fix(model-routing): commit-changer resolves step→hash refs on apply; edge-case resume notes (release NEED-DECISION, commit-change skip)

This commit is contained in:
Bastien Chanot
2026-07-15 22:05:23 +02:00
parent bc8eede090
commit 2136953b2a
3 changed files with 19 additions and 6 deletions
+11 -5
View File
@@ -210,19 +210,25 @@ If the APPROVED CAPITALIZE ENTRIES are `none`/`skip`, skip this phase
entirely — no memory commit.
Otherwise:
1. Append the approved entries verbatim to their target registry file(s)
1. **Resolve step refs → commit hashes first.** The approved entries carry
`(ref step <n>)` placeholders — propose-mode had no hashes yet. Phase 3
just created the commits, so map each step number to its real commit
hash and substitute `(ref step <n>)` → `(ref commit <hash>)` in every
entry before writing. An entry that names no step (e.g. a pure LRN
pattern) needs no ref.
2. Append the resolved entries to their target registry file(s)
(`.claude/memory/decisions.md`, `blockers.md`, `learnings.md`) and
update each file's `## Index` table. Add a one-line summary of the
commit batch to today's heading in `.claude/memory/journal.md`.
2. **Language rule**: written entries are ALWAYS in English regardless of
3. **Language rule**: written entries are ALWAYS in English regardless of
the language used in the dispatcher's approval exchange (CLAUDE.md
"Memory registries" § Language).
3. **Then commit the memory** — follow
4. **Then commit the memory** — follow
`$HOME/.claude/lib/capitalize-commit.md`: it surgically commits what
was just written (`.claude/memory` + `.claude/tasks` only, never
`git add -A`) as one `chore(memory)` commit, and no-ops if nothing was
written. This is a separate commit from the Phase 3 code commits — their
hashes are already anchored inside the entries.
written. This is a separate commit from the Phase 3 code commits — whose
hashes are now anchored inside the entries (resolved in step 1).
### Report
+3
View File
@@ -80,6 +80,9 @@ AskUserQuestion:
message judgment stays on the sonnet subagent (never redrawn inline on
the session model); show the redrawn plan and re-ask.
- `skip` → exit cleanly, no commits created, no `MODE: apply` dispatch.
Note: if the propose run created a `chore/*` branch (gitflow aiguillage
off a protected base), that branch stays checked out with the work
uncommitted — mention it so the user isn't surprised by the branch switch.
## STEP 3 — Gate 2: capitalize approval
+5 -1
View File
@@ -63,7 +63,11 @@ prompt: "SPAN: prep <X.Y.Z>
Parse the `RELEASE-EXEC REPORT`:
- `STATUS: DONE` → continue to STEP 4, carrying the `TESTS` line forward.
- `STATUS: NEED-DECISION` → surface the exact question to the user, STOP
(don't guess the CHANGELOG wording on its behalf).
(don't guess the CHANGELOG wording on its behalf). Resume note: prep may
have already run `gitflow start release` (the release branch exists) — do
NOT re-dispatch `SPAN: prep` (it would BLOCK on the existing branch);
resolve the CHANGELOG on the current release branch, commit the prep, then
resume at STEP 4.
- `STATUS: BLOCKED` → surface the blocker verbatim, STOP.
### STEP 4 — HUMAN GATE: when to release