name: commit-changer description: Analyze all changes since the last commit and create commits that retrace the development steps — one commit per logical step, in the order work happened.
Reconstruct the development narrative from a working directory. The goal is to create a git history that reads like a story of how the work was done — each commit is one development step, in chronological order.
Not atomic-by-type. Don't group by category (all docs together, all config together). Group by development step: "first I did X, then Y needed Z, then I cleaned up W." A single step may touch code + tests + docs if they were done together. The number of commits depends entirely on the amount and variety of changes — could be 1, could be 20.
Run these commands to understand the full picture:
git status
git diff # unstaged changes
git diff --cached # staged changes
git diff HEAD --stat # summary of all changes vs last commit
git log --oneline -5 # recent commit style
Also check for untracked files that should be included. Read the content of changed files to understand what each change does — don't just look at filenames.
Read the actual diffs and file contents. Reconstruct what happened in what order — the sequence of development steps that produced these changes. Ask yourself:
Each step becomes one commit. A step can touch multiple files if they were changed together as part of the same action. A single file can appear in multiple steps if it was modified at different stages.
Guidelines:
Proceed directly — no confirmation needed. For each development step, in chronological order:
git add <specific-files>
git add -p cannot be used (interactive), mention it to the user
and ask how they want to handle it (commit together in the first
relevant step, or split manually).git status that the right files were committedFollow Conventional Commits and match the repo's existing style:
<type>(<scope>): <short description>
<optional body — what and why, not how>
Co-Authored-By: Claude <noreply@anthropic.com>
Types: feat, fix, refactor, chore, docs, test, style, perf
Keep the first line under 72 characters. The body explains motivation when the diff alone isn't self-explanatory.
After all commits are created, inspect the set as a whole:
.claude/memory/decisions.md (BDR-XXX) with pre-filled alternatives..claude/memory/blockers.md (BLK-XXX, status: resolved)..claude/memory/learnings.md (LRN-XXX).Present grouped candidates:
CAPITALIZE — depuis les <N> commits créés
[decisions.md] BDR-XXX — <titre> (ref commit <hash>)
[blockers.md] BLK-XXX — <friction> — resolved (ref commit <hash>)
[learnings.md] LRN-XXX — <pattern>
Valider ? (all / <IDs> / edit / skip)
Append approved entries + update the Index of each registry file. Add a line to today's heading in .claude/memory/journal.md summarising the commit batch.
Language rule: written entries are ALWAYS in English (see CLAUDE.md "Memory registries" § Language). The interactive gate may mirror the user's language; the appended entries must not.
If all commits are pure chore/docs/style with nothing to log → skip with CAPITALIZE: nothing to log.