@wwkit/harness 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/extract.md +2 -14
- package/agents/lint.md +368 -0
- package/agents/pyit.md +361 -0
- package/agents/pyut.md +347 -0
- package/agents/query.md +2 -14
- package/agents/revise.md +2 -14
- package/agents/work.md +631 -0
- package/commands/fix.md +77 -0
- package/commands/git-sync.md +218 -0
- package/commands/net-port.md +364 -0
- package/commands/pyit.md +6 -0
- package/commands/pyut.md +6 -0
- package/commands/resume.md +104 -0
- package/package.json +4 -2
- package/plugins/work-bootstrap.js +77 -0
- package/scripts/work-review-package +50 -0
- package/scripts/work-task-brief +27 -0
- package/scripts/work-workspace +31 -0
- package/skills/better-skill/SKILL.md +124 -0
- package/skills/blame-skill/SKILL.md +201 -0
- package/skills/lint-ai-fix/SKILL.md +141 -0
- package/skills/lint-config-setup/SKILL.md +106 -0
- package/skills/lint-config-setup/references/languages/js.md +110 -0
- package/skills/lint-config-setup/references/languages/py.md +89 -0
- package/skills/lint-env-ensure/SKILL.md +92 -0
- package/skills/lint-env-ensure/references/config.md +65 -0
- package/skills/lint-language-detect/SKILL.md +79 -0
- package/skills/lint-language-detect/references/detect-language.js +65 -0
- package/skills/lint-rules-analyze/SKILL.md +129 -0
- package/skills/lint-suitability-check/SKILL.md +84 -0
- package/skills/lint-tool-fix/SKILL.md +94 -0
- package/skills/new-skill/SKILL.md +227 -0
- package/skills/new-skill/references/template.md +53 -0
- package/skills/new-skill/references/workflow-patterns.md +104 -0
- package/skills/pytest-case-create/SKILL.md +327 -0
- package/skills/pytest-case-create/references/test-standards.md +244 -0
- package/skills/pytest-case-fix/SKILL.md +274 -0
- package/skills/pytest-coverage-analyze/SKILL.md +226 -0
- package/skills/pytest-coverage-analyze/references/scoring-rules.md +57 -0
- package/skills/pytest-env-ensure/SKILL.md +198 -0
- package/skills/pytest-env-ensure/references/config.md +145 -0
- package/skills/pytest-execute/SKILL.md +155 -0
- package/skills/pytest-sample/SKILL.md +164 -0
- package/skills/pytest-sample/references/src/pytest-sample/Calculator.py +67 -0
- package/skills/pytest-sample/references/src/pytest-sample/ConfigManager.py +68 -0
- package/skills/pytest-sample/references/src/pytest-sample/FileProcessor.py +53 -0
- package/skills/pytest-sample/references/src/pytest-sample/OrderService.py +82 -0
- package/skills/pytest-sample/references/src/pytest-sample/TokenGenerator.py +50 -0
- package/skills/pytest-sample/references/src/pytest-sample/UserService.py +45 -0
- package/skills/pytest-sample/references/src/pytest-sample/__init__.py +0 -0
- package/skills/pytest-suitability-check/SKILL.md +224 -0
- package/skills/read-docs/SKILL.md +134 -0
- package/skills/read-docs/references/opencode/agents/cases.md +206 -0
- package/skills/read-docs/references/opencode/agents/design-pattern.md +47 -0
- package/skills/read-docs/references/opencode/agents/detail.md +191 -0
- package/skills/read-docs/references/opencode/agents/examples.md +100 -0
- package/skills/read-docs/references/opencode/agents/index.md +309 -0
- package/skills/read-docs/references/opencode/agents/parallel-dispatch.md +149 -0
- package/skills/read-docs/references/opencode/agents/subagent-internals.md +217 -0
- package/skills/read-docs/references/opencode/agents/workflow.md +161 -0
- package/skills/read-docs/references/opencode/cli/commands/acp.md +32 -0
- package/skills/read-docs/references/opencode/cli/commands/agent.md +16 -0
- package/skills/read-docs/references/opencode/cli/commands/attach.md +20 -0
- package/skills/read-docs/references/opencode/cli/commands/mcp.md +37 -0
- package/skills/read-docs/references/opencode/cli/commands/others.md +49 -0
- package/skills/read-docs/references/opencode/cli/commands/plugin.md +13 -0
- package/skills/read-docs/references/opencode/cli/commands/provider.md +44 -0
- package/skills/read-docs/references/opencode/cli/commands/run.md +81 -0
- package/skills/read-docs/references/opencode/cli/commands/serve.md +84 -0
- package/skills/read-docs/references/opencode/cli/commands/session.md +38 -0
- package/skills/read-docs/references/opencode/cli/commands/web.md +15 -0
- package/skills/read-docs/references/opencode/cli/env.md +39 -0
- package/skills/read-docs/references/opencode/cli/index.md +19 -0
- package/skills/read-docs/references/opencode/cli/tui.md +35 -0
- package/skills/read-docs/references/opencode/commands/examples.md +42 -0
- package/skills/read-docs/references/opencode/commands/index.md +185 -0
- package/skills/read-docs/references/opencode/config/provider.md +152 -0
- package/skills/read-docs/references/opencode/formatter/index.md +71 -0
- package/skills/read-docs/references/opencode/guide/config.md +419 -0
- package/skills/read-docs/references/opencode/guide/formatters.md +70 -0
- package/skills/read-docs/references/opencode/guide/index.md +37 -0
- package/skills/read-docs/references/opencode/guide/providers.md +31 -0
- package/skills/read-docs/references/opencode/guide/rules.md +63 -0
- package/skills/read-docs/references/opencode/plugins/examples.md +75 -0
- package/skills/read-docs/references/opencode/plugins/index.md +188 -0
- package/skills/read-docs/references/opencode/reference/index.md +119 -0
- package/skills/read-docs/references/opencode/rule/index.md +78 -0
- package/skills/read-docs/references/opencode/skills/detail.md +113 -0
- package/skills/read-docs/references/opencode/skills/examples.md +141 -0
- package/skills/read-docs/references/opencode/skills/index.md +126 -0
- package/skills/read-docs/references/opencode/skills/workflow.md +146 -0
- package/skills/read-docs/references/opencode/tests/agent.md +10 -0
- package/skills/read-docs/references/opencode/tests/config.md +60 -0
- package/skills/read-docs/references/opencode/tests/file.md +12 -0
- package/skills/read-docs/references/opencode/tests/serve.md +18 -0
- package/skills/read-docs/references/opencode/tests/session.md +31 -0
- package/skills/read-docs/references/opencode/tests/web.md +17 -0
- package/skills/read-docs/references/opencode/tools/arguments.md +305 -0
- package/skills/read-docs/references/opencode/tools/context.md +18 -0
- package/skills/read-docs/references/opencode/tools/custom.md +111 -0
- package/skills/read-docs/references/opencode/tools/detail.md +104 -0
- package/skills/read-docs/references/opencode/tools/examples.md +71 -0
- package/skills/read-docs/references/opencode/tools/index.md +56 -0
- package/skills/read-docs/references/opencode/tools/lsp.md +26 -0
- package/skills/read-docs/references/opencode/tools/mcp.md +132 -0
- package/skills/read-docs/references/opencode/train/README.md +135 -0
- package/skills/read-docs/references/opencode/train/agent-basic.md +772 -0
- package/skills/read-docs/references/opencode/train/command-basic.md +668 -0
- package/skills/read-docs/references/opencode/train/config-basic.md +509 -0
- package/skills/read-docs/references/opencode/train/index.md +164 -0
- package/skills/read-docs/references/opencode/train/practice.md +873 -0
- package/skills/read-docs/references/opencode/train/skill-basic.md +608 -0
- package/skills/read-docs/references/opencode/tui/commands/config.md +32 -0
- package/skills/read-docs/references/opencode/tui/commands/editor.md +47 -0
- package/skills/read-docs/references/opencode/tui/commands/index.md +125 -0
- package/skills/read-docs/references/opencode/tui/commands/init.md +5 -0
- package/skills/read-docs/references/opencode/tui/index.md +26 -0
- package/skills/read-docs/references/superpowers/bootstrap.md +107 -0
- package/skills/read-docs/references/superpowers/comparison.md +77 -0
- package/skills/read-docs/references/superpowers/context.md +71 -0
- package/skills/read-docs/references/superpowers/index.md +58 -0
- package/skills/read-docs/references/superpowers/parallel.md +49 -0
- package/skills/read-docs/references/superpowers/sdd.md +183 -0
- package/skills/read-docs/references/superpowers/skills.md +68 -0
- package/skills/read-docs/references/superpowers/workflow.md +83 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Subagent-Driven Development (SDD)
|
|
2
|
+
|
|
3
|
+
## 核心原则
|
|
4
|
+
|
|
5
|
+
> **Fresh subagent per task + task review (spec + quality) + broad final review = high quality, fast iteration**
|
|
6
|
+
|
|
7
|
+
## SDD 完整流程
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
11
|
+
│ Setup │
|
|
12
|
+
│ ├─ 确保在隔离工作区(using-git-worktrees) │
|
|
13
|
+
│ ├─ 创建 SDD 工作区目录: .superpowers/sdd/<plan-name>/ │
|
|
14
|
+
│ ├─ 检查 Ledger(progress.md)确定已完成任务 │
|
|
15
|
+
│ ├─ 读取计划,创建 todos │
|
|
16
|
+
│ └─ 预审计划冲突(任务矛盾、与约束冲突) │
|
|
17
|
+
├─────────────────────────────────────────────────────────────┤
|
|
18
|
+
│ Per Task Loop │
|
|
19
|
+
│ │ │
|
|
20
|
+
│ ├─ 1. 记录 BASE = git rev-parse HEAD │
|
|
21
|
+
│ ├─ 2. 提取任务 brief: scripts/task-brief PLAN N │
|
|
22
|
+
│ │ → .superpowers/sdd/<plan>/task-N-brief.md │
|
|
23
|
+
│ ├─ 3. 派发 implementer subagent │
|
|
24
|
+
│ │ prompt 包含: brief 路径 + report 路径 + 上下文 │
|
|
25
|
+
│ │ (不粘贴计划全文,不让 subagent 读整个计划) │
|
|
26
|
+
│ │ │
|
|
27
|
+
│ ├─ 4. 处理 implementer 报告 │
|
|
28
|
+
│ │ DONE → 生成 review package,派发 task reviewer │
|
|
29
|
+
│ │ DONE_WITH_CONCERNS → 读顾虑,决定是否先处理 │
|
|
30
|
+
│ │ NEEDS_CONTEXT → 补充上下文,重新派发 │
|
|
31
|
+
│ │ BLOCKED → 评估阻塞,换模型/拆任务/升级 │
|
|
32
|
+
│ │ │
|
|
33
|
+
│ ├─ 5. Task Review(两阶段) │
|
|
34
|
+
│ │ a. Spec Compliance: 对照 brief 检查实现 │
|
|
35
|
+
│ │ b. Code Quality: 清洁性/DRY/边界情况 │
|
|
36
|
+
│ │ verdict: ✅ + Approved → 完成任务 │
|
|
37
|
+
│ │ verdict: ❌ 或有 Critical/Important → 进入 fix loop │
|
|
38
|
+
│ │ │
|
|
39
|
+
│ ├─ 6. Fix Loop(最多 5 轮) │
|
|
40
|
+
│ │ Round 1-3: 恢复原 implementer(context 完整) │
|
|
41
|
+
│ │ Round 4-5: 新 implementer + 更强模型(fresh eyes) │
|
|
42
|
+
│ │ 每轮: fix → re-test → scoped re-review │
|
|
43
|
+
│ │ Round 5 仍有 open findings → Adjudicate │
|
|
44
|
+
│ │ │
|
|
45
|
+
│ ├─ 7. Adjudicate(仅 Round 5 触发) │
|
|
46
|
+
│ │ reviewer 错误/可争议 → park with ruling │
|
|
47
|
+
│ │ 真问题但不 load-bearing → park with ruling │
|
|
48
|
+
│ │ 真问题且 load-bearing → STOP, report BLOCKED │
|
|
49
|
+
│ │ │
|
|
50
|
+
│ └─ 8. 完成: 写 ledger, 标记 todo complete │
|
|
51
|
+
│ │
|
|
52
|
+
│ → 下一任务(串行,不并行) │
|
|
53
|
+
├─────────────────────────────────────────────────────────────┤
|
|
54
|
+
│ Final Review │
|
|
55
|
+
│ ├─ 生成全分支 review package (MERGE_BASE..HEAD) │
|
|
56
|
+
│ ├─ 派发 final reviewer(最强模型) │
|
|
57
|
+
│ ├─ 有 findings → 一次 fix dispatch + 一次 scoped re-review │
|
|
58
|
+
│ └─ 残留 load-bearing findings → 报告给用户 │
|
|
59
|
+
├─────────────────────────────────────────────────────────────┤
|
|
60
|
+
│ Finish │
|
|
61
|
+
│ ├─ 删除 SDD 工作区(git 历史是记录) │
|
|
62
|
+
│ └─ 调用 finishing-a-development-branch 技能 │
|
|
63
|
+
└─────────────────────────────────────────────────────────────┘
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Implementer Subagent 派发
|
|
67
|
+
|
|
68
|
+
**模板**: `implementer-prompt.md`
|
|
69
|
+
|
|
70
|
+
派发 prompt 结构:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
Subagent (general-purpose):
|
|
74
|
+
description: "Implement Task N: [task name]"
|
|
75
|
+
model: [MODEL — 必填,按 Model Selection 选择]
|
|
76
|
+
prompt: |
|
|
77
|
+
You are implementing Task N: [task name]
|
|
78
|
+
|
|
79
|
+
## Task Description
|
|
80
|
+
Read your task brief first: [BRIEF_FILE]
|
|
81
|
+
|
|
82
|
+
## Context
|
|
83
|
+
[场景设置:任务在项目中的位置、依赖、架构上下文]
|
|
84
|
+
|
|
85
|
+
## Your Job
|
|
86
|
+
1. Implement exactly what the task specifies
|
|
87
|
+
2. Write tests (following TDD if task says to)
|
|
88
|
+
3. Verify implementation works
|
|
89
|
+
4. Commit your work
|
|
90
|
+
5. Self-review
|
|
91
|
+
6. Report back
|
|
92
|
+
|
|
93
|
+
## Report Format
|
|
94
|
+
Write your full report to [REPORT_FILE].
|
|
95
|
+
|
|
96
|
+
Then report back with ONLY (under 15 lines):
|
|
97
|
+
- Status: DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT
|
|
98
|
+
- Commits created
|
|
99
|
+
- One-line test summary
|
|
100
|
+
- Concerns
|
|
101
|
+
- Report file path
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**关键设计**:
|
|
105
|
+
1. **文件传递上下文**:brief 和 report 都是文件,不经过 controller 的 context window
|
|
106
|
+
2. **简短返回**:implementer 只返回 ≤15 行的状态摘要,详情写文件
|
|
107
|
+
3. **model 必填**:省略 model 会继承 session 最贵模型
|
|
108
|
+
4. **不并行实现任务**:`Never dispatch multiple implementation subagents in parallel (conflicts)`
|
|
109
|
+
|
|
110
|
+
## Task Reviewer Subagent
|
|
111
|
+
|
|
112
|
+
**模板**: `task-reviewer-prompt.md`
|
|
113
|
+
|
|
114
|
+
Reviewer 获取三个文件路径 + 全局约束:
|
|
115
|
+
- BRIEF_FILE — 任务详情
|
|
116
|
+
- REPORT_FILE — implementer 的报告
|
|
117
|
+
- DIFF_FILE — review package(commits + stat + full diff with -U10 context)
|
|
118
|
+
|
|
119
|
+
**两阶段 review**:
|
|
120
|
+
1. **Spec Compliance**:Missing / Extra / Misunderstood
|
|
121
|
+
2. **Code Quality**:Clean separation / Error handling / DRY / Edge cases / Tests verify real behavior
|
|
122
|
+
|
|
123
|
+
**关键原则**:
|
|
124
|
+
- **不信任 implementer 报告**:`Treat the implementer's report as unverified claims`
|
|
125
|
+
- **不重新运行测试**:implementer 已运行并报告,reviewer 只在阅读代码产生具体疑虑时才跑 focused test
|
|
126
|
+
- **不做全库爬取**:`Do not crawl the broader codebase`
|
|
127
|
+
|
|
128
|
+
## Fix Loop 机制
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
Review 有 Critical/Important findings
|
|
132
|
+
│
|
|
133
|
+
▼
|
|
134
|
+
Round 1-3: 恢复原 implementer
|
|
135
|
+
├─ 发送 open findings verbatim
|
|
136
|
+
├─ implementer fix → re-test → append fix report
|
|
137
|
+
├─ 生成 scoped review package (FIX_BASE..HEAD)
|
|
138
|
+
└─ 派发 re-reviewer (re-review-prompt.md)
|
|
139
|
+
├─ ADDRESSED → 该 finding 关闭
|
|
140
|
+
└─ NOT ADDRESSED → 继续 open
|
|
141
|
+
│
|
|
142
|
+
▼ (有 open findings)
|
|
143
|
+
Round 4-5: 新 implementer + 更强模型
|
|
144
|
+
├─ "A prior implementer attempted this task [N] times; you own it now."
|
|
145
|
+
├─ 同样流程: fix → re-test → scoped re-review
|
|
146
|
+
└─ ...
|
|
147
|
+
│
|
|
148
|
+
▼ (Round 5 仍有 open findings)
|
|
149
|
+
Adjudicate (controller 自己裁决)
|
|
150
|
+
├─ reviewer 错误 → park with ruling
|
|
151
|
+
├─ 真但不 load-bearing → park with ruling
|
|
152
|
+
└─ 真且 load-bearing → STOP, report BLOCKED
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Re-review 是 scoped 的**:只验证 findings 是否解决 + 检查 fix diff 是否引入新问题。不重新审查未改动代码。out-of-scope 观察记入 ledger,不扩展 loop。
|
|
156
|
+
|
|
157
|
+
## SDD 工作区
|
|
158
|
+
|
|
159
|
+
每个计划有独立的工作区目录:
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
.superpowers/sdd/
|
|
163
|
+
.gitignore # 内容: *(忽略所有)
|
|
164
|
+
<plan-name>/
|
|
165
|
+
progress.md # Ledger
|
|
166
|
+
task-1-brief.md # 任务 1 的完整文本
|
|
167
|
+
task-1-report.md # 任务 1 implementer 的报告
|
|
168
|
+
review-a1b2..d4e5.diff # 任务 1 的 review package
|
|
169
|
+
...
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**设计原因**:
|
|
173
|
+
- `.superpowers/sdd/` 在 `.gitignore` 中,不污染 git status
|
|
174
|
+
- 不在 `.git/` 下(Claude Code 禁止 agent 写 `.git/`)
|
|
175
|
+
- 每计划独立目录,防止并发计划互相干扰
|
|
176
|
+
|
|
177
|
+
## 辅助脚本
|
|
178
|
+
|
|
179
|
+
| 脚本 | 作用 |
|
|
180
|
+
|------|------|
|
|
181
|
+
| `scripts/task-brief PLAN N` | 从计划文件提取第 N 个任务的完整文本到 `task-N-brief.md` |
|
|
182
|
+
| `scripts/review-package PLAN BASE HEAD` | 生成 diff 包(commits + stat + full diff -U10)到文件 |
|
|
183
|
+
| `scripts/sdd-workspace PLAN` | 解析并创建计划的工作区目录 |
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# 技能体系
|
|
2
|
+
|
|
3
|
+
## 技能列表
|
|
4
|
+
|
|
5
|
+
Superpowers 包含 14 个技能,覆盖完整的软件开发流程:
|
|
6
|
+
|
|
7
|
+
| 技能 | 阶段 | 说明 |
|
|
8
|
+
|------|------|------|
|
|
9
|
+
| `using-superpowers` | 元技能 | Bootstrap:如何发现和使用技能 |
|
|
10
|
+
| `brainstorming` | 需求 | 苏格拉底式设计对话,产出 spec |
|
|
11
|
+
| `writing-plans` | 规划 | 将 spec 拆解为 bite-sized 任务计划 |
|
|
12
|
+
| `using-git-worktrees` | 隔离 | 创建隔离工作区 |
|
|
13
|
+
| `subagent-driven-development` | 执行(SDD) | 每任务一个 subagent + 两阶段 review |
|
|
14
|
+
| `executing-plans` | 执行(inline) | 批量执行 + 检查点(无 subagent 时的替代) |
|
|
15
|
+
| `dispatching-parallel-agents` | 执行(并行) | 并行派发独立问题的修复 |
|
|
16
|
+
| `test-driven-development` | 实现 | RED-GREEN-REFACTOR |
|
|
17
|
+
| `systematic-debugging` | 调试 | 4 阶段根因分析 |
|
|
18
|
+
| `requesting-code-review` | 审查 | 派发 reviewer subagent |
|
|
19
|
+
| `receiving-code-review` | 审查 | 响应 review 反馈 |
|
|
20
|
+
| `verification-before-completion` | 验证 | 完成前验证 |
|
|
21
|
+
| `finishing-a-development-branch` | 收尾 | merge/PR/keep 决策 |
|
|
22
|
+
| `writing-skills` | 元技能 | 创建新技能 |
|
|
23
|
+
|
|
24
|
+
## 技能自动触发
|
|
25
|
+
|
|
26
|
+
`using-superpowers` 是所有技能的入口。它的核心规则:
|
|
27
|
+
|
|
28
|
+
> **Invoke relevant or requested skills BEFORE any response or action** — including clarifying questions, exploring the codebase, or checking files.
|
|
29
|
+
|
|
30
|
+
这意味着 agent 在回答任何问题(包括澄清问题)之前,必须先检查是否有相关技能。技能通过 `<SUBAGENT-STOP>` 标记跳过被派发为 subagent 的会话:
|
|
31
|
+
|
|
32
|
+
```markdown
|
|
33
|
+
<SUBAGENT-STOP>
|
|
34
|
+
If you were dispatched as a subagent to execute a specific task, ignore this skill.
|
|
35
|
+
</SUBAGENT-STOP>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 验收测试
|
|
39
|
+
|
|
40
|
+
> A working integration auto-triggers the `brainstorming` skill before any code is written.
|
|
41
|
+
|
|
42
|
+
用户说 "Let's make a react todo list" 时,agent 应自动触发 `brainstorming` 技能。
|
|
43
|
+
|
|
44
|
+
## Red Flags 表
|
|
45
|
+
|
|
46
|
+
`using-superpowers` 包含一个 Red Flags 表,列出 agent 可能用来"合理化"跳过技能的借口:
|
|
47
|
+
|
|
48
|
+
| Thought | Reality |
|
|
49
|
+
|---------|---------|
|
|
50
|
+
| "This is just a simple question" | Questions are tasks. Check for skills. |
|
|
51
|
+
| "I need more context first" | Skill check comes BEFORE clarifying questions. |
|
|
52
|
+
| "Let me explore the codebase first" | Skills tell you HOW to explore. Check first. |
|
|
53
|
+
| "I can check git/files quickly" | Files lack conversation context. Check for skills. |
|
|
54
|
+
| "This doesn't need a formal skill" | If a skill exists, use it. |
|
|
55
|
+
| "I remember this skill" | Skills evolve. Read current version. |
|
|
56
|
+
| "The skill is overkill" | Simple things become complex. Use it. |
|
|
57
|
+
| "I'll just do this one thing first" | Check BEFORE doing anything. |
|
|
58
|
+
|
|
59
|
+
## 技能优先级
|
|
60
|
+
|
|
61
|
+
> When multiple skills apply, process skills come first — they set the approach, then implementation skills carry it out.
|
|
62
|
+
|
|
63
|
+
- "Let's build X" → `brainstorming` first, then implementation skills
|
|
64
|
+
- "Fix this bug" → `systematic-debugging` first, then domain skills
|
|
65
|
+
|
|
66
|
+
## 用户指令优先级
|
|
67
|
+
|
|
68
|
+
> User instructions (CLAUDE.md, AGENTS.md, GEMINI.md, etc, direct requests) take precedence over skills, which in turn override default behavior. Only skip skill workflows or instructions when your human partner has explicitly told you to.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# 主工作流
|
|
2
|
+
|
|
3
|
+
## 完整流程
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
brainstorming → writing-plans → using-git-worktrees →
|
|
7
|
+
subagent-driven-development (or executing-plans) →
|
|
8
|
+
requesting-code-review → finishing-a-development-branch
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Brainstorming 阶段
|
|
12
|
+
|
|
13
|
+
**触发**:用户说"构建 X" 或 "实现功能 Y"
|
|
14
|
+
|
|
15
|
+
**流程**:
|
|
16
|
+
1. 探索项目上下文(文件、文档、最近提交)
|
|
17
|
+
2. 逐个提问澄清需求(一次一个问题)
|
|
18
|
+
3. 提出 2-3 种方案 + 权衡 + 推荐
|
|
19
|
+
4. 分段展示设计,每段后获用户确认
|
|
20
|
+
5. 写设计文档到 `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
|
|
21
|
+
6. 自审 spec(占位符扫描、一致性、范围、歧义)
|
|
22
|
+
7. 用户审查 spec
|
|
23
|
+
8. 调用 `writing-plans` 技能
|
|
24
|
+
|
|
25
|
+
**硬门控**:在设计获批前,禁止写任何代码。
|
|
26
|
+
|
|
27
|
+
## Writing Plans 阶段
|
|
28
|
+
|
|
29
|
+
**输入**:已批准的 spec
|
|
30
|
+
|
|
31
|
+
**产出**:实现计划文件 `docs/superpowers/plans/YYYY-MM-DD-<feature>.md`
|
|
32
|
+
|
|
33
|
+
**计划格式**:
|
|
34
|
+
```markdown
|
|
35
|
+
# [Feature] Implementation Plan
|
|
36
|
+
|
|
37
|
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development
|
|
38
|
+
|
|
39
|
+
**Goal:** [一句话]
|
|
40
|
+
**Architecture:** [2-3 句]
|
|
41
|
+
**Tech Stack:** [技术栈]
|
|
42
|
+
|
|
43
|
+
## Global Constraints
|
|
44
|
+
[项目级约束 — 版本、命名、平台要求等]
|
|
45
|
+
|
|
46
|
+
### Task N: [Component Name]
|
|
47
|
+
**Files:** Create/Modify/Test 路径
|
|
48
|
+
**Interfaces:** Consumes/Produces
|
|
49
|
+
- [ ] Step 1: Write the failing test
|
|
50
|
+
- [ ] Step 2: Run test to verify it fails
|
|
51
|
+
- [ ] Step 3: Write minimal implementation
|
|
52
|
+
- [ ] Step 4: Run test to verify it passes
|
|
53
|
+
- [ ] Step 5: Commit
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**关键原则**:
|
|
57
|
+
- 每步 2-5 分钟
|
|
58
|
+
- 无占位符("TBD"、"add error handling" 等是计划失败)
|
|
59
|
+
- 每步包含完整代码
|
|
60
|
+
- TDD:先写失败测试,再实现
|
|
61
|
+
|
|
62
|
+
## 执行选择
|
|
63
|
+
|
|
64
|
+
计划完成后,提供两种执行方式:
|
|
65
|
+
|
|
66
|
+
| 方式 | 条件 | 特点 |
|
|
67
|
+
|------|------|------|
|
|
68
|
+
| Subagent-Driven Development(推荐) | 有 subagent 能力 | 每任务一个 fresh subagent + 两阶段 review |
|
|
69
|
+
| Executing Plans(inline) | 无 subagent | 批量执行 + 人工检查点 |
|
|
70
|
+
|
|
71
|
+
## Finishing 阶段
|
|
72
|
+
|
|
73
|
+
1. 运行全量测试
|
|
74
|
+
2. 检测环境(normal repo / worktree / detached HEAD)
|
|
75
|
+
3. 确认 base branch
|
|
76
|
+
4. 呈现选项:
|
|
77
|
+
- Merge back to base locally
|
|
78
|
+
- Push and create PR
|
|
79
|
+
- Keep as-is
|
|
80
|
+
5. 执行用户选择
|
|
81
|
+
6. 清理工作区(仅 Superpowers 创建的 worktree)
|
|
82
|
+
|
|
83
|
+
**关键**:集成决策是用户的,agent 只呈现菜单等待回答。
|