Doc-aware planning skill. Turns a PRD, ADR, existing plan, or raw idea into a tracer-bullet implementation plan via a relentless one-question-at-a-time interview. Reads accepted ADRs and a PRD together as constraints: ADRs fix architectural decisions; the PRD supplies goals, non-goals, and acceptance criteria that gate each phase. Drafts Proposed ADRs — asking whether a decision is new or supersedes an existing one — and updates CONTEXT.md as terms resolve. Optional tribunal stress-test before finalizing. Use when asked to "plan with docs", "plan this ADR", "turn this PRD into a plan", "break this down into phases", "tracer bullets", "review my plan", "stress test this approach", or /plan-with-docs.
76
96%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
You are the orchestrator of a doc-aware planning process. Execute the following phases in order. Phases 3–5 only run if the user opts into the tribunal at the end of Phase 2.
Reference files:
references/interview-guide.md — decision-tree interview protocol + plan output formatreferences/plan-template.md — tracer-bullet vertical-slice template (default plan layout)references/prd-format.md — PRD constraint-extraction contract (goals, non-goals, AC-N criteria) matched to prd-designerreferences/adr-format.md — fallback ADR spec when project has no docs/adr/README.md of its ownreferences/context-format.md — fallback CONTEXT.md spec when project has no conventionreferences/personas.md — Skeptic / Critic / Advocate instructions (tribunal phase)references/jury-rules.md — jury synthesis + verdict template (tribunal phase)Maintainer evals (not loaded at runtime): references/evals.md — trigger tests + end-to-end scenarios; run after changing the skill.
Parse input — collect every path and inline string provided, not just the first:
/plan-with-docs, keep it./plan-with-docs <prd-path> <adr-path>), in any order — this is the prd-designer handoff.~/.claude/plans/ for an active plan file and read it. If still nothing, ask the user to provide a PRD path, ADR path, plan path, or raw idea.Classify the driving source — pick the first that matches (this sets the Phase 2 output path; it does NOT make the other docs mutually exclusive — every recognized doc is still loaded as a constraint in step 4):
**/docs/adr/*.md OR file frontmatter has a status: field. Read the ADR. If its status is Superseded, Rejected, or Deprecated, refuse with a clear error and stop. Accept Proposed or Accepted. Use the ADR's Context, Decision, and Consequences sections as the source of intent.**/docs/prds/*.md OR **/prd*.md OR content contains sections like Problem, Users, Goals, Scope.Record source = { type, path, basename } for the driving source. The output path in Phase 2 depends on this. A PRD and/or ADR supplied alongside a different driving source are loaded as constraints in step 4, not as the source.
Load project docs (read-only context):
CONTEXT.md is found, read it and set glossary = <contents>. Use these terms verbatim during the interview — never paraphrase project-specific vocabulary.docs/adr/ is found, list every *.md, read each, extract { number, title, status, decision, consequences }. Keep only entries with status: Accepted. Skip Proposed, Superseded, Rejected, Deprecated.docs/adr/README.md, treat it as the canonical ADR format spec. Otherwise fall back to references/adr-format.md. Same for CONTEXT.md format: prefer the project's convention if present; else references/context-format.md.CONTEXT.md nor docs/adr/ exists, set glossary = null and adrs = []. Create lazily later — only when the first new domain term resolves (for CONTEXT.md) or the first new Proposed ADR is warranted (for docs/adr/).docs/prds/*.md from CWD up to git root. If exactly one is found, load it and state so; if several, ask which (or none); if zero, set prd = null. Read it read-only (never edit it), and extract per references/prd-format.md:
prd = { path, goals[], nonGoals[], acceptanceCriteria[] (each { id: "AC-N", story, text }, grouped under Story), successMetrics[], scopeIn[], scopeOut[] }.
The PRD is the single source of truth for its criteria. references/prd-format.md is the canonical contract for how the plan references (AC-N), embeds, and gates them — follow it rather than restating it here.Confirm capture. Output a 2–3 sentence summary including the source type, any loaded ADRs, and the PRD constraint:
"Captured: ADR-driven plan for ADR-0003 (localStorage persistence). Also constrained by PRD
docs/prds/offline-mode.md— 3 goals, 2 non-goals, 7 acceptance criteria (AC-1…AC-7). Loaded Accepted ADRs: 0001 static export, 0002 shadcn-ui, 0004 pt-pt only, 0005 dev-only routes. I'll cite ADRs as we go, keep every phase traceable to AC-IDs, and ask before capturing any new/superseding ADR. Ready to start the interview?"
Read references/interview-guide.md for the full protocol. Summary:
Build the decision tree from the input. Branch derivation depends on input type — see references/interview-guide.md for the four input-type cases.
Present the decision tree to the user: "I've identified the following decision branches to explore: [list]. Let's walk through each one."
Walk each branch one question at a time:
[Branch N/M — Name (question K)].Doc-aware checks during the walk:
AC-N criteria across the plan's phases — every AC-N maps to exactly one phase. Before finalizing, flag any AC-N not owned by a phase (never silently drop). Each phase embeds its mapped criteria using the embedding rule in references/prd-format.md.AC-N pass; goals/success metrics never gate completion. (Gating contract: references/prd-format.md.)AC-N set settles, decompose them into concrete test cases — input → expected observable outcome — tagged with the test file and level (unit / integration / e2e / agent-browser), covering boundaries and failure modes, not just the happy path. Behavioral intent only — never test code. Prefer deriving cases by exploring existing test patterns in the codebase; ask the user only for behavior the code can't reveal. (Contract: references/prd-format.md.)[Non-Goal Conflict]
This would expand scope into a PRD non-goal:
"<quoted non-goal>"
Pick one before we continue:
a) Honor the non-goal — drop this from scope
b) Amend the PRD's non-goals — you'll edit the PRD outside this skill; I'll record it under "Proposed PRD scope changes" in the plan
c) I disagree this is a non-goal violation — explain whyCONTEXT.md, surface immediately: "Your glossary defines 'cancellation' as X, but you seem to mean Y — which is it?"CONTEXT.md using references/context-format.md structure. Don't batch — capture as it happens. Only domain-meaningful terms; no implementation details.[Decision Capture]
This decision — "<one-line>" — is architecturally significant (passes the 3-condition test). How should we record it?
a) New ADR — no Accepted ADR covers this area. I'll draft docs/adr/NNNN-<title>.md as Proposed.
b) Supersedes ADR-<NNNN> (<title>) — this changes an accepted decision. I'll draft a new Proposed ADR stating "Supersedes ADR-<NNNN>"; the old ADR is left untouched until you accept the new one.
c) Don't capture — follows an existing pattern / not ADR-worthy.
My recommendation: <a|b|c, with reason>.docs/adr/NNNN-<kebab-title>.md with status: Proposed (project's docs/adr/README.md format if present, else references/adr-format.md). Keep the body to durable decisions only — exclude ephemeral inventory, consumers/callers, provenance/process, universal baselines, and other projects' internals (see What to exclude from the body in references/adr-format.md). For (b), the body explains why the prior decision no longer holds and includes a Supersedes ADR-<NNNN> line. Never set status: Accepted. Never edit the old ADR — the user flips the old ADR to Superseded by NNNN on acceptance, outside this skill. Resume citing the new Proposed ADR.[Decision Capture] with (b) preselected:
[ADR Conflict → Decision Capture]
Your answer ("<quote>") conflicts with ADR <NNNN> — <title>: "<one-line summary>".
This changes an accepted decision, so (b) Supersede applies — unless you'd rather honor the ADR (a) or argue it's not a conflict (c).Terminate the interview when all branches are resolved OR the user signals "move on", "enough", "done", "skip", "proceed".
Produce the Plan. Use references/plan-template.md (tracer-bullet vertical-slice format). Glossary terms verbatim throughout.
Output path:
source.type === 'adr' → docs/plans/<source.basename>.md. Create docs/plans/ if missing../plans/{kebab-name}.md. Create ./plans/ if missing.Plan header — first lines under the title:
Source ADR: [docs/adr/<basename>](../adr/<basename>); PRD-driven → Source PRD: [path](path); Existing-plan refinement → Refined from: <existing path>; Raw idea → Origin: raw idea.Constrained by PRD: [path](path) line.Execution inputs: note — "Execute with BOTH this plan and the canonical PRD (<path>) loaded; the PRD is the source of truth for all AC-N criteria." (Omit if prd = null.)Required sections (in addition to the template):
Architectural decisions — cite loaded Accepted ADRs by number (e.g. "Constrained by ADR-0001 (static export), ADR-0003 (localStorage persistence).").PRD constraints — goals (non-gating intent) + a total traceability map keyed by ID (every AC-N → the one phase that delivers it) + non-goals explicitly respected. IDs only; no re-authored criteria text here. (Omit if prd = null.)AC-N into concrete test cases — input → expected observable outcome — tagged with the test file and level (unit / integration / e2e / agent-browser). Encode behavioral intent, not test code, and not bare criteria; cover boundaries and failure modes, not just the happy path. Each AC-N decomposes into ≥1 case, and the phase gate is met when its cases are green. (Contract: references/prd-format.md.)Acceptance gate (whole-PRD) phase — a checklist of every AC-N (no metrics) with the rule "Feature complete only when all checked." Distinct closing phase. (Omit if prd = null.)Post-launch success metrics (non-gating) — PRD goals/success metrics with baseline+target, labelled "measured after shipping; NOT a completion gate." (Omit if prd = null.)Proposed PRD scope changes — non-goal amendments the user chose during a [Non-Goal Conflict] (empty list if none).Proposed ADRs awaiting acceptance — list every Proposed ADR drafted during this session with its path (note Supersedes ADR-NNNN on superseding entries). Plan execution should not begin until the user reviews and accepts/rejects them.Glossary terms added — list new entries appended to CONTEXT.md inline during the interview.Present the plan path to the user. Ask: "Plan written to <path>. Want to stress-test it with the tribunal? (yes / no)"
Read references/personas.md.
Spawn 3 persona agents in parallel (single message, three Agent calls, all subagent_type: "general-purpose"). Each receives:
references/personas.mdAgents must NOT edit any files — read-only analysis only.
name: "skeptic") — questions every assumption.name: "critic") — finds flaws and failure modes.name: "advocate") — identifies strengths and opportunities.Collect all 3 results before proceeding.
Read references/jury-rules.md.
Spawn a jury agent (name: "jury", subagent_type: "general-purpose") with:
references/jury-rules.mdThe jury produces:
For each unresolved question:
SendMessage.SendMessage.Once questions are resolved, instruct the jury to produce the final verdict.
The jury produces the final verdict using the template in references/jury-rules.md:
[HIGH] / [MEDIUM] / [LOW].PROCEED — plan is solid, execute as-is.PROCEED WITH CHANGES — plan works but specific items must be addressed first.REVISE — significant gaps require a revised plan before execution.RETHINK — fundamental flaws; the approach itself needs reconsideration.Display the full verdict inline. Shut down the jury agent.
status field — assume Accepted. Do not skip on ambiguity.docs/adr/README.md exists but differs in format from references/adr-format.md — honor the project's convention. Never overwrite it.Open questions section and continue.AC-N is not owned by any phase — flag it before finalizing; never silently drop a criterion. Either add a phase/slice that delivers it or record why it's out of this plan's scope under Open questions.AC-N IDs (older/hand-written PRD) — assign stable AC-N IDs in reading order for use within the plan only; never write them back to the PRD. Note in the plan that IDs were derived.[Non-Goal Conflict] guard simply never triggers.66c7102
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.