mit einem Klick
auto-plan
// Turn an approved spec into ordered slices. Use when framing is accepted and planning begins.
// Turn an approved spec into ordered slices. Use when framing is accepted and planning begins.
Product go/no-go on a framed spec. Use after auto-frame, before planning.
Engineering go/no-go on a plan. Use after auto-plan, before execution.
Implement approved plan slices. Use as the execute-stage entry point.
Bound and de-risk a request into SPEC.md. Use when the objective is clear but scope needs constraining.
Sharpen a vague idea into a bounded objective. Use before framing when scope is undefined.
Build project truth from repo evidence. Use when steering is missing or stale.
| name | auto-plan |
| description | Turn an approved spec into ordered slices. Use when framing is accepted and planning begins. |
| metadata | {"stage":"plan"} |
Planning controller. Turns approved framing into ordered slices with verification commands.
First action: run scripts/get-context.mjs → JSON {activeChange, stage, canonicalSpec, canonicalDesign, canonicalPlan, productReview, engineeringReview, diagnostics} (missing state normalizes to "none"/null). If any diagnostic has level "error", stop and report it before proceeding.
auto-plan builds the smallest plan that makes execution safe while preserving the approved scope. It does not write code or broaden scope beyond the approved spec.
Loading discipline: hold SPEC.md, review state, and source files needed for accurate slices. Read wider project files when understanding existing code informs slice boundaries or verification commands.
Artifact discipline: PLAN.md is the reloadable execution index, not the whole implementation dossier. Keep PLAN.md compact enough to re-read. For large coherent work, summarize slices in PLAN.md and link optional detail files under .agent/work/<change>/slices/. Split only for independent outcomes, not because one coherent plan has many requirements.
Before finalizing PLAN.md:
references/quality.md (~36 lines: anti-patterns, better shape, prose hygiene scan patterns) when the plan leaves execution decisions to the implementer.Load files in this order. Stop as soon as you have enough to proceed.
1. .agent/.automaton/state/current.json (always, < 50 tokens)
2. STATUS.md (always, < 200 tokens)
3. SPEC.md (always, < 1000 tokens)
4. Linked spec detail (only files named by SPEC.md and needed for planning)
5. DESIGN.md (if exists and relevant, < 1000 tokens)
6. Wiki pages (only if referenced by spec or plan)
7. Source files (read as needed to produce accurate slices)
Read and explore source files when understanding existing code helps produce accurate slices — module structure, current implementations, test patterns, and integration points all inform slice boundaries, verification commands, and dependency ordering. Do not ignore linked spec/*.md files when they contain normative requirements, gap IDs, invariants, or acceptance detail.
If product_review exists in current.json, read the ## Review: Product section from SPEC.md and factor its conclusions into the plan. If product_review: approved_with_risks, ensure the plan explicitly addresses each risk. If product_review: descoped or needs_clarification, stop and recommend auto-frame.
If the engineering approach is complex or risky, recommend auto-eng-review before execution.
If SPEC.md contains content fields (Audience, Thesis, Voice, Content Anti-Goals) or the change produces writing, articles, briefs, decks, newsletters, documentation, or proposals, read references/content-planning.md (~59 lines: Pass 1 field carry-forward table, Pass 2 dimensions for slice design, content slice template, verification dimensions). Carry content fields into the plan; add channel, source policy, factual risk, and format where they affect execution or verification.
If SPEC.md names requirement IDs, gap IDs, invariants, audit questions, migration checkpoints, or coverage targets, preserve those IDs in PLAN.md and attach them to the slices that satisfy them. Do not collapse traceable requirements into untraceable prose.
Break work into ordered execution units, not topic buckets. Each slice must be:
For content slices, also name the artifact target, allowed sources, factual-risk gate, and format constraint so auto-execute does not invent missing context.
Before writing slices, think ahead to execution topology: which slices must run serially, which checkpoints require human judgment, which use subagents, and whether any parallel-safe groups exist. Continuation is the default after a verified slice; mark a checkpoint only when the agent must pause for human verification, a human decision, or a human action. Parallel-safe means dependencies are independent and write sets are disjoint; default to none. For multi-slice plans, make the topology clear that execution should continue through all approved slices; execution windows are context-management batches, not planned stopping points.
Frame each slice with required fields first, then only the overrides the slice needs:
### Slice N: [Name]
Required:
**Objective:** [one sentence]
**Acceptance criteria:**
- [observable criterion]
**Verification:** [command or check that proves the slice is done]
Defaults, state only when overriding:
**Execution:** direct | subagent recommended | subagent required (default: direct)
**Depends on:** none
**Checkpoint after:** none | human-verify | decision | human-action (default: none)
**Checkpoint reason:** none
Include when useful:
**Touches:** [files, directories, or subsystems]
**Produces:** [specific artifact or state change]
**Detail:** [linked `slices/slice-NNN.md` file]
Rules:
Execution means direct. State subagent recommended when the slice touches > 3 files, crosses subsystem boundaries, modifies shared interfaces or data schemas, or carries review risk. State subagent required only when the user asked for multi-agent execution or the slice modifies security-critical paths, production data, or irreversible state.Depends on means none.Checkpoint after means none, so the next slice may start after verification passes.human-verify only when the result cannot be verified by available commands, tests, host tools, or local inspection.decision only when the user must choose among named product, architecture, design, or scope options before the next slice can start. The checkpoint reason must include the concrete question and options. Do not use decision for reversible engineering judgment, known limitations, validation results, or "next slice should be..." notes.human-action when progress requires an external action the agent cannot perform, such as 2FA, account approval, or off-machine access.slices/slice-NNN.md and keep PLAN.md as the index. Split the slice only when it contains independent outcomes.Write the plan to .agent/work/<change>/PLAN.md.
Core sections (always present):
Conditional sections — include only when the named trigger applies, otherwise omit or mark "n/a":
Apply the Artifact Signal Discipline rules from references/ARTIFACT-LIFECYCLE.md while writing: no mirror sections, index over transcript, append-replace not stack. Replace prior ## Review: sections on re-run for the same change — do not stack reviews.
If the architecture is non-trivial or new patterns are introduced, write DESIGN.md to .agent/work/<change>/DESIGN.md. Keep it under 200 lines. If the architecture is obvious from the spec, skip this file.
Do NOT write PLAN.md if:
product_review is descoped or needs_clarification.If any of these are true, recommend auto-frame and stop.
Run sync-status.mjs from this skill's scripts directory.
Update .agent/.automaton/state/current.json:
canonical_design → path to DESIGN.md (if written)canonical_plan → path to PLAN.mdstage → planPLAN.md: written to .agent/work/<change>/PLAN.mdDESIGN.md: written to .agent/work/<change>/DESIGN.md (if needed).agent/.automaton/state/current.json updated with canonical_design (when written), canonical_plan, and stage: planerror-level diagnostics block the plan; warning-level diagnostics surface to the next stageauto-eng-review or auto-execute. The user or host invokes the next skill; auto-plan does not chain.Read references/slice-examples.md for well-designed vs. poorly-designed slices. (~103 lines: 2 good and 2 bad direct examples, 1 subagent-routed example with rationale, 1 topology section example with parallel-safe groups; rule of thumb: if you can't write the verification command before starting, the slice isn't defined.)
Read references/verification-patterns.md for common verification commands by stack. (~47 lines: Node/Python/Rust/Go/General commands, 4 verification principles including "verify the exact behavior, not absence of errors.")
Read references/CONTEXT-BUDGET.md for progressive loading and context pressure tiers. (~76 lines: 4 principles, 6-step loading order, 4 pressure tiers with behavioral rules, no-re-read rule with exceptions.)
Read references/ARTIFACT-LIFECYCLE.md when handoff rules or state pointer boundaries need clarification. (~105 lines: stage handoffs table, progressive disclosure layout with allowed paths, review verdict routing, STOP conditions.)