Merge feature/effort-tiering into develop

This commit is contained in:
bastien
2026-09-28 21:21:32 +02:00
70 changed files with 529 additions and 14 deletions
+10
View File
@@ -128,6 +128,7 @@ rules:
| BDR-104 | 2026-09-28 | MengTo motion pack: vendor 5 scroll skills pinned via shared lib/vendor-skills.sh + build personal skill site-motion; 17 skipped | accepted | | BDR-104 | 2026-09-28 | MengTo motion pack: vendor 5 scroll skills pinned via shared lib/vendor-skills.sh + build personal skill site-motion; 17 skipped | accepted |
| BDR-105 | 2026-09-28 | skill-catalog prune: 9 gstack out via GSTACK_REMOVED, full ⊇ every profile, max = everything, brightdata + frontend-design plugin off, security-guidance Stop review off, design gate asks `21st login` and waits | accepted | | BDR-105 | 2026-09-28 | skill-catalog prune: 9 gstack out via GSTACK_REMOVED, full ⊇ every profile, max = everything, brightdata + frontend-design plugin off, security-guidance Stop review off, design gate asks `21st login` and waits | accepted |
| BDR-106 | 2026-09-28 | superpowers: 7 wired skills vendored at v6.4.1 via lib/vendor-skills.sh (always_on lock class), plugin + marketplace dropped, citers by bare name, doctrine map for the 4 non-vendored refs | accepted | | BDR-106 | 2026-09-28 | superpowers: 7 wired skills vendored at v6.4.1 via lib/vendor-skills.sh (always_on lock class), plugin + marketplace dropped, citers by bare name, doctrine map for the 4 non-vendored refs | accepted |
| BDR-107 | 2026-09-28 | Effort tiering: session high, effort pins on 20 agents (BDR-077 second axis), entry level on 30 skills, five paired shifter skills, max at loop caps + ship-feature 4b | accepted |
--- ---
@@ -1330,3 +1331,12 @@ Branch feature/user-writing-web-rules, UNMERGED (human gate).
- **Caveats**: upstream cross-refs to the plugin prefix and the 8 dropped skills remain in the vendored text (a call on a dropped name fails, doctrine map applies); no upstream auto-update (bump the pin deliberately); the harness hot-loaded the 7 bare names in the running session after link.sh, the plugin names leave at restart; `superpowers-marketplace` cache dir may linger empty; other machines: `make plugin` (vendors) + `make link`, then uninstall the cached plugin by hand (CHANGELOG). - **Caveats**: upstream cross-refs to the plugin prefix and the 8 dropped skills remain in the vendored text (a call on a dropped name fails, doctrine map applies); no upstream auto-update (bump the pin deliberately); the harness hot-loaded the 7 bare names in the running session after link.sh, the plugin names leave at restart; `superpowers-marketplace` cache dir may linger empty; other machines: `make plugin` (vendors) + `make link`, then uninstall the cached plugin by hand (CHANGELOG).
- **Reference**: 18f8c89 (wiring), ddea411 (citers/docs/settings); contract `2026-09-28-superpowers-vendored-1357` (12 criteria, oracles in `.oracles/`), plan r3 after 3 challengers (simplicity CONCERNS(2), robustness CONCERNS(3), correctness FATAL(5)) + confirmation CONCERNS(1); executors 2/2 DONE first pass; GATE 0 MET, verifier CONFORME 12/12, security PASS; catalog 82 skills, plugin passive cost 670 t (ui-ux-pro-max only). Links [[BDR-105]] [[BDR-102]] [[BDR-104]] [[BDR-065]] [[LRN-178]] [[EVAL-034]]. - **Reference**: 18f8c89 (wiring), ddea411 (citers/docs/settings); contract `2026-09-28-superpowers-vendored-1357` (12 criteria, oracles in `.oracles/`), plan r3 after 3 challengers (simplicity CONCERNS(2), robustness CONCERNS(3), correctness FATAL(5)) + confirmation CONCERNS(1); executors 2/2 DONE first pass; GATE 0 MET, verifier CONFORME 12/12, security PASS; catalog 82 skills, plugin passive cost 670 t (ui-ux-pro-max only). Links [[BDR-105]] [[BDR-102]] [[BDR-104]] [[BDR-065]] [[LRN-178]] [[EVAL-034]].
- **Amendment 2026-09-28 (merge)**: `gitflow finish` → 65665a5, no conflict, pushed, local + origin copies removed; the 7 vendored skills stay linked after the merge. Whole prune (tiers 1 + 2) on develop. - **Amendment 2026-09-28 (merge)**: `gitflow finish` → 65665a5, no conflict, pushed, local + origin copies removed; the 7 vendored skills stay linked after the merge. Whole prune (tiers 1 + 2) on develop.
## BDR-107 — Effort tiering: session high, agent pins, skill entry levels, paired phase shifts, max at escalation [accepted] (2026-09-28)
- **Decision**: settings `effortLevel` high (was xhigh). `effort:` pin on 20 repo-authored agents by role: low appliers (hotfixer, release-executor, plugin-probe, validator-analyzer), medium executors (feater, bugfixer, code-cleaner, onboarder, scaffolder), high judgment (refactorer, analyzer, commit-changer, doc-syncer, handover-doc-writer), xhigh challengers + gates (plan-challenger, plugin-advisor, verifier, security-auditor, seo-analyzer, geo-analyzer); none on interviewer/client-handover-writer (inline-load), status-reporter (haiku), impeccable-* (vendored). `effort:` on 28 tracked user-invoked skills = run entry level (low bookkeeping, medium gitflow/prune-memory, high feat/hotfix/bugfix/refactor/audits-with-fix, xhigh orchestrators) + xhigh on vendored brainstorming/writing-plans (skills-external/, re-applied by install-plugins STEP 8e). Five shifter skills `effort-{low,medium,high,xhigh,max}` loaded by orchestrators per `lib/effort-shift.md`: medium at dispatch span, own level before challenge synthesis, low at bookkeeping tail, max at verify-secure caps (GATE 0/1/2) + ship-feature 4b; re-assert after nested skill / prose gate. STOP texts name `$CLAUDE_EFFORT`, suggest `/effort-max`. statusline shows `$CLAUDE_EFFORT`; banner warns on `CLAUDE_CODE_EFFORT_LEVEL`. Census `lib/tests/effort-routing.test.sh`. Audit script `lib/effort-audit.py`.
- **Why**: session-wide xhigh burned thinking on bookkeeping; EVAL-035: 97 % of thinking in the main loop, sonnet subagents ~26 tok/request → main-loop levers (entry level, shifts) carry the savings; pins = explicitness + future models. A/B `/reconcile` high→low: requests 18→15, output −27 %, thinking −28 %, time −19 % (EVAL-036).
- **Harness facts (2.1.283)**: skill `effort:` applies on user slash invocation and on interactive Skill-tool load; the Skill-tool load applies ONLY when paired with another tool call in the same message (lone call = no-op); re-load re-applies (text deduped); not applied in `-p`/SDK; prompt cache kept across a shift; `CLAUDE_CODE_EFFORT_LEVEL` beats every frontmatter; one effort per agent file, no call-site override; unpinned agents inherit the level in force at dispatch.
- **Alternatives rejected**: executor pins only (they barely think); escalation-diagnoser agent fable+max (no context, one more agent; main-loop max keeps the failure context); reflection in fable skill-runner children with session medium (loses interactivity); settings.json rewrite mid-run (LRN-098 class); `maxEffortLevel` caps (hide a mis-pin the census should fail); pins on machine-generated skills (find-docs: ctx7 regenerates, gitignored) or gstack skills (spec, skillify).
- **Caveats**: shifts inert headless; a prose gate ending the turn resets to session level (re-assert wired in bugfix and ship-feature 4b); mode-based agents pin their judgment mode; a shift paired with a built-in judgment dispatch would downgrade it (pair with Read/Bash instead); `lib/gitflow-test.sh` T16a red on this machine = gitleaks not installed, unrelated.
- **Refs**: spec `docs/superpowers/specs/2026-09-28-effort-tiering-design.md`, plan `docs/superpowers/plans/2026-09-28-effort-tiering.md`, [[LRN-179]], [[EVAL-035]], [[EVAL-036]], [[BDR-077]].
- **Correction (2026-09-28)**: EVAL-035 counted one record per content block (~2.8× on request counts); deduped figures in [[EVAL-037]]: main-loop thinking 99.9% of total thinking (was 96.6%), thinking 5.6% of weighted cost (was 8.4%), sonnet think/request 26→0.2 tok. Conclusions hold, sharper: main loop still carries almost all thinking, executors stay cheap.
+24
View File
@@ -55,6 +55,9 @@ rules:
| EVAL-032 | 2026-09-27 | 4 parallel feater executors, one tree, gate loop: verifier caught a vacuous test, security caught a partial-write; my oracles wrong twice | keep same-tree parallel dispatch with disjoint FILE SCOPE + orchestrator-owned shared files; blind verifier stays; measure oracles on precedents | | EVAL-032 | 2026-09-27 | 4 parallel feater executors, one tree, gate loop: verifier caught a vacuous test, security caught a partial-write; my oracles wrong twice | keep same-tree parallel dispatch with disjoint FILE SCOPE + orchestrator-owned shared files; blind verifier stays; measure oracles on precedents |
| EVAL-033 | 2026-09-28 | case 7: 2 analyzers + 2 executors + 3 re-dispatches; verifiers caught shape, convention and my wrong count; security caught an env override | brief names the scratchpad path explicitly (3 /tmp leftovers); keep blind verifiers; count claims get an artifact | | EVAL-033 | 2026-09-28 | case 7: 2 analyzers + 2 executors + 3 re-dispatches; verifiers caught shape, convention and my wrong count; security caught an env override | brief names the scratchpad path explicitly (3 /tmp leftovers); keep blind verifiers; count claims get an artifact |
| EVAL-034 | 2026-09-28 | catalog prune + 21st gate: two challenge rounds each found what r3 missed (nested SKILL.md, fixture cp lists, in-session export); my ledgers failed twice (heredoc CHECKs); 5 executors DONE first pass; verifier gap = tool false positive | keep the confirmation pass on any plan that changed materially; one-line CHECKs; grep fixture cp lists before a `source` | | EVAL-034 | 2026-09-28 | catalog prune + 21st gate: two challenge rounds each found what r3 missed (nested SKILL.md, fixture cp lists, in-session export); my ledgers failed twice (heredoc CHECKs); 5 executors DONE first pass; verifier gap = tool false positive | keep the confirmation pass on any plan that changed materially; one-line CHECKs; grep fixture cp lists before a `source` |
| EVAL-035 | 2026-09-28 | thinking-share measurement, 6 days of transcripts (10,955 requests): thinking = 8 % of weighted spend, 97 % of it in the main loop; sonnet subagents at xhigh think 26 tok/request; cache reads = 53 % | pins = explicitness not savings; main-loop effort + context size are the levers; A/B after rollout |
| EVAL-036 | 2026-09-28 | A/B `/reconcile` headless, session high vs skill entry low: requests 18→15, output 12374→9038 (−27 %), thinking 3135→2248 (−28 %), time 96.5→78.4 s (−19 %), n=1 | keep low on bookkeeping skills; repeat on a reflection skill before touching the medium/high split |
| EVAL-037 | 2026-09-28 | correction of EVAL-035/036 counts: transcript records are per content block; deduped by message.id → main-loop thinking share 99.9%, thinking share of weighted cost 5.6%, sonnet think/msg 26→0.2, A/B requests 9→8 | conclusions hold (sharper: main-loop thinking 96.6%→99.9%, weighted-cost thinking corrected 8.4%→5.6%); effort-audit.py dedupes from a3b479e+ |
--- ---
@@ -330,3 +333,24 @@ Dogfood: 3 blind lenses attacked the v1 plan for the plan-challenge feature itse
- **Result**: prune — challengers closed 8 MAJOR at r3, the confirmation pass still found 1 BLOCKER (nested SKILL.md in browser-skills/openclaw/node_modules) + 3 MAJOR (setup's global symlink, update-all 3rd copy, fixture cp lists); executors 4/4 DONE first pass; GATE 0 UNMET(4) = my heredoc CHECKs ([[LRN-176]]); verifier ECARTS(1) = floor-guard false positive ([[BLK-023]]), CONFORME at iteration 2; security PASS. 21st gate — three lenses: my shared-helper reflex = BLOCKER ×2 ([[LRN-178]]), my `export TWENTYFIRST_TOKEN` remedy = MAJOR (env does not persist); confirmation pass pinned the diagnostic format; executor DONE first pass, CONFORME 7/7, PASS. - **Result**: prune — challengers closed 8 MAJOR at r3, the confirmation pass still found 1 BLOCKER (nested SKILL.md in browser-skills/openclaw/node_modules) + 3 MAJOR (setup's global symlink, update-all 3rd copy, fixture cp lists); executors 4/4 DONE first pass; GATE 0 UNMET(4) = my heredoc CHECKs ([[LRN-176]]); verifier ECARTS(1) = floor-guard false positive ([[BLK-023]]), CONFORME at iteration 2; security PASS. 21st gate — three lenses: my shared-helper reflex = BLOCKER ×2 ([[LRN-178]]), my `export TWENTYFIRST_TOKEN` remedy = MAJOR (env does not persist); confirmation pass pinned the diagnostic format; executor DONE first pass, CONFORME 7/7, PASS.
- **Anomalies**: (1) both times the confirmation pass found real defects after "all MAJOR closed" → r3 is not a stopping point; (2) every gate failure of the day was mine (ledger format, tool pattern), none the executors'; (3) verifier and challengers each re-ran the live oracles themselves (link.sh, `set full`, the gate) — cheap, decisive; (4) the user's rule ("full ⊇ every profile") arrived at pass B and inverted a settled plan step: pass B before challenge is the right order. - **Anomalies**: (1) both times the confirmation pass found real defects after "all MAJOR closed" → r3 is not a stopping point; (2) every gate failure of the day was mine (ledger format, tool pattern), none the executors'; (3) verifier and challengers each re-ran the live oracles themselves (link.sh, `set full`, the gate) — cheap, decisive; (4) the user's rule ("full ⊇ every profile") arrived at pass B and inverted a settled plan step: pass B before challenge is the right order.
- **Action**: keep the single confirmation pass mandatory when a plan changed materially; contract CHECKs one line, files under `.oracles/`; grep fixture `cp` lists before any new `source`; run the live oracle once by hand before dispatching the verifier. - **Action**: keep the single confirmation pass mandatory when a plan changed materially; contract CHECKs one line, files under `.oracles/`; grep fixture `cp` lists before any new `source`; run the live oracle once by hand before dispatching the verifier.
## EVAL-035 — effort burn measured, premise corrected: subagents don't think, the main loop does
- **Date**: 2026-09-28
- **Output checked**: my hypothesis "executors inherit xhigh → that is the burn" vs `effort_split2.py` (scratchpad) over `~/.claude/projects/*`: main jsonl + `*/subagents/*.jsonl`, `isSidechain` split; weights output ×5, cache read ×0.1, cache write ×1.25.
- **Result**: main loop 67 % of weighted spend, 97 % of thinking (Fable 1,430 think-tok/request); sonnet subagents 5,268 requests at xhigh, 26 think-tok/request; thinking = 8 % of spend, all output 16 %, cache reads 53 % (main-loop context ~320 k tok/request). Window 6 days only. Indirect effect of effort (fewer steps → fewer requests) unmeasured.
- **Anomaly**: design was framed around executor pins; one script inverted it before any edit. Measure before routing.
- **Action**: pins stay (explicitness, future models); main-loop skill effort + phase shifts carry the savings; A/B `/reconcile` high vs xhigh after rollout; context size = bigger lever, separate track.
## EVAL-036 — A/B `/reconcile` headless: skill entry level low vs session high
- **Date**: 2026-09-28
- **Method**: Task 4 of the effort-tiering plan; `claude -p "/reconcile" --output-format json --allowedTools Read Grep Glob "Bash(git status:*)" "Bash(git log:*)"` before (session `high`, no frontmatter) and after (`effort: low` on the skill); per-request `usage` summed from the session jsonl.
- **Result**: requests 18→15, output tokens 12374→9038 (−27 %), thinking 3135→2248 (−28 %), duration 96.5 s→78.4 s (−19 %); transcript effort field high→low confirmed. n=1, same repo state.
- **Anomaly**: none; the indirect effect (fewer steps at lower effort) is real, which EVAL-035's static split could not show.
- **Action**: keep low on bookkeeping skills; repeat on a reflection skill (feat) before touching the medium/high split; `lib/effort-audit.py` makes the split measurable any time.
## EVAL-037 — correction of EVAL-035/036: one transcript record per content block, deduped by message.id
- **Date**: 2026-09-28
- **Output checked**: EVAL-035 (8 % thinking / 97 % main loop / 26 tok per sonnet request) and EVAL-036 (requests 18→15), produced by `effort-audit.py` counting every assistant record; final review found duplicates (same `message.id` + identical `usage`, one record per content block, ~2.8× on this repo's last 6 transcripts).
- **Result (deduped)**: main weighted-cost 61.4 %, thinking share 99.9 % (was 96.6 %); sub weighted-cost 38.6 %, thinking share 0.1 %; thinking = 5.6 % of weighted cost (was 8.4 %, inflated by duplicate counting); sonnet think/request 26→0.2 tok (sub, xhigh); A/B `/reconcile` (EVAL-036 rerun, deduped) requests 9→8, output 6129→4706, thinking 1550→1104 — the raw undeduped counts on the same transcripts are 18→15, matching EVAL-036 exactly (the bug, not the finding).
- **Anomaly**: the main-loop-carries-almost-all-thinking split got SHARPER after dedup (96.6→99.9 %), not weaker — duplication was near-uniform across content blocks, so ratios among scopes barely moved; only the absolute request/token counts and the overall thinking-share-of-cost figure were inflated (~2.2-2.8× depending on transcript mix).
- **Action**: `lib/effort-audit.py` dedupes by `message.id` from this commit; cite EVAL-037, not EVAL-035, for the split.
+1
View File
@@ -542,3 +542,4 @@ rules:
- User go "merge le tier 2": feature/superpowers-vendored merged into develop via `gitflow finish` → 65665a5, no conflict, pushed, copies removed by the lib. develop == origin/develop, no working branch anywhere. Whole skill-catalog prune (BDR-105 + BDR-106) on develop: catalog 82 skills, plugin passive cost 670 t, no session injection. Open for the user: `21st login`, claude.ai skills off, floor-guard `xit(` hotfix (BLK-023), two /tmp fixture dirs, other machines `make plugin` + `make link` + uninstall the cached plugin. - User go "merge le tier 2": feature/superpowers-vendored merged into develop via `gitflow finish` → 65665a5, no conflict, pushed, copies removed by the lib. develop == origin/develop, no working branch anywhere. Whole skill-catalog prune (BDR-105 + BDR-106) on develop: catalog 82 skills, plugin passive cost 670 t, no session injection. Open for the user: `21st login`, claude.ai skills off, floor-guard `xit(` hotfix (BLK-023), two /tmp fixture dirs, other machines `make plugin` + `make link` + uninstall the cached plugin.
- /hotfix BLK-023 (user: "fais le hotfix du floor-guard"): `skip_kind` substring match → `xit(` ⊂ `exit(`. Fix 0deb559 on bugfix/floor-guard-xit-boundary: bare Jasmine names via `SKIP_IDENT_RE` lookbehind, 4 flip fixtures (12/12). 3 challengers (2 SOLID, robustness CONCERNS(2): fixture line itself flaggable on a test path → waiver comment outside the echo; my criterion-2 live oracle vacuous → dropped — same LRN-173 class, plus I wrote a heredoc CHECK again before catching it, [[LRN-176]]). Hotfixer DONE first pass, oracles MET, security PASS. UNMERGED — human gate. - /hotfix BLK-023 (user: "fais le hotfix du floor-guard"): `skip_kind` substring match → `xit(` ⊂ `exit(`. Fix 0deb559 on bugfix/floor-guard-xit-boundary: bare Jasmine names via `SKIP_IDENT_RE` lookbehind, 4 flip fixtures (12/12). 3 challengers (2 SOLID, robustness CONCERNS(2): fixture line itself flaggable on a test path → waiver comment outside the echo; my criterion-2 live oracle vacuous → dropped — same LRN-173 class, plus I wrote a heredoc CHECK again before catching it, [[LRN-176]]). Hotfixer DONE first pass, oracles MET, security PASS. UNMERGED — human gate.
- User go "oui pour le changelog et merge le": CHANGELOG floor-guard entry amended via doc-syncer patch + doc-commit (018dfa3), bugfix/floor-guard-xit-boundary merged into develop via `gitflow finish` → c9f9b40, pushed, copies removed. develop == origin/develop, no working branch anywhere. Day total on develop: skill-catalog prune tiers 1 + 2 (BDR-105, BDR-106), 21st sign-in gate, BLK-023 resolved. - User go "oui pour le changelog et merge le": CHANGELOG floor-guard entry amended via doc-syncer patch + doc-commit (018dfa3), bugfix/floor-guard-xit-boundary merged into develop via `gitflow finish` → c9f9b40, pushed, copies removed. develop == origin/develop, no working branch anywhere. Day total on develop: skill-catalog prune tiers 1 + 2 (BDR-105, BDR-106), 21st sign-in gate, BLK-023 resolved.
- effort tiering built on feature/effort-tiering (BDR-107): session high, 20 agent pins, 28+2 skill entry levels, 5 paired shifters, max at caps + 4b, census 129+ locks green, A/B −27 % output on /reconcile; finish awaits human signal.
+10
View File
@@ -198,6 +198,8 @@ rules:
| LRN-176 | 2026-09-28 | gates.sh `CHECK:` is single-line: a heredoc body reads as prose, the oracle runs `python3 -` on empty stdin and lands NOT-MET "marker absent", never ERROR; multi-line oracle → `<contract>.oracles/*.py` | writing contract oracles longer than one line | | LRN-176 | 2026-09-28 | gates.sh `CHECK:` is single-line: a heredoc body reads as prose, the oracle runs `python3 -` on empty stdin and lands NOT-MET "marker absent", never ERROR; multi-line oracle → `<contract>.oracles/*.py` | writing contract oracles longer than one line |
| LRN-177 | 2026-09-28 | gstack skills hardcode `~/.claude/skills/gstack/<path>` (83 paths: bin, scripts, ETHOS.md, */sections, review/specialists, make-pdf/dist, freeze/bin…); only bin + browse/dist were linked → dead skills and vacuous hooks (exit 127); ./setup plants a global symlink; whole-dir link exposes nested SKILL.md; `apply` is additive, `set` parks | any gstack wiring change, any "gstack skill fails" report | | LRN-177 | 2026-09-28 | gstack skills hardcode `~/.claude/skills/gstack/<path>` (83 paths: bin, scripts, ETHOS.md, */sections, review/specialists, make-pdf/dist, freeze/bin…); only bin + browse/dist were linked → dead skills and vacuous hooks (exit 127); ./setup plants a global symlink; whole-dir link exposes nested SKILL.md; `apply` is additive, `set` parks | any gstack wiring change, any "gstack skill fails" report |
| LRN-178 | 2026-09-28 | a top-level `source` added to a lib breaks every hermetic suite that copies that lib alone into a fixture; grep the `cp` lists before adding one, or source lazily inside the branch that needs it | adding `source` to profile.sh / toggle-external.sh / any lib the suites copy | | LRN-178 | 2026-09-28 | a top-level `source` added to a lib breaks every hermetic suite that copies that lib alone into a fixture; grep the `cp` lists before adding one, or source lazily inside the branch that needs it | adding `source` to profile.sh / toggle-external.sh / any lib the suites copy |
| LRN-179 | 2026-09-28 | Skill `effort:` frontmatter shifts the MAIN LOOP for the rest of the turn on user slash invocation AND on interactive Skill-tool loads (last loaded wins, both directions, prompt cache kept); NOT applied in `-p`/headless; agent pins always honoured, unpinned agents inherit session | effort tiering; any skill or agent that must think more or less than the session |
| LRN-180 | 2026-09-28 | Skill-tool effort override needs a paired tool call: a lone Skill(effort-*) call is a no-op; a load in the same message as another tool call applies (the paired call already sees it); re-load re-applies (text deduped); skills Claude loads alone (brainstorming, writing-plans) apply nothing | every orchestrator shift; amends LRN-179 |
--- ---
@@ -1640,3 +1642,11 @@ Rule: when editing a doctrine file under structure locks, grep the test's lock s
## LRN-178 — before a new top-level `source`, grep the fixture `cp` lists ## LRN-178 — before a new top-level `source`, grep the fixture `cp` lists
- **Context**: twice in one day. E1b's `source gstack-removed.sh` in profile.sh/toggle-external.sh needed a `cp` line in three suites (profile-default, profile-set-managed, toggle-external-repo-resolution) — caught by the confirmation challenger, fixed in scope. My 21st helper plan would have added a second top-level `source` to toggle-external.sh with no fixture update → four suites red under `set -euo pipefail`; two challengers flagged it as BLOCKER, the helper was dropped. - **Context**: twice in one day. E1b's `source gstack-removed.sh` in profile.sh/toggle-external.sh needed a `cp` line in three suites (profile-default, profile-set-managed, toggle-external-repo-resolution) — caught by the confirmation challenger, fixed in scope. My 21st helper plan would have added a second top-level `source` to toggle-external.sh with no fixture update → four suites red under `set -euo pipefail`; two challengers flagged it as BLOCKER, the helper was dropped.
- **Apply**: `grep -n "cp .*lib/<file>" lib/tests/*.sh` before adding a `source` to a lib; either widen every fixture copy in the same change or source lazily inside the one branch that needs it. Prefer the inline predicate when only one caller needs the new semantics ([[BDR-105]]). - **Apply**: `grep -n "cp .*lib/<file>" lib/tests/*.sh` before adding a `source` to a lib; either widen every fixture copy in the same change or source lazily inside the one branch that needs it. Prefer the inline predicate when only one caller needs the new semantics ([[BDR-105]]).
## LRN-179 — skill `effort:` shifts the main loop for the rest of the turn, interactive only
- **Context**: effort-tiering spike 2026-09-28, Claude Code 2.1.283, Fable 5.1. Probes = `$CLAUDE_EFFORT` in Bash + transcript `effort` field per request. User-typed `/probe-low` → whole turn `low`. Skill-tool load in interactive session → `max` then `xhigh`, last loaded wins, both directions; first request after the switch read 206,996 cached tokens, wrote 1,164 (cache kept). Three `-p` runs: neither `effort:` nor `model:` skill frontmatter applied via Skill tool. Agent pin honoured (impeccable `medium`), unpinned built-in on sonnet inherited `xhigh`. Docs agent claimed "ultrathink keyword does not exist": wrong, docs = in-context nudge, API effort unchanged. Harness claims get verified against the harness ([[LRN-046]]).
- **Apply**: main-loop effort per phase = `Skill(effort-<level>)` on the main loop, never inside a dispatched agent; headless runs stay at session level; keep `CLAUDE_CODE_EFFORT_LEVEL` unset (beats every frontmatter). Spec `docs/superpowers/specs/2026-09-28-effort-tiering-design.md`.
## LRN-180 — Skill-tool effort override needs a paired tool call; a lone Skill call is a no-op (2.1.283)
- **Context**: effort-tiering smoke. Six lone `Skill(effort-*)` / probe loads left `$CLAUDE_EFFORT` unchanged; every load issued in the same assistant message as another tool call applied, and the paired Bash already saw the new level. Re-loading an already-loaded shifter re-applies (text deduped: "already loaded above"). Final review: `brainstorming` / `writing-plans` loaded alone by ship-feature and init-project → their vendored xhigh pin inert. Amends [[LRN-179]].
- **Apply**: `Skill(effort-<level>)` always travels with the step's first tool call, shift first; pair a downward shift with a pinned executor or a Read/Bash, never with a built-in judgment dispatch; before any built-in judgment dispatch, pair the own-level shift with it; skills Claude loads alone do not apply their pin → re-assert with a paired shift at the resumed planning step ([[BDR-107]]).
+9
View File
@@ -1,5 +1,14 @@
# TODO # TODO
## 2026-09-28 — effort tiering: session high, agent pins, skill levels, phase shifts (feature/effort-tiering)
Spec `docs/superpowers/specs/2026-09-28-effort-tiering-design.md`, plan
`docs/superpowers/plans/2026-09-28-effort-tiering.md`. Approved 2026-09-28: session
high, A+B+C, max on the main loop at the loop caps + ship-feature 4b, superpowers patch.
- [x] W1 settings high + banner warning + statusline live level + 20 agent pins + census suite (Tasks 1-3)
- [x] W2 28+2 skill entry levels + superpowers xhigh with resync re-apply (Tasks 4, 9)
- [x] W3 five shifters + lib/effort-shift.md + orchestrator wiring + max at caps/4b + gate audit (Tasks 5-8)
- [x] W4 BDR id + CHANGELOG + EVAL A/B + journal + audit script (Tasks 10-11)
## 2026-09-28 — tier 2: vendor 7 superpowers skills, drop the plugin (feature/superpowers-vendored) ## 2026-09-28 — tier 2: vendor 7 superpowers skills, drop the plugin (feature/superpowers-vendored)
User go "fais le tier 2" (decision 2026-09-28, batch 1). Contract User go "fais le tier 2" (decision 2026-09-28, batch 1). Contract
`.claude/tasks/contracts/2026-09-28-superpowers-vendored-1357.md`. `.claude/tasks/contracts/2026-09-28-superpowers-vendored-1357.md`.
+1
View File
@@ -7,6 +7,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/).
## [Unreleased] ## [Unreleased]
### Added ### Added
- **Effort tiering (BDR-107)**: reasoning effort routed per role and per phase. Session default `high`; `effort:` pins on the 20 repo-authored agents; entry level on 28 tracked user-invoked skills plus the two vendored superpowers skills (re-applied by `install-plugins.sh` after resync); five shifter skills `effort-low` … `effort-max` loaded at phase boundaries per `lib/effort-shift.md`, always sent with the step's first tool call (a lone Skill call is a no-op on 2.1.283), with `max` at the verify-secure caps and ship-feature 4b; `/effort-max` as the turn-scoped relaunch lever; statusline shows the live level; session banner warns when `CLAUDE_CODE_EFFORT_LEVEL` silences the pins; census `lib/tests/effort-routing.test.sh`; transcript audit `lib/effort-audit.py`.
- **Design gate asks the user to sign in to 21st instead of skipping it**: - **Design gate asks the user to sign in to 21st instead of skipping it**:
`lib/design-tool-gate.sh` adds a three-state 21st auth predicate `lib/design-tool-gate.sh` adds a three-state 21st auth predicate
(`twentyfirst_auth_state`, honors `TWENTYFIRST_TOKEN`/`API_KEY_21ST` or a (`twentyfirst_auth_state`, honors `TWENTYFIRST_TOKEN`/`API_KEY_21ST` or a
+1
View File
@@ -3,6 +3,7 @@ name: analyzer
description: Analyze code, codebase, or problem before any modification. Produces a factual report without proposing solutions. Use proactively before any refactoring, design, or implementation. description: Analyze code, codebase, or problem before any modification. Produces a factual report without proposing solutions. Use proactively before any refactoring, design, or implementation.
tools: Read, Grep, Glob, Bash tools: Read, Grep, Glob, Bash
model: opus model: opus
effort: high
memory: project memory: project
--- ---
+1
View File
@@ -3,6 +3,7 @@ name: bugfixer
description: Bug-fix EXECUTOR — dispatched by /bugfix with a closed DIAGNOSIS + FIX PLAN + contract. Applies the fix and a regression test, runs the suite, reports. No investigation, no questions, no commit. description: Bug-fix EXECUTOR — dispatched by /bugfix with a closed DIAGNOSIS + FIX PLAN + contract. Applies the fix and a regression test, runs the suite, reports. No investigation, no questions, no commit.
tools: Read, Edit, Write, Bash, Grep, Glob tools: Read, Edit, Write, Bash, Grep, Glob
model: sonnet model: sonnet
effort: medium
--- ---
# BUGFIXER — fix executor # BUGFIXER — fix executor
+3
View File
@@ -97,6 +97,8 @@ Parse `$ARGUMENTS` for optional flags:
--- ---
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
## STEP 1 — PRE-FLIGHT ## STEP 1 — PRE-FLIGHT
```bash ```bash
@@ -225,6 +227,7 @@ Store `DEPLOYED_URL` for STEP 7. If empty, ask user during STEP 6.
--- ---
## STEP 3 — BASELINE AUDITS (parallel) ## STEP 3 — BASELINE AUDITS (parallel)
First: `Skill(effort-high)` (effort-shift: judgment dispatch; the fable skill-runners are built-ins and inherit the level in force; high is the entry level of the audits they run).
Goal: capture `SCORE_*_BEFORE` so the client doc shows the delta. Goal: capture `SCORE_*_BEFORE` so the client doc shows the delta.
+1
View File
@@ -3,6 +3,7 @@ name: code-cleaner
description: Cleanup EXECUTOR (PHASE 2) — dispatched by /code-clean with an APPROVED scope. Deletes approved dead code, hands style/structural items to the refactorer, re-audits. Zero behavior change. No audit, no questions, no commit. description: Cleanup EXECUTOR (PHASE 2) — dispatched by /code-clean with an APPROVED scope. Deletes approved dead code, hands style/structural items to the refactorer, re-audits. Zero behavior change. No audit, no questions, no commit.
tools: Read, Edit, Write, Bash, Grep, Glob tools: Read, Edit, Write, Bash, Grep, Glob
model: sonnet model: sonnet
effort: medium
--- ---
# CODE-CLEANER — cleanup executor (PHASE 2) # CODE-CLEANER — cleanup executor (PHASE 2)
+1
View File
@@ -3,6 +3,7 @@ name: commit-changer
description: Retrace-and-commit engine — dispatched by /commit-change. Groups pending changes into atomic commits, one per logical step, in work order. description: Retrace-and-commit engine — dispatched by /commit-change. Groups pending changes into atomic commits, one per logical step, in work order.
tools: Bash, Read, Grep, Glob tools: Bash, Read, Grep, Glob
model: sonnet model: sonnet
effort: high
--- ---
# Git Smart Commit # Git Smart Commit
+1
View File
@@ -3,6 +3,7 @@ name: doc-syncer
description: 'Two-mode public-doc sync agent — MODE: audit (dispatched model="opus" — drift detection, semantic analysis, drafts, PATCH PLAN, read-only) and MODE: patch (sonnet pin — applies the APPROVED plan, oracle-checked, emits CHANGE SUMMARY + PATCHED_FILES). The validation gate lives in the DISPATCHER (BDR-077). Convention-aware (Diátaxis, Keep a Changelog); never touches .claude/.' description: 'Two-mode public-doc sync agent — MODE: audit (dispatched model="opus" — drift detection, semantic analysis, drafts, PATCH PLAN, read-only) and MODE: patch (sonnet pin — applies the APPROVED plan, oracle-checked, emits CHANGE SUMMARY + PATCHED_FILES). The validation gate lives in the DISPATCHER (BDR-077). Convention-aware (Diátaxis, Keep a Changelog); never touches .claude/.'
tools: Read, Write, Edit, Bash, Grep, Glob tools: Read, Write, Edit, Bash, Grep, Glob
model: sonnet model: sonnet
effort: high
--- ---
# DOC SYNCER # DOC SYNCER
+1
View File
@@ -3,6 +3,7 @@ name: feater
description: Small-feature EXECUTOR — dispatched by /feat with a closed plan + contract. Implements to the letter, tests, reports. No planning, no questions, no commit. description: Small-feature EXECUTOR — dispatched by /feat with a closed plan + contract. Implements to the letter, tests, reports. No planning, no questions, no commit.
tools: Read, Edit, Write, Bash, Grep, Glob tools: Read, Edit, Write, Bash, Grep, Glob
model: sonnet model: sonnet
effort: medium
--- ---
# FEATER — plan executor # FEATER — plan executor
+1
View File
@@ -3,6 +3,7 @@ name: geo-analyzer
description: GEO audit agent for AI search engines — dispatched by /geo and /seo. Audits AI crawlers, llms.txt, entity signals, Schema.org; emits a fix bundle (dispatcher applies), scored report. Classical SEO → seo-analyzer agent. description: GEO audit agent for AI search engines — dispatched by /geo and /seo. Audits AI crawlers, llms.txt, entity signals, Schema.org; emits a fix bundle (dispatcher applies), scored report. Classical SEO → seo-analyzer agent.
tools: Read, Edit, Write, Bash, Grep, Glob, WebFetch, WebSearch tools: Read, Edit, Write, Bash, Grep, Glob, WebFetch, WebSearch
model: opus model: opus
effort: xhigh
--- ---
# GEO — Generative Engine Optimization audit, fix & strategy # GEO — Generative Engine Optimization audit, fix & strategy
+1
View File
@@ -3,6 +3,7 @@ name: handover-doc-writer
description: 'Two-mode deliverable writer — MODE: synthesize (dispatched model="opus" — memory+git clustering, 6-chapter synthesis into a run-scoped draft) and MODE: render (sonnet pin — annexes, precheck, deterministic gates, MD + branded HTML/PDF from the draft). Dispatched twice by client-handover with the resolved PACKAGE. No audits, no questions, no dispatch.' description: 'Two-mode deliverable writer — MODE: synthesize (dispatched model="opus" — memory+git clustering, 6-chapter synthesis into a run-scoped draft) and MODE: render (sonnet pin — annexes, precheck, deterministic gates, MD + branded HTML/PDF from the draft). Dispatched twice by client-handover with the resolved PACKAGE. No audits, no questions, no dispatch.'
tools: Read, Write, Edit, Bash, Grep, Glob, WebSearch, WebFetch tools: Read, Write, Edit, Bash, Grep, Glob, WebSearch, WebFetch
model: sonnet model: sonnet
effort: high
--- ---
# HANDOVER DOC WRITER # HANDOVER DOC WRITER
+1
View File
@@ -3,6 +3,7 @@ name: hotfixer
description: Quick-fix executor — dispatched by /hotfix, which owns the routing and gitflow gate. Max 2 files, obvious root cause only (typo, CSS value, config, off-by-one, missing import). description: Quick-fix executor — dispatched by /hotfix, which owns the routing and gitflow gate. Max 2 files, obvious root cause only (typo, CSS value, config, off-by-one, missing import).
tools: Read, Edit, Write, Bash, Grep, Glob tools: Read, Edit, Write, Bash, Grep, Glob
model: sonnet model: sonnet
effort: low
--- ---
# HOTFIXER — closed-fix executor / L1 fix-bundle applier # HOTFIXER — closed-fix executor / L1 fix-bundle applier
+1
View File
@@ -3,6 +3,7 @@ name: onboarder
description: Generate claude-config files (CLAUDE.md, settings.json, .claudeignore, .gitignore safety, .claude/tasks/ + .claude/memory/ + .claude/audits/) for an existing project. Pure config generator — no interview, no audit. Called by /onboard orchestrator. description: Generate claude-config files (CLAUDE.md, settings.json, .claudeignore, .gitignore safety, .claude/tasks/ + .claude/memory/ + .claude/audits/) for an existing project. Pure config generator — no interview, no audit. Called by /onboard orchestrator.
tools: Read, Write, Edit, Bash, Glob, Grep tools: Read, Write, Edit, Bash, Glob, Grep
model: sonnet model: sonnet
effort: medium
--- ---
# ONBOARDER (config generator) # ONBOARDER (config generator)
+1
View File
@@ -3,6 +3,7 @@ name: plan-challenger
description: Fresh independent plan challenger — reads a PLAN file from disk and adversarially attacks it through ONE assigned lens (correctness | robustness | simplicity), then renders structured findings + a verdict. Report-only, never fixes, never implements. Dispatched fresh; blind to the other lenses. description: Fresh independent plan challenger — reads a PLAN file from disk and adversarially attacks it through ONE assigned lens (correctness | robustness | simplicity), then renders structured findings + a verdict. Report-only, never fixes, never implements. Dispatched fresh; blind to the other lenses.
tools: Read, Grep, Glob, Bash tools: Read, Grep, Glob, Bash
model: opus model: opus
effort: xhigh
--- ---
# PLAN-CHALLENGER AGENT # PLAN-CHALLENGER AGENT
+1
View File
@@ -3,6 +3,7 @@ name: plugin-advisor
description: Plugin-fit REASONER — dispatched by lib/plugin-gate.md with a PROBE REPORT (from plugin-probe). Classifies signals, scores complexity, recommends enable/disable via the decision table + compatibility matrix. Report-only. description: Plugin-fit REASONER — dispatched by lib/plugin-gate.md with a PROBE REPORT (from plugin-probe). Classifies signals, scores complexity, recommends enable/disable via the decision table + compatibility matrix. Report-only.
tools: Read, Glob, Grep tools: Read, Glob, Grep
model: opus model: opus
effort: xhigh
--- ---
# PLUGIN ADVISOR # PLUGIN ADVISOR
+1
View File
@@ -3,6 +3,7 @@ name: plugin-probe
description: Mechanical detection probe — dispatched by lib/plugin-gate.md BEFORE the plugin-advisor reasoner. Runs the CLI/filesystem probes, reports raw facts as a PROBE REPORT. No analysis, no recommendations. description: Mechanical detection probe — dispatched by lib/plugin-gate.md BEFORE the plugin-advisor reasoner. Runs the CLI/filesystem probes, reports raw facts as a PROBE REPORT. No analysis, no recommendations.
tools: Bash, Read, Glob, Grep tools: Bash, Read, Glob, Grep
model: sonnet model: sonnet
effort: low
--- ---
# PLUGIN PROBE # PLUGIN PROBE
+1
View File
@@ -3,6 +3,7 @@ name: refactorer
description: Refactor existing code without changing external behavior. Applies strict project norms. Use on legacy or non-compliant code. description: Refactor existing code without changing external behavior. Applies strict project norms. Use on legacy or non-compliant code.
tools: Read, Write, Edit, Grep, Glob, Bash tools: Read, Write, Edit, Grep, Glob, Bash
model: sonnet model: sonnet
effort: high
--- ---
# REFACTORER # REFACTORER
+1
View File
@@ -3,6 +3,7 @@ name: release-executor
description: Mechanical release executor — dispatched by /release-candidate for its two spans (prep, finish+tag). Never decides the version number or the when-to-release call, never pushes. description: Mechanical release executor — dispatched by /release-candidate for its two spans (prep, finish+tag). Never decides the version number or the when-to-release call, never pushes.
tools: Read, Edit, Write, Bash, Grep, Glob tools: Read, Edit, Write, Bash, Grep, Glob
model: sonnet model: sonnet
effort: low
--- ---
# RELEASE-EXECUTOR — mechanical release spans # RELEASE-EXECUTOR — mechanical release spans
+1 -1
View File
@@ -3,7 +3,7 @@ name: scaffolder
description: Create empty project skeleton. Generates CLAUDE.md, settings, structure, config, empty entry points, installs deps, optional Docker. NO business logic. description: Create empty project skeleton. Generates CLAUDE.md, settings, structure, config, empty entry points, installs deps, optional Docker. NO business logic.
tools: Read, Write, Edit, Bash, Glob, Grep tools: Read, Write, Edit, Bash, Glob, Grep
model: sonnet model: sonnet
effort: high effort: medium
--- ---
# SCAFFOLDER # SCAFFOLDER
+1
View File
@@ -3,6 +3,7 @@ name: security-auditor
description: 'SAST security gate — runs the pinned semgrep rulesets + the CLAUDE.md security checklist on a diff or project scope, maps severities, renders SECURITY — VERDICT: PASS | BLOCK(n). Blocks HIGH/CRITICAL only, reports the rest. Never fixes code. Fresh dispatch, no iteration history.' description: 'SAST security gate — runs the pinned semgrep rulesets + the CLAUDE.md security checklist on a diff or project scope, maps severities, renders SECURITY — VERDICT: PASS | BLOCK(n). Blocks HIGH/CRITICAL only, reports the rest. Never fixes code. Fresh dispatch, no iteration history.'
tools: Read, Grep, Glob, Bash, Write tools: Read, Grep, Glob, Bash, Write
model: sonnet model: sonnet
effort: xhigh
--- ---
# SECURITY-AUDITOR AGENT # SECURITY-AUDITOR AGENT
+1
View File
@@ -3,6 +3,7 @@ name: seo-analyzer
description: 'Classical SEO audit agent (Google, Bing) — dispatched from /seo. Live audit: Core Web Vitals, on-page, technical, local SEO, legal (FR). Emits a fix bundle (dispatcher applies) + scored report. AI/GEO → geo-analyzer agent.' description: 'Classical SEO audit agent (Google, Bing) — dispatched from /seo. Live audit: Core Web Vitals, on-page, technical, local SEO, legal (FR). Emits a fix bundle (dispatcher applies) + scored report. AI/GEO → geo-analyzer agent.'
tools: Read, Edit, Write, Bash, Grep, Glob, WebFetch, WebSearch tools: Read, Edit, Write, Bash, Grep, Glob, WebFetch, WebSearch
model: opus model: opus
effort: xhigh
--- ---
# SEO — Classical Search Engines audit, fix & strategy # SEO — Classical Search Engines audit, fix & strategy
+1
View File
@@ -3,6 +3,7 @@ name: validator-analyzer
description: Web standards audit agent — W3C HTML validity (validator.nu), W3C CSS validity (jigsaw.w3.org), WCAG 2.1 accessibility (axe-core, pa11y, WAVE). Dispatched from /web-validate. Produces scored .claude/audits/VALIDATE.md report with concrete diffs for auto-fixable issues and user actions for judgment-required fixes. Complementary to /harden (security), /seo (indexability), /geo (AI extraction). description: Web standards audit agent — W3C HTML validity (validator.nu), W3C CSS validity (jigsaw.w3.org), WCAG 2.1 accessibility (axe-core, pa11y, WAVE). Dispatched from /web-validate. Produces scored .claude/audits/VALIDATE.md report with concrete diffs for auto-fixable issues and user actions for judgment-required fixes. Complementary to /harden (security), /seo (indexability), /geo (AI extraction).
tools: Read, Edit, Write, Bash, Grep, Glob, WebFetch tools: Read, Edit, Write, Bash, Grep, Glob, WebFetch
model: sonnet model: sonnet
effort: low
--- ---
# Validator — W3C + WCAG audit # Validator — W3C + WCAG audit
+1
View File
@@ -3,6 +3,7 @@ name: verifier
description: Fresh independent verifier — reads a CONTRACT file from disk and renders a structured verdict (CONFORME / ECARTS / ERROR) on the implemented diff. Report-only, never fixes. Dispatched fresh at every iteration; receives no iteration history. description: Fresh independent verifier — reads a CONTRACT file from disk and renders a structured verdict (CONFORME / ECARTS / ERROR) on the implemented diff. Report-only, never fixes. Dispatched fresh at every iteration; receives no iteration history.
tools: Read, Grep, Glob, Bash tools: Read, Grep, Glob, Bash
model: sonnet model: sonnet
effort: xhigh
--- ---
# VERIFIER AGENT # VERIFIER AGENT
+7
View File
@@ -107,6 +107,12 @@ fi
REPO_DIR="${_repo_dir:-}" REPO_DIR="${_repo_dir:-}"
unset _claude_real _repo_dir unset _claude_real _repo_dir
# Effort tiering (BDR-107): this env var beats every skill/agent `effort:` pin.
EFFORT_WARN=""
if [ -n "${CLAUDE_CODE_EFFORT_LEVEL:-}" ]; then
EFFORT_WARN="⚠️ CLAUDE_CODE_EFFORT_LEVEL=${CLAUDE_CODE_EFFORT_LEVEL} set: skill/agent effort pins ignored"
fi
# Detect plan and set passive token budget # Detect plan and set passive token budget
PLAN=$(detect_plan 2>/dev/null || echo "pro") PLAN=$(detect_plan 2>/dev/null || echo "pro")
case "$PLAN" in case "$PLAN" in
@@ -253,5 +259,6 @@ unset _remote_ver REPO_DIR
echo "│ 💡 /plugin-check before starting a new project │" echo "│ 💡 /plugin-check before starting a new project │"
echo "│ 🩺 make doctor full diagnostic │" echo "│ 🩺 make doctor full diagnostic │"
echo "└───────────────────────────────────────────────────┘" echo "└───────────────────────────────────────────────────┘"
[ -n "$EFFORT_WARN" ] && printf '%s\n' "$EFFORT_WARN"
echo "" echo ""
unset TOKEN_WARN unset TOKEN_WARN
+6 -5
View File
@@ -33,13 +33,14 @@ if [ -z "$PROFILE" ] || [ "$PROFILE" = "none" ]; then
PROFILE="$DEFAULT_PROFILE" PROFILE="$DEFAULT_PROFILE"
fi fi
# Effort level from settings.json (.effortLevel — set by /effort or manual edit). # Effort level: the live value when the harness exports it (skill/agent
# settings.json is the source-of-truth, symlinked into ~/.claude/settings.json. # `effort:` shifts included, BDR-107), else the persisted settings.json key
EFFORT="?" # (.effortLevel — set by /effort or manual edit; symlinked into ~/.claude).
if [ -f "$REPO/settings.json" ]; then EFFORT="${CLAUDE_EFFORT:-}"
if [ -z "$EFFORT" ] && [ -f "$REPO/settings.json" ]; then
EFFORT=$(jq -r '.effortLevel // "?"' "$REPO/settings.json" 2>/dev/null) EFFORT=$(jq -r '.effortLevel // "?"' "$REPO/settings.json" 2>/dev/null)
[ -z "$EFFORT" ] && EFFORT="?"
fi fi
[ -z "$EFFORT" ] && EFFORT="?"
# Session duration (from total_duration_ms) # Session duration (from total_duration_ms)
DURATION_MS=$(echo "$INPUT" | jq -r \ DURATION_MS=$(echo "$INPUT" | jq -r \
+11
View File
@@ -934,6 +934,17 @@ for _ext_skill in "${EXT_SKILL_NAMES[@]}"; do
done done
echo "" echo ""
# Effort tiering (BDR-107): the vendored brainstorming/writing-plans carry an
# effort pin upstream lacks; re-apply after every resync (census lock in
# lib/tests/effort-routing.test.sh alarms if this ever stops working).
for _s in brainstorming writing-plans; do
_f="$(cd "$(dirname "$0")" && pwd)/skills-external/$_s/SKILL.md"
if [ -f "$_f" ] && ! grep -q '^effort:' "$_f"; then
sed -i "0,/^name: $_s\$/s//&\neffort: xhigh/" "$_f"
fi
done
unset _s _f
# ============================================================ # ============================================================
# STEP 8.5 — EXTERNAL SKILLS (npx skills add …) # STEP 8.5 — EXTERNAL SKILLS (npx skills add …)
# ============================================================ # ============================================================
+2
View File
@@ -59,6 +59,8 @@ silently downgrade the judgment. (The executor gates stay sonnet.)
A challenger that returns a malformed/empty verdict, a missing `PROOF`, or dies → A challenger that returns a malformed/empty verdict, a missing `PROOF`, or dies →
retry ONCE with a fresh challenger; a 2nd failure on that lens → STOP and escalate retry ONCE with a fresh challenger; a 2nd failure on that lens → STOP and escalate
(the STOP text names the level reached, `$CLAUDE_EFFORT`, and suggests `/effort-max`
for the relaunch; no shift here: a mute challenger is an infrastructure failure)
to the human, NAMING the lens. Never carry "plan challenged" into the gate on a to the human, NAMING the lens. Never carry "plan challenged" into the gate on a
silently dropped lens (`verify-secure-loop.md`: "a mute verifier is NEVER a PASS"). silently dropped lens (`verify-secure-loop.md`: "a mute verifier is NEVER a PASS").
+105
View File
@@ -0,0 +1,105 @@
#!/usr/bin/env python3
"""Sum output/thinking/cache tokens per (scope, model, effort) over Claude Code
transcripts. scope = main (session jsonl) | sub (subagents/*.jsonl or
isSidechain records). Read-only. Usage: effort-audit.py [projects-root]"""
import collections
import glob
import json
import os
import sys
# Weights relative to input price.
WEIGHTS = {"in": 1.0, "cc": 1.25, "cr": 0.1, "out": 5.0}
FIELDS = ("in", "cc", "cr", "out", "think")
def usage_row(usage):
"""Map one API usage block to the five counted fields."""
details = usage.get("output_tokens_details") or {}
return {
"in": usage.get("input_tokens", 0) or 0,
"cc": usage.get("cache_creation_input_tokens", 0) or 0,
"cr": usage.get("cache_read_input_tokens", 0) or 0,
"out": usage.get("output_tokens", 0) or 0,
"think": details.get("thinking_tokens", 0) or 0,
}
def scan(path, scope, agg):
"""Add every assistant record of one transcript to agg, once per
message id (the transcript writes one record per content block,
all sharing the same id and usage)."""
seen = set()
with open(path, errors="ignore") as handle:
for line in handle:
try:
rec = json.loads(line)
except ValueError:
continue
msg = rec.get("message") or {}
if rec.get("type") != "assistant" or not msg.get("usage"):
continue
mid = msg.get("id")
if mid in seen:
continue
seen.add(mid)
sub = scope == "sub" or bool(rec.get("isSidechain"))
key = ("sub" if sub else "main",
str(msg.get("model", "?")).replace("claude-", ""),
str(rec.get("effort") or "?"))
row = usage_row(msg["usage"])
agg[key]["msgs"] += 1
for field in FIELDS:
agg[key][field] += row[field]
def weighted(counter):
return sum(counter[f] * WEIGHTS[f] for f in WEIGHTS)
def report(agg):
"""Print the per-key table, then the main/sub split and the thinking
share."""
total = collections.Counter()
for counter in agg.values():
total.update(counter)
total_w = weighted(total) or 1
print(f"{'scope':5} {'model':22} {'effort':7} {'msgs':>6} {'think/msg':>9} "
f"{'think_tok':>10} {'out_tok':>10} {'cache_read':>12} {'%wcost':>7}")
ranked = sorted(agg.items(), key=lambda kv: -weighted(kv[1]))
for (scope, model, effort), c in ranked:
per_msg = c["think"] / max(c["msgs"], 1)
print(f"{scope:5} {model:22} {effort:7} {c['msgs']:6d} "
f"{per_msg:9.0f} {c['think']:10d} {c['out']:10d} "
f"{c['cr']:12d} {100 * weighted(c) / total_w:6.1f}%")
by_scope = collections.defaultdict(collections.Counter)
for (scope, _, _), c in agg.items():
by_scope[scope].update(c)
for scope, c in by_scope.items():
print(f" {scope:5} weighted-cost "
f"{100 * weighted(c) / total_w:5.1f}% thinking "
f"{100 * c['think'] / max(total['think'], 1):5.1f}% "
f"requests {c['msgs']}")
print(f" thinking = "
f"{100 * total['think'] * WEIGHTS['out'] / total_w:.1f}% "
f"of weighted cost; cache reads = "
f"{100 * total['cr'] * WEIGHTS['cr'] / total_w:.1f}%")
def main():
root = os.path.expanduser(
sys.argv[1] if len(sys.argv) > 1 else "~/.claude/projects")
agg = collections.defaultdict(collections.Counter)
for project in sorted(glob.glob(os.path.join(root, "*"))):
if not os.path.isdir(project):
continue
for path in glob.glob(os.path.join(project, "*.jsonl")):
scan(path, "main", agg)
sub_glob = os.path.join(project, "*", "subagents", "*.jsonl")
for path in glob.glob(sub_glob):
scan(path, "sub", agg)
report(agg)
if __name__ == "__main__":
main()
+80
View File
@@ -0,0 +1,80 @@
# Effort shift — phase-level reasoning effort on the main loop (BDR-107)
Shared include, companion of `lib/model-gate.md`: the gate fixes WHICH model
reflects, this include fixes HOW HARD each phase thinks. The rungs are the
user's: low (fix a line, run a script) · medium (day-to-day) · high
(refactor, resisting bug) · xhigh (architecture, audit before validation) ·
max (stuck error, judged need).
## Mechanics (verified on Claude Code 2.1.283)
- **Pairing rule**: a `Skill(effort-<level>)` call applies its effort only
when the same assistant message carries at least one other tool call
after it; a lone Skill call is a no-op. Send the shift together with the
step's first tool call, shift first. That paired call already runs at the
new level: pair a downward shift with a pinned-agent dispatch or a
Read/Bash, never with a built-in judgment dispatch (`general-purpose`,
`model: "opus"`), which would inherit it.
- Re-loading a shifter already loaded in the conversation re-applies its
effort (the harness only dedupes the skill text), so bounce-back
sequences such as medium → max → medium work.
- A skill's `effort:` frontmatter applies from the moment it loads to the
end of the turn: on the user's `/skill` unconditionally, and on a
`Skill(...)` call by Claude only under the pairing rule above (a skill
Claude loads alone, such as `brainstorming` or `writing-plans`, applies
nothing). Last loaded wins, both directions. The prompt cache survives a
shift.
- Dispatched agents run on their own `effort:` pin, never on a shift.
Unpinned agents inherit the level in force at dispatch.
- Headless sessions (`-p`, `claude agents`, SDK) ignore skill-level effort:
the run stays at the session level. `CLAUDE_CODE_EFFORT_LEVEL` beats every
frontmatter; keep it unset (the session banner warns).
Measure the split any time: `python3 ~/.claude/lib/effort-audit.py`
(thinking/output/cache tokens per scope, model and effort).
## Shifters
`Skill(effort-low)` · `Skill(effort-medium)` · `Skill(effort-high)` ·
`Skill(effort-xhigh)` · `Skill(effort-max)`. One tool call, one-line body,
always sent with another tool call (Pairing rule).
Typed by the user, `/effort-max` is a turn-scoped max: the relaunch lever
after a STOP. `ultrathink` only adds an in-context nudge; the API level
does not move.
## Wiring — per orchestrator
1. A dispatch span starts (executor, collector, fan-out) →
`Skill(effort-medium)`.
2. Reflection resumes after a dispatch span (challenge synthesis, verdict,
plan revision) → `Skill(effort-<the skill's own level>)`. Concretely:
the line before every `lib/challenge-plan.md` call.
3. The bookkeeping tail (memory commit, doc commit) → `Skill(effort-low)`.
4. Escalation → `Skill(effort-max)`, then the skill's own level again once
the diagnosis is produced. Automatic points: verify-secure loop caps
(GATE 0 floor, GATE 1 conformity, GATE 2 security) and ship-feature
STEP 4b. Not automatic, by doctrine: the challenge fail-safe (a mute
challenger is an infrastructure failure) and "gone WRONG → STOP" (STOP
precedes any further reasoning); their STOP text names the level
reached and suggests `/effort-max` for the relaunch.
5. Before any built-in or unpinned dispatch that carries judgment (a
`general-purpose` with `model: "opus"` or `"fable"`, the code reviewer
of requesting-code-review, a skill-runner) → `Skill(effort-<own level>)`
paired with that dispatch: built-ins inherit the level in force, and a
medium set earlier in the span would downgrade them.
## Re-assert
- After any nested `Skill(...)` whose frontmatter carries a different
effort (feat → commit-change), reload the orchestrator's own level.
- After a prose gate that ends the turn, the resumed turn runs at the
session level. If the resumed phase is reflection, its first step is
`Skill(effort-<own level>)`; dispatch and orchestration phases need
nothing.
## Never
- A shift never inside a dispatched agent: pins rule there.
- Max is for diagnosis, not for retrying the same fix harder.
- A medium shift never precedes a judgment dispatch in the same span
without an own-level shift paired with that dispatch.
+6
View File
@@ -45,3 +45,9 @@ site — `model: "fable"` when the child performs reflection/orchestration on
the main loop's behalf (skill-runners), otherwise its complexity tier the main loop's behalf (skill-runners), otherwise its complexity tier
(opus = dispatched judgment, sonnet = execution/collection, haiku = short (opus = dispatched judgment, sonnet = execution/collection, haiku = short
mechanical probes). mechanical probes).
Effort is the second axis of the same table (BDR-107): every typed agent
carries an `effort:` pin next to `model:`, and the main loop shifts per phase
through `lib/effort-shift.md`. No typed agent inherits either axis;
built-ins inherit the effort in force at dispatch, so an orchestrator shifts
before dispatching them (`lib/effort-shift.md`, wiring point 5).
+108
View File
@@ -0,0 +1,108 @@
#!/usr/bin/env bash
# lib/tests/effort-routing.test.sh — census: effort tiering (BDR-107)
# agent pins, skill entry levels, shifter skills, orchestrator wiring, settings.
# shellcheck disable=SC2015 # A && ok || ko is deliberate here: ok/ko never fail, so C never masks a true A
set -u
R="$(cd "$(dirname "$0")/../.." && pwd)"
pass=0; fail=0
ok() { pass=$((pass+1)); }
ko() { fail=$((fail+1)); printf 'FAIL %s\n' "$1"; }
has() { if grep -qF "$2" "$R/$1"; then ok; else ko "$1 missing: $2"; fi; }
lacks() { if grep -qF "$2" "$R/$1"; then ko "$1 must NOT contain: $2"; else ok; fi; }
# frontmatter = the lines between the first two '---' lines
fm() { awk 'NR==1&&/^---$/{p=1;next} p&&/^---$/{exit} p' "$1"; }
fm_effort() { fm "$1" | grep -E '^effort: (low|medium|high|xhigh|max)$' | head -1 | cut -d' ' -f2; }
fm_has_effort() {
got="$(fm_effort "$R/$1")"
if [ "$got" = "$2" ]; then ok; else ko "$1 frontmatter effort must be '$2', got '${got:-none}'"; fi
}
fm_no_effort() { if fm "$R/$1" | grep -q '^effort:'; then ko "$1 must NOT pin effort"; else ok; fi; }
# ── flip-test: the frontmatter reader must accept a valid level and reject an invalid one
FIX="$(mktemp -d)"; trap 'rm -rf "$FIX"' EXIT
printf -- '---\nname: good\neffort: xhigh\n---\nbody with effort: low in prose\n' > "$FIX/good.md"
printf -- '---\nname: bad\neffort: turbo\n---\n' > "$FIX/bad.md"
[ "$(fm_effort "$FIX/good.md")" = "xhigh" ] && ok || ko "flip: valid level not read"
[ -z "$(fm_effort "$FIX/bad.md")" ] && ok || ko "flip: invalid level accepted"
[ "$(fm "$FIX/good.md" | grep -c 'prose')" -eq 0 ] && ok || ko "flip: body leaked into frontmatter"
# ── 1) session default (spec D1)
has "settings.json" '"effortLevel": "high"'
# ── 2) hooks: env-var warning + live effort in the statusline (spec D1, D5)
has "hooks/session-start.sh" 'CLAUDE_CODE_EFFORT_LEVEL'
has "hooks/statusline.sh" 'CLAUDE_EFFORT'
# ── 3) agent pins (spec D2): one effort per agent file, judgment mode wins on mode-based agents
for a in hotfixer release-executor plugin-probe validator-analyzer; do fm_has_effort "agents/$a.md" low; done
for a in feater bugfixer code-cleaner onboarder scaffolder; do fm_has_effort "agents/$a.md" medium; done
for a in refactorer analyzer commit-changer doc-syncer handover-doc-writer; do fm_has_effort "agents/$a.md" high; done
for a in plan-challenger plugin-advisor verifier security-auditor seo-analyzer geo-analyzer; do fm_has_effort "agents/$a.md" xhigh; done
for a in interviewer client-handover-writer status-reporter; do fm_no_effort "agents/$a.md"; done
has "skills/init-project/SKILL.md" 'pin sonnet, effort medium'
# ── 4) skill entry levels (spec D3): the user's invocation sets the run's level
for s in status commit-change release-candidate doc capitalize close reconcile deploy profile plugin-check; do fm_has_effort "skills/$s/SKILL.md" low; done
for s in gitflow prune-memory; do fm_has_effort "skills/$s/SKILL.md" medium; done
for s in feat hotfix bugfix refactor web-validate harden seo geo; do fm_has_effort "skills/$s/SKILL.md" high; done
for s in ship-feature init-project onboard tour audit-delta analyze code-clean client-handover; do fm_has_effort "skills/$s/SKILL.md" xhigh; done
# ── 9) vendored superpowers carry xhigh (spec D3). The files live in skills-external/ (gitignored,
# machine-owned), so the durable artifact is the install-plugins.sh re-apply; the frontmatter
# check skips VISIBLY when the skill is not vendored yet (fresh clone before make plugin).
for s in brainstorming writing-plans; do
if [ -f "$R/skills-external/$s/SKILL.md" ]; then fm_has_effort "skills-external/$s/SKILL.md" xhigh
else printf 'SKIP skills-external/%s/SKILL.md not vendored yet (run make plugin)\n' "$s"; fi
done
has "install-plugins.sh" 'effort: xhigh'
# ── 5) shifter skills + include (spec D4)
for l in low medium high xhigh max; do fm_has_effort "skills/effort-$l/SKILL.md" "$l"; has "skills/effort-$l/SKILL.md" "name: effort-$l"; done
has "lib/effort-shift.md" 'Headless sessions'
has "lib/effort-shift.md" 'Skill(effort-max)'
has "lib/effort-shift.md" 'never inside a dispatched agent'
has "lib/model-gate.md" 'lib/effort-shift.md'
# ── 6) orchestrator wiring (spec D4)
for s in feat hotfix bugfix ship-feature init-project onboard tour code-clean seo geo harden web-validate audit-delta; do
has "skills/$s/SKILL.md" 'lib/effort-shift.md'; has "skills/$s/SKILL.md" 'a lone Skill call is a no-op'; done
for s in feat hotfix bugfix ship-feature init-project code-clean seo geo harden web-validate audit-delta; do
has "skills/$s/SKILL.md" 'Skill(effort-medium)'; done
lacks "skills/onboard/SKILL.md" 'Skill(effort-medium)'; lacks "skills/tour/SKILL.md" 'Skill(effort-medium)'
has "agents/client-handover-writer.md" 'lib/effort-shift.md'; lacks "agents/client-handover-writer.md" 'Skill(effort-medium)'; has "agents/client-handover-writer.md" 'Skill(effort-high)'
for s in feat hotfix bugfix; do has "skills/$s/SKILL.md" 'Skill(effort-high)'; done
for s in ship-feature init-project onboard code-clean audit-delta; do has "skills/$s/SKILL.md" 'Skill(effort-xhigh)'; done
for s in seo geo harden web-validate; do has "skills/$s/SKILL.md" 'Skill(effort-high)'; done
for s in feat hotfix bugfix ship-feature init-project; do has "skills/$s/SKILL.md" 'Skill(effort-low)'; done
has "skills/feat/SKILL.md" 'effort-shift: nested commit-change'
# ── 6b) pairing rule documented (R11)
has "lib/effort-shift.md" 'lone Skill call is a no-op'
has "lib/effort-shift.md" 're-applies its'
[ "$(grep -c 'a lone Skill call is a no-op' "$R/skills/feat/SKILL.md")" -ge 1 ] && ok || ko "feat INC line must carry the pairing rule"
# ── 7) escalation at max (spec D4)
[ "$(grep -c 'Skill(effort-max)' "$R/lib/verify-secure-loop.md")" -eq 3 ] && ok || ko "verify-secure-loop.md must shift to max at its 3 caps"
has "skills/ship-feature/SKILL.md" 'Skill(effort-max)'
has "lib/challenge-plan.md" '/effort-max'
has "lib/verify-secure-loop.md" '/effort-max'
# ── 8) turn-reset re-assert after a prose gate followed by reflection
has "skills/bugfix/SKILL.md" 'effort-shift: turn reset'
# ── 11) audit tooling
has "lib/effort-shift.md" 'effort-audit.py'
[ -x "$R/lib/effort-audit.py" ] && ok || ko "lib/effort-audit.py missing or not executable"
# ── 6c) judgment dispatches re-raised, planning re-asserts, stronger locks (final review I1/I2/M5)
for s in ship-feature init-project; do has "skills/$s/SKILL.md" 'effort-shift: judgment dispatch'; has "skills/$s/SKILL.md" 'effort-shift: turn reset'; done
has "agents/client-handover-writer.md" 'effort-shift: judgment dispatch'
has "lib/effort-shift.md" 'Before any built-in or unpinned dispatch'
has "lib/model-gate.md" 'built-ins inherit the effort in force'
has "skills/ship-feature/SKILL.md" 'effort-shift: error recovery'
for s in feat hotfix bugfix seo geo harden web-validate ship-feature init-project onboard code-clean audit-delta; do has "skills/$s/SKILL.md" 'effort-shift: own level before the challenge'; done
has "install-plugins.sh" 'for _s in brainstorming writing-plans; do'
# ── summary (later tasks insert their locks ABOVE this line)
printf 'effort-routing census: %d pass, %d fail\n' "$pass" "$fail"
[ "$fail" -eq 0 ]
+5 -4
View File
@@ -35,7 +35,7 @@ single `GATES — VERDICT:` line:
- `UNMET(n)` → hand the dev the CONTRACT path + the `NOT-MET` rows verbatim, - `UNMET(n)` → hand the dev the CONTRACT path + the `NOT-MET` rows verbatim,
nothing else; re-run GATE 0. **No verifier is dispatched** — a red build or nothing else; re-run GATE 0. **No verifier is dispatched** — a red build or
a red suite is not a judgement call, and paying an LLM to discover it is a red suite is not a judgement call, and paying an LLM to discover it is
waste. **Max 3 floor iterations** → STOP + human escalation with the rows. waste. **Max 3 floor iterations** → `Skill(effort-max)` (effort-shift: cap reached, diagnose at max before escalating; send it in the same message as the first tool call that gathers the escalation evidence), then STOP + human escalation with the rows.
- `ABANDONED(n)` → floor green but a handoff stands. Continue to GATE 1; the - `ABANDONED(n)` → floor green but a handoff stands. Continue to GATE 1; the
verifier surfaces it and its `ABANDONED(n)` verdict routes to the human verifier surfaces it and its `ABANDONED(n)` verdict routes to the human
gate. gate.
@@ -74,7 +74,7 @@ Parse its single `VERIFY — VERDICT:` line:
lines (NOT-MET / out-of-scope), nothing else: re-dispatch a FRESH executor lines (NOT-MET / out-of-scope), nothing else: re-dispatch a FRESH executor
with those inputs only, never redo the fix by hand. Then re-run GATE 0 and with those inputs only, never redo the fix by hand. Then re-run GATE 0 and
re-dispatch a FRESH verifier. Repeat. re-dispatch a FRESH verifier. Repeat.
**Max 3 conformity iterations** → STOP + human escalation with the **Max 3 conformity iterations** → `Skill(effort-max)` (effort-shift: cap reached, diagnose at max before escalating; send it in the same message as the first tool call that gathers the escalation evidence), then STOP + human escalation with the
CRITERIA table (the contract-vs-realized diff). CRITERIA table (the contract-vs-realized diff).
- `ABANDONED(n)` → direct human gate, never a dev loop (a dev cannot close - `ABANDONED(n)` → direct human gate, never a dev loop (a dev cannot close
what was proven impossible). The human lifts the abandonment or accepts what was proven impossible). The human lifts the abandonment or accepts
@@ -104,8 +104,9 @@ Parse its single `SECURITY — VERDICT:` line:
(re-dispatch a FRESH executor, never fix by hand). Then re-run GATE 0, then (re-dispatch a FRESH executor, never fix by hand). Then re-run GATE 0, then
**re-verify the REQUEST first** (GATE 1, fresh verifier) — a security fix **re-verify the REQUEST first** (GATE 1, fresh verifier) — a security fix
can drift the behavior — **then re-run GATE 2** (fresh auditor), in that can drift the behavior — **then re-run GATE 2** (fresh auditor), in that
order. **Max 3 security iterations** → STOP + human escalation with the order. **Max 3 security iterations** → `Skill(effort-max)` (effort-shift: cap reached, diagnose at max before escalating; send it in the same message as the first tool call that gathers the escalation evidence), then STOP + human escalation with the
BLOCKING table. BLOCKING table. Every STOP text names the level reached (`$CLAUDE_EFFORT`)
and suggests `/effort-max` for the relaunch.
- `DEGRADED` (semgrep absent) → does NOT block on the tool's absence; surface - `DEGRADED` (semgrep absent) → does NOT block on the tool's absence; surface
the checklist result + recommend `make plugin`. A DEGRADED run that still the checklist result + recommend `make plugin`. A DEGRADED run that still
BLOCKs (grep-caught secret/injection) blocks like any other. BLOCKs (grep-caught secret/injection) blocks like any other.
+1 -1
View File
@@ -444,7 +444,7 @@
} }
}, },
"feedbackDrafts": "off", "feedbackDrafts": "off",
"effortLevel": "xhigh", "effortLevel": "high",
"remoteControlAtStartup": true, "remoteControlAtStartup": true,
"inputNeededNotifEnabled": true, "inputNeededNotifEnabled": true,
"skipAutoPermissionPrompt": true, "skipAutoPermissionPrompt": true,
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: analyze name: analyze
effort: xhigh
description: 'Deep factual code analysis (read-only) or DEBUG mode (pass error/stack trace) — no solutions proposed, no file modifications. Triggers: "analyze", "analyse", "how does X work", "comment ça marche", "investigate only", "root cause only, no fix", "pourquoi ce comportement", "debug analysis". Fix wanted → /bugfix or /hotfix instead.' description: 'Deep factual code analysis (read-only) or DEBUG mode (pass error/stack trace) — no solutions proposed, no file modifications. Triggers: "analyze", "analyse", "how does X work", "comment ça marche", "investigate only", "root cause only, no fix", "pourquoi ce comportement", "debug analysis". Fix wanted → /bugfix or /hotfix instead.'
argument-hint: <file/area to analyze — OR paste error/stack trace for DEBUG mode> argument-hint: <file/area to analyze — OR paste error/stack trace for DEBUG mode>
allowed-tools: Read, Grep, Glob, Bash allowed-tools: Read, Grep, Glob, Bash
+4
View File
@@ -1,5 +1,6 @@
--- ---
name: audit-delta name: audit-delta
effort: xhigh
description: | description: |
Use when the user wants a recurring code audit scoped to changes since Use when the user wants a recurring code audit scoped to changes since
the previous run (full codebase on first run), on selectable axes: the previous run (full codebase on first run), on selectable axes:
@@ -28,6 +29,7 @@ Run `$HOME/.claude/lib/model-gate.md`. Reflection here (planning, audit
judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the
gate prints the remedy; end the turn — no later step, no dispatch. Nominal gate prints the remedy; end the turn — no later step, no dispatch. Nominal
(big) path is silent. (big) path is silent.
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
Audit only what changed since the last run, on the axes the user picks. Audit only what changed since the last run, on the axes the user picks.
Per axis: **audit → approval gate → fix → re-verify → marker update**, Per axis: **audit → approval gate → fix → re-verify → marker update**,
@@ -168,6 +170,7 @@ Then show the user the same compact table inline.
### 3b-bis. CHALLENGE THE PROPOSALS (before the gate) ### 3b-bis. CHALLENGE THE PROPOSALS (before the gate)
`Skill(effort-xhigh)` first (effort-shift: own level before the challenge; send it in the same message as the challenger dispatch).
This axis' findings + proposed fixes are a proposal set worth attacking before This axis' findings + proposed fixes are a proposal set worth attacking before
the human gate. Persist THIS axis' finding list (not the whole append-only the human gate. Persist THIS axis' finding list (not the whole append-only
report) to `.claude/tasks/plans/<date>-<axis>-<HHMM>.md`, then run report) to `.claude/tasks/plans/<date>-<axis>-<HHMM>.md`, then run
@@ -253,6 +256,7 @@ Then offer to capitalize (per CLAUDE.md): recurring finding patterns →
below on the same delta (the SAST is a deterministic floor, the reasoned below on the same delta (the SAST is a deterministic floor, the reasoned
pass covers what grep/rules miss): pass covers what grep/rules miss):
``` ```
Skill(effort-medium) # effort-shift: dispatch span starts; send with the Agent call below in ONE message
Agent(subagent_type="security-auditor", description="audit-delta security — semgrep SAST", Agent(subagent_type="security-auditor", description="audit-delta security — semgrep SAST",
prompt="MODE: audit\nSCOPE: <delta file list>\nREPORT: .claude/audits/.audit-delta-semgrep.md\nFollow agents/security-auditor.md exactly. Pinned rulesets, no login. Write ONLY to REPORT. End with REPORT_WRITTEN: <path>.") prompt="MODE: audit\nSCOPE: <delta file list>\nREPORT: .claude/audits/.audit-delta-semgrep.md\nFollow agents/security-auditor.md exactly. Pinned rulesets, no login. Write ONLY to REPORT. End with REPORT_WRITTEN: <path>.")
``` ```
+7
View File
@@ -1,5 +1,6 @@
--- ---
name: bugfix name: bugfix
effort: high
description: | description: |
Structured bug fix with root cause investigation. For bugs where Structured bug fix with root cause investigation. For bugs where
the cause isn't immediately obvious, spans multiple files, or the cause isn't immediately obvious, spans multiple files, or
@@ -25,6 +26,7 @@ allowed-tools:
MODEL GATE (blocking): run `$HOME/.claude/lib/model-gate.md` BEFORE any MODEL GATE (blocking): run `$HOME/.claude/lib/model-gate.md` BEFORE any
step below. Verdict `small` → STOP — print the gate's remedy, end the step below. Verdict `small` → STOP — print the gate's remedy, end the
turn, dispatch nothing. turn, dispatch nothing.
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
## REQUEST ## REQUEST
$ARGUMENTS $ARGUMENTS
@@ -117,12 +119,14 @@ RISK: <low/medium — what could go wrong>
obvious fix. obvious fix.
- If the fix is significant (>10 lines, multiple files, - If the fix is significant (>10 lines, multiple files,
behavior change): wait for user approval. behavior change): wait for user approval.
On resume: `Skill(effort-high)` first, sent with the next tool call (effort-shift: turn reset).
- Then run pass B of `$HOME/.claude/lib/contract-interview.md` against the - Then run pass B of `$HOME/.claude/lib/contract-interview.md` against the
FIX PLAN: every VISIBLE / PUBLIC NAME / SCOPE choice it settles that the FIX PLAN: every VISIBLE / PUBLIC NAME / SCOPE choice it settles that the
bug report left open → one batch of questions, before STEP 3b. The trivial bug report left open → one batch of questions, before STEP 3b. The trivial
fast-path is not exempt: a 1-line fix with a visible choice still asks. fast-path is not exempt: a 1-line fix with a visible choice still asks.
## STEP 3b — CHALLENGE THE FIX PLAN (before the contract) ## STEP 3b — CHALLENGE THE FIX PLAN (before the contract)
`Skill(effort-high)` first (effort-shift: own level before the challenge; send it in the same message as the challenger dispatch).
Unless the fix is the trivial 1-2 line case STEP 3 already fast-paths, the Unless the fix is the trivial 1-2 line case STEP 3 already fast-paths, the
DIAGNOSIS + FIX PLAN is a reflection worth attacking before it hardens into a DIAGNOSIS + FIX PLAN is a reflection worth attacking before it hardens into a
contract. Persist it to `.claude/tasks/plans/<date>-<slug>-<HHMM>.md`, then run contract. Persist it to `.claude/tasks/plans/<date>-<slug>-<HHMM>.md`, then run
@@ -156,6 +160,7 @@ branch it's a no-op (commit in place). Never `finish`.
Dispatch the executor — sonnet by frontmatter pin, do not override: Dispatch the executor — sonnet by frontmatter pin, do not override:
``` ```
Skill(effort-medium) # effort-shift: dispatch span starts; send with the Agent call below in ONE message
Agent(subagent_type="bugfixer") Agent(subagent_type="bugfixer")
prompt: "CONTRACT: <path from STEP 3.5> prompt: "CONTRACT: <path from STEP 3.5>
DIAGNOSIS: <ROOT CAUSE + EVIDENCE from STEP 3> DIAGNOSIS: <ROOT CAUSE + EVIDENCE from STEP 3>
@@ -277,6 +282,8 @@ A bugfix with an understood root cause is almost always worth one entry:
If the bug was trivial and the root cause not transferable → skip with `CAPITALIZE: trivial, skip`. If the bug was trivial and the root cause not transferable → skip with `CAPITALIZE: trivial, skip`.
`Skill(effort-low)` first (effort-shift: bookkeeping tail; send it in the same message as the memory-commit command).
**Then commit the memory** — follow `$HOME/.claude/lib/capitalize-commit.md`: it **Then commit the memory** — follow `$HOME/.claude/lib/capitalize-commit.md`: it
surgically commits what capitalize just wrote (`.claude/memory` + `.claude/tasks` surgically commits what capitalize just wrote (`.claude/memory` + `.claude/tasks`
only, never `git add -A`) as one `chore(memory)` commit, reports the memory-commit only, never `git add -A`) as one `chore(memory)` commit, reports the memory-commit
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: capitalize name: capitalize
effort: low
description: | description: |
Use when about to /clear or /compact, or closing a session, with Use when about to /clear or /compact, or closing a session, with
decisions, learnings, blockers, evals, or TODO changes not yet written decisions, learnings, blockers, evals, or TODO changes not yet written
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: client-handover name: client-handover
effort: xhigh
description: | description: |
Use when finalizing a project for non-technical client delivery — Use when finalizing a project for non-technical client delivery —
final audits, live-site validation, branded deliverable (MD + HTML + final audits, live-site validation, branded deliverable (MD + HTML +
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: close name: close
effort: low
description: | description: |
End-of-session ritual — flush what was decided, learned, and blocked into End-of-session ritual — flush what was decided, learned, and blocked into
`.claude/memory/`, reconcile `.claude/tasks/TODO.md`, and log a journal line. `.claude/memory/`, reconcile `.claude/tasks/TODO.md`, and log a journal line.
+4
View File
@@ -1,5 +1,6 @@
--- ---
name: code-clean name: code-clean
effort: xhigh
description: | description: |
Full codebase cleanup: dead code, style/norm enforcement, structural Full codebase cleanup: dead code, style/norm enforcement, structural
issues. Two-phase: read-only audit, then approved fixes only issues. Two-phase: read-only audit, then approved fixes only
@@ -25,6 +26,7 @@ allowed-tools:
MODEL GATE (blocking): run `$HOME/.claude/lib/model-gate.md` BEFORE any MODEL GATE (blocking): run `$HOME/.claude/lib/model-gate.md` BEFORE any
step below. Verdict `small` → STOP — print the gate's remedy, end the step below. Verdict `small` → STOP — print the gate's remedy, end the
turn, dispatch nothing. turn, dispatch nothing.
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
## TARGET ## TARGET
$ARGUMENTS $ARGUMENTS
@@ -120,6 +122,7 @@ TOTALS: <N blocking, N warn, N info>
If no issues found: report clean state and stop. If no issues found: report clean state and stop.
## STEP 3b — CHALLENGE THE SCOPE (before approval) ## STEP 3b — CHALLENGE THE SCOPE (before approval)
`Skill(effort-xhigh)` first (effort-shift: own level before the challenge; send it in the same message as the challenger dispatch).
The STEP 3 report is the proposed cleanup scope — worth attacking before the The STEP 3 report is the proposed cleanup scope — worth attacking before the
human approves it. It is still inline, so FIRST persist it to human approves it. It is still inline, so FIRST persist it to
`.claude/tasks/plans/<date>-<slug>-<HHMM>.md` (STEP 3 report format, one item `.claude/tasks/plans/<date>-<slug>-<HHMM>.md` (STEP 3 report format, one item
@@ -172,6 +175,7 @@ is approved, stop — no dispatch.
2. **Dispatch the executor** — sonnet by frontmatter pin, do not override: 2. **Dispatch the executor** — sonnet by frontmatter pin, do not override:
``` ```
Skill(effort-medium) # effort-shift: dispatch span starts; send with the Agent call below in ONE message
Agent(subagent_type="code-cleaner") Agent(subagent_type="code-cleaner")
prompt: "SCOPE: .claude/audits/CODE-CLEAN-SCOPE.md prompt: "SCOPE: .claude/audits/CODE-CLEAN-SCOPE.md
APPROVED: <the approved item list, incl. any per-item exported-symbol clears> APPROVED: <the approved item list, incl. any per-item exported-symbol clears>
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: commit-change name: commit-change
effort: low
description: | description: |
Analyze all pending changes (staged, unstaged, untracked) and create Analyze all pending changes (staged, unstaged, untracked) and create
atomic commits grouped by logical unit, retracing the work. Any git atomic commits grouped by logical unit, retracing the work. Any git
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: deploy name: deploy
effort: low
description: | description: |
Use when deploying a project via its per-project runbook — instantiates the delta Use when deploying a project via its per-project runbook — instantiates the delta
since last deploy, hands off for out-of-band execution, resumes cold, learns from errors. since last deploy, hands off for out-of-band execution, resumes cold, learns from errors.
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: doc name: doc
effort: low
description: | description: |
Use when documentation may be out of sync with code — features Use when documentation may be out of sync with code — features
added/removed vs README / INSTALL / DEPLOY / CHANGELOG. Stack-aware added/removed vs README / INSTALL / DEPLOY / CHANGELOG. Stack-aware
+6
View File
@@ -0,0 +1,6 @@
---
name: effort-high
description: Investigation shift. Deeper reasoning for diagnosis, LOCATE, contract drafting, refactor judgement inside feat, hotfix and bugfix runs.
effort: high
---
Effort shifted to high for the rest of this turn (lib/effort-shift.md). Continue with the caller's next step.
+6
View File
@@ -0,0 +1,6 @@
---
name: effort-low
description: Bookkeeping shift. Lowers reasoning to the cheapest level for the rest of the turn: journal lines, memory commits, capitalize, release bookkeeping, status output.
effort: low
---
Effort shifted to low for the rest of this turn (lib/effort-shift.md). Continue with the caller's next step.
+6
View File
@@ -0,0 +1,6 @@
---
name: effort-max
description: Escalation shift. Maximum reasoning when a verify or security loop hits its cap, a gate fails twice, or error recovery starts in ship-feature.
effort: max
---
Effort shifted to max for the rest of this turn (lib/effort-shift.md). Continue with the caller's next step.
+6
View File
@@ -0,0 +1,6 @@
---
name: effort-medium
description: Orchestration shift. Standard reasoning between two dispatches: read a subagent report, pick the next step, relay a gate verdict, route a branch.
effort: medium
---
Effort shifted to medium for the rest of this turn (lib/effort-shift.md). Continue with the caller's next step.
+6
View File
@@ -0,0 +1,6 @@
---
name: effort-xhigh
description: Reflection shift. Deep reasoning for brainstorm, planning, challenge synthesis and audit verdicts before a human validation gate.
effort: xhigh
---
Effort shifted to xhigh for the rest of this turn (lib/effort-shift.md). Continue with the caller's next step.
+7
View File
@@ -1,5 +1,6 @@
--- ---
name: feat name: feat
effort: high
description: | description: |
Small feature implementation (1-5 files). Reflection inline (scope, Small feature implementation (1-5 files). Reflection inline (scope,
plan, contract — session model), execution dispatched to the plan, contract — session model), execution dispatched to the
@@ -25,6 +26,7 @@ allowed-tools:
MODEL GATE (blocking): run `$HOME/.claude/lib/model-gate.md` BEFORE any MODEL GATE (blocking): run `$HOME/.claude/lib/model-gate.md` BEFORE any
step below. Verdict `small` → STOP — print the gate's remedy, end the step below. Verdict `small` → STOP — print the gate's remedy, end the
turn, dispatch nothing. turn, dispatch nothing.
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
## REQUEST ## REQUEST
$ARGUMENTS $ARGUMENTS
@@ -122,6 +124,7 @@ in the contract's CLARIFICATIONS `[gated]` and in the plan. A choice that
surfaces only during execution comes back as `NEED-DECISION` (STEP 3). surfaces only during execution comes back as `NEED-DECISION` (STEP 3).
## STEP 1b — CHALLENGE THE PLAN (before branching) ## STEP 1b — CHALLENGE THE PLAN (before branching)
`Skill(effort-high)` first (effort-shift: own level before the challenge; send it in the same message as the challenger dispatch).
The STEP 1 plan is a reflection worth attacking before a branch is spent on it. The STEP 1 plan is a reflection worth attacking before a branch is spent on it.
Persist it to `.claude/tasks/plans/<date>-<slug>-<HHMM>.md`, then run Persist it to `.claude/tasks/plans/<date>-<slug>-<HHMM>.md`, then run
`$HOME/.claude/lib/challenge-plan.md` with `PLAN` = that file, `KIND` = `build-plan`, `$HOME/.claude/lib/challenge-plan.md` with `PLAN` = that file, `KIND` = `build-plan`,
@@ -143,6 +146,7 @@ branch it's a no-op (commit in place). Never `finish`.
Dispatch the executor — sonnet by frontmatter pin, do not override: Dispatch the executor — sonnet by frontmatter pin, do not override:
``` ```
Skill(effort-medium) # effort-shift: dispatch span starts; send with the Agent call below in ONE message
Agent(subagent_type="feater") Agent(subagent_type="feater")
prompt: "CONTRACT: <path from STEP 0.7> prompt: "CONTRACT: <path from STEP 0.7>
PLAN: <the STEP 1 checklist + approach bullets + edge cases, verbatim> PLAN: <the STEP 1 checklist + approach bullets + edge cases, verbatim>
@@ -199,6 +203,7 @@ test), consider splitting into 2-3 atomic commits grouped by logical
unit — or run `/commit-change` on the pending work (it dispatches the unit — or run `/commit-change` on the pending work (it dispatches the
commit-changer (propose opus / apply sonnet, BDR-077); never inline-load the bare agent, it is now a commit-changer (propose opus / apply sonnet, BDR-077); never inline-load the bare agent, it is now a
propose/apply executor). propose/apply executor).
Then `Skill(effort-high)` (effort-shift: nested commit-change loaded at low; reload feat's level, sent with the next tool call).
Print summary: Print summary:
``` ```
@@ -249,6 +254,8 @@ Always append a 1-line entry to today's heading in `.claude/memory/journal.md`.
If no substantive capture candidate → skip with `CAPITALIZE: nothing to log`. If no substantive capture candidate → skip with `CAPITALIZE: nothing to log`.
`Skill(effort-low)` first (effort-shift: bookkeeping tail; send it in the same message as the memory-commit command).
**Then commit the memory** — follow `$HOME/.claude/lib/capitalize-commit.md`: it **Then commit the memory** — follow `$HOME/.claude/lib/capitalize-commit.md`: it
surgically commits what capitalize just wrote (`.claude/memory` + `.claude/tasks` surgically commits what capitalize just wrote (`.claude/memory` + `.claude/tasks`
only, never `git add -A`) as one `chore(memory)` commit, reports the memory-commit only, never `git add -A`) as one `chore(memory)` commit, reports the memory-commit
+5
View File
@@ -1,5 +1,6 @@
--- ---
name: geo name: geo
effort: high
description: | description: |
Use when a web project needs AI-search visibility audit — ChatGPT, Use when a web project needs AI-search visibility audit — ChatGPT,
Perplexity, Gemini, AI Overviews, Copilot… Standalone GEO; dispatches Perplexity, Gemini, AI Overviews, Copilot… Standalone GEO; dispatches
@@ -28,6 +29,7 @@ Run `$HOME/.claude/lib/model-gate.md`. Reflection here (planning, audit
judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the
gate prints the remedy; end the turn — no later step, no dispatch. Nominal gate prints the remedy; end the turn — no later step, no dispatch. Nominal
(big) path is silent. (big) path is silent.
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
Dispatches the `geo-analyzer` subagent (audit + fix bundle), then applies Dispatches the `geo-analyzer` subagent (audit + fix bundle), then applies
the bundle from THIS main loop at **L1** — same shape as `/web-validate` the bundle from THIS main loop at **L1** — same shape as `/web-validate`
@@ -45,6 +47,7 @@ every phase (LRN-126). Clean `.audit/geo-signals-<RUNID>.md` after apply.
**A — collect (sonnet):** **A — collect (sonnet):**
``` ```
Skill(effort-medium) # effort-shift: dispatch span starts; send with the Agent call below in ONE message
Agent(subagent_type="geo-analyzer", model="sonnet") Agent(subagent_type="geo-analyzer", model="sonnet")
prompt: "MODE: collect prompt: "MODE: collect
RUNID: <RUNID> RUNID: <RUNID>
@@ -83,6 +86,7 @@ your bundle."
``` ```
## STEP 1b — CHALLENGE THE FIX BUNDLE (advisory, before apply) ## STEP 1b — CHALLENGE THE FIX BUNDLE (advisory, before apply)
`Skill(effort-high)` first (effort-shift: own level before the challenge; send it in the same message as the challenger dispatch).
The analyzer returned a `## FIX BUNDLE` — worth attacking before any edit lands. The analyzer returned a `## FIX BUNDLE` — worth attacking before any edit lands.
**Skip if intervention mode = conservative** (nothing is applied). Else persist the **Skip if intervention mode = conservative** (nothing is applied). Else persist the
bundle verbatim to `.claude/tasks/plans/<date>-<slug>-<HHMM>.md`, then run bundle verbatim to `.claude/tasks/plans/<date>-<slug>-<HHMM>.md`, then run
@@ -114,6 +118,7 @@ intent, not header wording: **AUTO** = no-confirmation items (G1–G4/G6);
For each AUTO item, dispatch its `applier` at L1, passing the item verbatim: For each AUTO item, dispatch its `applier` at L1, passing the item verbatim:
``` ```
Skill(effort-medium) # effort-shift: dispatch span starts; send with the Agent call below in ONE message
Agent(subagent_type="hotfixer") # or "feater" per the item's applier Agent(subagent_type="hotfixer") # or "feater" per the item's applier
prompt: "<paste the bundle item: files, concern, current, expected, prompt: "<paste the bundle item: files, concern, current, expected,
framework note + shared-file discipline>. framework note + shared-file discipline>.
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: gitflow name: gitflow
effort: medium
description: Use when a project needs gitflow branch operations — bootstrapping main+develop, starting a typed branch (feature/bugfix/release/hotfix), or integrating finished work by directed merge — or when an orchestrator must branch or merge under the gitflow model. Use when about to merge any branch into develop or main. description: Use when a project needs gitflow branch operations — bootstrapping main+develop, starting a typed branch (feature/bugfix/release/hotfix), or integrating finished work by directed merge — or when an orchestrator must branch or merge under the gitflow model. Use when about to merge any branch into develop or main.
--- ---
+4
View File
@@ -1,5 +1,6 @@
--- ---
name: harden name: harden
effort: high
description: | description: |
Web hardening audit — HTTPS/TLS, HSTS, security headers (CSP, Web hardening audit — HTTPS/TLS, HSTS, security headers (CSP,
X-Frame-Options…), cookie flags, canonical, custom 404, server config X-Frame-Options…), cookie flags, canonical, custom 404, server config
@@ -28,6 +29,7 @@ Run `$HOME/.claude/lib/model-gate.md`. Reflection here (planning, audit
judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the
gate prints the remedy; end the turn — no later step, no dispatch. Nominal gate prints the remedy; end the turn — no later step, no dispatch. Nominal
(big) path is silent. (big) path is silent.
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
This skill orchestrates a narrow-scope hardening audit: TLS + security This skill orchestrates a narrow-scope hardening audit: TLS + security
headers + redirects + canonical + custom 404 + server configs. It headers + redirects + canonical + custom 404 + server configs. It
@@ -259,6 +261,7 @@ seo-analyzer will run in parallel.
Spawn a single seo-analyzer subagent with an explicit IN/OUT scope list. Spawn a single seo-analyzer subagent with an explicit IN/OUT scope list.
``` ```
Skill(effort-medium) # effort-shift: dispatch span starts; send with the Agent call below in ONE message
Agent( Agent(
subagent_type="seo-analyzer", subagent_type="seo-analyzer",
description="harden — narrow-scope web hardening audit", description="harden — narrow-scope web hardening audit",
@@ -519,6 +522,7 @@ Extract the score and critical-alert count from `.claude/audits/HARDEN.md` for t
--- ---
## STEP 2b — CHALLENGE THE FIX BUNDLE (MODE=fix only, advisory) ## STEP 2b — CHALLENGE THE FIX BUNDLE (MODE=fix only, advisory)
`Skill(effort-high)` first (effort-shift: own level before the challenge; send it in the same message as the challenger dispatch).
Skip if MODE=audit (no bundle exists). Else, before the STEP 3 gate, harden the bundle: Skip if MODE=audit (no bundle exists). Else, before the STEP 3 gate, harden the bundle:
extract the `## 8. Fix bundle` section from HARDEN.md to extract the `## 8. Fix bundle` section from HARDEN.md to
`.claude/tasks/plans/<date>-<slug>-<HHMM>.md` (a clean, blind-judgeable artifact), then run `.claude/tasks/plans/<date>-<slug>-<HHMM>.md` (a clean, blind-judgeable artifact), then run
+6
View File
@@ -1,5 +1,6 @@
--- ---
name: hotfix name: hotfix
effort: high
description: | description: |
Quick fix for superficial bugs: typos, CSS issues, config errors, Quick fix for superficial bugs: typos, CSS issues, config errors,
off-by-one, wrong variable name, missing import, broken link. off-by-one, wrong variable name, missing import, broken link.
@@ -23,6 +24,7 @@ allowed-tools:
MODEL GATE (blocking): run `$HOME/.claude/lib/model-gate.md` BEFORE any MODEL GATE (blocking): run `$HOME/.claude/lib/model-gate.md` BEFORE any
step below. Verdict `small` → STOP — print the gate's remedy, end the step below. Verdict `small` → STOP — print the gate's remedy, end the
turn, dispatch nothing. turn, dispatch nothing.
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
## REQUEST ## REQUEST
$ARGUMENTS $ARGUMENTS
@@ -92,6 +94,7 @@ point. Run it ONLY when the settled fix touches control flow or behaviour — an
off-by-one, a wrong operator/variable, a behaviour-changing config value, or a off-by-one, a wrong operator/variable, a behaviour-changing config value, or a
missing import that alters execution. In doubt → it is probably a `/bugfix`. missing import that alters execution. In doubt → it is probably a `/bugfix`.
`Skill(effort-high)` first (effort-shift: own level before the challenge; send it in the same message as the challenger dispatch).
For a logic fix: persist the STEP 1 located fix (root cause + the exact edit) to For a logic fix: persist the STEP 1 located fix (root cause + the exact edit) to
`.claude/tasks/plans/<date>-<slug>-<HHMM>.md`, then run `.claude/tasks/plans/<date>-<slug>-<HHMM>.md`, then run
`$HOME/.claude/lib/challenge-plan.md` with `PLAN` = that file, `KIND` = `$HOME/.claude/lib/challenge-plan.md` with `PLAN` = that file, `KIND` =
@@ -135,6 +138,7 @@ mentioned: STOP and ask `"working tree dirty: stash and continue, or abort?"`.
Dispatch the executor — sonnet by frontmatter pin, do not override: Dispatch the executor — sonnet by frontmatter pin, do not override:
``` ```
Skill(effort-medium) # effort-shift: dispatch span starts; send with the Agent call below in ONE message
Agent(subagent_type="hotfixer") Agent(subagent_type="hotfixer")
prompt: "CONTRACT: <path from STEP 1.7> prompt: "CONTRACT: <path from STEP 1.7>
LOCATED: <file(s) found in STEP 1 + the confirmed root cause> LOCATED: <file(s) found in STEP 1 + the confirmed root cause>
@@ -232,6 +236,8 @@ Always append a 1-line entry to today's heading in `.claude/memory/journal.md` (
**Language rule**: the journal line and any proposed BLK/LRN entries are ALWAYS written English AND caveman — fragments, articles dropped, code/IDs/quoted errors verbatim — per CLAUDE.md "Memory registries" (Always English, always caveman). **Language rule**: the journal line and any proposed BLK/LRN entries are ALWAYS written English AND caveman — fragments, articles dropped, code/IDs/quoted errors verbatim — per CLAUDE.md "Memory registries" (Always English, always caveman).
`Skill(effort-low)` first (effort-shift: bookkeeping tail; send it in the same message as the memory-commit command).
**Then commit the memory** — follow `$HOME/.claude/lib/capitalize-commit.md`: it **Then commit the memory** — follow `$HOME/.claude/lib/capitalize-commit.md`: it
surgically commits what capitalize just wrote (`.claude/memory` + `.claude/tasks` surgically commits what capitalize just wrote (`.claude/memory` + `.claude/tasks`
only, never `git add -A`) as one `chore(memory)` commit, reports the memory-commit only, never `git add -A`) as one `chore(memory)` commit, reports the memory-commit
+9 -1
View File
@@ -1,5 +1,6 @@
--- ---
name: init-project name: init-project
effort: xhigh
description: 'Use when initializing a brand-new project from scratch — needs interview, design, scaffold, and TDD implementation. Multi-agent orchestrator: plugin-advisor + interviewer + analyzer + scaffolder with two validation gates. Triggers: "init project", "new project", "start project from scratch", "scaffold project", "init-project".' description: 'Use when initializing a brand-new project from scratch — needs interview, design, scaffold, and TDD implementation. Multi-agent orchestrator: plugin-advisor + interviewer + analyzer + scaffolder with two validation gates. Triggers: "init project", "new project", "start project from scratch", "scaffold project", "init-project".'
argument-hint: <project idea or description> argument-hint: <project idea or description>
allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Agent, Skill allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Agent, Skill
@@ -13,6 +14,7 @@ Run `$HOME/.claude/lib/model-gate.md`. Reflection here (planning, audit
judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the
gate prints the remedy; end the turn — no later step, no dispatch. Nominal gate prints the remedy; end the turn — no later step, no dispatch. Nominal
(big) path is silent. (big) path is silent.
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
## REQUEST ## REQUEST
$ARGUMENTS $ARGUMENTS
@@ -95,7 +97,7 @@ contract, each tagged `[gated <date>]`. STEP 9's verifier judges against this
enriched contract. enriched contract.
## STEP 5 — SCAFFOLD ## STEP 5 — SCAFFOLD
Dispatch `Agent(subagent_type="scaffolder")` (pin sonnet, effort high — Dispatch `Agent(subagent_type="scaffolder")` (pin sonnet, effort medium —
BDR-077 : le design est CLOS au gate #1, le scaffold est de l'exécution, BDR-077 : le design est CLOS au gate #1, le scaffold est de l'exécution,
plus jamais inline sur le modèle de session). Pass IN THE PROMPT (LRN-126 — plus jamais inline sur le modèle de session). Pass IN THE PROMPT (LRN-126 —
every field the scaffolder consumes crosses the dispatch): BRIEF (verbatim) every field the scaffolder consumes crosses the dispatch): BRIEF (verbatim)
@@ -179,10 +181,12 @@ This is the deterministic scaffold commit owner (closes BLK-010). The MVP is
implemented on a `feature/*` branch off `develop` (STEP 8). implemented on a `feature/*` branch off `develop` (STEP 8).
## STEP 6 — PLAN ## STEP 6 — PLAN
`Skill(effort-xhigh)` first, sent with the next tool call (effort-shift: turn reset; gate #1 ended the turn and the vendored `writing-plans` pin applies only when the user invokes it).
Invoke `writing-plans` (vendored superpowers skill) with BRIEF + skeleton. Invoke `writing-plans` (vendored superpowers skill) with BRIEF + skeleton.
Granular tasks (2-5 min each), exact file paths, TDD: tests before code. Granular tasks (2-5 min each), exact file paths, TDD: tests before code.
## STEP 6b — CHALLENGE THE PLAN (before the gate) ## STEP 6b — CHALLENGE THE PLAN (before the gate)
`Skill(effort-xhigh)` first (effort-shift: own level before the challenge; send it in the same message as the challenger dispatch).
Before the human sees the implementation plan, harden it. Run Before the human sees the implementation plan, harden it. Run
`$HOME/.claude/lib/challenge-plan.md` with `PLAN` = the plan STEP 6 wrote under `$HOME/.claude/lib/challenge-plan.md` with `PLAN` = the plan STEP 6 wrote under
`docs/superpowers/plans/`, `KIND` = `build-plan`, `SCOPE` = the skeleton + task file `docs/superpowers/plans/`, `KIND` = `build-plan`, `SCOPE` = the skeleton + task file
@@ -208,6 +212,7 @@ Approve and start? (yes / request changes)
Changes → back to STEP 6. Approved → continue. Changes → back to STEP 6. Approved → continue.
## STEP 8 — IMPLEMENT ## STEP 8 — IMPLEMENT
First: `Skill(effort-medium)` (effort-shift: dispatch span starts; send it in the same message as this step's first dispatch).
Start the MVP feature branch off develop, then implement on it: Start the MVP feature branch off develop, then implement on it:
```bash ```bash
bash "$HOME/.claude/lib/gitflow.sh" start feature mvp bash "$HOME/.claude/lib/gitflow.sh" start feature mvp
@@ -256,6 +261,7 @@ against the founding contract. Distinct axis from STEP 10 code review
([[LRN-095]]) — both run. ([[LRN-095]]) — both run.
## STEP 10 — CODE REVIEW ## STEP 10 — CODE REVIEW
`Skill(effort-xhigh)` first, sent with the review dispatch (effort-shift: judgment dispatch; the reviewer is a built-in and inherits the level in force).
Invoke `requesting-code-review` (vendored superpowers skill). **Model routing (BDR-077):** the Invoke `requesting-code-review` (vendored superpowers skill). **Model routing (BDR-077):** the
review subagent it dispatches MUST carry `model: "opus"` in the Agent call — review subagent it dispatches MUST carry `model: "opus"` in the Agent call —
craft review is dispatched judgment, never inherited from the session. Fix craft review is dispatched judgment, never inherited from the session. Fix
@@ -310,6 +316,8 @@ articles dropped, code/IDs/quoted errors verbatim — per CLAUDE.md "Memory
registries" (Always English, always caveman). The gate may mirror the user's registries" (Always English, always caveman). The gate may mirror the user's
language; entries must not. language; entries must not.
`Skill(effort-low)` first (effort-shift: bookkeeping tail; send it in the same message as the memory-commit command).
**Then commit the memory** — follow `$HOME/.claude/lib/capitalize-commit.md`: it **Then commit the memory** — follow `$HOME/.claude/lib/capitalize-commit.md`: it
surgically commits the approved founding decisions (`.claude/memory` + surgically commits the approved founding decisions (`.claude/memory` +
`.claude/tasks` only, never `git add -A`) as one `chore(memory)` commit, BEFORE `.claude/tasks` only, never `git add -A`) as one `chore(memory)` commit, BEFORE
+3
View File
@@ -1,5 +1,6 @@
--- ---
name: onboard name: onboard
effort: xhigh
description: 'Use when bringing an existing repo into the claude-config framework — needs archetype detection, config install, full multi-axis audit (debt/SEO/GEO/UI-UX/perf/security/a11y/docs), and prioritized backlog. Multi-agent orchestrator. Do NOT use for repos created via /init-project. Triggers: "onboard", "onboard project", "audit existing repo", "setup existing project".' description: 'Use when bringing an existing repo into the claude-config framework — needs archetype detection, config install, full multi-axis audit (debt/SEO/GEO/UI-UX/perf/security/a11y/docs), and prioritized backlog. Multi-agent orchestrator. Do NOT use for repos created via /init-project. Triggers: "onboard", "onboard project", "audit existing repo", "setup existing project".'
argument-hint: '[optional hints: "Python FastAPI" | "Next.js monorepo" | "force-archetype:wordpress"]' argument-hint: '[optional hints: "Python FastAPI" | "Next.js monorepo" | "force-archetype:wordpress"]'
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, Skill allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, Skill
@@ -13,6 +14,7 @@ Run `$HOME/.claude/lib/model-gate.md`. Reflection here (planning, audit
judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the
gate prints the remedy; end the turn — no later step, no dispatch. Nominal gate prints the remedy; end the turn — no later step, no dispatch. Nominal
(big) path is silent. (big) path is silent.
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
## REQUEST ## REQUEST
$ARGUMENTS $ARGUMENTS
@@ -890,6 +892,7 @@ Vérifier que les 4 fichiers `.claude/audits/ONBOARD_REPORT.md`, `.claude/audits
--- ---
## STEP 7b — CHALLENGE THE PROPOSALS (before the human gate) ## STEP 7b — CHALLENGE THE PROPOSALS (before the human gate)
`Skill(effort-xhigh)` first (effort-shift: own level before the challenge; send it in the same message as the challenger dispatch).
The 4 audit files are on disk; `AUDIT_PROPOSALS.md` is the artifact worth The 4 audit files are on disk; `AUDIT_PROPOSALS.md` is the artifact worth
attacking before the human spends a gate on it. Run attacking before the human spends a gate on it. Run
`$HOME/.claude/lib/challenge-plan.md` with `PLAN` = `$HOME/.claude/lib/challenge-plan.md` with `PLAN` =
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: plugin-check name: plugin-check
effort: low
description: 'Audit active plugins vs project needs. Read-only advisory recommending enable/disable. Triggers: "plugin-check", "quels plugins".' description: 'Audit active plugins vs project needs. Read-only advisory recommending enable/disable. Triggers: "plugin-check", "quels plugins".'
argument-hint: '[ex: "React + FastAPI" or "Rust CLI, no frontend"]' argument-hint: '[ex: "React + FastAPI" or "Rust CLI, no frontend"]'
allowed-tools: Read, Bash, Glob, Grep, Agent allowed-tools: Read, Bash, Glob, Grep, Agent
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: profile name: profile
effort: low
description: | description: |
Partition Claude skills by purpose: design, dev, qa, audit, minimal. Partition Claude skills by purpose: design, dev, qa, audit, minimal.
Toggles symlinks between skills/ and skills-disabled/ to keep only Toggles symlinks between skills/ and skills-disabled/ to keep only
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: prune-memory name: prune-memory
effort: medium
description: | description: |
Use when .claude/memory/ registries grow too large or noisy — superseded Use when .claude/memory/ registries grow too large or noisy — superseded
entries verbose, similar entries cluttering, journal stale, caveman style entries verbose, similar entries cluttering, journal stale, caveman style
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: reconcile name: reconcile
effort: low
description: Use when you need the REAL open-work state of a project and the TODO or memory registries may be stale — "is the queue empty?", "what's left open?", "qu'est-ce qui reste", before /close, after a break, or when a checkbox/status looks doubtful. Confronts declared status (TODO checkboxes, registry statuses) against real git/fs state and surfaces the gaps. NOT memory curation (that is /prune-memory). description: Use when you need the REAL open-work state of a project and the TODO or memory registries may be stale — "is the queue empty?", "what's left open?", "qu'est-ce qui reste", before /close, after a break, or when a checkbox/status looks doubtful. Confronts declared status (TODO checkboxes, registry statuses) against real git/fs state and surfaces the gaps. NOT memory curation (that is /prune-memory).
--- ---
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: refactor name: refactor
effort: high
description: 'Improve code quality without changing behavior — strict norm enforcement, targeted scope (file/module). Full-codebase audit+cleanup → /code-clean. Triggers: "refactor", "clean up code", "normaliser".' description: 'Improve code quality without changing behavior — strict norm enforcement, targeted scope (file/module). Full-codebase audit+cleanup → /code-clean. Triggers: "refactor", "clean up code", "normaliser".'
argument-hint: <file, function, or module to refactor> argument-hint: <file, function, or module to refactor>
allowed-tools: Read, Write, Edit, Grep, Glob, Bash, Agent allowed-tools: Read, Write, Edit, Grep, Glob, Bash, Agent
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: release-candidate name: release-candidate
effort: low
description: 'Use when develop is ahead of main and you want to cut a versioned release — finalize version.txt + CHANGELOG, merge develop→main via the gitflow fan-out, tag it, and push. Triggers: "cut a release", "release candidate", "tag a version", "ship develop to main". NOT feature/bugfix integration (that is gitflow finish via /ship-feature) nor a hotfix.' description: 'Use when develop is ahead of main and you want to cut a versioned release — finalize version.txt + CHANGELOG, merge develop→main via the gitflow fan-out, tag it, and push. Triggers: "cut a release", "release candidate", "tag a version", "ship develop to main". NOT feature/bugfix integration (that is gitflow finish via /ship-feature) nor a hotfix.'
allowed-tools: allowed-tools:
- Read - Read
+5
View File
@@ -1,5 +1,6 @@
--- ---
name: seo name: seo
effort: high
description: | description: |
Use when a web project needs SEO + GEO audit or optimization — Use when a web project needs SEO + GEO audit or optimization —
classical search (Google, Bing) AND AI search (ChatGPT, Perplexity, AI classical search (Google, Bing) AND AI search (ChatGPT, Perplexity, AI
@@ -29,6 +30,7 @@ Run `$HOME/.claude/lib/model-gate.md`. Reflection here (planning, audit
judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the
gate prints the remedy; end the turn — no later step, no dispatch. Nominal gate prints the remedy; end the turn — no later step, no dispatch. Nominal
(big) path is silent. (big) path is silent.
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
This skill orchestrates TWO specialist agents running in parallel, then This skill orchestrates TWO specialist agents running in parallel, then
merges their output into a single `.claude/audits/SEO.md` report. It is the main merges their output into a single `.claude/audits/SEO.md` report. It is the main
@@ -323,6 +325,7 @@ templating.
**PHASE A — collect (both domains, one message):** **PHASE A — collect (both domains, one message):**
``` ```
Skill(effort-medium) # effort-shift: dispatch span starts; send with the Agent call below in ONE message
Agent(subagent_type="seo-analyzer", model="sonnet") Agent(subagent_type="seo-analyzer", model="sonnet")
prompt: """ prompt: """
MODE: collect MODE: collect
@@ -507,6 +510,7 @@ the reports."
``` ```
## STEP 1b — CHALLENGE THE FIX BUNDLE (advisory, before apply) ## STEP 1b — CHALLENGE THE FIX BUNDLE (advisory, before apply)
`Skill(effort-high)` first (effort-shift: own level before the challenge; send it in the same message as the challenger dispatch).
Both envelopes now carry a `## FIX BUNDLE` — worth attacking before any edit lands. Both envelopes now carry a `## FIX BUNDLE` — worth attacking before any edit lands.
**Skip if intervention mode = conservative** (nothing is applied). Else persist both **Skip if intervention mode = conservative** (nothing is applied). Else persist both
bundles (seo + geo, verbatim) to `.claude/tasks/plans/<date>-<slug>-<HHMM>.md`, then run bundles (seo + geo, verbatim) to `.claude/tasks/plans/<date>-<slug>-<HHMM>.md`, then run
@@ -554,6 +558,7 @@ The two bundles may touch the same shared template (meta vs JSON-LD). Apply
For each AUTO item, dispatch its `applier` at L1, passing the item verbatim: For each AUTO item, dispatch its `applier` at L1, passing the item verbatim:
``` ```
Skill(effort-medium) # effort-shift: dispatch span starts; send with the Agent call below in ONE message
Agent(subagent_type="hotfixer") # or "feater" per the item's applier Agent(subagent_type="hotfixer") # or "feater" per the item's applier
prompt: "<paste the bundle item: files, concern, current, expected, prompt: "<paste the bundle item: files, concern, current, expected,
framework note + shared-file discipline>. framework note + shared-file discipline>.
+14 -2
View File
@@ -1,5 +1,6 @@
--- ---
name: ship-feature name: ship-feature
effort: xhigh
description: 'Use when shipping a new feature end-to-end — needs design brainstorm, planning, TDD implementation with subagents, error recovery, code review, and finish. Multi-agent orchestrator (9-step pipeline). Triggers: "ship feature", "ship-feature", "build and merge", "feature end-to-end", "implement and ship".' description: 'Use when shipping a new feature end-to-end — needs design brainstorm, planning, TDD implementation with subagents, error recovery, code review, and finish. Multi-agent orchestrator (9-step pipeline). Triggers: "ship feature", "ship-feature", "build and merge", "feature end-to-end", "implement and ship".'
argument-hint: <feature description> argument-hint: <feature description>
allowed-tools: Read, Write, Edit, Bash, Grep, Glob allowed-tools: Read, Write, Edit, Bash, Grep, Glob
@@ -13,6 +14,7 @@ Run `$HOME/.claude/lib/model-gate.md`. Reflection here (planning, audit
judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the
gate prints the remedy; end the turn — no later step, no dispatch. Nominal gate prints the remedy; end the turn — no later step, no dispatch. Nominal
(big) path is silent. (big) path is silent.
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
## REQUEST ## REQUEST
$ARGUMENTS $ARGUMENTS
@@ -112,8 +114,10 @@ Inject ONLY what constrains: the NON-BINDING count does NOT enter the brainstorm
(the injection inherits the OUTPUT filter — detail what binds, drop what doesn't). (the injection inherits the OUTPUT filter — detail what binds, drop what doesn't).
Consumption = INPUT INJECTION (we can't modify the external skill; we control its input). Consumption = INPUT INJECTION (we can't modify the external skill; we control its input).
Refine request into validated design via Socratic questioning. Don't proceed until design approved. Refine request into validated design via Socratic questioning. Don't proceed until design approved.
Turns after a user reply run at the session level until a tool call is paired with `Skill(effort-xhigh)` (effort-shift: turn reset).
## STEP 2 — PLAN ## STEP 2 — PLAN
`Skill(effort-xhigh)` first, sent with the next tool call (effort-shift: turn reset; brainstorm turns after a user reply run at the session level, and the vendored `brainstorming` pin applies only when the user invokes it).
Invoke `writing-plans` (vendored superpowers skill) with the validated design AND the 0d digest: every task Invoke `writing-plans` (vendored superpowers skill) with the validated design AND the 0d digest: every task
must be consistent with the in-force constraints; where a task implements or affects one, must be consistent with the in-force constraints; where a task implements or affects one,
note the ID inline. Break design into tasks (2-5 min each). Each task: exact file paths, full code, verification steps. note the ID inline. Break design into tasks (2-5 min each). Each task: exact file paths, full code, verification steps.
@@ -123,6 +127,7 @@ request nor the STEP 1 brainstorm settled (check the contract's CLARIFICATIONS
first) → one batch before STEP 2b; answers append to the contract `[gated]`. first) → one batch before STEP 2b; answers append to the contract `[gated]`.
## STEP 2b — CHALLENGE THE PLAN (adversarial, before the gate) ## STEP 2b — CHALLENGE THE PLAN (adversarial, before the gate)
`Skill(effort-xhigh)` first (effort-shift: own level before the challenge; send it in the same message as the challenger dispatch).
Before the human sees the plan, harden it. Run `$HOME/.claude/lib/challenge-plan.md`: Before the human sees the plan, harden it. Run `$HOME/.claude/lib/challenge-plan.md`:
- `PLAN` = the plan STEP 2 wrote under `docs/superpowers/plans/` - `PLAN` = the plan STEP 2 wrote under `docs/superpowers/plans/`
- `KIND` = `build-plan` - `KIND` = `build-plan`
@@ -169,6 +174,7 @@ judges the diff against this ENRICHED contract, not the STEP 0e seed — so a
criterion the design introduced is verified, not lost. criterion the design introduced is verified, not lost.
## STEP 4 — IMPLEMENT ## STEP 4 — IMPLEMENT
First: `Skill(effort-medium)` (effort-shift: dispatch span starts; send it in the same message as this step's first dispatch).
Start the feature branch off develop, then implement on it: Start the feature branch off develop, then implement on it:
```bash ```bash
bash "$HOME/.claude/lib/gitflow.sh" start feature <name> bash "$HOME/.claude/lib/gitflow.sh" start feature <name>
@@ -187,7 +193,8 @@ this loop.
## STEP 4b — ERROR RECOVERY (if STEP 4 fails) ## STEP 4b — ERROR RECOVERY (if STEP 4 fails)
If a subagent returns a build error, failing test, or type error: If a subagent returns a build error, failing test, or type error:
1. Load `$HOME/.claude/agents/analyzer.md` in DEBUG MODE on the exact error output. 1. `Skill(effort-max)` (effort-shift: error recovery; send it in the same message as the Read of the analyzer file below), then load
`$HOME/.claude/agents/analyzer.md` in DEBUG MODE on the exact error output.
Produce: root cause hypotheses (ordered), affected files, what NOT to touch. Produce: root cause hypotheses (ordered), affected files, what NOT to touch.
2. Present gate: 2. Present gate:
``` ```
@@ -203,8 +210,10 @@ OPTIONS :
C) Abort feature — preserve work done so far C) Abort feature — preserve work done so far
``` ```
3. Wait for user choice. Do NOT auto-fix. Do NOT proceed without explicit approval. 3. Wait for user choice. Do NOT auto-fix. Do NOT proceed without explicit approval.
4. If A → apply minimal fix, re-run STEP 4 for the failed task only. Max 2 retry attempts. 4. On resume the turn is at the session level (effort-shift: turn reset).
If A → `Skill(effort-medium)` sent with the re-dispatch, apply minimal fix, re-run STEP 4 for the failed task only. Max 2 retry attempts.
If still failing after 2 → fall back to options B or C. If still failing after 2 → fall back to options B or C.
If B or C → `Skill(effort-xhigh)` first, sent with the next tool call.
If B → before skipping: scan remaining task list for tasks that depend on the failed task If B → before skipping: scan remaining task list for tasks that depend on the failed task
(look for references to the same file or function in subsequent tasks). (look for references to the same file or function in subsequent tasks).
If dependents found → present: "Tasks [N, M] depend on the skipped task. If dependents found → present: "Tasks [N, M] depend on the skipped task.
@@ -234,6 +243,7 @@ conformity + security vs. craft/design) — both run, neither subsumes the
other ([[LRN-095]]). other ([[LRN-095]]).
## STEP 6 — CODE REVIEW ## STEP 6 — CODE REVIEW
`Skill(effort-xhigh)` first, sent with the review dispatch (effort-shift: judgment dispatch; the reviewer is a built-in and inherits the level in force).
Invoke `requesting-code-review` (vendored superpowers skill). **Model routing (BDR-077):** the Invoke `requesting-code-review` (vendored superpowers skill). **Model routing (BDR-077):** the
review subagent it dispatches MUST carry `model: "opus"` in the Agent call — review subagent it dispatches MUST carry `model: "opus"` in the Agent call —
craft review is dispatched judgment, never inherited from the session. Fix craft review is dispatched judgment, never inherited from the session. Fix
@@ -267,6 +277,8 @@ Feature shipped implies at least one design decision worth capturing. Run this B
If nothing substantive to log → print `CAPITALIZE: nothing substantive to log` and skip. If nothing substantive to log → print `CAPITALIZE: nothing substantive to log` and skip.
`Skill(effort-low)` first (effort-shift: bookkeeping tail; send it in the same message as the memory-commit command).
**Then commit the memory** — follow `$HOME/.claude/lib/capitalize-commit.md`: it **Then commit the memory** — follow `$HOME/.claude/lib/capitalize-commit.md`: it
surgically commits what capitalize just wrote (`.claude/memory` + `.claude/tasks` surgically commits what capitalize just wrote (`.claude/memory` + `.claude/tasks`
only, never `git add -A`) as one `chore(memory)` commit, reports the memory-commit only, never `git add -A`) as one `chore(memory)` commit, reports the memory-commit
+1
View File
@@ -1,5 +1,6 @@
--- ---
name: status name: status
effort: low
description: 'Consolidated project snapshot — plugins + passive token cost, git state, recent commits, GSD v2 milestone progress. Read-only. Run at session start or after a break. Open-work reconciliation (stale TODO vs real git) → /reconcile. Triggers: "status", "sitrep", "where are we", "project state", "after break".' description: 'Consolidated project snapshot — plugins + passive token cost, git state, recent commits, GSD v2 milestone progress. Read-only. Run at session start or after a break. Open-work reconciliation (stale TODO vs real git) → /reconcile. Triggers: "status", "sitrep", "where are we", "project state", "after break".'
argument-hint: (no arguments needed) argument-hint: (no arguments needed)
allowed-tools: Read, Bash, Glob, Grep, Agent allowed-tools: Read, Bash, Glob, Grep, Agent
+2
View File
@@ -1,5 +1,6 @@
--- ---
name: tour name: tour
effort: xhigh
description: | description: |
Use when the user wants ONE grouped pass over a whole project (or a Use when the user wants ONE grouped pass over a whole project (or a
list of projects) covering all hygiene axes together: code cleanup + list of projects) covering all hygiene axes together: code cleanup +
@@ -29,6 +30,7 @@ Run `$HOME/.claude/lib/model-gate.md`. Reflection here (planning, audit
judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the
gate prints the remedy; end the turn — no later step, no dispatch. Nominal gate prints the remedy; end the turn — no later step, no dispatch. Nominal
(big) path is silent. (big) path is silent.
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
One pipeline per project: **security → clean → re-verify → reconcile → One pipeline per project: **security → clean → re-verify → reconcile →
doc → convergence re-audit**, looping until a full pass applies zero new doc → convergence re-audit**, looping until a full pass applies zero new
+5
View File
@@ -1,5 +1,6 @@
--- ---
name: web-validate name: web-validate
effort: high
description: | description: |
Use when a web project needs W3C HTML/CSS validity or WCAG 2.1 Use when a web project needs W3C HTML/CSS validity or WCAG 2.1
accessibility audit. Dispatches the validator-analyzer agent, strict accessibility audit. Dispatches the validator-analyzer agent, strict
@@ -27,6 +28,7 @@ Run `$HOME/.claude/lib/model-gate.md`. Reflection here (planning, audit
judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the judgment, loop decisions) requires Fable/Opus. Verdict `small` → STOP: the
gate prints the remedy; end the turn — no later step, no dispatch. Nominal gate prints the remedy; end the turn — no later step, no dispatch. Nominal
(big) path is silent. (big) path is silent.
EFFORT SHIFTS: follow `$HOME/.claude/lib/effort-shift.md` (BDR-107): medium when a dispatch span starts, own level before challenge synthesis, low at the bookkeeping tail, max at escalation; every shift goes in the same message as the step's first tool call, a lone Skill call is a no-op.
This skill orchestrates a narrow-scope standards audit : This skill orchestrates a narrow-scope standards audit :
@@ -178,6 +180,7 @@ Spawn a single `validator-analyzer` subagent with explicit scope and
collected context : collected context :
``` ```
Skill(effort-medium) # effort-shift: dispatch span starts; send with the Agent call below in ONE message
Agent( Agent(
subagent_type="validator-analyzer", subagent_type="validator-analyzer",
description="validate — W3C HTML + CSS + WCAG audit", description="validate — W3C HTML + CSS + WCAG audit",
@@ -252,6 +255,7 @@ grep -c '^### \[Critique\]' .claude/audits/VALIDATE.md
--- ---
## STEP 2b — CHALLENGE THE FIX BUNDLE (MODE=fix only, advisory) ## STEP 2b — CHALLENGE THE FIX BUNDLE (MODE=fix only, advisory)
`Skill(effort-high)` first (effort-shift: own level before the challenge; send it in the same message as the challenger dispatch).
Skip if MODE=audit (no bundle exists). Else, before the STEP 3 gate, harden the bundle: Skip if MODE=audit (no bundle exists). Else, before the STEP 3 gate, harden the bundle:
extract the `## 5. Fix bundle` section from VALIDATE.md to extract the `## 5. Fix bundle` section from VALIDATE.md to
`.claude/tasks/plans/<date>-<slug>-<HHMM>.md` (a clean, blind-judgeable artifact), then run `.claude/tasks/plans/<date>-<slug>-<HHMM>.md` (a clean, blind-judgeable artifact), then run
@@ -309,6 +313,7 @@ Options :
share files: share files:
``` ```
Skill(effort-medium) # effort-shift: dispatch span starts; send with the Agent call below in ONE message
Agent(subagent_type="hotfixer") Agent(subagent_type="hotfixer")
prompt: "<paste the file-group's bundle items: file, issue, current, prompt: "<paste the file-group's bundle items: file, issue, current,
expected fix>. expected fix>.