feat(gitflow): chore branch type + aiguillage for standalone memory/doc skills

Standalone /capitalize /close /prune-memory /reconcile no longer lean on the .claude/** hook exemption when run on main/develop: the aiguillage branches them to chore/* off develop before writing. New chore type (base develop, finish->develop) added to the lib; hook unchanged (chore/* non-protected). Closes the leak where standalone memory work (memory IS the work, no code branch to follow) landed direct on a protected base. 64/64 gitflow-test green, shellcheck clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNaYKPEkjH1jbgoX1TwKMX
This commit is contained in:
Bastien Chanot
2026-07-01 13:25:36 +02:00
co-authored by Claude Opus 4.8
parent 53bd7beee8
commit e8807a7333
9 changed files with 82 additions and 28 deletions
+11 -7
View File
@@ -168,23 +168,27 @@ Every git action follows gitflow — inside a skill AND for ad-hoc commits made
outside one on direct request. The model is universal across all projects.
### Branch model
`main` (prod) · `develop` (integration, off main) · `feature/*` + `bugfix/*`
(off develop → develop) · `release/*` (off develop → main + back-merge develop)
· `hotfix/*` (off main → main + develop [+ any open release/*]). `master`→`main`
everywhere.
`main` (prod) · `develop` (integration, off main) · `feature/*` + `bugfix/*` +
`chore/*` (off develop → develop; `chore/*` = memory/doc maintenance, e.g.
standalone `/capitalize` `/prune-memory` `/reconcile`) · `release/*` (off develop →
main + back-merge develop) · `hotfix/*` (off main → main + develop [+ any open
release/*]). `master`→`main` everywhere.
### Rules for every git action
- **Never commit code directly on `main` or `develop`.** Branch first from the
correct base, named `<type>/<name>`. (`.claude/**` memory/config commits are
exempt — they follow the work, not the code's gitflow.)
hook-exempt — they follow the work; but *standalone* memory/doc skills branch to
`chore/*` via the aiguillage rather than lean on that exemption.)
- **Branch + merge via the lib, never by hand** — the directed-merge + hotfix
fan-out logic lives there once:
`bash ~/.claude/lib/gitflow.sh start <type> <name>` · `… finish`.
- **`gitflow finish` (merge) only on an explicit human signal** ("merge it",
"feature OK") — never because tests pass, a plan step says "merge", or a verb
("ship") implied it.
- **Assistance flows** (`/feat` `/bugfix` `/hotfix`) auto-branch on a protected
base (the aiguillage); on a working branch they commit in place, never finish.
- **Assistance flows** (`/feat` `/bugfix` `/hotfix`) AND **standalone memory/doc
skills** (`/capitalize` `/close` `/prune-memory` `/reconcile`, type `chore`)
auto-branch on a protected base (the aiguillage); on a working branch they commit
in place, never finish.
- **New/onboarded projects** get the model + the versioned pre-commit hook via
`gitflow init` (init-project STEP 5f, onboard STEP 2.6).