fix(commit-change): add gitflow aiguillage before commit

commit-changer committed code autonomously with no branch precondition
(gitflow-conformity §2a, verified MEDIUM CONFIRMED) — on develop/main it
attempted a direct code commit, backstopped only by the pre-commit hook.
Adds Phase 0: the same `gitflow-aiguillage.md` mechanism hotfixer/bugfixer/
feater already use (TYPE=chore) — branches to chore/* on a protected base,
no-op on a working branch — plus a report-only fallback (no develop / no
lib -> ask human, don't auto-branch). Commit-plan gate + scoped staging
untouched. SKILL.md pre-flight notes the aiguillage.

Dry-run (throwaway repos, REAL lib + REAL pre-commit hook) — both paths:
  CASE 1 on develop: aiguillage -> chore/commit-pending, code commit
    SUCCEEDS, hook never blocks; contrast: same commit direct on develop
    is BLOCKED -> aiguillage is what avoids it. PASS
  CASE 2 no develop: fallback -> no auto-branch, changes uncommitted,
    no chore/* created, ask human. PASS
This commit is contained in:
Bastien Chanot
2026-07-09 11:31:59 +02:00
parent 2741e8b239
commit 9d9c55e87c
2 changed files with 16 additions and 0 deletions
+13
View File
@@ -18,6 +18,19 @@ on the amount and variety of changes — could be 1, could be 20.
## Workflow
### Phase 0: Gitflow aiguillage (before any commit)
**Follow `$HOME/.claude/lib/gitflow-aiguillage.md` — your type = `chore`.**
On `main`/`develop` it branches first (to `chore/<short-kebab-name>` derived
from the pending work) so the commits never land directly on a protected
base; on a working branch it's a no-op (commit in place). Never `finish`,
never `merge`, never `push` — this engine only commits.
**Report-only fallback.** If `develop` doesn't exist or
`$HOME/.claude/lib/gitflow.sh` is unavailable, do NOT auto-branch: report the
current branch state and ask the user which branch to commit on before
proceeding.
### Phase 1: Gather context
Run these commands to understand the full picture: