ControlFlow Plan
Overview
Produce a durable, execution-ready plan in the shared ControlFlow format. The format is
not restated here: it is single-sourced from schemas/planner.plan.schema.json (the
machine-enforced contract) and plans/templates/plan-document-template.md (the human
document skeleton). Read both at invoke time and conform to them; do not paraphrase the
contract from memory.
Invoke this skill via /controlflow-claude-code:controlflow-plan.
Local Contract
- Read the repository before phase decomposition; keep verified facts separate from
assumptions with a bounded scope statement.
- The saved artifact defines scope, risks, files, phases, validation, review route, and
handoff without depending on plugin-host runtime contracts.
- Apply references/llm-behavior-guidelines.md for
assumption, simplicity, scope, and verification discipline.
- Ask the user directly when an answer changes file scope, user-visible behavior,
architecture, or destructive-risk handling; otherwise record a bounded assumption.
Workflow
- Create a saved plan when the user asks for one or when work is SMALL, MEDIUM, or LARGE;
skip only for truly TRIVIAL work. Save to
plans/<task-slug>-plan.md unless the user
names another path.
- Read
schemas/planner.plan.schema.json and
plans/templates/plan-document-template.md — these are the authoritative format. Use
references/plan-format.md as a compact checklist, not a
substitute for them.
- Map likely files, tests, commands, dependencies, and change boundaries before phase
decomposition.
- Read references/complexity-tiers.md; assign one tier.
Any unresolved HIGH-impact semantic risk forces LARGE regardless of file count.
- Fill all seven semantic risk categories (see
references/plan-format.md); never skip a row — use
not_applicable with justification.
- Write the artifact using the template's header, 10 sections in order, and the five
lifecycle sections (
## Progress, ## Discoveries, ## Decision Log, ## Outcomes,
## Idempotence & Recovery) for SMALL+ plans.
- Every phase declares exactly one
executor_agent from the schema enum, lists concrete
files, tests, acceptance criteria, quality gates, and failure expectations, and keeps
steps in numbered prose with NO code blocks.
- Add Mermaid diagrams per tier:
sequenceDiagram for MEDIUM+ non-trivial orchestration;
flowchart TD + sequenceDiagram for LARGE. Each diagram ≤30 lines.
- Set
status: ABSTAIN or REPLAN_REQUIRED when confidence is below 0.9 or evidence is
insufficient; include the terminal-outcome structure from the template.
- Add a research or spike phase before implementation when a HIGH-impact risk is
unresolved.
- For
READY_FOR_EXECUTION, include a Handoff section pointing execution to
plans/<task-slug>-plan.md — do NOT inline the plan in chat. See
references/inline-execution.md for how execution
treats waves, the context packet, and optional delegation.
Review Route (tier-gated, runs after this skill)
Hand non-TRIVIAL plans to /controlflow-claude-code:controlflow-verify, which runs inline
adversarial verification: SMALL → phase 1; MEDIUM → phases 1–2; LARGE → phases 1–3.
Planning-Specific Failure Checks
- Do not plan from chat memory when reading the repo would change scope.
- Do not skip a semantic risk category because the tier feels low.
- Do not decompose phases before mapping likely files and tests.
- Do not mark READY_FOR_EXECUTION without a review route and artifact destination.
- Do not restate the schema/template in the artifact — conform to them.
References
references/plan-format.md
references/complexity-tiers.md
references/inline-execution.md
references/llm-behavior-guidelines.md
1---2name: controlflow-plan-23description: Use when a repository task needs a high-quality ControlFlow plan before coding — small, medium, or large scope, cross-file edits, risky migrations, architectural uncertainty, or any work that should produce a saved Markdown plan artifact in plans/. Single-sources the plan format from schemas/planner.plan.schema.json and the plan template.4---56# ControlFlow Plan78## Overview910Produce a durable, execution-ready plan in the shared ControlFlow format. The format is11not restated here: it is single-sourced from `schemas/planner.plan.schema.json` (the12machine-enforced contract) and `plans/templates/plan-document-template.md` (the human13document skeleton). Read both at invoke time and conform to them; do not paraphrase the14contract from memory.1516Invoke this skill via `/controlflow-claude-code:controlflow-plan`.1718## Local Contract1920- Read the repository before phase decomposition; keep verified facts separate from21 assumptions with a bounded scope statement.22- The saved artifact defines scope, risks, files, phases, validation, review route, and23 handoff without depending on plugin-host runtime contracts.24- Apply [references/llm-behavior-guidelines.md](references/llm-behavior-guidelines.md) for25 assumption, simplicity, scope, and verification discipline.26- Ask the user directly when an answer changes file scope, user-visible behavior,27 architecture, or destructive-risk handling; otherwise record a bounded assumption.2829## Workflow30311. Create a saved plan when the user asks for one or when work is SMALL, MEDIUM, or LARGE;32 skip only for truly TRIVIAL work. Save to `plans/<task-slug>-plan.md` unless the user33 names another path.342. Read `schemas/planner.plan.schema.json` and35 `plans/templates/plan-document-template.md` — these are the authoritative format. Use36 [references/plan-format.md](references/plan-format.md) as a compact checklist, not a37 substitute for them.383. Map likely files, tests, commands, dependencies, and change boundaries before phase39 decomposition.404. Read [references/complexity-tiers.md](references/complexity-tiers.md); assign one tier.41 Any unresolved HIGH-impact semantic risk forces LARGE regardless of file count.425. Fill all seven semantic risk categories (see43 [references/plan-format.md](references/plan-format.md)); never skip a row — use44 `not_applicable` with justification.456. Write the artifact using the template's header, 10 sections in order, and the five46 lifecycle sections (`## Progress`, `## Discoveries`, `## Decision Log`, `## Outcomes`,47 `## Idempotence & Recovery`) for SMALL+ plans.487. Every phase declares exactly one `executor_agent` from the schema enum, lists concrete49 files, tests, acceptance criteria, quality gates, and failure expectations, and keeps50 steps in numbered prose with NO code blocks.518. Add Mermaid diagrams per tier: `sequenceDiagram` for MEDIUM+ non-trivial orchestration;52 `flowchart TD` + `sequenceDiagram` for LARGE. Each diagram ≤30 lines.539. Set `status: ABSTAIN` or `REPLAN_REQUIRED` when confidence is below 0.9 or evidence is54 insufficient; include the terminal-outcome structure from the template.5510. Add a research or spike phase before implementation when a HIGH-impact risk is56 unresolved.5711. For `READY_FOR_EXECUTION`, include a Handoff section pointing execution to58 `plans/<task-slug>-plan.md` — do NOT inline the plan in chat. See59 [references/inline-execution.md](references/inline-execution.md) for how execution60 treats waves, the context packet, and optional delegation.6162## Review Route (tier-gated, runs after this skill)6364Hand non-TRIVIAL plans to `/controlflow-claude-code:controlflow-verify`, which runs inline65adversarial verification: SMALL → phase 1; MEDIUM → phases 1–2; LARGE → phases 1–3.6667## Planning-Specific Failure Checks6869- Do not plan from chat memory when reading the repo would change scope.70- Do not skip a semantic risk category because the tier feels low.71- Do not decompose phases before mapping likely files and tests.72- Do not mark READY_FOR_EXECUTION without a review route and artifact destination.73- Do not restate the schema/template in the artifact — conform to them.7475## References7677- `references/plan-format.md`78- `references/complexity-tiers.md`79- `references/inline-execution.md`80- `references/llm-behavior-guidelines.md`