forked from bchanot/claude
feat(skills): add 3-way adversarial plan-challenge phase to reflection orchestrators
After a plan/reflection is elaborated and before it executes, three fresh blind sub-agents (correctness / robustness / simplicity) attack it on the big model; the main loop RE-THINKS every aspect a BLOCKER lands (a named plan change, or [deferred]) and re-challenges once if the plan materially changed. Advisory into each skill's existing human gate — the human stays the decider. - lib/challenge-plan.md — reusable phase: fail-safe (never fail open), severity-driven (any single-lens BLOCKER = must-address), RE-THINK loop - agents/plan-challenger.md — challenger role (read-only, big-model per BDR-066) - lib/tests/plan-challenger.test.sh — 41-assertion structure lock - wired into 11 orchestrators: ship-feature/init-project/feat/bugfix (build-plan), onboard/audit-delta/code-clean (proposals), seo/geo/harden/web-validate (fix-bundle) Hardened by dogfooding: 3 blind challengers reviewed this feature's own v1 plan and caught 4 BLOCKERs (fail-open, consensus-buries-lone-finding, wrong model tier vs BDR-066, false on-disk-plan premise) — all fixed here.
This commit is contained in:
@@ -251,6 +251,22 @@ grep -c '^### \[Critique\]' .claude/audits/VALIDATE.md
|
||||
|
||||
---
|
||||
|
||||
## STEP 2b — CHALLENGE THE FIX BUNDLE (MODE=fix only, advisory)
|
||||
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
|
||||
`$HOME/.claude/lib/challenge-plan.md` with `PLAN` = that file, `KIND` = `fix-bundle`,
|
||||
`SCOPE` = the HTML/CSS files each fix touches, `CONSTRAINTS` = the STEP 1 strict scope (W3C
|
||||
validity + WCAG 2.1) + the conservative auto-fix rule (structural/syntactic only, content →
|
||||
§6) + the shared-template discipline (targeted Edit, never Write — templates carry /seo +
|
||||
/geo content). Three blind challengers ask, per fix: will it ACHIEVE conformance / could it
|
||||
BREAK rendering or regress another SC / is a simpler fix better. This main loop RE-THINKS
|
||||
every aspect a BLOCKER lands (a named bundle change, or `[deferred <date>]`) and re-challenges
|
||||
once if the bundle materially changed. Advisory — it sits BEFORE (never replaces) the STEP 3
|
||||
confirmation; carry its CHALLENGE SUMMARY into that gate.
|
||||
|
||||
---
|
||||
|
||||
## STEP 3 — Apply fixes (MODE=fix only)
|
||||
|
||||
Skip this step if `MODE=audit`.
|
||||
@@ -271,6 +287,11 @@ Files to modify (N) :
|
||||
|
||||
Critical : X | Haute : Y | Moyenne : Z | Basse : W
|
||||
|
||||
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)
|
||||
|
||||
Options :
|
||||
A) Apply all
|
||||
B) Review each diff before applying
|
||||
|
||||
Reference in New Issue
Block a user