diff --git a/agents/commit-changer.md b/agents/commit-changer.md index 67f627d..e7b4e95 100644 --- a/agents/commit-changer.md +++ b/agents/commit-changer.md @@ -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/` 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: diff --git a/skills/commit-change/SKILL.md b/skills/commit-change/SKILL.md index 39fb879..9f4ce86 100644 --- a/skills/commit-change/SKILL.md +++ b/skills/commit-change/SKILL.md @@ -23,5 +23,8 @@ If unreachable, emit `Commit-changer agent missing.` and STOP. Never auto-commit Pre-flight checks (the agent should also perform, but flag here): - Detached HEAD or unmerged conflicts → STOP, report state. - Identity unconfigured (`git config user.email` empty) → STOP, ask user. +- On a protected base (`main`/`develop`) the agent runs the gitflow + aiguillage (Phase 0) and branches to `chore/*` before committing — code + never lands directly on a protected branch. $ARGUMENTS