@wwkit/harness 1.0.10 → 1.0.12

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.
@@ -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 只呈现菜单等待回答。