mcpField
W
writing-plans

writing-plans

github.com/zenobi-us开发6835 次安装今天更新
代码仓库

关于 writing-plans

将已确定的规格整理为分步实施计划的技能,面向需要代码库相关任务、测试、文档检查和执行交接说明的工程师。

主要功能

  1. 01将工作拆分为 2–5 分钟步骤
  2. 02注明文件路径和精确命令
  3. 03列出测试及预期结果
  4. 04遵循 DRY、YAGNI 和 TDD
  5. 05提供执行交接选项

适用场景

  1. 01规格确定后规划实施
  2. 02指导不熟悉代码库的工程师
  3. 03制定包含提交步骤的测试优先任务

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/zenobi-us/dotfiles --skill writing-plans

安装后在 Claude Code 中输入/writing-plans确认已加载。

详细介绍

如果还没有规范,请勿使用此技能。请先使用头脑风暴或规范技能。

编写计划

概述

编写全面的实施计划,假设工程师对我们的代码库一无所知,而且品味可能不太好。记录他们需要了解的一切:每项任务要修改哪些文件、代码、测试、需要查阅的文档,以及如何测试。将完整计划拆分为易于完成的小任务。遵循 DRY、YAGNI、TDD。频繁提交。

假设他们是熟练的开发者,但对我们的工具集或问题领域几乎一无所知。假设他们不太了解如何设计好的测试。

开始时宣布:“我正在使用编写计划技能来制定实施计划。”

**上下文:**应在专用工作树中执行(由头脑风暴技能创建)。

**保存计划到:**使用 scopecraft 工具

小任务的粒度

每个步骤只执行一个操作(2-5 分钟):

  • “编写失败的测试”——一个步骤
  • “运行测试,确认它失败”——一个步骤
  • “实现最少量的代码,让测试通过”——一个步骤
  • “运行测试,确认它们通过”——一个步骤
  • “提交”——一个步骤

计划文档标题

每份计划都必须以此标题开头:

---
insert frontmatter here
---
# [Feature Name] Implementation Plan

> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.

**Goal:** [One sentence describing what this builds]

**Architecture:** [2-3 sentences about approach]

**Tech Stack:** [Key technologies/libraries]

任务结构

### 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 == expected

步骤 2:运行测试,确认它失败

运行:pytest tests/path/test.py::test_name -v 预期:失败,并显示“function not defined”

步骤 3:编写最少量的实现

def function(input):
    return expected

步骤 4:运行测试,确认它通过

运行:pytest tests/path/test.py::test_name -v 预期:通过

步骤 5:提交

git add tests/path/test.py src/path/file.py
git commit -m "feat: add specific feature"

## Remember
- Exact file paths always
- Complete code in plan (not "add validation")
- Exact commands with expected output
- Reference relevant skills with @ syntax
- DRY, YAGNI, TDD, frequent commits

## Execution Handoff

After saving the plan, offer execution choice:

**"Plan complete and saved to `docs/plans/<filename>.md`. Two execution options:**

**1. Subagent-Driven (this session)** - I dispatch fresh subagent per task, review between tasks, fast iteration

**2. Parallel Session (separate)** - Open new session with executing-plans, batch execution with checkpoints

**Which approach?"**

**If Subagent-Driven chosen:**
- **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development
- Stay in this session
- Fresh subagent per task + code review

**If Parallel Session chosen:**
- Guide them to open new session in worktree
- **REQUIRED SUB-SKILL:** New session uses superpowers:executing-plans

评论

支持 Markdown