将 spec/需求拆分为可执行的分步实施计划。 Use when: 有 spec 或需求,准备动手前需要拆分步骤。 Not for: trivial 改动(≤5 行)、已有详细计划。 Output: 分步实施计划(含 TDD 步骤和检查点)。
64
76%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./cat-cafe-skills/writing-plans/SKILL.md将 spec/需求拆分为分步实施计划。写清楚每步改哪些文件、代码、测试、怎么验证。DRY. YAGNI. TDD. Frequent commits.
Announce at start: "I'm using the writing-plans skill to create the implementation plan."
Context: Write the plan on main before opening a feature worktree. After the plan is committed, continue to worktree and then tdd.
开工前 Recall(F102 记忆系统)🔴:写计划前先搜相关历史——search_evidence("{feature}") 找相关 spec/ADR/讨论,避免重复造轮子。
Save plans to: feature-specs/YYYY-MM-DD-<feature-name>.md
Before splitting steps, do this first:
Steps are internal implementation rhythm, NOT delivery batches. The deliverable to the user is a complete feat matching the full spec — not a step's output. Do not expose intermediate steps as "验收点" to the user.
Plan 涉及有生命周期的状态对象(thread 标记 / carrier / session / 持久 config / cache / 索引 / 注册表)时,「功能描述 + 幂等测试点」不够——那是把状态机的边留给 reviewer 逐轮补(PR #2202 实测:4 P1 + 16 P2 全是同一对象的状态转移边——crash window / restore 复活 / deleted-list 漏过滤 / 并发 race / self-heal,打了 20 轮才合入)。
Census 先行(F229 A3a 二次教训 2026-06-11):gate 第一步是普查——列出 plan 涉及的全部有生命周期对象再逐个三件套。特别注意"复用现有 API"场景下的新消费侧状态(轮询循环、发送闸门、到达判定器都是状态机)。漏报对象 = gate 形同虚设:F229 A3b 三对象三件套齐全,A3a 的 ConversationSendCycle 漏普查 → 云端同型 5 轮逐边补课。
三件套,缺一 = plan 不完整,不准发给实现猫:
派生值规则:能用纯投影(pure selector,零存储)表达的状态,禁止落独立存储——无同步即无失同步。
Each step is one action (2-5 minutes):
Every plan MUST start with this header:
# [Feature Name] Implementation Plan
**Feature:** F0xx — `docs/features/F0xx-xxx.md`
**Goal:** [One sentence — must match feat doc 的 goal]
**Acceptance Criteria:** [从 feat doc 逐条抄过来,plan 必须覆盖全部 AC]
**Architecture cell:** [ownership cell id from docs/architecture/ownership/README.md]
**Map delta:** none | update required | new cell required
**Map delta why:** [一句话说明为什么不改 map / 改哪个 cell / 为什么需要新 cell]
**Architecture:** [2-3 sentences about approach]
**Tech Stack:** [Key technologies/libraries]
**前端验证:** [涉及前端?标注 Yes — reviewer 必须用 Playwright/Chrome 实测]
---F191 约束:普通增量写 Map delta: none,不得重新画架构图。update required 或 new cell required 代表 Phase 0 还包含 ownership map 更新,必须在 implementation steps 里列出来。
### Task N: [Component Name]
**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py:123-145`
- Test: `tests/exact/path/to/test.py`
**Step 1: Write the failing test**
```python
def test_specific_behavior():
result = function(input)
assert result == expectedStep 2: Run test to verify it fails
Run: pytest tests/path/test.py::test_name -v
Expected: FAIL with "function not defined"
Step 3: Write minimal implementation
def function(input):
return expectedStep 4: Run test to verify it passes
Run: pytest tests/path/test.py::test_name -v
Expected: PASS
Step 5: Commit
git add tests/path/test.py src/path/file.py
git commit -m "feat: add specific feature"## Open Questions in Plans
计划中的 Open Question 必须分类:
- **技术 OQ**:实现过程中自行解决
- **价值 OQ**:需要 operator 判断 → 附 Decision Packet(格式见 `refs/decision-matrix.md`),包含 TL;DR + 回滚成本 + 真正需要判断的价值问题
先判断可逆性:回滚成本低的不升级 operator,猫猫自决。
## Remember
- Exact file paths always
- Complete code in plan (not "add validation")
- Exact commands with expected output
- DRY, YAGNI, TDD, frequent commits
## 下一步
计划写完并提交 → **直接加载 `worktree`**(创建隔离开发环境)→ `tdd`(开始实现)。SOP 链条自动推进(§17)。80782c5
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.