diff --git a/agents/client-handover-writer.md b/agents/client-handover-writer.md index 0273722..c608bed 100644 --- a/agents/client-handover-writer.md +++ b/agents/client-handover-writer.md @@ -533,7 +533,7 @@ After loops finish (success, stall, or override), capture: --- -## STEP 5 — COMMIT + PUSH (only if files changed) +## STEP 5 — COMMIT + PUSH STATE READ (only if files changed) ```bash CHANGED_DURING_PIPELINE=$(git diff --name-only "$PIPELINE_BASE_SHA"..HEAD) @@ -542,18 +542,18 @@ PENDING_CHANGES=$(git status --porcelain) If both empty → skip to STEP 6. -**Gitflow precondition (report-only fallback).** Before any commit or push, -confirm this is a gitflow repo: +**Gitflow precondition (report-only fallback).** Before any commit, +confirm this is a gitflow repo (the pipeline never pushes): ```bash git rev-parse --verify -q develop >/dev/null 2>&1 && echo DEVELOP_OK [ -f "$HOME/.claude/lib/gitflow.sh" ] && echo LIB_OK ``` -If `develop` is missing OR the gitflow lib is unavailable → **do NOT commit, -do NOT push.** Leave the changes in the working tree and record in the STEP 8 -summary: "Commit/push skipped — no gitflow model in this repo; publish the -listed changes manually before deploy." Continue to STEP 6. +If `develop` is missing OR the gitflow lib is unavailable → **do NOT commit +(and never push).** Leave the changes in the working tree and record in the +STEP 8 summary: "Commit skipped — no gitflow model in this repo; publish the +listed changes by hand before deploy." Continue to STEP 6. If `PENDING_CHANGES` non-empty → invoke /commit-change skill via subagent: diff --git a/agents/release-executor.md b/agents/release-executor.md index b86aa05..a102923 100644 --- a/agents/release-executor.md +++ b/agents/release-executor.md @@ -31,6 +31,9 @@ stop and report — never chain into the other span yourself. ### Input ``: the version number, already decided by the dispatcher before dispatch — you never derive it, never second-guess it, never bump it. +Format check only, by reading the string (never inside a Bash command): + must match ^[0-9]+\.[0-9]+\.[0-9]+$ (literal regex text, single +backslashes); anything else → STATUS: BLOCKED, nothing created. ### Steps 1. `bash "$HOME/.claude/lib/gitflow.sh" start release ` — forks from @@ -80,7 +83,7 @@ actual branch; never finish whatever happens to be checked out. main's release-merge commit). In auto-push mode finish pushes `main` and `develop` (best effort: the lib warns and returns 0 on a failed push; the dispatcher re-verifies with ahead counts) (BDR-095); in - manual push mode they stay local. The tag stays local until the + manual push mode, or with an invalid gitflow.autopush, they stay local. The tag stays local until the dispatcher's tag-push gate. ### Forbidden in this span diff --git a/skills/capitalize/SKILL.md b/skills/capitalize/SKILL.md index 1045007..5037ea7 100644 --- a/skills/capitalize/SKILL.md +++ b/skills/capitalize/SKILL.md @@ -343,7 +343,8 @@ Otherwise, from the `chore/` branch, THREE separate Bash calls, never comb Outcomes, evaluated IN THIS ORDER (finish rc 0, or rc 5/2/6 with the branch merged — the wording then starts with `merged, branch not deleted (rc ) —` instead of `merged to develop —`): -- **push mode `invalid`** → `merged to develop — gitflow.autopush= is not a boolean: the lib and hooks still push on an invalid value until run D (origin/develop is commit(s) behind, or unknown); fix the value by hand`. +- **push mode `invalid`, `ahead` > 0 or unknown** → `merged to develop — : treated as manual push mode by every reader, nothing pushed (origin/develop is commit(s) behind, or unknown). Fix the value by hand, then: ! git push origin develop` (append ` once a remote exists` when `ahead` is unknown). +- **push mode `invalid`, `ahead` = 0** → `merged to develop — : pushed anyway, a hook in this repo still fails open (likely a stale .githooks/: a session-start reconcile refreshes it, commit the refresh) or a manual push. Fix the value by hand.` - **`ahead` = 0** → `develop pushed` (auto-push mode did it). - **`ahead` = unknown** → `merged to develop — not on origin (no origin/develop ref; no remote or never fetched)`; push mode manual → add `You: ! git push origin develop once a remote exists`. - **`ahead` > 0, push mode `manual`** → `merged to develop — manual push mode: not pushed. You: ! git push origin develop`. @@ -360,7 +361,7 @@ CAPITALIZE COMPLETE — () TODO.md : checked , added journal.md : +1 line under ## committed : (chore(memory): …) | ⚠️ NOT committed (rc 3 — see closing line) - persisted : develop pushed | merged, manual push mode: not pushed | merged, not on origin (no origin/develop) | merged, push FAILED | merged, gitflow.autopush invalid ( behind) | finish rc , not merged | merged, branch not deleted (rc ) | on chore/, not merged (--no-push) + persisted : develop pushed | merged, manual push mode: not pushed | merged, not on origin (no origin/develop) | merged, push FAILED | merged, autopush invalid, nothing pushed ( behind) | merged, autopush invalid, pushed anyway (stale hook or manual push) | finish rc , not merged | merged, branch not deleted (rc ) | on chore/, not merged (--no-push) dropped as already-captured: LRN-023, BLK-006 ignored as noise: push/tag release ``` @@ -368,15 +369,16 @@ CAPITALIZE COMPLETE — () Then the closing line — pick by the STEP 5C persist result (`` = `Context flushed` for pre-wipe, `Session closed` for ritual): -- **auto-persisted (5C: finish rc 0 AND `ahead` = 0)** → `✅ + persisted to origin/develop (). Next session: read .claude/memory/ at startup.` +- **auto-persisted (push mode `auto`, finish rc 0 AND `ahead` = 0)** → `✅ + persisted to origin/develop (). Next session: read .claude/memory/ at startup.` On the `--no-push` path ONLY read TWO facts first, each its own Bash call: `bash "$HOME/.claude/lib/gitflow.sh" push-mode` and `git rev-list --count origin/chore/..chore/ 2>/dev/null || echo unknown` (`branch_ahead`). `` below is the verb's word. The WORKING-branch and rc 3 paths have no `chore/` and never use the mode. -- **--no-push, `branch_ahead` = 0** → `✅ + committed on chore/ — pushed to origin by the hooks (auto-push mode), NOT merged (--no-push). Merge when ready.` -- **--no-push, `branch_ahead` > 0 or unknown** → `✅ + committed on chore/ — this disk only, not pushed (), NOT merged. You: ! git push -u origin chore/; merge when ready.` With push mode `invalid`, append ` gitflow.autopush= is not a boolean: fix it by hand`. +- **--no-push, `branch_ahead` = 0** → `✅ + committed on chore/ — pushed to origin by the hooks (auto-push mode), NOT merged (--no-push). Merge when ready.` With push mode `invalid`, replace `(auto-push mode)` with `(: pushed anyway, a hook still fails open, likely stale, or a manual push; fix the value by hand, commit the .githooks refresh)`. +- **--no-push, `branch_ahead` > 0 or unknown** → `✅ + committed on chore/ — this disk only, not pushed (), NOT merged. You: ! git push -u origin chore/; merge when ready.` With push mode `invalid`, append ` : treated as manual push mode, nothing pushed; fix the value by hand`. - **manual (merged, `ahead` > 0)** → `✅ + merged to develop — manual push mode: not pushed. You: ! git push origin develop` -- **not on origin (merged, `ahead` unknown)** → `✅ + merged to develop — not on origin (no origin/develop ref).` Push mode manual → add `You: ! git push origin develop once a remote exists`. -- **invalid (merged)** → `⚠️ + merged to develop — gitflow.autopush= is not a boolean; lib/hooks still push on it until run D (origin/develop behind). Fix the value by hand.` +- **not on origin (push mode not `invalid`, merged, `ahead` unknown)** → `✅ + merged to develop — not on origin (no origin/develop ref).` Push mode manual → add `You: ! git push origin develop once a remote exists`. +- **invalid (merged, ahead > 0 or unknown)** → `⚠️ + merged to develop — : treated as manual push mode by every reader, nothing pushed (origin/develop behind). Fix the value by hand, then: ! git push origin develop` (+ ` once a remote exists` when unknown) +- **invalid (merged, ahead = 0)** → `⚠️ + merged to develop — : pushed anyway, a hook still fails open, likely stale (refreshed by the next session-start reconcile; commit the refresh) or a manual push. Fix the value by hand.` - **push failed after merge** → `✅ + merged to develop — ⚠️ push FAILED (); merged locally, push manually.` - **finish failed** → `⚠️ + finish rc : — chore/ kept, NOT merged; resolve by hand.` (rc 1/4 only; rc 5/2/6 with the branch merged use the outcome lines above with the `merged, branch not deleted (rc )` prefix, so the push state is still reported.) - **WORKING branch (rode a feature branch)** → `✅ + committed on . Integrates when the branch merges.` diff --git a/skills/client-handover/SKILL.md b/skills/client-handover/SKILL.md index d7df8f0..fa4acc3 100644 --- a/skills/client-handover/SKILL.md +++ b/skills/client-handover/SKILL.md @@ -45,7 +45,7 @@ The agent runs a **ship-and-handover pipeline** with explicit gates: - Re-invoke the audit subagent in audit mode: it re-scores and returns the next FIX BUNDLE; it applies nothing (a dispatched child cannot hold a gate). - Repeat up to `MAX_ITERATIONS` (default 5). - If still < 17/20 after cap → escalate to user with concrete remaining issues; user decides continue / stop / manual intervention. -4. **COMMIT + PUSH** — If files changed during fix loops, run /commit-change (atomic logical commits); the gitflow hooks push in auto-push mode, otherwise (manual push mode, or a hook push that failed) the agent tells the user to push with `! git push -u origin ` BEFORE the deploy pause. +4. **COMMIT + PUSH STATE READ** — If files changed during fix loops, run /commit-change (atomic logical commits); the gitflow hooks push in auto-push mode, otherwise (manual push mode, an invalid gitflow.autopush, or a hook push that failed) the agent tells the user to push with `! git push -u origin ` BEFORE the deploy pause. 5. **DEPLOY PAUSE** — List exact deploy artifacts: changed files since baseline, deploy hints from project (vercel.json, netlify.toml, Dockerfile, .github/workflows/deploy.yml, etc.), and the deploy process in plain words. Use AskUserQuestion: "Deploy done? (Yes / Not yet / Skip validate)". Block until Yes or Skip. 6. **/web-validate (live site)** — Run validator-analyzer against the deployed URL. Capture `SCORE_VALIDATE`. 7. **GATE — per-axis threshold ≥17/20** — Compute final `SCORE_*_AFTER` for SEO classique, GEO (IA), HARDEN, VALIDATE. If ANY < 17/20: STOP. Generate `.claude/audits/HANDOVER-ROADMAP.md` with prioritized analysis of what's blocking each below-threshold axis. Do NOT write the client deliverable. Report to user.