
plan
Use when a slice's design is locked and it needs an executable phase plan — refine each phase's objective and entry/exit/verification criteria, author plan.toml + plan.md, and materialise the runtime phase sheets. Routed to from /design.
- Installs
- 143
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/davidlee/doctrine --skill plan- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads plan automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Plan
You are turning design intent into an executable phase plan.
Inputs:
slice-nnn.md(scope)design.md(canonical design reference)- existing
plan.toml/plan.md(when present)
Process
-
Read the slice scope and
design.mdtogether. -
Confirm planning is not getting ahead of design:
- if
design.mdis missing or blank, stop and run/designunless you have been explicitly instructed otherwise. - if
design.mdexists but is stale relative to the current ask or slice scope, reconcile the design first. Clarify with the user if ambiguous. - you MUST NOT treat plan or phase creation as a substitute for unresolved design.
- if planning surfaces substantive new design problems, run
/designto revise or append to the design before continuing. - re-grep before you trust the design's premises. The design was locked
at author-time; the tree has moved since. Scan
design.mdfor concrete, grep-pable references — file paths, function/type names, constants, config keys — and resolve each against the current tree (grep,ls,git show). A missing path, moved file, or renamed symbol means the design rests on a stale premise: STOP and run/designto reconcile it before scaffolding phase sheets against wrong paths. (A design that names nothing concrete has nothing to check — this costs only what the design asserts.) - check the research advisory (
doctrine slice research <id>), then draft the slice's selectors from its Thread 2 hotspot map rather than from recall — the design-time selector dry-run is only the checking half.
- if
-
Scaffold the plan:
doctrine slice plan <ID>writesplan.toml+plan.md(refuses to clobber existing files). The tool reads these but never rewrites them — hand-edit freely.Routed findings from the design review (provisional). Before authoring phases, open the slice's design-review RV and read every finding whose
routeisdemonstrate,probeorcontrol. The index view ofreview showshows aroutecolumn; read each routed finding's response with-f— seelib:reference/review-ledger.md§ Route axis. Each is an obligation deliberately not repaired in prose. Its response carries a criterion sketch and a placement constraint: transcribe the sketch into an entry or exit criterion citingRV-NNN F-ninline in the criterion text, on the earliest phase that satisfies the constraint. An untranscribed routed blocker cannot honestly be verified, and an unverified blocker refuses the slice close. Nothing validates the transcription. -
Author
plan.toml— one[[phase]]per ordered phase:-
idisPHASE-NN(zero-padded), immutable and never reused — edits append, they never renumber. -
nameandobjectivefor the phase. -
entrance_criteria(EN-n),exit_criteria(EX-n), andverification. Verification ids carry their mode:VT-nverified by test,VA-nby agent,VH-nby human — useVA/VHwhen a test cannot judge the criterion, so it is still checked downstream rather than silently skipped. These ids are local to the phase and equally immutable. -
Structured VT mandate (NON-NEGOTIABLE). Every
VT-nrow MUST carry at minimumtest_file+keywordsso the VT gate has signal. Without themverify-vtreportsUNCHECKABLE— the gate is inert project-wide. Write the mandate in the TOML row, not prose:{ id = "VT-1", expects = "round-trip unit: the new fn parses, renders, and re-parses", test_file = "src/your_test.rs", keywords = ["your_fn", "your_struct"], patterns = ["^\\s*pub fn"], # optional: stronger line-anchored shape waived = false }test_file— the ONE file where the keywords will actually appear (the production source or a test file the phase touches). The mandate carries a singletest_file; all keywords must live in that one file. Pick the file that the phase changes, or the test file that exercises it — not both. This must be a path that will exist after the phase lands, not a future file.keywords— raw substrings that MUST appear in that file after the phase lands. They are the proportionate floor: plain substring match over the raw source (no comment/string stripping).patterns(optional) — line-anchored regex for a stronger language-agnostic shape assertion. The author owns the regex.waived— escape valve with a mandatorywaived_reason.
doctrine slice verify-vt <id>gates every VT mandate at dispatch conclude/handover, not at audit. Atest_filewith no keywords passes vacuously — the keyword floor is what gives the gate teeth, not the file alone. -
specs/requirementsstay empty in v1 (no registry yet). When a slice does carry relations, they are written withdoctrine link(not typed keys here) — seelib:reference/using-doctrine.md§ Relating entities.
-
-
Author
plan.md— the rationale and sequencing prose: why these phases, in this order, with these boundaries. Honour the storage rule (lib:reference/using-doctrine.md§ Storage tiers): no queried or derived data inplan.md. -
Commit.
-
Consider plan critically: what's under-specified, assumed, ambiguous, oversized, optimistic, requires verification, or presents implementation risk? For each of these, decide what new information is needed, or what mitigations to put in place. Ground the plan in known details of the implementation.
-
Plan the revision; print a summary of it for the user. Then work through it.
-
Revise the plan; commit again. Summarise what changed.
-
Materialise phase tracking:
doctrine slice phases <ID>creates the per-phase sheets in the state tree fromplan.toml.--pruneremoves orphan tracking whose plan phase is gone (destructive — only when you meant to drop a phase). -
Hand off to
/phase-planto expand the next phase's runtime phase sheet just before execution — then/execute. Do this only after slice scope,design.md, and the plan tell the same story. Record the lifecycle move on handoff:doctrine slice status <id> ready(bare number).
Outcomes
plan.tomlis execution-ready: every phase has an objective and EN/EX criteria plus verification in an explicit mode (VT/VA/VH).plan.mdexplains the rationale and sequencing.- A runtime phase sheet exists per phase with clear done criteria.
- If plan complexity or policy ambiguity emerges, STOP and
/consult.
FAQ
What does the plan skill do?
Use when a slice's design is locked and it needs an executable phase plan — refine each phase's objective and entry/exit/verification criteria, author plan.toml + plan.md, and materialise the runtime phase sheets. Routed to from /design.
How do I install plan?
Run npx skills add https://github.com/davidlee/doctrine --skill plan in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/plan/ (personal) or .claude/skills/plan/ (project).
Which AI agents can use plan?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is plan safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains plan?
It is published by davidlee in davidlee/doctrine. It has 143 recorded installs.
More from davidlee/doctrine
code-review
davidlee/doctrine
Use whenever reviewing code for quality and correctness — a diff, PR, module, or subsystem — producing verified, severity-ranked findings on the RV ledger. Not for comprehension tours (walkthrough) or doctrine-conformance hunts (inquisition, user-invoked only).
pair
davidlee/doctrine
Agentic pair programming — drive a change together with a human partner in the loop, narrating intent and pausing at decision points. Use when the user wants to work side-by-side rather than hand off a whole task. Calibrated by three dials (role, detail, autonomy) and an always-on challenge mandate.
consult
davidlee/doctrine
Use the moment you hit an unanticipated obstacle, a decision with competing tradeoffs, or emergent complexity mid-task — before adapting planned scope, adding a dependency, taking a shortcut, or making any impactful concession on your own.
handover
davidlee/doctrine
Use when handing work to a fresh context — first bring the durable harvest current, then emit a continuation at one of two weights — a printed continuation prompt (light) or a handover.md context packet (full). Use whenever a fresh agent would more efficiently continue.
canon
davidlee/doctrine
Use before making architectural or workflow choices, when correctness depends on project governance, or when entering an unfamiliar subsystem — to load the project's authoritative rules before you act on assumptions.
retrieve-memory
davidlee/doctrine
Use before making non-trivial assumptions — before touching a subsystem you have not this session, before running or changing a command pipeline, when code and docs conflict, when asked "what is the right way here?", when debugging a recurring failure, or when about to answer with "probably/usually/likely".
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.