| name | plan-tasks |
| description | 在执行复杂任务前,按 Rumelt《好战略,坏战略》全书的动态模块生成可审阅、可证伪的战略方案。用户调用 /plan-tasks,要求先给方案、实施计划、任务拆解、防跑偏方案,或任务涉及多个文件或模块、架构变化、重构、竞争路线、关键未知、强依赖、多人或多代理协作、高影响、高风险或高返工成本时使用。 |
| when_to_use | 显式规划请求始终触发;复杂或高代价任务自动触发。对单文件小修、简单 bug、配置微调、纯解释或状态查询不自动触发;用户明确调用时才以 compact 模式规划。 |
| argument-hint | [任务描述] [--modules M-03,M-07] [--exclude M-04] |
| disable-model-invocation | false |
| user-invocable | true |
| allowed-tools | ["Read","Grep","Glob"] |
Plan Tasks
Purpose and state boundary
Build a causal strategy before execution, then track only work the user explicitly approves. Treat $ARGUMENTS as the task when present; otherwise use the current request and relevant conversation context.
There are two phases:
- Planning: inspect only read-only context, produce
DRAFT or READY_FOR_REVIEW, then stop.
- Approved execution: begin only after the user explicitly approves the current plan or named
A-* actions; create or update a TASK/ tracker and execute only inside that scope.
During planning, never edit target files, create a tracker, run mutating commands, publish, deploy, commit, send an external message, or take an irreversible action. allowed-tools pre-approves read tools; it is not a security sandbox. Continue to obey Claude Code permissions, project instructions, protected paths, privacy rules, and the user's authorization.
Parse inputs and load only needed knowledge
Accept an optional override in the task text:
--modules M-03,M-07 adds requested modules.
--exclude M-04 requests removal of conditional modules.
Before planning, always read these files completely:
- references/routing.md
- references/core-kernel-and-bad-strategy.md (
M-01)
- references/plan-contract.md
Classify the task with routing.md, record the route, then read every selected module below. Do not load unselected method files merely to appear comprehensive.
Read references/examples.md only when the task is vague, conflicting, exploratory, or difficult to classify. Keep [GSBS] author claims separate from [AI-EXT] AI-collaboration controls. Never attribute prompts, permissions, validators, schemas, or approval gates to Richard Rumelt.
Planning workflow
- Establish requirements, facts, constraints, unknowns, assumptions, tools, permissions, and prohibited actions without expanding authority.
- Classify seven routing dimensions: uncertainty, dependency, reversibility, scope/capability, legacy inertia, environmental dynamics, and coordination complexity. Apply mandatory-module rules before accepting a user exclusion.
- Select one mode:
full for complex, ambiguous, multi-stage, high-impact, cross-module, or costly-to-reverse work;
diagnostic-exploration when evidence cannot support one primary diagnosis;
compact only for an explicitly requested, simple, low-risk, reversible task.
- Formulate the kernel: facts and constraints -> diagnosis or alternatives -> guiding policy and non-goals -> proximate objective/leverage -> coherent actions.
- Apply each selected module to a named field or ID in the plan. Listing a module without changing the plan is invalid.
- Define action interfaces:
addresses, implements, input, output, dependencies, permissions, and observable acceptance. Put gates before weak links and keep only causally coherent work.
- State a testable hypothesis, smallest feasible test, failure signal, and the layer to revisit after failure. Use genuine alternatives instead of defending the first answer.
- Run the bad-strategy audit: reject fluff, goals posing as strategy, avoided choices, unfocused objectives, blue-sky objectives, and template completion without causal links.
- Output exactly
rumelt-task-plan/v2 from the contract. Use DRAFT for unresolved hard errors or material decisions; otherwise use READY_FOR_REVIEW. Never set APPROVED for the user.
If a plan is saved to an authorized path, run:
python "${CLAUDE_SKILL_DIR}/scripts/validate-plan.py" <plan.md>
Fix every ERROR; expose any WARN as a review question or an accepted risk. Present the plan version, selected modules, pivotal assumption, approval scope, and remaining user decisions. Stop without executing the target task.
Approval and tracking
Treat approval as valid only when the user has seen the current version and explicitly approves the whole plan or named A-* actions. Silence, the original request, READY_FOR_REVIEW, low apparent risk, or self-judgment is never approval. Approval never expands tools, directories, data access, external sends, destructive operations, or privacy permissions.
After valid approval:
- Read references/task-tracking-contract.md completely.
- Create
TASK/TASK_<descriptive-name>.md only if no tracker exists.
- Copy the approved plan ID/version, routing snapshot, module set, diagnosis, policy, proximate objective, non-goals, approval scope, permissions, and completion criteria.
- Decompose only approved
A-* actions into verifiable T-* checkbox items. Update each item immediately after its acceptance condition passes.
- Pause and issue a revised
READY_FOR_REVIEW plan if strategy, selected modules, scope, permissions, acceptance, or external effects change materially.
- Validate a saved tracker after creation, material updates, and completion:
python "${CLAUDE_SKILL_DIR}/scripts/validate-task-tracker.py" <TASK-file.md> [--plan <approved-plan.md>]
Non-negotiable gates
- Do not design action without a supported diagnosis or an explicit exploration objective.
- Do not call a statement a guiding policy unless it chooses and rejects routes.
- Do not select a module without a traceable application in the plan.
- Do not allow user overrides to remove
M-01 or a high-risk mandatory module.
- Do not execute or create
TASK/ before explicit approval of the current plan.