← 返回
未分类

增强版写作计划

Use when you have a spec or requirements for a multi-step task, before touching code. Enhanced version with milestone timelines, data flow diagrams, mockups,...
在有规格说明或需求文档,需要完成多步骤任务但尚未开始编码时使用。增强版,包含里程碑时间表、数据流图、原型设计等。
paudyyin
未分类 clawhub v1.0.0 1 版本 99615.4 Key: 无需
★ 0
Stars
📥 259
下载
💾 0
安装
1
版本
#latest

概述

Writing Plans — Enhanced

Overview

Write comprehensive implementation plans assuming the engineer has zero context for our codebase. Document everything they need to know: which files to touch, data flow, mockups, risks. Give them the whole plan as bite-sized tasks.

Announce at start: "I'm using the writing-plans skill to create the implementation plan."

Save plans to: docs/plans/YYYY-MM-DD-.md

Plan Document Header

Every plan MUST start with this header:

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

**Effort:** ~N weeks | **Surfaces touched:** N packages | **New tables:** N | **Feature flag:** name

Milestone Timeline

Ship in slices, each independently reviewable and each behind the flag. Nothing is user-visible until the last slice.

### Milestone 1: Schema & API Contract (Week 1 · Mon–Tue)

New tables, migrations, and API stubs. No UI. Contract reviewed before anything else lands.

- `packages/db` — new migrations
- `packages/api` — tRPC router stubs

### Milestone 2: Core Component (Week 1 · Wed–Fri)

Static component rendered from fixtures. Optimistic insert on submit, rollback on failure.

- `apps/web` — new component
- `apps/storybook` — fixture stories

### Milestone 3: Realtime Integration (Week 2 · Mon–Wed)

Subscribe to changes. Track state for sidebar digest.

### Milestone 4: Notifications & Ramp (Week 2 · Thu–Fri)

Mention detection → notification row, email digest fallback, ramp feature flag.

Data Flow

Describe the data flow from client to persistence. Use ASCII diagrams with solid = request/response, dashed = realtime/async.

### Data Flow: Optimistic Write Path

Client                    API Server              Database
  │                          │                       │
  ├─► POST /tasks (optimistic)                       │
  │  ├─► update local cache immediately              │
  │  └─► send mutation ─────►┤                       │
  │                           ├─► validate ─────────►┤
  │                           │                       │
  │                           │◄─ 200 OK ─────────────┤
  │◄─ cache update ──────────┤                       │
  │                          │                       │

### Realtime Fan-Out (dashed path)

Database ─ ─ ─► WebSocket ─ ─ ─► Other clients
  │              │                  │
  └─► trigger ──►┤                  └─► re-render
                 └─► push notification

Mockups

Not pixel-final — just enough that the reviewer and implementer agree on layout and placement.

### A · Thread Inside an Open Task Card

┌──────────────────────────────────────┐
│  Ship onboarding empty-state rewrite  │
│  BIR-1142 · Assigned to Priya · Due  │
├──────────────────────────────────────┤
│  Priya: Should we add an illustration?│
│  You: Yes, let me mock it up          │
│                                       │
│  ┌─────────────────────────────────┐ │
│  │ Add a comment...          Post │ │
│  └─────────────────────────────────┘ │
└──────────────────────────────────────┘

### B · Sidebar Unread Digest

┌──────────────────────────────────────┐
│ 🔴 Jonah commented on BIR-1142       │
│    "Should the illustration swap..."  │
│ 🔵 Aiko mentioned you on BIR-1098    │
│    "@priya can you confirm..."        │
└──────────────────────────────────────┘

Risk Table

RiskLikelihoodImpactMitigation
-------------------------------------
Migration locks table during deployMediumHighRun with CONCURRENTLY; schedule off-peak
Realtime subscription leaks memoryLowMediumAdd max-subscription cap; monitor heap
Feature flag not ramped correctlyMediumMediumAuto-alert if flag stuck > 3 days

Bite-Sized Task Granularity

Each step is one action (2-5 minutes):

  • "Write the failing test" — step
  • "Run it to make sure it fails" — step
  • "Implement the minimal code to make the test pass" — step
  • "Run the tests and make sure they pass" — step
  • "Commit" — step

Task Structure

### 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**
[code block]

**Step 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**
[code block]

**Step 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"


## 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
2. **Parallel Session (separate)** — Open new session with executing-plans, batch execution with checkpoints

Which approach?"

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-21 14:47 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

天气查询

paudyyin
通过墨迹天气或MSN天气获取当前天气和预报。用户询问天气、温度或某地预报时使用。不适用于历史查询。
★ 0 📥 381

前端设计

paudyyin
创建独特、生产级前端界面,追求高设计品质。用于构建网页组件、页面、海报、应用(网站、着陆页、仪表盘、React组件、HTML/CSS布局及任何Web界面美化)。生成创意、打磨精细的代码和UI设计,坚决拒绝千篇一律的“AI审美”。
★ 1 📥 440

文献综述自动器

paudyyin
自动检索学术文献(Semantic Scholar/arXiv/CrossRef),进行相关性筛选、主题聚类分析,生成综述草稿(支持本地模板或大模型润色),帮助快速了解研究前沿动态。
★ 0 📥 393