docs(doctrine): challenge route rides the first challenge call; summary Advisor row; feat/bugfix skip the end call on clean gates
This commit is contained in:
1 parent
858bd41782
commit
2b7aeb8605
14 files changed
+59
-34
No files matched your search
+1
-1
@@ -20,7 +20,7 @@ The BDR-125 context queue is delivered: phases 0, 0b, 4a, 1, 5, 2 and 4b-4d ship
|
||||
- **memory commit chokepoint**: `lib/memory.sh check --staged`, run by `lib/memory-commit.sh commit` before every memory commit (rc 6, registry unstaged), also refuses a staged v2 registry whose new `## ` entry does not carry the next free ID: the highest ID seen at any heading level, fenced or not, in HEAD and above the entry in the staged file, plus one, the same reading `add` uses. stderr: `memory: <file>:<line>: new entry <ID> is not the next free ID <PREFIX>-NNN`. A committed ID is never renamed: fix the uncommitted heading and every uncommitted mention of its ID (the `superseded by` line from `add --supersedes`, the journal line), or drop the new entry and re-add it with `memory.sh add`. Skipped when the registry is absent from HEAD, HEAD is v1 (an `upgrade` commit), HEAD has an open code fence, or HEAD has no well-formed `## ` entry. Tests: `lib/tests/memory.test.sh`.
|
||||
- **model-router write guard fails closed**: when the guard's own check throws or times out, a main-loop Edit, Write or NotebookEdit of a code file outside a skill run is held with `model-router: the write guard failed (<kind>), so this write is held. Enter /hotfix, /feat, /bugfix or /ship-feature, or re-enter the skill you were running, then make this edit.` One log line per session: `model-router: write guard failed (<kind>): main-loop code writes are held until a skill runs`. Sub-agents, skill runs (typed, model-declared phase, typed `/route`) and `.md` / `.txt` files still pass; an error raised by a downstream tool is replayed as before. The guard used to let the write through on its own failure. Tests: `mods/model-router/hooks/register.test.ts` (GUARD: a failing guard …).
|
||||
- **model-router: Fable leaves auto-routing**: the `best` and `big` tiers default to opus then sonnet (were fable>opus>sonnet and opus>fable>sonnet), so Opus is the strongest model the router routes to and Fable is the advisor (`advisorModel` in settings.json). Fable stays in the model table and first in the fallback rank, so a hand pick of fable ranks above opus. The first-use Change dialog offers opus, sonnet and haiku; the bare `/model` dialog still offers fable, labelled `fable (custom)`. The ask before Fable only fires when a machine override puts fable at the head of `best`: otherwise `/route ask-tier on` answers `(inert: best is not headed by fable)` and `/route show` prints `ask-tier: inert`. An agent on a best or big row keeps its opus frontmatter when Opus is down. The `tiers.best does not lead the fallback chain` log is gone; `routing.json` is unchanged. Tests: `mods/model-router/hooks/register.test.ts`; `lib/tests/effort-routing.test.sh` floors every row on its tier's head. The `/client-handover` skill-runner children and the `lib/model-gate.md` dispatch doctrine pin `model: "opus"` instead of `"fable"` (BDR-150: Fable is the advisor, never a dispatch target), and the model gate lets a sub-agent pass when the route answer says its model is `fixed at spawn`. Tests: `lib/tests/model-routing.test.sh` refuses any fable dispatch pin under agents/, skills/ and lib/; `lib/tests/effort-routing.test.sh` checks the 7 opus/effort="high" client-handover dispatches.
|
||||
- **Advisor doctrine (`CLAUDE.global.md` § Workflow, `lib/effort-shift.md` § Advisor, `lib/challenge-plan.md`, `lib/verify-secure-loop.md`, `agents/plan-challenger.md`, `agents/verifier.md`, `agents/security-auditor.md`, `agents/analyzer.md`, `skills/{feat,bugfix,ship-feature,init-project,a11y,guardrails,audit-delta,tour,release-candidate}/SKILL.md`)**: when a stronger model is needed (an approach to settle before building, a stuck problem, a long task before calling it done, a change to recommend to the doctrine, the architecture or a public interface), the main loop calls the advisor tool (Fable, settings `advisorModel`, set by `/advisor`), at least on the written plan before the plan challengers are dispatched (`lib/challenge-plan.md`, every skill that challenges a plan, once per skill run, not before a re-challenge: an answer that lands a real flaw revises the plan file as plain plan text with no advisor attribution, the advice never enters a challenger brief, and the CHALLENGE SUMMARY gains an `Advisor:` row; the ORCHESTRATOR PROTOCOL in `agents/plan-challenger.md` mirrors this advisor-first step and the row), once per verify-secure run at the first gate loop to fail twice (floor, conformity, security, or a second structural failure, counting main-loop calls since GATE 0 first ran; the advice stays in the main loop and never enters an executor brief; every cap or escalation STOP carries it and says whether it predates the last iteration), and before proposing a merge (`gitflow finish`) or calling a long task done: one end-of-run call per skill run, never skipped for an earlier plan or stuck call. It sits at the end step of feat, bugfix, ship-feature, init-project, a11y and guardrails: the main loop first prints the run's diff stat, the answer goes into the reply, summary or finish proposal as an `Advisor:` line, a fix it drives goes back through the gates, and a later proposal reuses the answer and says it predates the newer commits. It also sits at the end of audit-delta and tour when the run applied a fix (tour: main loop only, never a runner), and at release-candidate STEP 4 before the go / hold ask. In those three the answer is reported only: a fix it calls for waits for a new run, and at the release gate it makes hold the recommended answer. The same six gate skills carry a `Stuck:` line that points at the verify-secure rule. Inside a skill run these points cover the triggers: no second call for the same recommendation. `plan-challenger`, `verifier`, `security-auditor` and `analyzer` may call it only when dispatched as a sub-agent, at most once per dispatch, late, before their verdict or report; the analyzer's output rests on the code it read, never on the advice alone, and advice proposing a design or a fix counts only where the brief asks for one. For the three gates advice only adds: the verifier may go back to a contract criterion and tags a resulting NOT-MET `(advisor-prompted)`, never clearing a gap on advice; the challenger never drops or lowers a finding on advice alone; the security-auditor tags an added finding `advisor:<STEP 3 class>` at that class's severity (REPORTED LOW when it matches no class), and tags a raised one `<rule>+advisor` only when the class's severity is higher than the finding's own; a raise that does not apply, or matches no class, changes nothing (no tag, no PROOF count). Its PROOF ends with `; advisor <n> added/raised`. Executors and every other sub-agent do not call it, even when the tool is listed. Advisor absent or erroring → proceed as written; advice waives no gate, cap or guard and, at a loop cap, feeds the STOP diagnosis. Fable on main comes only from a hand pick, a typed `/route model=fable`, a phase naming `model: fable` or a machine override that puts fable in a tier (BDR-150). Prose that still named Fable as the `audit` row head or a skill-runner pin (`agents/plan-challenger.md`, `lib/challenge-plan.md`, `lib/effort-shift.md`, `skills/tour/SKILL.md`) now says opus.
|
||||
- **Advisor doctrine (`CLAUDE.global.md` § Workflow, `lib/effort-shift.md` § Advisor, `lib/challenge-plan.md`, `lib/verify-secure-loop.md`, `agents/plan-challenger.md`, `agents/verifier.md`, `agents/security-auditor.md`, `agents/analyzer.md`, `skills/{feat,bugfix,hotfix,ship-feature,init-project,onboard,code-clean,harden,a11y,guardrails,audit-delta,tour,release-candidate}/SKILL.md`, `skills/pack-seo/skills/{seo,geo}/SKILL.md`, `skills/pack-web-validate/skills/web-validate/SKILL.md`)**: when a stronger model is needed (an approach to settle before building, a stuck problem, a long task before calling it done, a change to recommend to the doctrine, the architecture or a public interface), the main loop calls the advisor tool (Fable, settings `advisorModel`, set by `/advisor`), at least on the written plan before the plan challengers are dispatched (`lib/challenge-plan.md`, every skill that challenges a plan, once per skill run, not before a re-challenge: an answer that lands a real flaw revises the plan file as plain plan text with no advisor attribution, the advice never enters a challenger brief, and the CHALLENGE SUMMARY of every caller gains an `Advisor:` row (the plan change it drove, `called, no change` or `not called (absent | error | already called this run)`), each caller sending its route before the challenge with the first tool call of `lib/challenge-plan.md`; the ORCHESTRATOR PROTOCOL in `agents/plan-challenger.md` mirrors this advisor-first step and the row), once per verify-secure run at the first gate loop to fail twice (floor, conformity, security, or a second structural failure, counting main-loop calls since GATE 0 first ran; the advice stays in the main loop and never enters an executor brief; every cap or escalation STOP carries it and says whether it predates the last iteration), and before proposing a merge (`gitflow finish`) or calling a long task done: one end-of-run call per skill run, never skipped for an earlier plan or stuck call, except that feat and bugfix skip it when GATE 0 said MET, the verifier CONFORME and security PASS (not DEGRADED), each on its first attempt, their summary's `ADVISOR` field then reading `skipped (gates clean on first pass)`. It sits at the commit step of feat and bugfix and at the end step of ship-feature, init-project, a11y and guardrails: the main loop first prints the run's diff stat, the answer goes into the reply or finish proposal as an `Advisor:` line, or into the feat/bugfix summary's `ADVISOR` field, a fix it drives goes back through the gates, and a later merge proposal reuses the last run's answer, or its skip, and names any code commit made after it (doc and memory commits excepted). It also sits at the end of audit-delta and tour when the run applied a fix (tour: main loop only, never a runner), and at release-candidate STEP 4 before the go / hold ask. In those three the answer is reported only: a fix it calls for waits for a new run, and at the release gate it makes hold the recommended answer. The same six gate skills carry a `Stuck:` line that points at the verify-secure rule. Inside a skill run these points cover the triggers: no second call for the same recommendation. `plan-challenger`, `verifier`, `security-auditor` and `analyzer` may call it only when dispatched as a sub-agent, at most once per dispatch, late, before their verdict or report; the analyzer's output rests on the code it read, never on the advice alone, and advice proposing a design or a fix counts only where the brief asks for one. For the three gates advice only adds: the verifier may go back to a contract criterion and tags a resulting NOT-MET `(advisor-prompted)`, never clearing a gap on advice; the challenger never drops or lowers a finding on advice alone; the security-auditor tags an added finding `advisor:<STEP 3 class>` at that class's severity (REPORTED LOW when it matches no class), and tags a raised one `<rule>+advisor` only when the class's severity is higher than the finding's own; a raise that does not apply, or matches no class, changes nothing (no tag, no PROOF count). Its PROOF ends with `; advisor <n> added/raised`. Executors and every other sub-agent do not call it, even when the tool is listed. Advisor absent or erroring → proceed as written; advice waives no gate, cap or guard and, at a loop cap, feeds the STOP diagnosis. Fable on main comes only from a hand pick, a typed `/route model=fable`, a phase naming `model: fable` or a machine override that puts fable in a tier (BDR-150). Prose that still named Fable as the `audit` row head or a skill-runner pin (`agents/plan-challenger.md`, `lib/challenge-plan.md`, `lib/effort-shift.md`, `skills/tour/SKILL.md`) now says opus.
|
||||
- **gates.sh timeout**: the default per-CHECK timeout (`GATES_TIMEOUT`) is 600 s, up from 120 s. A full `make test` (about 135 s) went NOT-MET on the timeout alone. A run lasts the sum of its CHECKs: a caller with a shorter limit (a foreground tool call stops at 600 s) runs it in the background, and a killed run writes nothing back, so the floor stays PENDING.
|
||||
|
||||
### Removed
|
||||
|
||||
+17
-9
@@ -115,15 +115,23 @@ triggers in CLAUDE.global.md § Workflow):
|
||||
(a contract micro-gate, an early escalation, the STOP diagnosis) and
|
||||
never enters an executor brief.
|
||||
3. Before proposing a merge (`gitflow finish`) or calling a long task
|
||||
done. Wired at the end step of feat, bugfix, ship-feature,
|
||||
init-project, a11y, guardrails, audit-delta and tour, and at the
|
||||
release gate of release-candidate: one end-of-run call per skill
|
||||
run, never skipped for an earlier plan or stuck call; audit-delta
|
||||
and tour skip it when the run applied no fix. In the six flows that
|
||||
run the gates, the main loop first prints the run's diff stat, a fix
|
||||
the answer drives goes back through the gates, and a later proposal
|
||||
reuses the answer and says it predates the newer commits. Elsewhere
|
||||
the answer is reported only and a fix it calls for is a new run.
|
||||
done. Wired at the commit step of feat and bugfix, at the end step
|
||||
of ship-feature, init-project, a11y, guardrails, audit-delta and
|
||||
tour, and at the release gate of release-candidate: one end-of-run
|
||||
call per skill run, never skipped for an earlier plan or stuck call.
|
||||
Two skips only: audit-delta and tour when the run applied no fix;
|
||||
feat and bugfix when GATE 0 said MET, the verifier CONFORME and
|
||||
security PASS (not DEGRADED), each on its first attempt (any other
|
||||
verdict, a retry, a loop iteration or a verdict no longer in view
|
||||
runs the call), their summary then reading
|
||||
`skipped (gates clean on first pass)`. A skipped call discharges
|
||||
its point and the trigger it covers. In the six flows that run the
|
||||
gates (feat, bugfix, ship-feature, init-project, a11y, guardrails),
|
||||
the main loop first prints the run's diff stat, a fix the answer
|
||||
drives goes back through the gates, and a later merge proposal
|
||||
reuses the last run's answer, or its skip, and names any code commit
|
||||
made after it (doc and memory commits excepted). Elsewhere the
|
||||
answer is reported only and a fix it calls for is a new run.
|
||||
|
||||
Inside a skill run, the points above also cover the triggers of
|
||||
CLAUDE.global.md § Workflow; no second call for the same recommendation.
|
||||
|
||||
@@ -170,7 +170,7 @@ Then show the user the same compact table inline.
|
||||
|
||||
### 3b-bis. CHALLENGE THE PROPOSALS (before the gate)
|
||||
|
||||
`mcp__model-router__route(phase="plan")` first (route: own level before the challenge; send it with the challenger dispatch).
|
||||
`mcp__model-router__route(phase="plan")` first (route: own level before the challenge; send it with the first tool call of lib/challenge-plan.md, the advisor call when one is due).
|
||||
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
|
||||
report) to `.claude/tasks/plans/<date>-<axis>-<HHMM>.md`, then run
|
||||
@@ -192,6 +192,7 @@ CHALLENGE SUMMARY (3b-bis — 3 lenses):
|
||||
BLOCKERs addressed : <n> — <finding → the named finding-set change that closes it>
|
||||
Deferred (human-ack): <list | none>
|
||||
Lenses returned : correctness / robustness / simplicity (NAME any that failed to return)
|
||||
Advisor : <the finding-set change it drove | called, no change | not called (absent | error | already called this run)>
|
||||
```
|
||||
|
||||
- "Fix what you find" said **in the invocation** does NOT skip this gate:
|
||||
|
||||
+10
-6
@@ -127,7 +127,7 @@ RISK: <low/medium — what could go wrong>
|
||||
fast-path is not exempt: a 1-line fix with a visible choice still asks.
|
||||
|
||||
## STEP 3b — CHALLENGE THE FIX PLAN (before the contract)
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the challenger dispatch).
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the first tool call of lib/challenge-plan.md, the advisor call when one is due).
|
||||
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
|
||||
contract. Persist it to `.claude/tasks/plans/<date>-<slug>-<HHMM>.md`, then run
|
||||
@@ -137,8 +137,8 @@ dispositions. Three blind challengers attack it (correctness = is the root cause
|
||||
right; robustness = blast radius / regressions; simplicity = is the fix minimal);
|
||||
RE-THINK every aspect a BLOCKER lands, re-challenge once if the plan materially
|
||||
changed. STEP 3.5 writes the contract from the REVISED plan. Print a CHALLENGE SUMMARY
|
||||
(BLOCKERs addressed / deferred / lenses returned), folding any deferred BLOCKER into
|
||||
the STEP 3 approval gate.
|
||||
(BLOCKERs addressed / deferred / lenses returned / advisor), folding any
|
||||
deferred BLOCKER into the STEP 3 approval gate.
|
||||
|
||||
## STEP 3.5 — CONTRACT
|
||||
|
||||
@@ -233,9 +233,12 @@ Parse the `BUGFIX-EXEC REPORT`:
|
||||
two sentences of body).
|
||||
`mcp__model-router__route(phase="reflect")` first (route: end-of-run review).
|
||||
Before the summary, the main loop prints the run's diff stat, then makes its
|
||||
end-of-run advisor call (`lib/effort-shift.md` § Advisor); its answer
|
||||
goes into the summary as an `Advisor:` line, and a fix it drives goes
|
||||
back through the gates.
|
||||
end-of-run advisor call (`lib/effort-shift.md` § Advisor), skipped when
|
||||
GATE 0 said MET, the verifier CONFORME and security PASS (not DEGRADED),
|
||||
each on its first attempt; any other verdict, a retry, a loop iteration or
|
||||
a verdict no longer in view runs the call. The answer, or the skip, goes
|
||||
into the summary's `ADVISOR` field, and a fix it drives goes back through
|
||||
the gates.
|
||||
4. Print summary:
|
||||
```
|
||||
BUGFIX COMPLETE
|
||||
@@ -244,6 +247,7 @@ Parse the `BUGFIX-EXEC REPORT`:
|
||||
FILE(S) : <changed files>
|
||||
TEST(S) : <added/updated tests, or "none — verified manually">
|
||||
REGRESSION : <checked areas>
|
||||
ADVISOR : <one-line answer | skipped (gates clean on first pass) | not called (absent | error)>
|
||||
```
|
||||
|
||||
## STEP 7 — DOC SYNC (automatic)
|
||||
|
||||
@@ -122,7 +122,7 @@ TOTALS: <N blocking, N warn, N info>
|
||||
If no issues found: report clean state and stop.
|
||||
|
||||
## STEP 3b — CHALLENGE THE SCOPE (before approval)
|
||||
`mcp__model-router__route(phase="plan")` first (route: own level before the challenge; send it with the challenger dispatch).
|
||||
`mcp__model-router__route(phase="plan")` first (route: own level before the challenge; send it with the first tool call of lib/challenge-plan.md, the advisor call when one is due).
|
||||
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
|
||||
`.claude/tasks/plans/<date>-<slug>-<HHMM>.md` (STEP 3 report format, one item
|
||||
@@ -144,6 +144,7 @@ CHALLENGE SUMMARY (STEP 3b — 3 lenses):
|
||||
BLOCKERs addressed : <n> — <finding → the named scope change that closes it>
|
||||
Deferred (human-ack): <list | none>
|
||||
Lenses returned : correctness / robustness / simplicity (NAME any that failed to return)
|
||||
Advisor : <the scope change it drove | called, no change | not called (absent | error | already called this run)>
|
||||
|
||||
AskUserQuestion:
|
||||
Approve which items for execution? (all / <item numbers> / clarify <item>)
|
||||
|
||||
+10
-6
@@ -124,7 +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).
|
||||
|
||||
## STEP 1b — CHALLENGE THE PLAN (before branching)
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the challenger dispatch).
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the first tool call of lib/challenge-plan.md, the advisor call when one is due).
|
||||
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
|
||||
`$HOME/.claude/lib/challenge-plan.md` with `PLAN` = that file, `KIND` = `build-plan`,
|
||||
@@ -132,8 +132,8 @@ Persist it to `.claude/tasks/plans/<date>-<slug>-<HHMM>.md`, then run
|
||||
Three blind challengers attack it; RE-THINK every aspect a BLOCKER lands (a named
|
||||
plan change, or `[deferred]`), re-challenge once if the plan materially changed. The
|
||||
STEP 3 executor receives the REVISED plan. Before dispatch, print a CHALLENGE SUMMARY
|
||||
(BLOCKERs addressed / deferred / lenses returned), surfacing any deferred BLOCKER in
|
||||
the STEP 1 pass B batch.
|
||||
(BLOCKERs addressed / deferred / lenses returned / advisor), surfacing any
|
||||
deferred BLOCKER in the STEP 1 pass B batch.
|
||||
|
||||
## STEP 2 — BRANCH
|
||||
|
||||
@@ -207,9 +207,12 @@ propose/apply executor).
|
||||
Then `mcp__model-router__route(phase="reflect")` (route: nested commit-change loaded at apply; reload feat's level).
|
||||
|
||||
Before the summary, the main loop prints the run's diff stat, then makes its
|
||||
end-of-run advisor call (`lib/effort-shift.md` § Advisor); its answer
|
||||
goes into the summary as an `Advisor:` line, and a fix it drives goes
|
||||
back through the gates.
|
||||
end-of-run advisor call (`lib/effort-shift.md` § Advisor), skipped when
|
||||
GATE 0 said MET, the verifier CONFORME and security PASS (not DEGRADED),
|
||||
each on its first attempt; any other verdict, a retry, a loop iteration or
|
||||
a verdict no longer in view runs the call. The answer, or the skip, goes
|
||||
into the summary's `ADVISOR` field, and a fix it drives goes back through
|
||||
the gates.
|
||||
|
||||
Print summary:
|
||||
```
|
||||
@@ -218,6 +221,7 @@ FEATURE : <name>
|
||||
FILE(S) : <created/modified files>
|
||||
TEST(S) : <added tests>
|
||||
VERIFIED : <what was checked>
|
||||
ADVISOR : <one-line answer | skipped (gates clean on first pass) | not called (absent | error)>
|
||||
```
|
||||
|
||||
## STEP 6 — DOC SYNC (automatic)
|
||||
|
||||
@@ -522,7 +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)
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the challenger dispatch).
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the first tool call of lib/challenge-plan.md, the advisor call when one is due).
|
||||
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
|
||||
`.claude/tasks/plans/<date>-<slug>-<HHMM>.md` (a clean, blind-judgeable artifact), then run
|
||||
@@ -557,6 +557,7 @@ If MODE=fix and `.claude/audits/HARDEN.md` ends with `READY TO APPLY — awaitin
|
||||
BLOCKERs addressed : <n> — <finding → the named bundle change that closes it>
|
||||
Deferred (human-ack): <list | none>
|
||||
Lenses returned : correctness / robustness / simplicity (NAME any that failed to return)
|
||||
Advisor : <the bundle change it drove | called, no change | not called (absent | error | already called this run)>
|
||||
|
||||
Options :
|
||||
A) Apply all
|
||||
|
||||
@@ -94,7 +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
|
||||
missing import that alters execution. In doubt → it is probably a `/bugfix`.
|
||||
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the challenger dispatch).
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the first tool call of lib/challenge-plan.md, the advisor call when one is due).
|
||||
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
|
||||
`$HOME/.claude/lib/challenge-plan.md` with `PLAN` = that file, `KIND` =
|
||||
@@ -102,8 +102,8 @@ For a logic fix: persist the STEP 1 located fix (root cause + the exact edit) to
|
||||
contract's acceptance criteria. Three blind challengers attack the fix; the main
|
||||
loop RE-THINKS any aspect a BLOCKER lands (a named change to the fix, or
|
||||
`[deferred]`) and re-challenges once if it materially changed. Print a
|
||||
CHALLENGE SUMMARY (BLOCKERs addressed / deferred / lenses returned). A BLOCKER
|
||||
that shows the fix is wrong or incomplete means this was never
|
||||
CHALLENGE SUMMARY (BLOCKERs addressed / deferred / lenses returned / advisor).
|
||||
A BLOCKER that shows the fix is wrong or incomplete means this was never
|
||||
a hotfix — escalate to `/bugfix` (its STEP 3b runs the same phase under the full
|
||||
verify+secure loop).
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ Invoke `writing-plans` (vendored superpowers skill) with BRIEF + skeleton.
|
||||
Granular tasks (2-5 min each), exact file paths, TDD: tests before code.
|
||||
|
||||
## STEP 6b — CHALLENGE THE PLAN (before the gate)
|
||||
`mcp__model-router__route(phase="plan")` first (route: own level before the challenge; send it with the challenger dispatch).
|
||||
`mcp__model-router__route(phase="plan")` first (route: own level before the challenge; send it with the first tool call of lib/challenge-plan.md, the advisor call when one is due).
|
||||
Before the human sees the implementation plan, harden it. Run
|
||||
`$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
|
||||
@@ -213,6 +213,7 @@ CHALLENGE SUMMARY (STEP 6b — 3 lenses):
|
||||
BLOCKERs addressed : <n> — <finding → the named plan change that closes it>
|
||||
Deferred (human-ack): <list | none>
|
||||
Lenses returned : correctness / robustness / simplicity (NAME any that failed to return)
|
||||
Advisor : <the plan change it drove | called, no change | not called (absent | error | already called this run)>
|
||||
Approve and start? (yes / request changes)
|
||||
```
|
||||
Changes → back to STEP 6. Approved → continue.
|
||||
|
||||
@@ -917,7 +917,7 @@ Vérifier que les 4 fichiers `.claude/audits/ONBOARD_REPORT.md`, `.claude/audits
|
||||
---
|
||||
|
||||
## STEP 7b — CHALLENGE THE PROPOSALS (before the human gate)
|
||||
`mcp__model-router__route(phase="plan")` first (route: own level before the challenge; send it with the challenger dispatch).
|
||||
`mcp__model-router__route(phase="plan")` first (route: own level before the challenge; send it with the first tool call of lib/challenge-plan.md, the advisor call when one is due).
|
||||
The 4 audit files are on disk; `AUDIT_PROPOSALS.md` is the artifact worth
|
||||
attacking before the human spends a gate on it. Run
|
||||
`$HOME/.claude/lib/challenge-plan.md` with `PLAN` =
|
||||
@@ -961,6 +961,7 @@ CHALLENGE SUMMARY (STEP 7b — 3 lenses):
|
||||
BLOCKERs addressed : <n> — <finding → the named proposals change that closes it>
|
||||
Deferred (human-ack): <list | none>
|
||||
Lenses returned : correctness / robustness / simplicity (NAME any that failed to return)
|
||||
Advisor : <the proposals change it drove | called, no change | not called (absent | error | already called this run)>
|
||||
|
||||
Prochaine étape : générer .claude/tasks/TODO.md depuis .claude/audits/AUDIT_PROPOSALS.md approuvé.
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ your bundle."
|
||||
```
|
||||
|
||||
## STEP 1b — CHALLENGE THE FIX BUNDLE (advisory, before apply)
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the challenger dispatch).
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the first tool call of lib/challenge-plan.md, the advisor call when one is due).
|
||||
The analyzer returned a `## FIX BUNDLE` — worth attacking before any edit lands.
|
||||
**Skip if intervention mode = conservative** (nothing is applied). Else persist the
|
||||
bundle verbatim to `.claude/tasks/plans/<date>-<slug>-<HHMM>.md`, then run
|
||||
@@ -138,6 +138,7 @@ CHALLENGE SUMMARY (STEP 1b — 3 lenses):
|
||||
BLOCKERs addressed : <n> — <finding → the named bundle change that closes it>
|
||||
Deferred (human-ack): <list | none>
|
||||
Lenses returned : correctness / robustness / simplicity (NAME any that failed to return)
|
||||
Advisor : <the bundle change it drove | called, no change | not called (absent | error | already called this run)>
|
||||
Approve all / select (ids) / skip all?
|
||||
```
|
||||
|
||||
|
||||
@@ -511,7 +511,7 @@ the reports."
|
||||
```
|
||||
|
||||
## STEP 1b — CHALLENGE THE FIX BUNDLE (advisory, before apply)
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the challenger dispatch).
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the first tool call of lib/challenge-plan.md, the advisor call when one is due).
|
||||
Both envelopes now carry a `## FIX BUNDLE` — worth attacking before any edit lands.
|
||||
**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
|
||||
@@ -583,6 +583,7 @@ CHALLENGE SUMMARY (STEP 1b — 3 lenses):
|
||||
BLOCKERs addressed : <n> — <finding → the named bundle change that closes it>
|
||||
Deferred (human-ack): <list | none>
|
||||
Lenses returned : correctness / robustness / simplicity (NAME any that failed to return)
|
||||
Advisor : <the bundle change it drove | called, no change | not called (absent | error | already called this run)>
|
||||
Approve all / select (ids) / skip all?
|
||||
```
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ grep -c '^### \[Critique\]' .claude/audits/VALIDATE.md
|
||||
---
|
||||
|
||||
## STEP 2b — CHALLENGE THE FIX BUNDLE (MODE=fix only, advisory)
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the challenger dispatch).
|
||||
`mcp__model-router__route(phase="reflect")` first (route: own level before the challenge; send it with the first tool call of lib/challenge-plan.md, the advisor call when one is due).
|
||||
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
|
||||
`.claude/tasks/plans/<date>-<slug>-<HHMM>.md` (a clean, blind-judgeable artifact), then run
|
||||
@@ -296,6 +296,7 @@ CHALLENGE SUMMARY (STEP 2b — 3 lenses) :
|
||||
BLOCKERs addressed : <n> — <finding → the named bundle change that closes it>
|
||||
Deferred (human-ack): <list | none>
|
||||
Lenses returned : correctness / robustness / simplicity (NAME any that failed to return)
|
||||
Advisor : <the bundle change it drove | called, no change | not called (absent | error | already called this run)>
|
||||
|
||||
Options :
|
||||
A) Apply all
|
||||
|
||||
@@ -133,7 +133,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]`.
|
||||
|
||||
## STEP 2b — CHALLENGE THE PLAN (adversarial, before the gate)
|
||||
`mcp__model-router__route(phase="plan")` first (route: own level before the challenge; send it with the challenger dispatch).
|
||||
`mcp__model-router__route(phase="plan")` first (route: own level before the challenge; send it with the first tool call of lib/challenge-plan.md, the advisor call when one is due).
|
||||
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/`
|
||||
- `KIND` = `build-plan`
|
||||
@@ -163,6 +163,7 @@ CHALLENGE SUMMARY (STEP 2b — 3 lenses):
|
||||
BLOCKERs addressed : <n> — <finding → the named plan change that closes it>
|
||||
Deferred (human-ack): <list | none>
|
||||
Lenses returned : correctness / robustness / simplicity (NAME any that failed to return)
|
||||
Advisor : <the plan change it drove | called, no change | not called (absent | error | already called this run)>
|
||||
Approve and execute? (yes / request changes)
|
||||
```
|
||||
This block EXPOSES each in-force item with the plan's CLAIMED disposition, for human
|
||||
|
||||
Reference in new issue
Block a user