forked from bchanot/claude
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:
co-authored by
Claude Opus 4.8
parent
53bd7beee8
commit
e8807a7333
@@ -50,6 +50,13 @@ Running `/capitalize` right after a ritual should propose (near) nothing.
|
||||
This skill is NOT `/prune-memory` (registry curation — merge, compress,
|
||||
mark-superseded). It only appends.
|
||||
|
||||
## Gitflow aiguillage (before any write)
|
||||
|
||||
Before STEP 4 writes anything, follow `$HOME/.claude/lib/gitflow-aiguillage.md`
|
||||
— this skill's TYPE = `chore`. On `main`/`develop` it branches to `chore/<name>`
|
||||
off develop, so the memory commit lands on a branch, never direct on a protected
|
||||
base; on a working branch it proceeds in place. Never `gitflow finish` (human-gated).
|
||||
|
||||
## STEP 0 — PRECHECK
|
||||
|
||||
```bash
|
||||
|
||||
@@ -34,4 +34,7 @@ Ritual answers are deduped like any other candidate — a dup is dropped and its
|
||||
existing ID shown, not re-logged. This is the upgrade over the legacy `/close`,
|
||||
which wrote ritual answers fresh with no dedup.
|
||||
|
||||
The gitflow aiguillage (branch to `chore/*` on a protected base before writing)
|
||||
runs inside `capitalize` — not duplicated here.
|
||||
|
||||
→ Use the Skill tool to launch `capitalize` with argument `--ritual`.
|
||||
|
||||
@@ -68,11 +68,13 @@ gives a **real-time, explicit go for THIS merge** — "merge it", "feature OK",
|
||||
|
||||
All of these mean: present the merge as a question, then wait for the explicit go.
|
||||
|
||||
## Aiguillage (assistance skills)
|
||||
## Aiguillage (assistance + standalone memory/doc skills)
|
||||
|
||||
On a protected base, assistance skills (`feat`/`bugfix`/`hotfix`) call
|
||||
`start <type>` to branch first; on a working branch they commit in place. Same
|
||||
`protected-base` predicate the out-of-skill hook uses.
|
||||
On a protected base, assistance skills (`feat`/`bugfix`/`hotfix`) AND the standalone
|
||||
memory/doc skills (`capitalize`/`close`/`prune-memory`/`reconcile`, TYPE `chore`)
|
||||
call `start <type>` to branch first; on a working branch they commit in place. Same
|
||||
`protected-base` predicate the out-of-skill hook uses. Caller→type map + rationale:
|
||||
`lib/gitflow-aiguillage.md`.
|
||||
|
||||
## Common Mistakes
|
||||
|
||||
|
||||
@@ -62,6 +62,13 @@ If working tree is dirty on any registry file → STOP with: "Commit or
|
||||
stash pending changes in `.claude/memory/` first. Skill writes in-place.
|
||||
Git is the only backup."
|
||||
|
||||
## STEP 0b — Gitflow aiguillage (after PRECHECK, before any write)
|
||||
|
||||
PRECHECK first (clean tree = the backup). Then follow
|
||||
`$HOME/.claude/lib/gitflow-aiguillage.md` — this skill's TYPE = `chore`. On
|
||||
`main`/`develop` it branches to `chore/<name>` off develop so the curation lands
|
||||
on a branch; on a working branch it proceeds in place. Never `gitflow finish`.
|
||||
|
||||
## STEP 1 — AUDIT (per registry)
|
||||
|
||||
For each target registry (filter by `$ARGUMENTS` or all 5):
|
||||
|
||||
@@ -34,6 +34,8 @@ Not for: curating/compressing registries → `/prune-memory`. The skill never ed
|
||||
Plus **contradiction candidates** — `reconcile_contradiction_candidates`: accepted-BDR ⇄ open-chantier overlap, surfaced for human review.
|
||||
|
||||
## The gate (mandatory)
|
||||
**Before applying (A/B):** follow `$HOME/.claude/lib/gitflow-aiguillage.md` — TYPE `chore`. On `main`/`develop` the write-back branches to `chore/<name>` off develop first, so a reconciled TODO never lands direct on a protected base; on a working branch it applies in place. Never `gitflow finish` (human-gated).
|
||||
|
||||
Reconciling the TODO edits a tracked file → never silent. Show the proposed diff, then ask: **A** apply all · **B** select a subset · **C** touch nothing. Registries stay READ-ONLY (append-only; curation is `/prune-memory`).
|
||||
|
||||
## Honest limits (do not over-read the guarantee)
|
||||
|
||||
Reference in New Issue
Block a user