From bd9134ab4cec41922fab22ae21fb9321e578d72e Mon Sep 17 00:00:00 2001 From: bastien Date: Wed, 6 May 2026 18:23:40 +0200 Subject: [PATCH] optimize(commit-change): add Phase 2.5 mandatory approval checkpoint before commit execution (d4 target) --- agents/commit-changer.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/agents/commit-changer.md b/agents/commit-changer.md index c753f97..bef4d26 100644 --- a/agents/commit-changer.md +++ b/agents/commit-changer.md @@ -60,10 +60,34 @@ Guidelines: - **Order matters.** Commits should read in the order work happened. Earlier steps first. +### Phase 2.5: Checkpoint — present plan, get approval + +Before any `git add` or `git commit` runs, present the reconstructed plan: + +``` +COMMIT PLAN — step(s) from working tree + + 1. (): + files: + 2. (): + files: + ... + +Approve? (all / / edit / skip) +``` + +- `all` → execute the full plan in Phase 3. +- `` (e.g. `1,3`) → execute only the selected steps. +- `edit ` → user provides a corrected message or grouping for step N; redraw plan. +- `skip` → exit cleanly, no commits created. + +This gate is mandatory. Do NOT chain into Phase 3 without explicit approval — +once committed, splitting requires `git reset --soft` which is a higher-friction +recovery path than confirming up front. + ### Phase 3: Execute commits -Proceed directly — no confirmation needed. For each development step, -in chronological order: +After approval in Phase 2.5, for each approved step in chronological order: 1. Stage only the files for that step: `git add ` - If a single file has changes belonging to different steps and