forked from bchanot/claude
docs(plan): Task 8 — upgrade migrates every v1 dialect (user ask at the gate)
This commit is contained in:
1 parent
bfa062081f
commit
0ccd4af88f
2 files changed
+21
No files matched your search
@@ -27,5 +27,7 @@ Phase 4a of the context mod queue (BDR-125), TODO.md "Phase 4a, memory v2 write
|
||||
EXPECT: all suites green
|
||||
EVIDENCE: PENDING
|
||||
|
||||
13. [gated 2026-10-28] `memory.sh upgrade` migrates every measured v1 dialect (hyphen, pipe, `###` headings, title-suffix status, `date: · status:`, `**Statut** :`, no frontmatter) to v2: headings normalized to `## ID — title (date)`, frontmatter added, open/closed verdict of every entry identical before and after (oracle), idempotent; proven on copies of the 13 other projects. Applying it to those repos is a later per-repo pass, not this branch.
|
||||
|
||||
## FILE SCOPE
|
||||
lib/memory.sh (new), lib/tests/memory.test.sh (new), lib/tests/fixtures/* (new fixtures), lib/reconcile.sh, lib/tests/run-reconcile.sh, lib/memory-commit.sh, lib/capitalize-commit.md, lib/analyze-before-plan.md, skills/capitalize/SKILL.md, skills/close/SKILL.md, skills/prune-memory/SKILL.md (+ tests/run-deterministic.sh, test-prompts.json), skills/feat/SKILL.md, skills/bugfix/SKILL.md, skills/hotfix/SKILL.md, skills/ship-feature/SKILL.md, skills/commit-change/SKILL.md, agents/commit-changer.md, skills/init-project/SKILL.md, agents/onboarder.md, skills/onboard/SKILL.md, templates/memory/*.md, hooks/session-start.sh, CLAUDE.global.md (Memory registries), Makefile (suite glob already covers lib/tests/*.test.sh), .claude/memory/{decisions,learnings,blockers,evals}.md (Index removal + marker), mods/model-router/routing.json (only if a new row is needed), docs (CHANGELOG at STEP 8).
|
||||
@@ -525,3 +525,22 @@ Run: `grep -c '^## Index' .claude/memory/*.md` → 0 everywhere; `make test suit
|
||||
/home/bchanot/repos/bchanot/trucks_at_work
|
||||
```
|
||||
(pre-branch reader: `git show develop:lib/reconcile.sh > <tmp>` then source `<tmp>`; measured 2026-10-28 on copies: 13 of 13 distinct files identical.)
|
||||
|
||||
---
|
||||
|
||||
### Task 8: `upgrade` migrates every v1 dialect (user ask at the gate, 2026-10-28)
|
||||
|
||||
User at STEP 3: "Il faudrait un système de migration pour que les fichiers v1 deviennent des fichiers v2 pour tout harmoniser". Same files, same `.claude/memory/` place, versioned and pushed with the code; v2 = `format: 2` + no Index.
|
||||
|
||||
**Files:** `lib/memory.sh` (`upgrade` path only), `lib/tests/memory.test.sh` (new T15 block), `lib/tests/fixtures/blockers-v1-dialects.md` (extend if needed).
|
||||
|
||||
**Behaviour** (replaces the dialect refusal of Deviation 6 for `upgrade` only):
|
||||
1. No frontmatter → prepend the matching `templates/memory/<name>.md` frontmatter (with `format: 2`) and keep the file's own body verbatim below it.
|
||||
2. Heading normalization, entry headings only (`^#+ *PREFIX-[0-9]+`): `## ID - t`, `## ID | date | t`, `### ID — t`, `## ID — t — date` → `## ID — t (date)`; the date comes from the heading, else the Index row, else the first `Date`/`date:` body line, else none. The title text is kept verbatim (only separators change). IDs never change.
|
||||
3. Status preservation: before rewriting, compute every entry's open/closed verdict with the v1 lexical reader (reconcile's legacy path, blockers) and the status word (all registries); after rewriting, if the strict v2 parser would read a different verdict or no status where the legacy reader had one, append `- **Status (<today>, upgrade)**: <word>` to that entry.
|
||||
4. Oracle (file untouched on any failure, rc 2, culprit named): same ID set and order; every entry's verdict before == after (blockers via the legacy reader vs `memory_closed`, others by status word when one existed); `check` green; idempotent second run.
|
||||
5. `upgrade` no longer refuses any of the measured dialects; it refuses only what the oracle cannot prove.
|
||||
|
||||
**Tests (T15):** one fixture per dialect (hyphen, pipe, `###`, title-suffix `— RESOLVED`, `date: … · status:`, `**Statut** :`, no frontmatter) → upgraded, `check` green, verdicts preserved, idempotent; a tampered case where the oracle refuses and the file stays byte-identical. Proof on copies (read-only on the real repos): `upgrade` on a copy of each of the 13 other projects' registries is oracle-green; report the per-repo line counts.
|
||||
|
||||
**Out of this branch:** applying it to the 13 other repos happens after the merge, one `chore/memory-v2` branch per repo, user approval per repo (phase 0b pattern), committed through `/commit-change` (a heading rename is an in-place edit, memory-commit refuses it by design).
|
||||
Reference in new issue
Block a user