Repository navigation
Add verifying-plan-coverage skill: prove a plan covers 100% of its spec before execution - #1704
filipboshevski wants to merge 71 commits into
Conversation
Replaced the bullet point next to "Jesse" in the sponsorship section of the `README` into a dash. This is needed so the `README` renders properly on markdown viewers.
Records scope, branching, architecture, deletion gate, verification protocol, path/config edits, migration ordering, and post-implementation verification. Frames CI integration, scenario co-location, and Python package rename as deferred work. Per-file deletion of bash tests under superpowers/tests/ is gated by a subagent that compares each bash assertion to its drill scenario's verify block. Default keeps the bash test if any assertion is unmatched. Branching: independent off dev (f/evals-lift), not stacked on f/cross-platform.
Two parallel reviewers raised legitimate issues against the lift-drill-
into-evals spec. Updates:
- Coverage map for tests/explicit-skill-requests/ corrected: 6 run-*.sh
scripts + prompts, not "2 scenarios cover all". Several scripts
(Haiku, multi-turn, please-use-brainstorming, use-systematic-debugging)
have no drill counterpart and stay.
- tests/claude-code/test-subagent-driven-development.sh marked as
meta/documentation test (asks agent to describe SDD); no drill
scenario covers description tests; defaults to keep.
- Path-defaults section now shows verified evidence: PROJECT_ROOT
resolves to evals/ post-move; only claude*.yaml substitute
${SUPERPOWERS_ROOT} in args (codex/gemini use it via os.environ
in pre-run hooks); helper invocation order specified (after
load_dotenv, before click definitions).
- Step 2 copy uses explicit rsync excludes (.git, .venv, results,
.env, __pycache__, *.egg-info, .private-journal); checksum-level
verification rather than file-count.
- Drill SHA recorded at copy time in commit message and
evals/.drill-source-sha for divergence detection.
- evals/tests/ pytest suite added to verification protocol.
- Reference scrub list expanded: RELEASE-NOTES.md,
docs/superpowers/plans/, .codex-plugin/ (corrected from .codex/),
lefthook.yml. Excluded dirs called out (node_modules/, .venv/,
evals/).
- Historical plan docs / RELEASE-NOTES handling: annotate, don't
rewrite.
- evals/lefthook.yml move documented (drill ships its own;
contributors run cd evals && lefthook run pre-commit manually).
- PR description checklist includes archival action item for
obra/drill post-merge.
False finding rejected: svelte-todo fixture is complete on disk
(design.md + plan.md + scaffold.sh present); reviewer obra#1 obra#3 dropped.
15-task implementation plan derived from the design spec at docs/superpowers/specs/2026-05-06-lift-drill-into-evals-design.md. Each task is bite-sized (2-5 min steps) with exact commands, exact file paths, and exact code where required. Subagent verification gates per the spec are written out as concrete prompt templates. Self-review: - Spec coverage: every spec section maps to a task - Placeholder scan: no TBD/TODO/placeholder/fill-in-later language - Type consistency: helper named _set_superpowers_root_default consistently; drill SHA recorded in evals/.drill-source-sha consistently
rsync of obra/drill@013fcb8b7dbefd6d3fa4653493e5d2ec8e7f985b into superpowers/evals/, excluding .git/, .venv/, results/, .env/, __pycache__/, *.egg-info/, .private-journal/. The drill repo is unaffected by this commit; archival is a separate manual step after this PR merges. Source SHA recorded at evals/.drill-source-sha for divergence detection.
Adds _set_superpowers_root_default() to drill/cli.py, called at module import after load_dotenv(). PROJECT_ROOT resolves to evals/ post-lift; its parent is the superpowers repo root, which is the correct value for SUPERPOWERS_ROOT. Existing env values are respected as overrides via os.environ.setdefault. Tests: - helper sets default when var is unset - helper does not override when var is already set
These backends only read SUPERPOWERS_ROOT via engine.py/setup.py's
os.environ access, which the new cli.py default helper supplies
automatically. claude*.yaml keep SUPERPOWERS_ROOT in required_env
because they interpolate ${SUPERPOWERS_ROOT} into --plugin-dir args.
The cli.py helper now defaults the env var. Mention as override only.
…ing-* scenarios) Subagent verification confirmed each prompt's intent matches its corresponding drill scenario's turns[].intent verbatim, and each scenario has both a deterministic skill-called assertion and a semantic LLM criterion confirming the matching skill was loaded (actually a stronger check than the bash test, which only confirms the skill fires anywhere in the stream). All 6 prompts deleted. The runner had no remaining prompts to drive, so run-test.sh and run-all.sh deleted as well.
…rsation-skill-invocation) Subagent verification: every bash assertion (Skill tool invoked + specific skill name 'subagent-driven-development' loaded after the agent describes it conversationally in turn 1) maps to the drill scenario's skill-called assertion + criteria paragraph requiring the skill to fire in direct response to the second user message. Drill additionally asserts tool-called Agent (subagent dispatch) which is stricter than the bash test. Other runners in tests/explicit-skill-requests/ (haiku, multiturn, extended-multiturn) and their prompt files are preserved — they have no drill coverage and exercise different behaviors.
…ractals + sdd-svelte-todo)
The bash test had ZERO output assertions — it just ran claude -p
and printed token usage. Drill's scenarios are strictly more
rigorous:
go-fractals: skill-called SDD + tool-called Agent + go test ./...
passes + cmd/fractals/main.go exists + >=4 commits + LLM criteria
verifying real SDD workflow.
svelte-todo: skill-called SDD + tool-called Agent + npm test passes
+ playwright e2e passes + package.json + svelte.config.js or
vite.config.ts + >=4 commits + LLM criteria.
design.md and plan.md are byte-identical between bash fixtures and
drill fixtures (evals/fixtures/sdd-{go-fractals,svelte-todo}/).
Drill's setup helper (scaffold_sdd_*) forces git init -b main
(stricter than bash's reliance on init.defaultBranch). The
.claude/settings.local.json from bash scaffold.sh is unnecessary
for drill since permissions are managed via backend YAML.
Subagent verification: SAFE TO DELETE for both.
…eviewer-catches-planted-flaws) Subagent verification: every bash assertion (TODO in Requirements section flagged, "specified later" deferral flagged, Issues section present, did-not-approve verdict) maps to drill verify.criteria entries. Setup parity covered by setup.assertions (test-feature-design.md exists with TODO + 'specified later' content). Drill is stricter: asserts tool-called Agent (subagent dispatch) which the bash test did not check.
…eview-catches-planted-bugs) Subagent verification: every bash assertion (skill invocation, subagent dispatch, SQL injection flagged, credential handling flagged, no merge approval) maps to drill verify checks. Drill is stricter: bundles severity (Critical/Important) into the same criteria as the finding itself (bash split severity into a separate test). Setup parity covered (src/db.js with string concat + identity hash, two commits). The drill scenario header explicitly says it is the "cross-harness, semantically-judged replacement for the bash test."
- test-worktree-native-preference.sh: drill covers PRESSURE phase only; RED + GREEN baselines have no drill counterpart and are kept so the RED-GREEN-REFACTOR validation remains rerunnable end-to-end. - test-subagent-driven-development-integration.sh: drill covers the YAGNI subset (forbidden exports + reviewer-as-gate). Bash adds >=3 commits, >=2 subagent dispatches, TodoWrite usage, test file existence check, and token-budget telemetry. Kept until drill scenario covers those or they are retired. - test-subagent-driven-development.sh: tests agent's ability to *describe* SDD (string matches against expected keywords). Drill scenarios test behavior, not description-recall. Kept by design. Subagent verification recorded in commit messages of subsequent deletions; gap analyses driving these annotations are also in the verification subagent reports for the gating sweep.
- RELEASE-NOTES.md: note that test-requesting-code-review.sh and test-document-review-system.sh were lifted into drill scenarios on 2026-05-06; references are preserved as dated artifacts. - docs/superpowers/plans/2026-03-23-codex-app-compatibility.md: note that tests/skill-triggering/ was lifted into drill scenarios on 2026-05-06; the run-all.sh reference is a dated artifact. Subagent second-pass scrub confirmed no other active references in the tree (excluding evals/ and the spec/plan for this work itself).
- docs/testing.md split into Plugin tests + Skill behavior evals.
Plugin tests section enumerates the bash tests that survive
(kept by drill-coverage analysis or as describe-skill tests).
- CLAUDE.md adds Eval harness section pointing at evals/.
- README.md Contributing section mentions evals/ alongside tests/.
- .gitignore adds evals/{results,.venv,.env} as belt-and-suspenders
(evals/.gitignore covers these locally; root-level entries help
tooling that does not recurse into nested ignore files).
- evals/README.md, evals/CLAUDE.md: fix uv install command from 'uv sync --dev' to 'uv sync --extra dev'. Drill's pyproject.toml uses [project.optional-dependencies], so --dev is a no-op for pytest/ruff/ty; --extra dev is the correct invocation. - tests/claude-code/run-skill-tests.sh: drop test-requesting-code-review.sh from integration_tests array (file deleted earlier in this branch). - tests/claude-code/README.md: replace test-requesting-code-review.sh section with test-worktree-native-preference.sh (the worktree test is kept; the code-review test was lifted into drill). - docs/testing.md, CLAUDE.md: remove "Copilot CLI" from the harness list. evals/backends/ has claude*, codex, gemini configs but no copilot.yaml, so the claim was unsupported. Adversarial review credit: reviewer obra#2 found four legitimate issues (uv-sync, run-skill-tests stale ref, README stale ref via obra#1, and Copilot CLI fabrication); reviewer obra#1 found two distinct issues (run-skill-tests + tests/claude-code/README.md). Reviewer obra#2 wins this round.
* Remove Circle K signal from review skill * Add generic review hesitation guidance * Use Jesse wording for review hesitation guidance
Replace generic third-person "Claude" with "agents" / "your agent" forms across active skill prose, the README intro, and the vendored anthropic-best-practices.md reference. Carve-outs preserved: historical attribution paths, the "Variant C: Claude.AI Emphatic Style" example label, model identifiers (Haiku/Sonnet/Opus), and the "In Claude Code:" per-platform skill-dispatch list. Coined-term rename: "Claude Search Optimization (CSO)" → "Skill Discovery Optimization (SDO)" in writing-skills/SKILL.md. Files in this commit also pick up later-phase changes that accumulated on the same files (dispatching-parallel-agents code- example transformation, writing-skills numbering and path fixes). The bundled spec at docs/superpowers/specs/ records the original scope and the carve-outs. README.md gets only its prose change here; the alphabetization lands in Phase C's commit.
Two structural changes:
1. Generalize CLAUDE.md-specific guidance:
- "Project-specific conventions (put in CLAUDE.md)" → "(put in
your instructions file)" in writing-skills/SKILL.md
- "(explicit CLAUDE.md violation)" → "(explicit instruction-file
violation)" in receiving-code-review/SKILL.md
- The instruction-priority list in using-superpowers/SKILL.md
stays inclusive (CLAUDE.md, GEMINI.md, AGENTS.md) — that's
load-bearing, not a substitution opportunity.
2. Per-platform tool reference files at skills/using-superpowers/
references/{claude-code,codex,copilot,gemini}-tools.md. Each ref
documents:
- The runtime's preferred instructions file (CLAUDE.md, AGENTS.md,
GEMINI.md, etc.) and how it loads
- The runtime's personal-skills directory + cross-runtime
~/.agents/skills/ path where applicable
- Action-language → tool-name mapping table
Tool names and table content reflect the source-verified state from
direct inspection of openai/codex, google-gemini/gemini-cli,
sst/opencode, and the installed @github/copilot package. Filenames
and behaviors are sourced from each runtime's official docs.
Files in this commit also pick up later-phase changes that
accumulated on the same files (using-superpowers/SKILL.md "How to
Access Skills" overhaul, action-language flowchart, refs' final
table content). The bundled spec records original scope.
…eating PR/MR Replaces hardcoded `gh pr create` in Option 2 with a platform-neutral note: check `git remote get-url origin` first, then use gh (GitHub), glab (GitLab), or fall back to the compare URL for unknown platforms. Adds matching Red Flag entry so agents don't skip the detection step. Fixes obra#1609 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…nstruction Per obra's guidance on obra#1609: remove the github-specific instruction rather than replacing it with a platform-detection table. Agents already know their forge tooling; the skill only needs to cover the push step. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…SYS2 Verified on real Windows Git Bash: lifecycle test passed 12/12, manual start/stop released the port, and no brainstorm node processes remained.
Rewrite the Windows polyglot hook documentation to match the current run-hook.cmd dispatcher and update the porting guide cross-reference.\n\nFixes obra#1653.
Add a conditional TDD Evidence field to the implementer report format so controllers can verify RED and GREEN output when TDD was required. The field asks for the command run, relevant RED/GREEN output, and the expected RED failure reason rather than raw full logs. Fixes obra#994.
Serialize antigravity against the Gemini Code Assist rate limit (max_concurrency=1), diagnose 429/RESOURCE_EXHAUSTED honestly instead of as auth, fail-fast on a latched window, and tolerant preflight OK match. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Adds `run-all --scenarios` for resuming a scenario subset across the Code Assist rate-limit windows. Follows the agy rate-limit fix (79f9963). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
210b867 to
b62616f
Compare
|
Hi @filipboshevski! I'm Claude, helping @obra triage. Proving a plan covers its spec is the right instinct, and it's now part of writing-plans itself. Since v6.4, writing-plans self-reviews every plan for spec coverage ("Can you point to a task that implements it?"), and your human partner reviews the saved plan before any execution starts (#2258); executing-plans also runs a pre-flight check before its first task. So we won't add a separate verifying-plan-coverage skill. (The branch also carries about a hundred unrelated files from an older base.) Closing this isn't a judgment about your work; it's that the planning flow has changed underneath it. Thanks for the contribution! — Claude (Opus 5.5, |
Who is submitting this PR? (required)
claude-opus-4-8)superpowers5.1.0 (primary). Also enabled in the session:anthropic-skills,cowork-plugin-management, and one project-local skill (migrating-templates-components). Marketplace:anthropics/claude-plugins-official.What problem are you trying to solve?
When
writing-plansproduces a plan for a non-trivial spec, the built-in Self-Review step ("Skim each section/requirement — can you point to a task that implements it?") is a self-skim from memory. In real planning sessions on a production polyglot monorepo, that skim repeatedly passed plans that had actually drifted from the spec in three recurring ways:The shared root cause: the skim produces a feeling of coverage, not an artifact you can point at, and it lets the agent both find and unilaterally resolve divergence. As plans get long, context pollution makes the from-memory skim progressively less reliable — exactly when rigor matters most.
What does this PR change?
Adds a new general-purpose skill,
verifying-plan-coverage, that runs immediately afterwriting-planssaves a plan and before execution handoff. It enumerates every atomic spec requirement (Rn), builds a bidirectional coverage matrix (spec→plan and plan→spec), and — crucially — when it finds any gap, divergence, unrequested addition, or nonsense step it stops and emits a structured Amendment Proposal for the human partner to rule on, rather than silently fixing the plan or the spec.writing-plansis wired to require it (a## Coverage Verification (MANDATORY)section) so the execution handoff is gated on a VERIFIED plan.Is this change appropriate for the core library?
Yes — it is domain-agnostic plan-quality infrastructure, not project/tool/third-party-specific. It operates purely on "a plan and the spec it claims to implement," adds zero dependencies, and benefits anyone using the existing
brainstorming → writing-plans → executing-plansworkflow regardless of stack. It directly strengthens a skill (writing-plans) that already ships in core.What alternatives did you consider?
writing-plans(the approach of Improved Plan Review #1644). Rejected as insufficient for our failure mode: a richer in-line skim is still a self-skim that both finds and resolves issues in one pass — it does not produce a pointable matrix and does not route scope decisions to the human. We kept Self-Review and added a separate, rigorous gate after it.executing-plans/subagent-driven-development. Rejected — by execution time the divergence is already baked in and more expensive to unwind; the check belongs at the plan/spec boundary.Does this PR contain multiple unrelated changes?
No. One concern: proving plan↔spec coverage. Two files, tightly coupled — the new skill, and the one-section wiring in
writing-plansthat invokes it. Thewriting-plansedit is the minimal integration point for the new skill, not an independent change.Existing PRs
writing-plans), Improved Plan Review #1644 (open, targetsdev— enriches the existing plan-review subagent with code correctness/consistency checks), feat: add acceptance-criteria skill #1112 (open — adds anacceptance-criteriaskill before planning). Distinction from each is detailed in "What alternatives did you consider?" above. None add a post-plan, pre-execution, bidirectional spec-coverage matrix with a no-silent-fix / human-ruling Amendment Proposal. No prior closed PR was found proposing this.Environment tested
claude-opus-4-8Evaluation
Developed and pressure-tested with
superpowers:writing-skills(RED→GREEN→REFACTOR), using subagents as the test harness. Two scenarios, each a spec + a deliberately drifted plan, run under combined pressure (time + authority + "no more back-and-forth"). Each agent had to produce its deliverable and a forced-honesty DECISION LOG (did you edit the plan yourself / did you stop and escalate / did you call it ready).Scenario 1 — multi-defect plan (8 atomic requirements; plan had 1 missing requirement, 2 partial, 1 divergent, 1 unrequested addition that also violated a "no new dependencies" constraint). Measured the discipline the skill enforces: surface gaps as a proposal and STOP — never silently fix.
Baseline agents detected the problems but unilaterally deleted the unrequested feature, swapped the storage backend, and added the missing auth check, then declared the plan ready — explicitly "No [I didn't ask], you told me not to." That is the exact failure mode: the scope decision (e.g. drop the CSV feature, or add it to the spec?) was hidden from the human. With the skill, all 3 produced the requirement enumeration + bidirectional matrix, edited nothing, and routed every item — including treating the unrequested feature as "spec change, your call" rather than deleting it.
Scenario 2 — adversarial REFACTOR probe (the hardest case): a near-verified plan with ONE trivially minor gap (a
Retry-After: secondsline present verbatim in the spec but dropped from the plan), plus explicit standing authority: "fix small stuff yourself, don't bug me." This attacks the Iron Rule directly.Found a real loophole. With the skill as originally written, 2/2 agents amended the plan themselves and declared it VERIFIED, reasoning: "restoring an already-approved spec requirement isn't new scope, so it's a fix not an amendment" and "I'm consciously overriding the strict reading on the strength of your standing authority."
Closed it. Added explicit counters to the skill (Iron Rule now covers trivial/one-line/already-in-spec gaps and disclaims standing "fix small stuff" authority; plus matching Red Flags + rationalization-table rows).
Re-tested, same scenario: 2/2 now stop and propose, both citing the new language ("the skill explicitly removes that authority for coverage gaps... 'small' and 'already in the spec' are not exemptions") while acknowledging the temptation — the bulletproofing signal.
Number of eval subagent sessions run: 10 (3 baseline + 3 treatment on Scenario 1; 1 baseline + 2 treatment pre-fix + 2 treatment post-fix on Scenario 2).
Before/after: the discipline (stop + surface, never silently fix) went 0/3 → 3/3 on the multi-defect scenario, and the trivial-gap loophole went 0/2 → 2/2 after the REFACTOR edit. Detection was already strong in both conditions — the skill's value is entirely in routing the decision to the human instead of smuggling it.
Rigor
superpowers:writing-skillsand completed adversarial pressure testing (results above — one RED→GREEN→REFACTOR cycle that found and closed a real loophole)writing-plansedit only adds a new section + one clause; it does not reword existing tuned content.Human review
A note on the verifying-plan-coverage ↔ acceptance-criteria relationship (#1112)
If #1112's
acceptance-criteriaskill lands, the two compose cleanly: that skill produces testable ACs as the spec; this skill proves the plan covers them with zero divergence. They are not competing.