mcpField
W
writing-plans

writing-plans

github.com/jackspaceAgent 工作流1636 次安装12 周前更新
代码仓库

关于 writing-plans

用于编写实施计划的 skill,列出具体文件、命令、测试和细分任务,适合需要为代码库或问题领域背景有限的开发者制定可执行方案。

主要功能

  1. 01拆分为 2–5 分钟的小步骤
  2. 02明确文件、测试和命令
  3. 03按测试优先组织任务
  4. 04将计划保存至 docs/plans
  5. 05提供后续执行选项

适用场景

  1. 01为陌生代码库规划功能
  2. 02将实现工作拆分为可测试任务
  3. 03准备供后续执行的计划

安装

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

$npx skills add https://github.com/jackspace/claudeskillz --skill writing-plans

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

附带文件SKILL.json

详细介绍

编写计划

概述

编写完整的实现计划,假设工程师对我们的代码库毫无背景知识,且品味存疑。记录他们需要知道的一切:每个任务要改哪些文件、代码、测试、他们可能需要查阅的文档、如何测试。把整个计划拆解成小任务。DRY。YAGNI。TDD。频繁提交。

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

开始时宣布:“我正在使用 writing-plans 技能来创建实现计划。”

上下文: 应在专用 worktree 中运行(由 brainstorming 技能创建)。

将计划保存到:docs/plans/YYYY-MM-DD-<feature-name>.md

小任务粒度

每一步是一个操作(2-5 分钟):

  • “编写失败的测试” - 步骤
  • “运行它以确保失败” - 步骤
  • “实现最小代码使测试通过” - 步骤
  • “运行测试并确保通过” - 步骤
  • “提交” - 步骤

计划文档头部

每个计划必须以这个头部开头:

# [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