agentleFS
broneqbroneq/bdk/skills/verify-plan/SKILL.md

verify-plan

Skill1 starsChanged 48 days agoMITView on GitHub

Verify implementation plans before execution with a single Opus subagent driven by a structured six-section checklist. Use when you have a written plan (from /bdk:create-plan or manual) and want to check it works before writing code.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Verify plans against real code before execution.

    line 17
  2. Very specific:

    Use the Agent tool with subagent_type: "bdk:plan-verifier" and this message body:

    line 52
  3. Very specific:

    Do not execute the plan. On PASS_WITH_WARNINGS, name the warnings in the chat line - they are worth reading before execution, but they do …

    line 124

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Verify Plan

Relies on BDK foundation (STARTUP_INSTRUCTIONS.md) for project context.

Verify plans against real code before execution. Spawns one Opus subagent (bdk:plan-verifier) that runs a six-section checklist and returns a YAML verdict envelope.

Invocation

/bdk:verify-plan docs/plans/2026-03-17-some-plan.md

$ARGUMENTS = plan file path. Read file first.

Decision Flow

flowchart TB
    start([Read plan file]) --> spawn[Spawn bdk:plan-verifier<br/>opus, six-section checklist]
    spawn --> parse[Parse YAML verdict envelope]
    parse --> status{status?}
    status -- PASS or<br/>PASS_WITH_WARNINGS --> save([Render verdict-template<br/>Write report])
    status -- FAIL --> iter_check{iteration < 2?}
    iter_check -- YES --> delta[Build delta message<br/>SendMessage verifier_agent_id]
    delta -- reply --> parse
    iter_check -- NO 2 failures --> escalate([Plan needs rethink.<br/>Suggest /bdk:design])

    classDef good fill:#d4edda,stroke:#3aa055
    classDef bad fill:#f8d7da,stroke:#c25a1b
    class start,save good
    class escalate bad

Step 1 — Locate Plan File

Parse $ARGUMENTS. Validate the path exists. Read the full content. Compute plan-slug = basename without .md extension. If the path is missing or empty, abort with a clear error and stop.

Step 2 — Spawn bdk:plan-verifier

Use the Agent tool with subagent_type: "bdk:plan-verifier" and this message body:

PLAN FILE: <path>
ITERATION: 1
FULL PLAN CONTENT:
---
<plan content verbatim>
---
For each task, run all six checklist sections (signature_drift, data_trace,
edge_cases, regression_flows, test_coverage, plan_completeness). Emit the
YAML verdict envelope as the LAST block of your reply — no prose after it.

Capture agent_id from the spawn envelope. Store as verifier_agent_id — needed for iteration 2 SendMessage.

Step 3 — Parse YAML Envelope

Extract the final yaml ... block from the agent's reply. Parse it. Required keys: status, iteration, per_task, must_fix.

Malformed YAML handling: respawn the agent once with the identical message. If the second reply is also malformed, abort and report the parse error to the user — do not silently continue.

Step 4 — Decide Next Action

Branch on status:

statusAction
PASS or PASS_WITH_WARNINGSGo to Step 5 (write report).
FAIL and iteration < 2Build a delta message (below). Call SendMessage(to: verifier_agent_id, message: <delta>). Loop back to Step 3 with the new reply.
FAIL and iteration == 2Stop. Print a concise summary of remaining must_fix entries. Recommend /bdk:design — after two failed iterations the plan is structurally wrong, not detail-wrong.

Delta message template (iteration 2):

Iteration 2.
Task IDs to re-verify: <deduped task_ids from must_fix>
Other tasks are unchanged — carry forward iteration-1 verdicts.
Run all six checklist sections only on the listed tasks. Emit the YAML
verdict envelope as the LAST block, with iteration: 2.

Step 5 — Write Verification Report

First stamp the plan's identity:

python3 ${CLAUDE_PLUGIN_ROOT}/scripts/bdk_run_state.py hash-plan <plan-path>

Render the report using references/verdict-template.md, filling the returned plan_sha256 into the header. Save to:

.bdk/verify-plan/<plan-slug>-verification.md

The hash is over the plan file's bytes, so it identifies exactly the plan that was verified. /bdk:subagent-execute-plan re-computes it with the same subcommand at Step 0 and compares: equal means it is running the verified plan, different means the plan was edited after verification and the verdict above no longer describes it. Do not compute the hash any other way - one source keeps the two sides from disagreeing over an algorithm or a trailing newline.

Confirm in chat with the report path and the pass/fail summary line.

Step 6 — Hand Off

On PASS or PASS_WITH_WARNINGS, print the next step and stop:

  Verdict:  PASS | PASS_WITH_WARNINGS
  Report:   .bdk/verify-plan/<plan-slug>-verification.md
  Plan sha: <first 12 chars>

  Next: /bdk:subagent-execute-plan <plan-path>

Do not execute the plan. On PASS_WITH_WARNINGS, name the warnings in the chat line - they are worth reading before execution, but they do not block it.

On FAIL after two iterations, the handoff is /bdk:design, not the executor (Step 4 already covers this).

Notes

  • Loop cap = 2 iterations. Third would be wasted work; escalation is the intended path.
  • The agent retains plan content + iteration-1 findings across SendMessage. Pass only the delta — do not re-include the full plan.
  • See STARTUP "Continuing a Spawned Agent" for the 5-min warm-cache window. If iteration 2 is delayed beyond that, the SendMessage still works but pays a cache miss.
  • SendMessage iteration is same-session only. verifier_agent_id is not addressable from a later session, so a re-verification after any session boundary is a fresh Step 2 spawn with the full plan - there is no cheap cross-session resume. If the plan changed, that is the correct behaviour anyway: the verdict is about specific bytes, and a fresh pass is what re-establishes it.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.