swe-plan
Skill2 starsChanged 6 months agoMITView on GitHub
Create an optional delivery plan from a specification. Use only when implementation needs multiple independently verifiable slices, sessions, agents, migrations, backfills, or rollout coordination.
In this repository10 other files it gives its agents.
- gitSkill
- handoff-sessionSkill
- html-artifactsSkill
- prompt-writerSkill
- swe-executeSkill
- swe-researchSkill
- swe-reviewSkill
- swe-shapeSkill
- swe-specSkill
- swe-worktreeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 11 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Write .swe/<change>/plan.md using plan.template.md.
- Distinctive: line 35
Preserve valid intermediate states: Every slice must leave the repository buildable, testable, and operationally safe under the specified …
- Distinctive: line 38
Check plan size: If more than roughly eight slices are needed, recommend splitting the change or introducing explicit phases rather than …
- Distinctive: line 43
Create a plan when one or more apply:
- Distinctive: line 61
leave the repository valid after that slice alone.
- Very specific: line 68
If sequencing depends on a clear, bounded factual unknown—such as migration duration, deployment compatibility, backfill throughput, or an …
- Very specific: line 78
Read the repository and upstream artifacts, run read-only inspection, and delegate bounded research without asking.
- Distinctive: line 80
Ask first when an investigation is authenticated, paid, mutating, production-facing, or expensive.
- Distinctive: line 82
Never modify source code, and never invoke another SWE pipeline stage.
- Distinctive: line 86
Do not include API schemas, SQL, interface signatures, algorithms, or detailed code mutations.
- Distinctive: line 87
Do not prescribe private methods, local variables, or step-by-step coding instructions.
- Distinctive: line 88
Do not add per-slice commit commands.
- Very specific: line 89
Do not restate spec content so an implementer can avoid reading spec.html.
- Distinctive: line 90
Do not create a plan merely because the framework has a planning skill.
- Very specific: line 94
When a plan was written, report the planning rationale, the number and ordering strategy of the slices, the first risk or capability …
- Distinctive: line 96
When it was skipped or blocked, report the reason and where execution or revision continues instead.
- Very specific: line 102
Plan written: every slice satisfies Slice Rules, references the spec.html section ids and acceptance criteria it implements, and has …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Pipeline
swe-shape → swe-spec → [swe-plan] → [swe-worktree] → swe-execute → swe-review, with swe-research available at any point.
Each stage runs in its own session: the user invokes one skill, reviews the artifact, clears the context, then invokes the next with the artifacts as input. Assume no memory of other stages beyond the files named below.
- This stage: optional. Decide delivery order and verification boundaries. Most changes skip it.
- Reads:
spec.html(the approved design and contracts, written byswe-spec) andbrief.md(the approved problem and acceptance criteria, written byswe-shape). - Writes:
plan.md, or nothing when the spec is one coherent slice. - Next: the user runs
swe-worktreeorswe-execute. Do not invoke either.
Purpose
Decide delivery order and verification boundaries for complex execution. A plan coordinates specified work; it does not repeat design or narrate how to code it.
A plan is not a Markdown restatement of the spec. spec.html remains the contract, and swe-execute reads it whether or not a plan exists. The plan's only job is to say what is built in what order, how each step is verified, and which spec sections each step needs.
Inputs and Workspace
Read .swe/<change>/spec.html — the canonical contract, at whatever depth each section reached — using its table of contents to load only the sections that affect sequencing. Read brief.md when acceptance, dependencies, or risk require it, and the research reports either artifact links when they affect sequencing, feasibility, rollout, or an early risk-reduction slice. Infer the change directory only when unambiguous.
Write .swe/<change>/plan.md using plan.template.md. The plan is Markdown: it is a short list of slices consumed almost entirely by agents, with little to gain from rich rendering.
Workflow
- Decide whether to plan. Apply the planning threshold below — it is a gate, not a preference. If the spec is one coherent implementation slice, do not create
plan.md; report that execution can proceed directly from the spec. Most changes end here. - Identify delivery slices. Find the smallest set of completed, observable or independently risk-reducing outcomes. Prefer thin end-to-end slices over technical layers.
- Order by dependency and learning. Establish prerequisites, then prioritize early validation of expensive assumptions, integration risk, migration safety, and user-visible value.
- Preserve valid intermediate states. Every slice must leave the repository buildable, testable, and operationally safe under the specified compatibility strategy.
- Reference authoritative detail. Link each slice to the exact
spec.htmlsection ids it implements and the acceptance criteria it satisfies. Do not copy their contracts. - Define verification. Give runnable repository commands and observable results for each slice, including rollback or operational checks only where relevant.
- Check plan size. If more than roughly eight slices are needed, recommend splitting the change or introducing explicit phases rather than producing a giant plan.
- Complete, skip, or stop. Finish with exactly one of the outcomes in
Completion Criteria.
Planning Threshold
Create a plan when one or more apply:
- implementation has multiple independently verifiable outcomes;
- work spans several focused sessions or agents;
- migrations, backfills, compatibility windows, rollout, or rollback require ordering;
- an external integration or risky assumption should be validated before broad implementation;
- intermediate repository or production states require deliberate coordination;
- teams can work in parallel against stable spec contracts.
Skip the plan when the spec can be implemented and verified as one coherent slice with straightforward intermediate state. A large spec is not by itself a reason to plan; a spec with multiple independently verifiable outcomes is.
Slice Rules
A slice must:
- produce completed behaviour or a stable, independently valuable risk-reduction boundary;
- include its production changes, tests, required configuration, and documentation;
- depend only on completed earlier slices and spec contracts;
- leave the repository valid after that slice alone;
- have one clear outcome and deterministic verification.
A schema migration, compatibility layer, contract-tested external client, or enabling refactor may be a separate slice when it is independently safe and verifiable. Do not create placeholder interfaces, empty scaffolding, or horizontal layers that become useful only after undocumented future work.
Research and Upstream Revision
If sequencing depends on a clear, bounded factual unknown—such as migration duration, deployment compatibility, backfill throughput, or an external operational limit—check .swe/research/INDEX.md, then run swe-research, and resume planning from its evidence.
Planning must not invent requirements, design, contracts, paths, or error behaviour. If research is inconclusive or the spec cannot be sequenced safely:
- Stop planning.
- Identify the exact upstream gap or contradiction.
- Return to
swe-specorswe-shapeas appropriate. A presentplan.mdshould be executable rather than a partial draft.
Autonomy
Read the repository and upstream artifacts, run read-only inspection, and delegate bounded research without asking. Write only plan.md.
Ask first when an investigation is authenticated, paid, mutating, production-facing, or expensive.
Never modify source code, and never invoke another SWE pipeline stage.
Constraints
- Do not include API schemas, SQL, interface signatures, algorithms, or detailed code mutations.
- Do not prescribe private methods, local variables, or step-by-step coding instructions.
- Do not add per-slice commit commands.
- Do not restate spec content so an implementer can avoid reading
spec.html; they must follow the linked sections. - Do not create a plan merely because the framework has a planning skill.
Output
When a plan was written, report the planning rationale, the number and ordering strategy of the slices, the first risk or capability validated, the artifact path, and the next step — normally swe-worktree or swe-execute.
When it was skipped or blocked, report the reason and where execution or revision continues instead.
Completion Criteria
Finish with exactly one outcome, having created or overwritten plan.md only in the first:
- Plan written: every slice satisfies
Slice Rules, references thespec.htmlsection ids and acceptance criteria it implements, and has deterministic verification; ordering preserves valid intermediate states. - Plan skipped: the spec is one coherent slice, and the response directs execution to
spec.html. - Returned upstream: the sequencing gap and the earliest affected artifact are explicit.
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.

