360 Secure SkillHub
360 安全技能中心

Writing Plans Enhanced

核心功能为生成规范的增强型技术实现计划,包含里程碑时间线、ASCII数据流图、Mockups、风险表及细粒度可执行任务。适用于复杂多步骤技术任务规划,假设工程师无代码库上下文,提供全流程落地指引。输出为Markdown格式文档,存储至指定路径,完成后可选择子代理驱动或并行会话执行计划。

paudyyin
paudyyin
热度 49.45
最近更新 2026-07-17 16:30:45
分类:开发依赖:读写文件 / 内部调用大模型应用场景:任务管理 / 工作流 / 报告撰写 / 模板

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add writing-plans-enhanced
Metadata
name
writing-plans-enhanced
version
1.0.0
description
Create enhanced implementation plans with milestone timelines, data flow diagrams, mockups, and risk tables. Use when planning complex multi-step tasks that need visual planning artifacts.
dependencies
[]

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-<feature-name>.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

| Risk | Likelihood | Impact | Mitigation |
|------|-----------|--------|------------|
| Migration locks table during deploy | Medium | High | Run with `CONCURRENTLY`; schedule off-peak |
| Realtime subscription leaks memory | Low | Medium | Add max-subscription cap; monitor heap |
| Feature flag not ramped correctly | Medium | Medium | Auto-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

```markdown
### 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**
```bash
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?"