## 1. Write routing rule to ~/.claude/CLAUDE.md

- [x] 1.1 Add a "Memory routing" section to `~/.claude/CLAUDE.md` with:
  - Vault (`memory-vault`) for: conventions, tool behavior, client facts, patterns that generalize beyond one repo
  - Project graph (`memory-project`) for: codebase structure, module relationships, what exists where in the current repo
  - Decision heuristic: "Would this be useful outside this repo, next year?" — yes → vault; no → project graph

## 2. Rename memory-query → memory-vault and update SKILL.md

- [x] 2.1 Rename `~/.claude/plugins/memory/skills/memory-query/` to `memory-vault/`
- [x] 2.2 Rewrite `SKILL.md`:
  - Replace description frontmatter to reflect vault scope
  - Add explicit scope statement: "cross-project evergreen knowledge — not codebase structure"
  - Remove the god-node section entirely (no injected hub note required)
  - Keep: query/path/explain patterns with `--budget 2000`, tag-scoped caution note (ADR-014), episodic → memsearch redirect
  - Add write guidance: use `memory-write` for knowledge that generalizes; decision heuristic points to `~/.claude/CLAUDE.md` routing rule

## 3. Create memory-project skill

- [x] 3.1 Create directory `~/.claude/plugins/memory/skills/memory-project/`
- [x] 3.2 Write `SKILL.md` with sections:
  - **Scope** — project graph at `./graphify-out/graph.json`; codebase structure only
  - **Onboard** — `graphify extract . --backend ollama --model qwen2.5-coder:7b`, then `graphify cluster-only .`, then add `graphify-out/` to `.gitignore`; note AST-only cost for code repos; confirm graph.json exists before reporting done
  - **Incremental update** — `graphify update .` for routine edits; `graphify update . --force` for structural changes (renames, deletions, moves); suggest update after major refactors
  - **Remove** — delete `graphify-out/`; graph is rebuildable; leave gitignore entry
  - **Query** — `graphify query "<question>" --graph ./graphify-out/graph.json`; delegate traversal mechanics to `memory-vault` (no duplication)
  - **Graph path discovery** — `session-context.sh` injects path if graph exists; if no path injected in project context, suggest onboard
  - **Constraints** — never commit `graphify-out/`; model is `qwen2.5-coder:7b`; gitignore entry survives deletion

## 4. Trim session-context.sh

- [x] 4.1 Edit `~/.claude/plugins/memory/hooks/session-context.sh`:
  - Remove: vault graph report output, live convention query, journal pointer
  - Keep: conditional check for `<project-root>/graphify-out/graph.json`; if exists, emit the absolute path; else emit nothing

## 5. Mirror to .codex/ and .pi/

- [x] 5.1 Rename `.codex/skills/memory-query/` → `memory-vault/`; replace SKILL.md with the updated content from step 2
- [x] 5.2 Create `.codex/skills/memory-project/SKILL.md` with the content from step 3
- [x] 5.3 Rename `.pi/skills/memory-query/` → `memory-vault/`; replace SKILL.md with the updated content from step 2
- [x] 5.4 Create `.pi/skills/memory-project/SKILL.md` with the content from step 3

## 6. Verify against spec

- [x] 6.1 Check Requirement 1: routing rule exists in `~/.claude/CLAUDE.md` with vault/project distinction and decision heuristic
- [x] 6.2 Check Requirement 2: `memory-vault` SKILL.md has no god-node section; has scope statement; query patterns present; tag-caution retained
- [x] 6.3 Check Requirement 3: `memory-project` SKILL.md covers all lifecycle operations; query delegates to memory-vault; constraints stated; gitignore contract explicit
- [x] 6.4 Check Requirement 4: `session-context.sh` emits only the graph path pointer; vault report, convention query, journal pointer are gone
- [x] 6.5 Check Requirement 5: content of `memory-vault/SKILL.md` and `memory-project/SKILL.md` is identical across `~/.claude/plugins/memory/skills/`, `.codex/skills/`, `.pi/skills/`
