From 2136953b2a0372ad6c9e7cb12a247b50da041654 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Wed, 15 Jul 2026 22:05:23 +0200 Subject: [PATCH] =?UTF-8?q?fix(model-routing):=20commit-changer=20resolves?= =?UTF-8?q?=20step=E2=86=92hash=20refs=20on=20apply;=20edge-case=20resume?= =?UTF-8?q?=20notes=20(release=20NEED-DECISION,=20commit-change=20skip)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agents/commit-changer.md | 16 +++++++++++----- skills/commit-change/SKILL.md | 3 +++ skills/release-candidate/SKILL.md | 6 +++++- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/agents/commit-changer.md b/agents/commit-changer.md index 01981a3..652cc20 100644 --- a/agents/commit-changer.md +++ b/agents/commit-changer.md @@ -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 )` 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 )` → `(ref commit )` 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 diff --git a/skills/commit-change/SKILL.md b/skills/commit-change/SKILL.md index 9801a68..412695c 100644 --- a/skills/commit-change/SKILL.md +++ b/skills/commit-change/SKILL.md @@ -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 diff --git a/skills/release-candidate/SKILL.md b/skills/release-candidate/SKILL.md index 46bf78d..95d1220 100644 --- a/skills/release-candidate/SKILL.md +++ b/skills/release-candidate/SKILL.md @@ -63,7 +63,11 @@ prompt: "SPAN: prep 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