agentleFS
PiloTracerPiloTracer/pilo.ai.logicbison/skills/plan-verify/skill.md

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.

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
  1. Very specific:

    Every mode ends with a Completion checklist — each item pass | fail | skip with evidence.

    line 29
  2. Very specific:

    Operator handoff: every response that ends a turn follows the Operator handoff contract — terse output.

    line 30
  3. Very specific:

    If {ITERATION_CARRIER} has valid ## Current iteration → alignment (then offer foundation / master if user wants full stack).

    line 55
  4. Distinctive:

    Before running any protocol, emit a Request interpretation block that maps the open language to framework terms:

    line 71
  5. Distinctive:

    When a keyword match is unambiguous (e.g.

    line 93
  6. Distinctive:

    When the mapping is probabilistic or the user question is vague, label Inference and ask once to confirm the detected mode before …

    line 94
  7. Very specific:

    When mode is explicit (e.g.

    line 97
  8. Distinctive:

    Run at start of every mode.

    line 101
  9. Distinctive:

    Run BF1 slot inventory for foundation rows only.

    line 127
  10. Very specific:

    Run plan-master integrity only if ≥2 foundation artifacts exist (01, 04, ADR, or SPEC).

    line 129
  11. Very specific:

    Follow .ai/skills/plan-foundation/skill.md § Status protocol (S1–S6).

    line 135
  12. Very specific:

    Follow .ai/skills/plan-master/skill.md § integrity mode on foundation set only (docs 01–04, ADRs, SPECs, registries — no *-full-plan.md …

    line 145
  13. Very specific:

    If no *-full-plan.md but substitute exists (ROADMAP, milestones) → run M3 against substitute.

    line 212
  14. Distinctive:

    If only NEXT/sprint doc → master: partial.

    line 213
  15. Very specific:

    Do not emit blocked prerequisite solely for missing Plan-master-ready: — report formal-plan-master-ready: no and Next: @plan-repair …

    line 214
  16. Very specific:

    implementation-ready: must remain no unless an Approved *-full-plan.md exists (no brownfield waiver for broad execution).

    line 215
  17. Distinctive:

    If plan-master-ready: no in HANDOFF / foundation status:

    line 219
  18. Very specific:

    Follow .ai/skills/plan-master/skill.md § Status protocol.

    line 226
  19. Very specific:

    Objective: Read-only inventory of deployable application surfaces (routes, pages, controllers, standalone utilities under {APP}) vs …

    line 275
  20. Very specific:

    If no application source exists → skip with verdict pass (nothing to map).

    line 290
  21. Very specific:

    Read-only inventory of deployable surfaces vs SPEC Implementation map + DIRECTORY_MAP.

    line 373

≈ “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.

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

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.md unless the user explicitly asks to persist a verify result in HANDOFF.
  • Delegate, do not duplicate — invoke upstream skills by following their skill.md protocols (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-master were never run; assess framework alignment from repo evidence.
  • Every mode ends with a Completion checklist — each item pass | fail | skip with evidence.
  • Operator handoff: every response that ends a turn follows the Operator handoff contract — terse output; approvals under **Needs your approval:** citing path: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 saysModeAction
@plan-verify foundationfoundationFoundation verify
@plan-verify mastermasterMaster verify
@plan-verify alignmentalignmentAlignment verify — NEXT vs {MASTER_PLAN}
@plan-verify driftalignmentAlias for alignment
@plan-verify statusstatusStatus protocol — read-only summary
@plan-verify brownfieldbrownfieldBrownfield verify — full framework alignment pass
@plan-verify coveragecoverageCoverage verify — app surfaces vs SPECs / DIRECTORY_MAP
@plan-verify registrycoverageAlias for coverage
@plan-verify verify(infer)See Default below
plan-verify audit foundationfoundationAlias
plan-verify check mastermasterAlias
Open language: "verify foundation planning", "audit master plan"(infer)Map keywords → mode; ask once if ambiguous

Default (bare @plan-verify):

  1. If {ITERATION_CARRIER} has valid ## Current iteration → alignment (then offer foundation / master if user wants full stack).
  2. Else if {PLANS_ROOT}/full/*-full-plan.md exists → master, then abbreviated foundation snapshot in report.
  3. Else if {PLANS_ROOT}/foundation/ has any doc → foundation.
  4. Else if application source or product docs exist → brownfield.
  5. 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 mapping

Rules:

  • 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

#ReadWhen
1.cursorrules placeholder map ({PLANS_ROOT}, {HANDOFF}, …)all modes
2{HANDOFF}all modes
3{PLANS_ROOT}/ASSUMPTIONS.md, RISK_REGISTRY.md, UNKNOWNS.mdfoundation, master
4.ai/standards/20260519-MASTER_PLAN_STANDARD.mdmaster (section contract)
5.ai/docs/guides/workflows/20260518-tutorial-fix-existing-plans.mdalignment

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:

  1. Run BF1 slot inventory for foundation rows only.
  2. Skip hard fail when plan-foundation status would show all not started — instead score each P0–P6 row: present | substitute | partial | missing with substitute path.
  3. Run plan-master integrity only if ≥2 foundation artifacts exist (01, 04, ADR, or SPEC); else integrity: skip.
  4. Verdict may be pass with gaps or aligned-best-effort when substitutes cover scope + architecture; list formal-foundation-complete: no explicitly.
  5. Next step defaults to @plan-repair brownfield - foundation (not @plan-foundation greenfield unless 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

DimensionQuestionResult
P0 captureP0 initial scope + .cursorrules + registries exist?pass / fail / gap
P1 explorationDocs 01–04 present; doc 04 is architecture foundation not master plan?pass / fail / gap
P2 ADRsCore ADRs Decided or deferred with UNKNOWNS?pass / fail / gap
P3 SPECsCONVENTIONS + FEATURE_STANDARD + DIRECTORY_MAP + ≥1 SPEC with R1…?pass / fail / gap
P4 cross-cuttingThreat model, observability, stack doc when UI/security in scope?pass / fail / skip
P5 infraProposal or HANDOFF waiver for compose?pass / fail / skip
P6 opsHANDOFF + NEXT + README gates?pass / fail / gap
RegistriesASSUMPTIONS / RISK / UNKNOWNS reviewed, not empty shells?pass / fail
TraceabilityScope ↔ ADR ↔ SPEC spot-check for touched contexts?pass / fail / gap
TerminologyDoc 04 not called "the full plan" in artifacts?pass / fail
Integrity (F1)plan-master integrity on foundation?pass / fail / waived
Probe coverageIf {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:

  1. If no *-full-plan.md but substitute exists (ROADMAP, milestones) → run M3 against substitute; label master artifact: substitute with path.
  2. If only NEXT/sprint doc → master: partial; alignment BF branch carries execution truth.
  3. Do not emit blocked prerequisite solely for missing Plan-master-ready: — report formal-plan-master-ready: no and Next: @plan-repair brownfield - master.
  4. implementation-ready must remain no unless an Approved *-full-plan.md exists (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

#ReadWhen
1{AGENT_RULES_FILE} — REPLACE:APP_ROOT, REPLACE:FRONTEND_ROOT, boundary placeholdersalways
2.work/standards/*DIRECTORY_MAP* (or {BOUNDARY_MAP})always
3{FEATURE_SPEC_ROOT}/README.md + each */…-SPEC.md (Implementation map + Purpose)always
4Application 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 kindTypical evidence (adapt per stack)
HTTP API routers / controllersFastAPI APIRouter, Express routers, Nest modules
UI routes / pagesNext.js pages/ or app/, React Router route files
BFF / API routespages/api/, server actions with distinct URLs
Workers / jobsCelery tasks, queue consumers with dedicated modules
Standalone utilitiesScripts 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:

  1. SPEC ## Implementation map (§14) path table (FEATURE_STANDARD) — Confirmed
  2. DIRECTORY_MAP bounded-context / path row — Confirmed or Inference
  3. SPEC Purpose / §6 APIs naming the surface — Inference
  4. 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).

SkillRelationship
plan-foundationUpstream for foundation status; plan-verify orchestrates, does not replace
plan-masterUpstream for master status + integrity
plan-repairDownstream on fail — @plan-repair repair - from foundation | from master | from alignment | from coverage
feature-specDownstream for new slugs when coverage finds unmapped surfaces
code-verifyOrthogonal — code vs plan; run both before broad release
code-repairWrong layer for plan gaps — redirect to plan-repair
code-implementationRegenerates 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)

#CheckResultEvidence
1Mode detectedpass/fail
2Shared reads completedpass/failpaths
3Upstream skill protocols runpass/fail
4Check matrix filledpass/fail
5Verdict matches evidencepass/fail
6Next step names exact commandpass/fail
7No application code writtenpass
8Layer labels not conflatedpass/fail
9Request interpretation emitted (when open language)pass/skip
10Operator 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).

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.