@boyingliu01/xp-gate 0.12.13 → 0.13.0

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.
Files changed (130) hide show
  1. package/adapters/typescript.sh +5 -2
  2. package/build-integrity/__tests__/ccn-refactor-gate10.test.ts +133 -0
  3. package/build-integrity/gate-10.ts +111 -123
  4. package/hooks/gate-3.sh +68 -0
  5. package/hooks/gate-4.sh +80 -0
  6. package/hooks/gate-7.sh +45 -0
  7. package/hooks/gate-8.sh +56 -0
  8. package/hooks/pre-commit +15 -3
  9. package/mock-policy/AGENTS.md +4 -4
  10. package/mutation/AGENTS.md +4 -4
  11. package/package.json +1 -1
  12. package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  13. package/plugins/claude-code/skills/delphi-review/AGENTS.md +4 -4
  14. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +50 -62
  15. package/plugins/claude-code/skills/sprint-flow/SKILL.md +200 -238
  16. package/plugins/claude-code/skills/sprint-flow/references/force-levels.md +13 -14
  17. package/plugins/claude-code/skills/sprint-flow/references/orchestration-rules.md +61 -197
  18. package/plugins/claude-code/skills/sprint-flow/references/phase-1-prep.md +294 -0
  19. package/plugins/claude-code/skills/sprint-flow/references/phase-2-design.md +194 -0
  20. package/{skills/sprint-flow/references/phase-2-build.md → plugins/claude-code/skills/sprint-flow/references/phase-3-build.md} +11 -11
  21. package/plugins/claude-code/skills/sprint-flow/references/phase-4-verify.md +153 -0
  22. package/plugins/claude-code/skills/sprint-flow/references/phase-5-ship.md +40 -0
  23. package/plugins/claude-code/skills/sprint-flow/references/phase-6-close.md +134 -0
  24. package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-learning-log.md +1 -1
  25. package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-output-template.md +15 -37
  26. package/plugins/claude-code/skills/sprint-flow/templates/emergent-issues-template.md +7 -7
  27. package/plugins/claude-code/skills/sprint-flow/templates/pain-document-template.md +5 -5
  28. package/plugins/claude-code/skills/sprint-flow/templates/sprint-progress-template.md +36 -47
  29. package/plugins/claude-code/skills/sprint-flow/templates/sprint-summary-template.md +16 -15
  30. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +4 -4
  31. package/plugins/opencode/package.json +1 -1
  32. package/plugins/opencode/skills/delphi-review/AGENTS.md +4 -4
  33. package/plugins/opencode/skills/sprint-flow/AGENTS.md +50 -62
  34. package/plugins/opencode/skills/sprint-flow/SKILL.md +200 -238
  35. package/plugins/opencode/skills/sprint-flow/references/force-levels.md +13 -14
  36. package/plugins/opencode/skills/sprint-flow/references/orchestration-rules.md +61 -197
  37. package/plugins/opencode/skills/sprint-flow/references/phase-1-prep.md +294 -0
  38. package/plugins/opencode/skills/sprint-flow/references/phase-2-design.md +194 -0
  39. package/plugins/{claude-code/skills/sprint-flow/references/phase-2-build.md → opencode/skills/sprint-flow/references/phase-3-build.md} +11 -11
  40. package/plugins/opencode/skills/sprint-flow/references/phase-4-verify.md +153 -0
  41. package/plugins/opencode/skills/sprint-flow/references/phase-5-ship.md +40 -0
  42. package/plugins/opencode/skills/sprint-flow/references/phase-6-close.md +134 -0
  43. package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-learning-log.md +1 -1
  44. package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-output-template.md +15 -37
  45. package/plugins/opencode/skills/sprint-flow/templates/emergent-issues-template.md +7 -7
  46. package/plugins/opencode/skills/sprint-flow/templates/pain-document-template.md +5 -5
  47. package/plugins/opencode/skills/sprint-flow/templates/sprint-progress-template.md +36 -47
  48. package/plugins/opencode/skills/sprint-flow/templates/sprint-summary-template.md +16 -15
  49. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +4 -4
  50. package/plugins/qoder/plugin.json +1 -1
  51. package/plugins/qoder/skills/delphi-review/AGENTS.md +4 -4
  52. package/plugins/qoder/skills/sprint-flow/AGENTS.md +50 -62
  53. package/plugins/qoder/skills/sprint-flow/SKILL.md +274 -208
  54. package/plugins/qoder/skills/sprint-flow/references/components/middleware.md +5 -2
  55. package/plugins/qoder/skills/sprint-flow/references/force-levels.md +13 -14
  56. package/plugins/qoder/skills/sprint-flow/references/orchestration-rules.md +61 -197
  57. package/plugins/qoder/skills/sprint-flow/references/phase-1-prep.md +294 -0
  58. package/plugins/qoder/skills/sprint-flow/references/phase-2-design.md +194 -0
  59. package/plugins/{opencode/skills/sprint-flow/references/phase-2-build.md → qoder/skills/sprint-flow/references/phase-3-build.md} +11 -11
  60. package/plugins/qoder/skills/sprint-flow/references/phase-4-verify.md +153 -0
  61. package/plugins/qoder/skills/sprint-flow/references/phase-5-ship.md +40 -0
  62. package/plugins/qoder/skills/sprint-flow/references/phase-6-close.md +134 -0
  63. package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-learning-log.md +1 -1
  64. package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-output-template.md +15 -37
  65. package/plugins/qoder/skills/sprint-flow/templates/emergent-issues-template.md +7 -7
  66. package/plugins/qoder/skills/sprint-flow/templates/pain-document-template.md +5 -5
  67. package/plugins/qoder/skills/sprint-flow/templates/sprint-progress-template.md +36 -47
  68. package/plugins/qoder/skills/sprint-flow/templates/sprint-summary-template.md +16 -15
  69. package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +4 -4
  70. package/principles/AGENTS.md +4 -4
  71. package/principles/lint-baseline.ts +35 -40
  72. package/skills/delphi-review/AGENTS.md +4 -4
  73. package/skills/sprint-flow/AGENTS.md +50 -62
  74. package/skills/sprint-flow/SKILL.md +200 -238
  75. package/skills/sprint-flow/references/force-levels.md +13 -14
  76. package/skills/sprint-flow/references/orchestration-rules.md +61 -197
  77. package/skills/sprint-flow/references/phase-1-prep.md +294 -0
  78. package/skills/sprint-flow/references/phase-2-design.md +194 -0
  79. package/skills/sprint-flow/references/phase-3-build.md +147 -0
  80. package/skills/sprint-flow/references/phase-4-verify.md +153 -0
  81. package/skills/sprint-flow/references/phase-5-ship.md +40 -0
  82. package/skills/sprint-flow/references/phase-6-close.md +134 -0
  83. package/skills/sprint-flow/templates/auto-estimate-learning-log.md +1 -1
  84. package/skills/sprint-flow/templates/auto-estimate-output-template.md +15 -37
  85. package/skills/sprint-flow/templates/emergent-issues-template.md +7 -7
  86. package/skills/sprint-flow/templates/pain-document-template.md +5 -5
  87. package/skills/sprint-flow/templates/sprint-progress-template.md +36 -47
  88. package/skills/sprint-flow/templates/sprint-summary-template.md +16 -15
  89. package/skills/test-specification-alignment/AGENTS.md +4 -4
  90. package/plugins/claude-code/skills/sprint-flow/references/phase-0-think.md +0 -115
  91. package/plugins/claude-code/skills/sprint-flow/references/phase-1-plan.md +0 -178
  92. package/plugins/claude-code/skills/sprint-flow/references/phase-3-review.md +0 -215
  93. package/plugins/claude-code/skills/sprint-flow/references/phase-4-uat.md +0 -125
  94. package/plugins/claude-code/skills/sprint-flow/references/phase-5-feedback.md +0 -100
  95. package/plugins/claude-code/skills/sprint-flow/references/phase-6-ship.md +0 -9
  96. package/plugins/claude-code/skills/sprint-flow/references/phase-7-land.md +0 -9
  97. package/plugins/claude-code/skills/sprint-flow/references/phase-8-cleanup.md +0 -9
  98. package/plugins/claude-code/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +0 -263
  99. package/plugins/claude-code/skills/sprint-flow/references/phase-minus-1-isolate.md +0 -58
  100. package/plugins/opencode/skills/sprint-flow/references/phase-0-think.md +0 -115
  101. package/plugins/opencode/skills/sprint-flow/references/phase-1-plan.md +0 -178
  102. package/plugins/opencode/skills/sprint-flow/references/phase-3-review.md +0 -215
  103. package/plugins/opencode/skills/sprint-flow/references/phase-4-uat.md +0 -125
  104. package/plugins/opencode/skills/sprint-flow/references/phase-5-feedback.md +0 -100
  105. package/plugins/opencode/skills/sprint-flow/references/phase-6-ship.md +0 -9
  106. package/plugins/opencode/skills/sprint-flow/references/phase-7-land.md +0 -9
  107. package/plugins/opencode/skills/sprint-flow/references/phase-8-cleanup.md +0 -9
  108. package/plugins/opencode/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +0 -263
  109. package/plugins/opencode/skills/sprint-flow/references/phase-minus-1-isolate.md +0 -58
  110. package/plugins/qoder/skills/sprint-flow/references/phase-0-think.md +0 -115
  111. package/plugins/qoder/skills/sprint-flow/references/phase-1-plan.md +0 -178
  112. package/plugins/qoder/skills/sprint-flow/references/phase-2-build.md +0 -43
  113. package/plugins/qoder/skills/sprint-flow/references/phase-3-review.md +0 -215
  114. package/plugins/qoder/skills/sprint-flow/references/phase-4-uat.md +0 -125
  115. package/plugins/qoder/skills/sprint-flow/references/phase-5-feedback.md +0 -100
  116. package/plugins/qoder/skills/sprint-flow/references/phase-6-ship.md +0 -9
  117. package/plugins/qoder/skills/sprint-flow/references/phase-7-land.md +0 -9
  118. package/plugins/qoder/skills/sprint-flow/references/phase-8-cleanup.md +0 -9
  119. package/plugins/qoder/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +0 -263
  120. package/plugins/qoder/skills/sprint-flow/references/phase-minus-1-isolate.md +0 -58
  121. package/skills/sprint-flow/references/phase-0-think.md +0 -115
  122. package/skills/sprint-flow/references/phase-1-plan.md +0 -178
  123. package/skills/sprint-flow/references/phase-3-review.md +0 -215
  124. package/skills/sprint-flow/references/phase-4-uat.md +0 -125
  125. package/skills/sprint-flow/references/phase-5-feedback.md +0 -100
  126. package/skills/sprint-flow/references/phase-6-ship.md +0 -9
  127. package/skills/sprint-flow/references/phase-7-land.md +0 -9
  128. package/skills/sprint-flow/references/phase-8-cleanup.md +0 -9
  129. package/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +0 -263
  130. package/skills/sprint-flow/references/phase-minus-1-isolate.md +0 -58
@@ -1,178 +0,0 @@
1
- # Phase 1: PLAN(共识评审)
2
-
3
- ## 目标
4
-
5
- 多模型评审,达成 APPROVED 共识。后续步骤自动从 APPROVED 设计文档提取 specification.yaml。
6
-
7
- ---
8
-
9
- ## 调用 Skills
10
-
11
- - `autoplan` (gstack) — CEO → Design → Eng 自动流水线
12
- - `delphi-review` — 多轮匿名评审直到共识
13
- - specification.yaml 从 APPROVED 设计文档自动生成(无需独立 skill)
14
-
15
- **Web 前端项目额外注入**:
16
- - `design-shotgun` (gstack) — 生成多版 UI 设计变体,用于探索不同的设计方案
17
-
18
- **Mobile 项目额外注入** (`--type mobile-flutter` / `mobile-react-native`):
19
- - `design-shotgun` (gstack) — 移动端 UI 设计探索(Web 项目相同,适用 Flutter Web / RN 项目)
20
-
21
- ---
22
-
23
- ## 执行步骤
24
-
25
- ### Step 0: Web 前端项目 — 调用 design-shotgun(如适用)
26
-
27
- **IF project_type is web-nextjs / web-react / web-vue / mobile-flutter / mobile-react-native:**
28
-
29
- ```bash
30
- skill(name="design-shotgun", user_message="[Pain Document 内容 + 需求描述]")
31
- ```
32
-
33
- design-shotgun 执行:
34
- - 生成多个 AI 设计变体
35
- - 打开比较板展示不同设计方案
36
- - 收集结构化反馈并迭代
37
-
38
- 输出: 多个设计方案(用于 autoplan 的 plan-design-review)
39
-
40
- **IF backend project:** 跳过此步骤,直接进入 Step 1。
41
-
42
- ### Step 1: 调用 autoplan skill
43
-
44
- ```bash
45
- skill(name="autoplan", user_message="[Pain Document 内容]")
46
- ```
47
-
48
- autoplan 自动执行:
49
- - `plan-ceo-review` — CEO 视角评审
50
- - `plan-design-review` — Design 视角评审
51
- - `plan-eng-review` — Eng 视角评审
52
-
53
- 使用 6 个决策原则自动决策,输出:
54
-
55
- ```yaml
56
- autoplan_result:
57
- taste_decisions: [] | [decision1, decision2, ...]
58
- verdict: "AUTO_APPROVED" | "NEEDS_REVIEW"
59
- ```
60
-
61
- ---
62
-
63
- ### Step 2: 条件分支(关键设计)
64
-
65
- ```
66
- ┌───────────────────────────────────────────────────────────────────┐
67
- │ Phase 1: 条件分支逻辑 │
68
- ├───────────────────────────────────────────────────────────────────┤
69
- │ │
70
- │ IF autoplan_result.verdict == "AUTO_APPROVED" │
71
- │ AND autoplan_result.taste_decisions == [] │
72
- │ → 调用 lightweight delphi-review(2 专家、1 轮、2/2 APPROVED) │
73
- │ → 场景: autoplan 所有决策自动通过,无关键分歧,但仍需共识门禁 │
74
- │ │
75
- │ IF autoplan_result.verdict == "NEEDS_REVIEW" │
76
- │ OR autoplan_result.taste_decisions.length > 0 │
77
- │ → ⚠️ 暂停等待用户确认 taste_decisions │
78
- │ → 用户确认后,调用标准 delphi-review │
79
- │ → 场景: 存在关键决策分歧或 autoplan 未完全自动通过 │
80
- │ │
81
- └───────────────────────────────────────────────────────────────────┘
82
- ```
83
-
84
- ---
85
-
86
- ### Step 2a: 如果需要用户确认 taste_decisions
87
-
88
- 暂停并提示用户:
89
-
90
- ```
91
- ⚠️ autoplan 发现以下关键决策无法自动决定,请确认:
92
-
93
- Decision 1: [决策描述]
94
- Option A: [选项A] - [优缺点]
95
- Option B: [选项B] - [优缺点]
96
-
97
- Decision 2: [决策描述]
98
- Option A: [...]
99
- Option B: [...]
100
-
101
- 请选择每个决策的选项,或提供您的观点。
102
- ```
103
-
104
- 用户确认后,继续 Step 2b。
105
-
106
- ---
107
-
108
- ### Step 2b: 调用 delphi-review(强制,orchestrator 直接执行)
109
-
110
- ```bash
111
- skill(name="delphi-review", user_message="[设计文档 + taste_decisions 确认结果]")
112
- ```
113
-
114
- delphi-review 执行:
115
- - Round 1: 3 专家匿名独立评审
116
- - Round 2+: 交换意见直到共识
117
- - 输出: APPROVED / REQUEST_CHANGES
118
-
119
- **如果 REQUEST_CHANGES**:
120
- - ⚠️ 暂停等待用户处理(orchestrator 直接执行,可交互确认)
121
- - 修复后重新评审(从 Round 2 起步)
122
- - 直到 APPROVED
123
-
124
- **如果 APPROVED**:
125
- - 自动进入 Step 3
126
-
127
- ---
128
-
129
- ### Step 3: 从 APPROVED 设计文档提取 specification.yaml
130
-
131
- 设计文档 APPROVED 后,自动提取需求 + AC 生成轻量 specification.yaml(无需独立 skill):
132
-
133
- ```
134
- # 自动完成: 读取设计文档 → 提取 requirements → 生成 specification.yaml
135
- # specification.yaml 用于 test-spec-alignment 验证
136
- ```
137
-
138
- ```yaml
139
- specification:
140
- requirements:
141
- - id: REQ-001
142
- description: [需求描述]
143
- priority: [critical/high/medium/low]
144
-
145
- acceptance_criteria:
146
- - id: AC-001
147
- requirement: REQ-001
148
- criteria: [验收标准]
149
- test_type: [unit/integration/e2e]
150
-
151
- design_decisions:
152
- - id: DD-001
153
- decision: [设计决策]
154
- rationale: [理由]
155
- alternatives_considered: [备选方案]
156
- ```
157
-
158
- ---
159
-
160
- ### Step 4: 保存 specification.yaml
161
-
162
- 保存到 `<project-root>/.sprint-state/phase-outputs/specification.yaml`
163
-
164
- ---
165
-
166
- ## 暂停点
167
-
168
- | 暂停点 | 触发条件 | 用户操作 |
169
- |--------|---------|---------|
170
- | taste_decisions 确认 | autoplan 无法自动决策 | 用户确认每个决策 |
171
- | delphi-review APPROVED | Round 结果 REQUEST_CHANGES | 用户修复并重新评审 |
172
-
173
- ---
174
-
175
- ## 输出
176
-
177
- - specification.yaml
178
- - 进入 Phase 2 自动执行(除非 `--stop-at plan`)
@@ -1,215 +0,0 @@
1
- # Phase 3: REVIEW + TEST(验证)
2
-
3
- ## 目标
4
-
5
- 多专家代码走查、测试对齐、浏览器测试。确保 MVP 符合 specification。
6
-
7
- **执行者**: orchestrator 直接执行全部步骤(非 subagent dispatch)— Issue #249。
8
-
9
- Web 前端项目额外增加:系统化 QA、视觉审计、性能基线。
10
-
11
- ---
12
-
13
- ## 调用 Skills
14
-
15
- **所有项目**:
16
- - `delphi-review --mode code-walkthrough` — 多专家匿名代码走查(2-3 domestic models, ≥90% consensus)
17
- - `test-specification-alignment` — 测试与 Spec 对齐验证
18
- - `browse` (gstack) — 浏览器自动化测试
19
-
20
- **Web 前端项目额外注入** (`--type web-nextjs` / `web-react` / `web-vue`):
21
- - `qa` (gstack) — 三层 QA(Quick/Standard/Exhaustive)系统化测试
22
- - `design-review` (gstack) — 线上 UI 视觉审计(间距、层级、AI slop 检测)
23
- - `benchmark` (gstack) — Core Web Vitals 性能基线
24
-
25
- **Mobile 项目额外注入** (`--type mobile-flutter` / `mobile-react-native`):
26
- - `flutter-test` — Flutter 单元测试 + widget 测试 (Flutter only)
27
- - Detox E2E — React Native 端到端测试 (RN only)
28
- - `flutter-review` (user) — Flutter 代码审查 (Flutter only)
29
-
30
- **Backend 项目额外注入** (`--type backend-go` / `backend-springboot` / `backend-django`):
31
- - API Testing — 后端 API 自动化测试
32
-
33
- ---
34
-
35
- ## 执行步骤
36
-
37
- ### Step 1: 调用 delphi-review --mode code-walkthrough
38
-
39
- ```
40
- skill(name="delphi-review", user_message="--mode code-walkthrough")
41
- ```
42
-
43
- delphi code-walkthrough 执行:
44
- - 2-3 位国内模型专家匿名独立评审(DeepSeek-v4-pro + Kimi-K2.6 + Qwen3.6-Plus)
45
- - Round 1: 匿名独立评审(防止 anchoring bias)
46
- - Round 2: 交换意见,响应关切
47
- - Round 3: 最终立场(如需)
48
- - ≥90% 共识 + APPROVED 才通过
49
-
50
- **如果 REQUEST_CHANGES**:
51
- - ⚠️ 暂停等待用户处理 Critical Issues + Major Concerns(orchestrator 直接执行,可交互)
52
- - 修复后回到 Round 2 重新评审
53
-
54
- **如果 APPROVED**:
55
- - 写入 `.code-walkthrough-result.json`(1 小时有效期)
56
- - 进入 Step 2
57
-
58
- ### Step 2: 调用 test-specification-alignment
59
-
60
- ```
61
- skill(name="test-specification-alignment", user_message="--spec specification.yaml --tests mvp-v1/tests")
62
- ```
63
-
64
- Phase 1: 验证对齐(可修改测试) → Phase 2: 执行测试(禁止修改测试)
65
-
66
- 失败 → 回退 Phase 2 自动修复。通过 → 进入 Step 3。
67
-
68
- ### Step 2.5: Web 前端 — 调用 qa(如适用)
69
-
70
- **IF project_type is web-nextjs / web-react / web-vue:**
71
-
72
- ```
73
- skill(name="qa", user_message="Standard: [部署 URL 或 localhost:3000]")
74
- ```
75
-
76
- qa 三层可选:
77
- - Quick: 只测 critical + high 问题
78
- - Standard (推荐): critical + high + medium
79
- - Exhaustive: 包括 cosmetic
80
-
81
- 输出: before/after health scores + fix evidence + ship-readiness summary
82
-
83
- ### Step 2.6: Web 前端 — 调用 design-review(如适用)
84
-
85
- **IF project_type is web-nextjs / web-react / web-vue:**
86
-
87
- ```
88
- skill(name="design-review", user_message="审计 [部署 URL] 的视觉设计")
89
- ```
90
-
91
- design-review 检查:
92
- - 视觉一致性(间距、颜色、字体)
93
- - 层级问题(信息架构、布局)
94
- - AI slop 模式(重复布局、过度设计)
95
- - 交互响应(动画、加载状态)
96
-
97
- 迭代修复,每次提交原子化。
98
-
99
- ### Step 2.7: Web 前端 — 调用 benchmark(如适用)
100
-
101
- **IF project_type is web-nextjs / web-react / web-vue:**
102
-
103
- ```
104
- skill(name="benchmark", user_message="建立 [部署 URL] 的性能基线")
105
- ```
106
-
107
- benchmark 测量:
108
- - 页面加载时间
109
- - Core Web Vitals (LCP, FID, CLS)
110
- - 资源大小
111
- - 与上次部署对比
112
-
113
- ### Step 2.8: Mobile — Flutter 测试(如适用)
114
-
115
- **IF project_type is mobile-flutter:**
116
-
117
- ```bash
118
- flutter test --coverage 2>&1 | tail -20
119
- ```
120
-
121
- flutter-test 输出:
122
- - 测试通过率
123
- - 覆盖率统计
124
- - Widget 测试结果
125
-
126
- ### Step 2.9: Mobile — React Native 测试(如适用)
127
-
128
- **IF project_type is mobile-react-native:**
129
-
130
- ```bash
131
- npx detox test 2>&1 | tail -20
132
- ```
133
-
134
- RN E2E 输出:
135
- - Detox 测试结果
136
- - 模拟器/真机行为验证
137
-
138
- ### Step 2.10: API 自动化测试(后端项目如适用)
139
-
140
- **IF project_type is backend-go/backend-springboot/backend-django:**
141
-
142
- ```bash
143
- skill(name="api-test", user_message="针对 [API endpoint] 运行自动化测试")
144
- ```
145
-
146
- **Backend 类型支持**:
147
- - **Go (backend-go)**: 使用 httpbakery 或原生 net/http 测试
148
- - **Spring Boot (backend-springboot)**: 使用 RestAssured 或 TestRestTemplate
149
- - **Django (backend-django)**: 使用 Django REST framework 测试客户端或 pytest-django
150
-
151
- **API 测试覆盖**:
152
- - 所有 API 端点测试 (GET, POST, PUT, DELETE)
153
- - 响应状态码验证
154
- - 响应数据结构验证(符合 Spec)
155
- - 认证端点测试
156
- - 错误处理测试 (400, 401, 403, 404, 500)
157
-
158
- API 测试失败 → 自动回退 Phase 2 修复。
159
-
160
- ### Step 3: 调用 browse skill
161
-
162
- ```
163
- skill(name="browse", user_message="--url [URL] --test-ui")
164
- ```
165
-
166
- **默认**: `localhost:3000`
167
-
168
- **Web 前端扩展支持**:
169
- - 部署环境 URL 测试(如 Vercel/Render/Netlify)
170
- - 响应式布局测试(mobile/tablet/desktop)
171
- - 表单交互测试(提交、验证)
172
- - 认证页面测试(login/register)
173
-
174
- browse 执行:
175
- - 启动 Chromium
176
- - 测试 UI/UX
177
- - 截图验证
178
-
179
- 发现问题 → 回退 Phase 2 修复。通过 → 进入 Step 4。
180
-
181
- ### Step 4: 保存 Review Report
182
-
183
- 保存到 `<project-root>/.sprint-state/phase-outputs/review-report.md`
184
-
185
- 包含:
186
- - delphi code-walkthrough result
187
- - test-specification-alignment result
188
- - qa report (web only)
189
- - design-review report (web only)
190
- - benchmark baseline (web only)
191
- - browse screenshots
192
-
193
- ---
194
-
195
- ## 暂停点
196
-
197
- | 暂停点 | 触发条件 | 用户操作 |
198
- |--------|---------|---------|
199
- | delphi code-walkthrough REQUEST_CHANGES | Critical Issues 未修复 | 用户修复 → 重新评审 → APPROVED → 继续 |
200
- | test-alignment 失败 | 自动回退 Phase 2(不暂停) | 自动迭代 |
201
- | qa 发现问题 (web) | 自动回退修复(不暂停) | 自动迭代 |
202
- | design-review 发现问题 (web) | 自动回退修复(不暂停) | 自动迭代 |
203
- | api-test 失败 (backend) | 自动回退 Phase 2(不暂停) | 自动迭代 |
204
- | browse 发现问题 | 自动回退 Phase 2(不暂停) | 自动迭代 |
205
-
206
- ---
207
-
208
- ## 输出
209
-
210
- - `.code-walkthrough-result.json`(pre-push hook 验证)
211
- - Review Report (`review-report.md`)
212
- - Web 前端附加: QA report + design-review report + benchmark baseline
213
- - Backend 附加: API test report
214
- - 验证通过的 MVP
215
- - 进入 Phase 4 ⚠️ **必须人工验收**
@@ -1,125 +0,0 @@
1
- # Phase 4: USER ACCEPTANCE(⚠️ 人工验收)
2
-
3
- ## 目标
4
-
5
- 用户实际使用 MVP,发现 Emergent 问题。这是 AI 无法预测的环节。
6
-
7
- ---
8
-
9
- ## ⚠️ 关键说明
10
-
11
- **这是 Emergent Requirements 发现环节。**
12
-
13
- - AI 无法预测用户看到产品后才发现的问题
14
- - 78% 的软件失败是用户使用时发现的,不是开发阶段发现的
15
- - 必须由用户实际使用验收
16
-
17
- ---
18
-
19
- ## 调用 Skills
20
-
21
- **无** — 必须人工
22
-
23
- ---
24
-
25
- ## 执行步骤
26
-
27
- ### Step 1: 提示用户开始验收
28
-
29
- ```
30
- ⚠️ Phase 4: USER ACCEPTANCE
31
-
32
- MVP 已通过自动化验证,现在需要您实际使用验收。
33
-
34
- 请按照以下步骤:
35
- 1. 启动应用(或访问部署地址)
36
- 2. 使用 Emergent Issues 检查清单进行验收
37
- 3. 记录发现的问题
38
- 4. 完成后确认是否继续
39
-
40
- 验收完成后,请回复:
41
- - "验收通过" → 进入 Phase 5
42
- - "发现问题" → 填写 emergent-issues.md
43
- ```
44
-
45
- ---
46
-
47
- ### Step 2: 用户实际使用 MVP
48
-
49
- 用户按照 Emergent Issues 检查清单验收:
50
-
51
- 使用模板:`@templates/emergent-issues-template.md`
52
-
53
- 检查维度:
54
- 1. **核心功能体验** (Core Functionality UX)
55
- 2. **多轮交互体验** (Multi-turn Interaction UX)
56
- 3. **视觉/交互体验** (Visual/Interaction UX)
57
- 4. **用户认知负担** (Cognitive Load)
58
- 5. **意外发现** (Unexpected Observations)
59
-
60
- ---
61
-
62
- ### Step 3: 记录 Emergent Issues
63
-
64
- 用户填写 `emergent-issues.md`:
65
-
66
- ```markdown
67
- # Emergent Issues - [需求名称]
68
-
69
- ## 验收日期
70
- YYYY-MM-DD
71
-
72
- ## 发现的问题
73
-
74
- ### Critical
75
- | 问题描述 | 影响范围 | 发现场景 |
76
- |---------|---------|---------|
77
-
78
- ### Major
79
- | 问题描述 | 影响范围 | 发现场景 |
80
- |---------|---------|---------|
81
-
82
- ### Minor
83
- | 问题描述 | 影响范围 | 发现场景 |
84
- |---------|---------|---------|
85
-
86
- ## 验收结论
87
- - [ ] ✅ 验收通过,进入 Phase 5
88
- - [ ] ⚠️ 发现问题需 Sprint 2 迭代
89
- ```
90
-
91
- ---
92
-
93
- ### Step 4: 保存 Emergent Issues
94
-
95
- 保存到 `<project-root>/.sprint-state/phase-outputs/emergent-issues.md`
96
-
97
- ---
98
-
99
- ## 暂停点
100
-
101
- **⚠️ 必须等待用户验收完成**
102
-
103
- - 用户确认验收结果后才能继续
104
- - 如果发现重大问题 → Sprint 2 回到 Phase 0
105
-
106
- ---
107
-
108
- ## Sprint 2 触发逻辑
109
-
110
- ```
111
- Sprint 结束时 (Phase 6 完成):
112
- IF emergent_issues_count == 0 → sprint_completed,结束流程
113
-
114
- IF emergent_issues_count > 0:
115
- ├─ IF emergent_issues 有 Critical → 自动启动 Sprint 2
116
- ├─ IF emergent_issues 仅 Major/Minor → 询问用户
117
- └─ Sprint 2 Pain Document 从 emergent-issues.md 转化
118
- ```
119
-
120
- ---
121
-
122
- ## 输出
123
-
124
- - Emergent Issues List (`emergent-issues.md`)
125
- - 进入 Phase 5 自动执行(如果用户确认验收)
@@ -1,100 +0,0 @@
1
- # Phase 5: FEEDBACK CAPTURE(反馈捕获)
2
-
3
- ## 目标
4
-
5
- 记录 Emergent 发现,工程回顾(团队级),持续改进。为 Sprint 2 准备 Pain Document。
6
-
7
- ---
8
-
9
- ## 调用 Skills
10
-
11
- - `learn` (gstack) — 模式记录(个人级)
12
- - `retro` (gstack) _(新增)_ — 周工程回顾:提交历史、工作模式、代码质量趋势(团队级)
13
- - `systematic-debugging` (superpowers) _(可选)_ — 根因调试:反馈中的 bug 做根因分析
14
-
15
- ---
16
-
17
- ## 执行步骤
18
-
19
- ### Step 1: 调用 learn skill
20
-
21
- ```
22
- skill(name="learn", user_message="[Emergent Issues 内容 + Sprint 总结]")
23
- ```
24
-
25
- learn 执行:
26
- - 记录本次 Sprint 的 emergent 发现
27
- - 转化为 CLAUDE.md 规则
28
- - 更新 institutional memory
29
-
30
- ### Step 2: 工程回顾 — 调用 retro(新增 — ISSUE32)
31
-
32
- ```
33
- skill(name="retro")
34
- ```
35
-
36
- retro 执行:
37
- - **提交历史分析**: 本次 Sprint 的 commits、工作模式
38
- - **代码质量趋势**: 结合 Phase 3 的 benchmark 数据,展示质量变化
39
- - **团队贡献分解**: 每人贡献比例 + praise + growth areas
40
- - **改进建议**: 下次 Sprint 的改进点
41
-
42
- 输出: Retro 报告(周级工程回顾)
43
-
44
- ### Step 3: 根因调试(可选 — ISSUE32)
45
-
46
- **IF Phase 4 发现 bug 或 Phase 3 验证失败**:
47
- ```
48
- skill(name="systematic-debugging", user_message="[具体 bug 描述]")
49
- ```
50
-
51
- systematic-debugging 执行 4 阶段:
52
- 1. Investigate(根因调查)
53
- 2. Analyze(分析)
54
- 3. Hypothesize(假设验证)
55
- 4. Implement(修复)
56
-
57
- **Iron Law**: 无调查 → 不修复
58
-
59
- ### Step 4: 转化 Emergent Issues 为 Sprint 2 Pain Document
60
-
61
- 如果有 emergent issues,转化为新需求:
62
- ```markdown
63
- # Sprint 2 Pain Document
64
-
65
- ## 来源
66
- 基于 Sprint 1 的 Emergent Issues
67
-
68
- ## Critical Issues (自动进入 Sprint 2)
69
- | Issue | Sprint 1 描述 | Sprint 2 目标 |
70
- |-------|--------------|--------------|
71
-
72
- ## Major Issues (询问用户是否纳入)
73
- | Issue | Sprint 1 描述 | Sprint 2 目标 |
74
- |-------|--------------|--------------|
75
-
76
- ## Minor Issues (可选纳入)
77
- | Issue | Sprint 1 描述 | Sprint 2 目标 |
78
- |-------|--------------|--------------|
79
- ```
80
-
81
- ### Step 5: 保存 Feedback Log 和 Sprint 2 Pain Document
82
-
83
- 保存到:
84
- - `<project-root>/.sprint-state/phase-outputs/feedback-log.md`
85
- - `<project-root>/.sprint-state/phase-outputs/sprint2-pain.md` (如有 emergent issues)
86
-
87
- ---
88
-
89
- ## 暂停点
90
-
91
- **无** — Phase 5 完成后自动进入 Phase 6
92
-
93
- ---
94
-
95
- ## 输出
96
-
97
- - Feedback Log (`feedback-log.md`)
98
- - Retro Report(retro 输出)
99
- - Sprint 2 Pain Document (`sprint2-pain.md`) — 如果有 emergent issues
100
- - 进入 Phase 6 自动执行
@@ -1,9 +0,0 @@
1
- # Phase 6: SHIP + DEPLOY(发布)
2
-
3
- **完整指令**: @see SKILL.md `## Phase 6: SHIP` section.
4
-
5
- **摘要**: 结构化分支完成决策, 创建 PR, 合并部署, 监控. 生成 Sprint Summary.
6
-
7
- **关键链**: PHASE5-GATE → verification → finishing-a-development-branch(4选项) → ship → land-and-deploy → canary → Sprint Summary
8
-
9
- **输出**: PR URL, Sprint Summary
@@ -1,9 +0,0 @@
1
- # Phase 7: LAND(合并 + 部署)
2
-
3
- **完整指令**: @see SKILL.md `## Phase 7: LAND` section.
4
-
5
- **摘要**: 自动合并 PR, 等待 CI, 执行部署, Canary Health Check, 失败自动回滚.
6
-
7
- **关键链**: merge PR → wait CI(10min) → wait Deploy(10min) → Canary Health Check(5min) → auto-rollback on failure
8
-
9
- **输出**: 部署状态 (success/failure/skipped), Canary 报告
@@ -1,9 +0,0 @@
1
- # Phase 8: CLEANUP(清理 + 总结)
2
-
3
- **完整指令**: @see SKILL.md `## Phase 8: CLEANUP` section.
4
-
5
- **摘要**: 自动清理 worktree, 更新 sprint-state.json, 输出 Sprint Summary, 处理 emergent issues.
6
-
7
- **关键链**: worktree detection → remove(retry×3) → residual check → sprint-state update → Sprint Summary → emergent issues(→Sprint 2?)
8
-
9
- **输出**: Cleanup Report, Sprint Summary