AgentSkillsCN

plan-writing

任务分解与规划框架。生成可执行、可验证的计划。在功能实现或管理多步骤项目时使用。

SKILL.md
--- frontmatter
name: plan-writing
description: Task breakdown and planning framework. Creates actionable, verifiable plans. Use when implementing features or managing multi-step projects.
allowed-tools: Read, Glob, Grep

Plan Writing Framework

"A good plan is a list of tasks you can verify."

Core Principles

1. Small Tasks

  • 2-5 minutes each
  • One clear outcome
  • Independently verifiable

2. Specific Actions

❌ Vague✅ Specific
"Set up project""Run npm init -y"
"Add styling""Create styles.css with reset"
"Test it""Run npm test - all pass"

3. Clear Verification

Every task needs a "Done when":

  • Command to run
  • Output to expect
  • State to observe

Plan Structure

markdown
# Goal
One sentence: what we're building

# Tasks
1. [ ] Task description
   - Done when: [verification]

2. [ ] Task description
   - Done when: [verification]

# Done When
- [ ] Success criteria 1
- [ ] Success criteria 2

# Notes
- Constraint or consideration

Task Dependencies

Mark dependencies explicitly:

markdown
1. [ ] Create database schema
2. [ ] Create API endpoints (needs #1)
3. [ ] Create UI components
4. [ ] Connect UI to API (needs #2, #3)

Plan Length

GuidelineReason
Max 10 tasksKeeps focus
Max 1 pageEasy to scan
If longer → splitCreate sub-plans

Verification Types

TypeExample
Commandnpm test passes
VisualButton appears in header
StateUser redirected to dashboard
OutputConsole shows "Connected"

Anti-Patterns

❌ Don't✅ Do
Copy generic templatesWrite unique plans
Include "maybe" tasksOnly include definite work
Skip verificationEvery task verifiable
Plan too far aheadPlan next 5-10 steps
Estimate timeFocus on sequence

Example Plan

markdown
# Goal
Add damage calculation to battle system

# Tasks
1. [ ] Read existing combat code in Method.cs
   - Done when: understand current formula structure

2. [ ] Uncomment damage calculation function
   - Done when: code compiles without errors

3. [ ] Write unit test for basic damage
   - Done when: test exists, fails (TDD red)

4. [ ] Implement damage formula
   - Done when: test passes

5. [ ] Add defense reduction calculation
   - Done when: DEF reduces damage correctly

6. [ ] Test edge cases (0 DEF, high DEF)
   - Done when: all edge tests pass

# Done When
- [ ] All damage tests pass
- [ ] Game compiles without errors
- [ ] Manual test: attack deals expected damage

Tips

  • Start planning from the end - what does "done" look like?
  • Break down uncertain tasks - if unsure, explore first
  • Update the plan - plans change, that's okay
  • One task in progress - focus on current step

Each plan is UNIQUE to the task. Don't copy-paste - think through each step.