plan-verify
Skill0 starsChanged 5 months agoMITView on GitHub
Verification layer for planning artifacts: foundation (P0–P6), master plan, NEXT vs full-plan alignment, code-to-SPEC registry coverage, and brownfield framework alignment when plan-foundation or plan-master were never run formally. Orchestrates upstream status/integrity when present; otherwise assesses repo evidence against .ai slots. Use plan-verify foundation, master, alignment, coverage, brownfield, or open language.
In this repository22 other files it gives its agents.
- ai-directorSkill
- code-implementationSkill
- code-repairSkill
- code-verifySkill
- concept-runSkill
- db-migrationSkill
- deploy-basicSkill
- deploy-filesSkill
- dev-stackSkill
- docsSkill
- feature-specSkill
- infra-terraformSkill
- plan-foundationSkill
- plan-masterSkill
- plan-repairSkill
- plan-syncSkill
- process-routerSkill
- project-bootstrapSkill
- project-query-setupSkill
- session-controlSkill
- tauri-developmentSkill
- x-directorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 7 are distinctive, and 14 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Every mode ends with a Completion checklist — each item pass | fail | skip with evidence.
- Very specific: line 30
Operator handoff: every response that ends a turn follows the Operator handoff contract — terse output.
- Very specific: line 55
If {ITERATION_CARRIER} has valid ## Current iteration → alignment (then offer foundation / master if user wants full stack).
- Distinctive: line 71
Before running any protocol, emit a Request interpretation block that maps the open language to framework terms:
- Distinctive: line 93
When a keyword match is unambiguous (e.g.
- Distinctive: line 94
When the mapping is probabilistic or the user question is vague, label Inference and ask once to confirm the detected mode before …
- Very specific: line 97
When mode is explicit (e.g.
- Distinctive: line 101
Run at start of every mode.
- Distinctive: line 127
Run BF1 slot inventory for foundation rows only.
- Very specific: line 129
Run plan-master integrity only if ≥2 foundation artifacts exist (01, 04, ADR, or SPEC).
- Very specific: line 135
Follow .ai/skills/plan-foundation/skill.md § Status protocol (S1–S6).
- Very specific: line 145
Follow .ai/skills/plan-master/skill.md § integrity mode on foundation set only (docs 01–04, ADRs, SPECs, registries — no *-full-plan.md …
- Very specific: line 212
If no *-full-plan.md but substitute exists (ROADMAP, milestones) → run M3 against substitute.
- Distinctive: line 213
If only NEXT/sprint doc → master: partial.
- Very specific: line 214
Do not emit blocked prerequisite solely for missing Plan-master-ready: — report formal-plan-master-ready: no and Next: @plan-repair …
- Very specific: line 215
implementation-ready: must remain no unless an Approved *-full-plan.md exists (no brownfield waiver for broad execution).
- Distinctive: line 219
If plan-master-ready: no in HANDOFF / foundation status:
- Very specific: line 226
Follow .ai/skills/plan-master/skill.md § Status protocol.
- Very specific: line 275
Objective: Read-only inventory of deployable application surfaces (routes, pages, controllers, standalone utilities under {APP}) vs …
- Very specific: line 290
If no application source exists → skip with verdict pass (nothing to map).
- Very specific: line 373
Read-only inventory of deployable surfaces vs SPEC Implementation map + DIRECTORY_MAP.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
plan-verify
Verification layer for planning documentation — not application code. Does not author foundation docs or master plans; does not replace plan-foundation / plan-master mutating modes.
Pairs with: plan-foundation (foundation status + gate evidence), plan-master (master status + integrity), plan-repair (remediation after fail), code-verify (implementation layer — orthogonal), .cursorrules Completion Gate (evidence-first).
Canonical path: .ai/skills/plan-verify/skill.md · Invocation examples: reference.md
Registry: .ai/skills/SKILL_DEPENDENCIES.md.
Hard rules:
- Evidence-first — cite file paths and quoted headings; never claim pass without running the checks in this skill or attaching upstream skill output from the same session.
- Read-only — no writes to
{HANDOFF},{ITERATION_CARRIER}, foundation docs, or*-full-plan.mdunless the user explicitly asks to persist a verify result in HANDOFF. - Delegate, do not duplicate — invoke upstream skills by following their
skill.mdprotocols (same agent turn); do not reimplement certify, revise, or greenfield logic inline. - Layer discipline — foundation verify must not score implementation-ready (redirect to
@plan-master status). Master verify must not certify plan-master-ready (redirect to@plan-foundation certify). - Brownfield-first — when Brownfield detection is yes, use Brownfield verify (or the BF branch inside the requested mode). Do not hard-stop solely because
@plan-foundation/@plan-masterwere never run; assess framework alignment from repo evidence. - Every mode ends with a Completion checklist — each item
pass|fail|skipwith evidence. - Operator handoff: every response that ends a turn follows the Operator handoff contract — terse output; approvals under
**Needs your approval:**citingpath:L<n>; questions numbered under**Needs your answer:**; exactly one**Next step:**command; one line when nothing is needed (Form A). Decisions and questions never mixed; empty sections omitted.
Parse invocation
Normalize to mode + optional scope. Use ASCII hyphen - between tokens.
| User says | Mode | Action |
@plan-verify foundation | foundation | Foundation verify |
@plan-verify master | master | Master verify |
@plan-verify alignment | alignment | Alignment verify — NEXT vs {MASTER_PLAN} |
@plan-verify drift | alignment | Alias for alignment |
@plan-verify status | status | Status protocol — read-only summary |
@plan-verify brownfield | brownfield | Brownfield verify — full framework alignment pass |
@plan-verify coverage | coverage | Coverage verify — app surfaces vs SPECs / DIRECTORY_MAP |
@plan-verify registry | coverage | Alias for coverage |
@plan-verify verify | (infer) | See Default below |
plan-verify audit foundation | foundation | Alias |
plan-verify check master | master | Alias |
| Open language: "verify foundation planning", "audit master plan" | (infer) | Map keywords → mode; ask once if ambiguous |
Default (bare @plan-verify):
- If
{ITERATION_CARRIER}has valid## Current iteration→ alignment (then offer foundation / master if user wants full stack). - Else if
{PLANS_ROOT}/full/*-full-plan.mdexists → master, then abbreviated foundation snapshot in report. - Else if
{PLANS_ROOT}/foundation/has any doc → foundation. - Else if application source or product docs exist → brownfield.
- Else → foundation (empty repo; bootstrap hints).
Aliases: audit, check → same mode inference as bare @plan-verify.
Open language → brownfield when user says: existing repo, legacy, never ran plan-foundation, adopt Agent OS, align to .ai framework, brownfield.
Open language → coverage when user says: unmapped surfaces, code-to-plan parity, feature catalog gap, 100% cataloged, map routers/pages to features, undocumented app surfaces.
Open language interpretation (free requests)
When: The user message does not contain an explicit mode keyword (foundation, master, alignment, brownfield, status, drift) — or the keyword is embedded in a free-form sentence (e.g. "verify foundation planning", "audit master plan", "is our plan ready?").
Before running any protocol, emit a Request interpretation block that maps the open language to framework terms:
### Request interpretation
**User said:** <raw text or paraphrase one line>
**Detected mode:** foundation | master | alignment | brownfield | status
**Mapped via:** <keyword match | default inference | user disambiguation>
**Framework components examined:**
| Component | Path | Why |
|-----------|------|-----|
| P0–P6 foundation docs | `{PLANS_ROOT}/foundation/*` | Mode: foundation |
| Plan-master status + integrity | `{PLANS_ROOT}/full/*-full-plan.md` | Mode: master |
| SPECs | `{FEATURE_SPEC_ROOT}/` | Per touched contexts |
| … | … | … |
**Assumption ledger:** <Confirmed | Inference | Unverified> for any ambiguous mappingRules:
- Emit the interpretation block once before the mode-specific protocol runs.
- When a keyword match is unambiguous (e.g. "audit master plan" → mode
master), state Confirmed. - When the mapping is probabilistic or the user question is vague, label Inference and ask once to confirm the detected mode before proceeding.
- Include the interpretation block in the report header (see report formats below).
When mode is explicit (e.g. @plan-verify foundation, @plan-verify master), skip the interpretation block and record: **Request:** explicit mode — no interpretation needed.
Run at start of every mode. Record brownfield: yes | no in report header.
BF0 signals, Framework alignment map slot table, brownfield verify BF1–BF4, report template, verdict rules: reference.md § Brownfield detection and verify (detailed).
Shared prerequisites
| # | Read | When |
| 1 | .cursorrules placeholder map ({PLANS_ROOT}, {HANDOFF}, …) | all modes |
| 2 | {HANDOFF} | all modes |
| 3 | {PLANS_ROOT}/ASSUMPTIONS.md, RISK_REGISTRY.md, UNKNOWNS.md | foundation, master |
| 4 | .ai/standards/20260519-MASTER_PLAN_STANDARD.md | master (section contract) |
| 5 | .ai/docs/guides/workflows/20260518-tutorial-fix-existing-plans.md | alignment |
Foundation verify protocol
Cross-check foundation layer readiness: P0–P6 gates, registries, traceability, and semantic integrity on foundation artifacts.
Foundation verify — brownfield branch (BF)
When BF0 = yes:
- Run BF1 slot inventory for foundation rows only.
- Skip hard fail when
plan-foundation statuswould show all not started — instead score each P0–P6 row: present | substitute | partial | missing with substitute path. - Run
plan-master integrityonly if ≥2 foundation artifacts exist (01, 04, ADR, or SPEC); else integrity: skip. - Verdict may be pass with gaps or aligned-best-effort when substitutes cover scope + architecture; list formal-foundation-complete: no explicitly.
- Next step defaults to
@plan-repair brownfield - foundation(not@plan-foundation greenfieldunless user wants full questionnaire).
F0 - Invoke upstream status (mandatory)
Follow .ai/skills/plan-foundation/skill.md § Status protocol (S1–S6). Produce or absorb the standard Foundation status report.
Record in your working notes (do not conflate labels):
- foundation-complete: yes | no
- plan-master-ready: yes | no | not evaluated
- Phase table P0–P6 with evidence paths
F1 - Integrity on foundation artifacts (mandatory)
Follow .ai/skills/plan-master/skill.md § integrity mode on foundation set only (docs 01–04, ADRs, SPECs, registries — no *-full-plan.md required).
Record: integrity: pass | pass with waivers | fail
F2 - Foundation check matrix
| Dimension | Question | Result |
| P0 capture | P0 initial scope + .cursorrules + registries exist? | pass / fail / gap |
| P1 exploration | Docs 01–04 present; doc 04 is architecture foundation not master plan? | pass / fail / gap |
| P2 ADRs | Core ADRs Decided or deferred with UNKNOWNS? | pass / fail / gap |
| P3 SPECs | CONVENTIONS + FEATURE_STANDARD + DIRECTORY_MAP + ≥1 SPEC with R1…? | pass / fail / gap |
| P4 cross-cutting | Threat model, observability, stack doc when UI/security in scope? | pass / fail / skip |
| P5 infra | Proposal or HANDOFF waiver for compose? | pass / fail / skip |
| P6 ops | HANDOFF + NEXT + README gates? | pass / fail / gap |
| Registries | ASSUMPTIONS / RISK / UNKNOWNS reviewed, not empty shells? | pass / fail |
| Traceability | Scope ↔ ADR ↔ SPEC spot-check for touched contexts? | pass / fail / gap |
| Terminology | Doc 04 not called "the full plan" in artifacts? | pass / fail |
| Integrity (F1) | plan-master integrity on foundation? | pass / fail / waived |
| Probe coverage | If {PLANS_ROOT}/foundation/PROBE_LEDGER.md exists: bash .ai/scripts/readiness-verify.sh passes? Coverage % vs target; ★ gaps? | pass / gap / n/a |
F3 - Foundation verify report (mandatory)
## plan-verify foundation - <Project>
**Date:** <ISO> · **Mode:** foundation (read-only)
### Request interpretation
<when open language — insert interpretation block; otherwise: explicit foundation mode>
### Upstream
- **plan-foundation status:** embedded / cited above
- **plan-master integrity (foundation):** pass | pass with waivers | fail
### Check matrix
| Dimension | Result | Evidence / gap |
|-----------|--------|----------------|
### Readiness (report only — do not certify here)
- **foundation-complete:** yes | no
- **plan-master-ready:** yes | no
- **Probe coverage:** NN% (target 85%) · ledger honest: yes/fail | no ledger - if understanding is thin, run `@plan-foundation probe`
### Gaps
<ordered - severity High / Med / Low>
### Verdict
**pass** | **pass with gaps** | **fail** - <one sentence>
### Next step
- pass / pass with gaps (waived): `@plan-foundation certify plan-master-ready` or `@plan-master greenfield` if already certified
- fail: `@plan-repair repair - from foundation` or `@plan-repair foundation - <goal>`
End the report with the Operator handoff close (Form A `Next: …` or Form B `**Needs your approval:**` / `**Needs your answer:**` / `**Next step:**`) per SKILL_DEPENDENCIES.md; any operator-required approval/question from **Gaps** / **Next step** must ALSO appear in the closing handoff block, enumerated with `path:line`.Master verify protocol
Cross-check master implementation plan and implementation-ready prerequisites (report only — scoring follows plan-master status rules).
Master verify — brownfield branch (BF)
When BF0 = yes:
- If no
*-full-plan.mdbut substitute exists (ROADMAP, milestones) → run M3 against substitute; label master artifact: substitute with path. - If only NEXT/sprint doc → master: partial; alignment BF branch carries execution truth.
- Do not emit blocked prerequisite solely for missing
Plan-master-ready:— report formal-plan-master-ready: no and Next:@plan-repair brownfield - master. - implementation-ready must remain no unless an Approved
*-full-plan.mdexists (no brownfield waiver for broad execution).
M0 - Prerequisite snapshot
If plan-master-ready: no in HANDOFF / foundation status:
- brownfield: no → verdict fail with Run first:
@plan-foundation certify plan-master-ready. - brownfield: yes → continue; report formal gate open; use Master verify — brownfield branch.
M1 - Invoke upstream status (mandatory)
Follow .ai/skills/plan-master/skill.md § Status protocol. Record:
- Plan artifact path
- Plan status: Draft | Approved | …
- implementation-ready: yes | no (from plan-master — cite, do not re-score differently) Cross-check foundation layer: P0–P6 gates, registries, traceability, semantic integrity.
BF branch, F0–F3 steps, check matrix, report template: reference.md § Foundation verify protocol (detailed).
| Milestone ref | Iteration header M{N} exists in plan §19 (or HANDOFF-documented section id) |
| Task ids | Iteration task ids match plan §19 exactly |
| FR/NFR | Iteration traces cite ids that exist in plan FR/NFR tables |
| Acceptance scope | Iteration acceptance is milestone-local, not whole-plan dump |
| Concept registry | Iteration registry matches SPEC §15 for touched features |
| Files column | Every task row has path or TBD + blocker |
A2 - Alignment report
## plan-verify alignment - M{N}: <name>
**Date:** <ISO> · **Plan:** <path> · **Iteration:** {ITERATION_CARRIER}
### Request interpretation
<when open language — insert interpretation block; otherwise: explicit alignment mode>
### Checks
| Check | Result | Evidence |
### Gaps
<ordered>
### Verdict
**pass** | **pass with gaps** | **fail**
### Next step
- Master wrong: `@plan-repair master - <reason>` or `@plan-master revise - <reason>`
- NEXT wrong only: `@code-implementation plan - M{N}` (after master is source of truth)
- Both: fix master first (tutorial §6 order)
End the report with the Operator handoff close (Form A `Next: …` or Form B `**Needs your approval:**` / `**Needs your answer:**` / `**Next step:**`) per SKILL_DEPENDENCIES.md; any operator-required approval/question from **Gaps** / **Next step** must ALSO appear in the closing handoff block, enumerated with `path:line`.Coverage verify protocol
Triggers: @plan-verify coverage, @plan-verify registry, or open language about unmapped app surfaces / code-to-registry parity.
Objective: Read-only inventory of deployable application surfaces (routes, pages, controllers, standalone utilities under {APP}) vs registry artifacts ({FEATURE_SPEC_ROOT}/<slug>/*-SPEC.md Implementation map, {BOUNDARY_MAP} / DIRECTORY_MAP rows). Ensures agents can locate code from .work/ without ad-hoc tree walks.
Not in scope: Full behavioural SPEC review (use @feature-spec review); iteration task scope (use @code-verify milestone); framework self-check (use bash scripts/framework-verify.sh from Agent OS repo root).
Legacy artifacts: Project-specific feature.yml or domain-registry markdown files are not framework canon. Treat them as substitutes during inventory; migrate paths into SPEC Implementation map (FEATURE_STANDARD) when repairing.
C0 - Prerequisites
| # | Read | When |
| 1 | {AGENT_RULES_FILE} — REPLACE:APP_ROOT, REPLACE:FRONTEND_ROOT, boundary placeholders | always |
| 2 | .work/standards/*DIRECTORY_MAP* (or {BOUNDARY_MAP}) | always |
| 3 | {FEATURE_SPEC_ROOT}/README.md + each */…-SPEC.md (Implementation map + Purpose) | always |
| 4 | Application tree under {APP} (2–3 levels; route entrypoints) | always |
If no application source exists → skip with verdict pass (nothing to map); suggest @plan-verify foundation.
C1 - Surface inventory (mandatory)
Build a surface list — one row per independently routable or operable unit:
| Surface kind | Typical evidence (adapt per stack) |
| HTTP API routers / controllers | FastAPI APIRouter, Express routers, Nest modules |
| UI routes / pages | Next.js pages/ or app/, React Router route files |
| BFF / API routes | pages/api/, server actions with distinct URLs |
| Workers / jobs | Celery tasks, queue consumers with dedicated modules |
| Standalone utilities | Scripts under {APP} invoked in production (not one-off scripts/ dev tools unless documented in HANDOFF) |
Exclude: tests/, migrations/, generated code, vendor mirrors under .work/docs/integration/, pure config.
Label each row Confirmed (file cite) | Inference (heuristic grouping).
C2 - Registry mapping (mandatory)
For each surface, resolve mapped slug using this order:
- SPEC ## Implementation map (§14) path table (FEATURE_STANDARD) — Confirmed
- DIRECTORY_MAP bounded-context / path row — Confirmed or Inference
- SPEC Purpose / §6 APIs naming the surface — Inference
- No match → unmapped Cross-check master plan and implementation-ready prerequisites (report only).
BF branch, M0–M4 steps, conformance matrix, report template: reference.md § Master verify protocol (detailed).
| Skill | Relationship |
plan-foundation | Upstream for foundation status; plan-verify orchestrates, does not replace |
plan-master | Upstream for master status + integrity |
plan-repair | Downstream on fail — @plan-repair repair - from foundation | from master | from alignment | from coverage |
feature-spec | Downstream for new slugs when coverage finds unmapped surfaces |
code-verify | Orthogonal — code vs plan; run both before broad release |
code-repair | Wrong layer for plan gaps — redirect to plan-repair |
code-implementation | Regenerates iteration block after master/plan repair |
Status protocol
Read-only summary of plan-verify readiness. Emit a compact table: foundation status (from @plan-foundation status when present), master status (@plan-master status), active iteration in {ITERATION_CARRIER}, and top gaps from {PLANS_ROOT}/UNKNOWNS.md. No writes. End the report with the Operator handoff close (Form A Next: … or Form B **Needs your approval:** / **Needs your answer:** / **Next step:**) per SKILL_DEPENDENCIES.md.
Completion checklist (all modes)
| # | Check | Result | Evidence |
| 1 | Mode detected | pass/fail | |
| 2 | Shared reads completed | pass/fail | paths |
| 3 | Upstream skill protocols run | pass/fail | |
| 4 | Check matrix filled | pass/fail | |
| 5 | Verdict matches evidence | pass/fail | |
| 6 | Next step names exact command | pass/fail | |
| 7 | No application code written | pass | |
| 8 | Layer labels not conflated | pass/fail | |
| 9 | Request interpretation emitted (when open language) | pass/skip | |
| 10 | Operator handoff close emitted (Form A or Form B) | pass/fail |
Anti-patterns
- Claiming pass without running integrity or citing upstream output
- Certifying plan-master-ready or implementation-ready inside plan-verify (use upstream skills)
- Using alignment when no iteration block exists — use master or foundation first
- Fixing docs during verify without user asking — use plan-repair
- Full foundation greenfield questionnaire during a status request
- Hard-stopping brownfield repos solely for missing formal certify (use BF branch +
@plan-repair brownfield) - Claiming implementation-ready or plan-master-ready from brownfield alignment alone
- Running open-language verify without emitting a Request interpretation block (see Open language interpretation)
- Claiming 100% cataloged from framework slot alignment alone — run coverage when the question is code locate-ability
- Introducing parallel registries (
feature.yml, per-repo domain-registry files) instead of SPEC Implementation map + DIRECTORY_MAP - Burying operator actions/questions in prose instead of the closing Operator handoff block (Form A single line / Form B labeled sections)
Detect drift between
{ITERATION_CARRIER}and{MASTER_PLAN}.
BF branch, A0 existence gate, A1 checks, A2 report template: reference.md § Alignment verify protocol (detailed).
Read-only inventory of deployable surfaces vs SPEC Implementation map + DIRECTORY_MAP.
C0–C5 steps, surface inventory, mapping order, coverage matrix, report template, verdict rules: reference.md § Coverage verify protocol (detailed).
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
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.

