memory-index-synclisted
Install: claude install-skill Fr-e-d/GAAI-framework
# Memory Index Sync
## Purpose / When to Activate
Activate when:
- `/gaai-status` reports files on disk not registered in `index.md`
- After a batch of DEC files were created outside the `decision-extraction` skill
- As a lightweight post-delivery gate to confirm index integrity
- Before running `memory-refresh` or `memory-compact` (ensures index accuracy first)
This skill **heals drift** — it does NOT create new knowledge. It only registers things that already exist on disk but are missing from `index.md`.
---
## Process
### Step 1 — Decision Registry Sync
1. Read all registry files at `contexts/memory/` root (`index.md` + any `index-*.md` siblings such as `index-decisions.md` when Decision Registry has been extracted per file-size budget) — extract all registered DEC IDs from any of them
2. Read `archive/superseded-decisions.archive.md` "Superseded DEC entries" table — extract all archived DEC IDs (column 1)
3. Glob `decisions/DEC-*.md` — list all files on disk, extract IDs from filenames
4. For each DEC file on disk:
- Read its YAML frontmatter : `id`, `domain`, `level`, `title`, `status`, `superseded_by`, **`archived_to`** (coordinated with `memory-archive-superseded` skill)
- **If `archived_to:` field is set** (e.g. `archive/superseded-decisions.archive.md`) AND the DEC ID is present in the archive index: SKIP active registration. The DEC's active home is the archive. Do NOT add a row to the active Decision Registry. (Prevents undo of archive operation by `m