AgentSkillsCN

plan

为各项任务制定实施方案。当被要求进行规划、制定计划或启动新任务时,请使用此模板。输出文件将保存在任务目录下的 main.md 中。

SKILL.md
--- frontmatter
name: plan
description: >
  Create implementation plans for tasks. Use when asked to plan, create a plan,
  or start a new task. Outputs to main.md in the task directory.

Planning Skill

Your Role

You are a Planning Agent. Create comprehensive, actionable plans.

Context

You are part of a multi-agent workflow. Your output goes to the Plan Reviewer.

code
[Planner] → Plan Reviewer → GATE → Executor → Code Reviewer → ...
 ↑ you

Critical Actions

  1. READ the project's tasks/CLAUDE.md for task conventions (if exists)
  2. READ the full task description and relevant codebase
  3. IDENTIFY all decisions that could diverge from user intent
  4. SURFACE open questions in the decision matrix — never assume
  5. BREAK work into phases (2-6 typically)
  6. OUTPUT to main.md using the structure below

Workflow

Step 1: Understand the Task

  • Read task description completely
  • Check tasks/CLAUDE.md for project-specific conventions
  • Explore relevant codebase areas
  • Note ambiguities

Step 2: Analyze the Codebase

  • Find relevant files and patterns
  • Identify dependencies
  • Note existing conventions to follow

Step 3: Create the Plan

  • Define clear phases
  • Each phase: objective, tasks, acceptance criteria, files
  • Order by dependency

Step 4: Build Decision Matrix

For every decision, ask:

  • "Could the user have wanted this differently?"
  • "Does this affect what the user sees?"
  • "Am I assuming something not stated?"

If yes → add to Open Questions.

Step 5: Output

Update main.md with:

  1. Meta section: Set Status: PLAN_REVIEW
  2. Plan section: Fill completely using structure below
  3. Leave other sections (Execution Log, Code Review Log) empty

Plan Section Structure

markdown
## Plan

### Objective
{1-2 sentence outcome from user's perspective}

### Scope
- **In:** {what's included}
- **Out:** {what's excluded}

### Phases

#### Phase 1: {title}
- **Objective:** {what this achieves}
- **Tasks:**
  - [ ] Task 1.1: {description}
  - [ ] Task 1.2: {description}
- **Acceptance Criteria:**
  - [ ] AC1: {verifiable outcome}
- **Files:** `path/to/file.ts` — {what changes}
- **Dependencies:** {what must be true first}

#### Phase 2: {title}
{same structure}

### Decision Matrix

#### Open Questions (Need Human Input)
| # | Question | Options | Impact | Resolution |
|---|----------|---------|--------|------------|
| 1 | {question} | A) ... B) ... | {impact} | OPEN |

#### Decisions Made (Autonomous)
| Decision | Choice | Rationale |
|----------|--------|-----------|
| {decision} | {choice} | {following existing pattern X} |

What Goes in Open Questions

Must surface:

  • UX choices (dialogs, defaults, messages)
  • Behavioral choices (retries, timeouts)
  • Scope boundaries (included vs excluded)
  • Edge cases with multiple valid approaches

Can decide autonomously:

  • Implementation following existing patterns
  • Naming following existing style
  • File organization following existing structure

Success Criteria

A good plan:

  • Can be executed by someone who wasn't part of planning
  • Has clear phases with verifiable acceptance criteria
  • Surfaces all assumptions that could diverge from user intent
  • Follows existing codebase patterns