一键导入
planning-and-task-breakdown
Use after a spec is approved and before multi-file implementation begins, to break work into verifiable batches with checkpoints.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use after a spec is approved and before multi-file implementation begins, to break work into verifiable batches with checkpoints.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | planning-and-task-breakdown |
| description | Use after a spec is approved and before multi-file implementation begins, to break work into verifiable batches with checkpoints. |
| type | skill |
| license | MIT |
| compatibility | ["claude-code","cursor","codex"] |
| trigger | spec-approved|multi-file-implementation|batch-planning |
| skip_when | single-file-fix|quick-fix-scope |
| user-invocable | false |
Convert the approved plan into small, executable tasks that can be verified one at a time. Good task breakdown reduces hidden coupling, scope drift, and fake progress.
Model tier: runs on
sonnet(bounded decomposition against a written spec) per.claude/references/model-routing.md. Tool discipline (phase-locked): planning is a read + plan-artifact phase. Write only the plan/todo artifacts (docs/plans/,tasks/todo.md) — never source or test code. Implementation belongs to Phase 3; a source edit here is a scope violation thescope-guardhook will flag.
## Prior Work Check
section is missing OR was generated more than one session ago (different
branch HEAD, different day), re-run prior-work-check against the
current branch state. Risk profiles and lessons can shift between
approval and planning. A BLOCK verdict here means planning stops until
the spec is amended and re-approved.bash scripts/constitution-digest.sh if absent).
Each batch states which rules it must satisfy, not just what it builds —
recorded in the plan so the implementer and human reviewers see, per
batch, exactly which rules constrain it.
An empty list is allowed only with an explicit "no rule constrains this
batch" note..claude/references/dependency-intake-checklist.md criterion 0, also listed in the active tech-stack skill) to confirm the package exists and is the real one (not a typosquat / hallucination).[ASSUMED] in the plan until verified, and insert an explicit checkpoint:human-verify step before the install task. This checkpoint is one of the conditions that blocks MTK_AUTO_PROCEED at the implement Phase 2.5 gate, so an unverified package can never be installed autonomously.tasks/todo.md with:
docs/specs/, persist the plan alongside it:
implement Phase 0.7 — the file already exists at the plan path): do not
author a new plan or version-bump the engineer's file. Adopt the supplied
path as-is, validate its plan.batches against the JSON sidecar schema, and
run prior-work-check's existing-plan reconciliation mode so
already-implemented batches are marked done before the approval gate rather
than re-run. Skip the authoring sub-steps below.-v2, -v3). If the spec was written as docs/specs/2026-04-23-foo-v2.md, the plan is docs/plans/2026-04-23-foo-v2.md.YYYY-MM-DD-<feature-slug>.md with no suffix.docs/plans/ if it does not exist.docs/plans/ to .gitignore if not already present.plan section to the existing JSON handoff artifact at
docs/specs/<date>-<slug>.json (created by spec-driven-development).
Schema: .claude/schemas/handoff.schema.json. Required keys:
"plan": {
"batches": [
{ "id": "B1", "files": ["src/X.cs"], "acceptance": "...",
"verification": "...", "boundary": "...", "depends": [],
"governing_constraints": ["C0.2", "S1.15"],
"parallel_safe": false }
]
}
Every files entry must already exist in the top-level change_manifest.
If it does not, re-plan first — don't quietly widen scope here.plan_trust_gate at pending — only the engineer's Phase 2.5 approval flips it to pass. See .claude/references/orchestration-gates.md.
10.5. Update the workflow artifact (additive, capability-gated). With plan_path/todo_path recorded, follow .claude/references/artifact-publishing.md to add the Plan section to the workflow's Claude Artifact. Because the artifact is keyed to the workflow uuid, this updates the existing URL in place (passing the recorded results.artifact_url) — it does not mint a new link. Silent no-op when the tool is unavailable or MTK_ARTIFACT_PUBLISH=0.plan-gap-reviewer agent with the original user request and the saved plan path — plus, when they exist, the spec markdown path, the spec JSON sidecar path, and tasks/todo.md. Passing the sidecar and todo activates the agent's cross-artifact consistency check: spec ↔ plan ↔ todo are mapped against each other in both directions (manifest entries ↔ batches, success criteria ↔ tests, out-of-scope ↔ batch contents) so disagreement between the artifacts is caught before the approval gate, not after implementation. The agent runs in a forked context and is forbidden from reading lessons, prior reviewer output, or the workflow artifact — its job is to challenge the plan against the repo with no anchors. Surface every BLOCKING finding back to the planner and revise before the approval gate. Surface ADVISORY findings unchanged at the approval gate so the engineer decides.See .claude/skills/context-engineering/SKILL.md for the shared table. Planning-specific traps: "I'll just keep the tasks in my head" (hidden plans drift fastest — write the list so implementation and review can check reality against it), "this batch is a bit large, but it saves time" (oversized batches hide breakage and make checkpoints meaningless), and "I'll add verification steps later" (a task without verification is not a task, it's a wish).
tasks/todo.md drifting from actual implementationtasks/todo.md exists and is actionable.claude/references/artifact-publishing.md (step 10.5)Corrective batch of multiple small independent fixes (apply review findings, several/multiple fixes across >3 files, no new contract or architecture) — broader than fix, lighter than implement.
One-time repo setup that detects tech stack, audits the codebase, pulls coding guidelines, and generates a project-specific CLAUDE.md
Full feature implementation loop orchestrating planning, batching, verification, and review skills
Use when the task is a new feature, breaking change, multi-file change, or any work where approval should happen before coding begins.
Use to create, update, and read durable workflow state under .mtk/workflows/ so orchestration survives compaction, crash, and session handoff.
Use before approving a spec or starting a multi-file implementation to confirm no existing skill, helper, handler, or lesson already covers the proposed work.