specops 0.2.4 → 0.3.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 (160) hide show
  1. package/.opencode/agent/specops-codebase-mapper.md +764 -0
  2. package/.opencode/agent/specops-debugger.md +1246 -0
  3. package/.opencode/agent/specops-executor.md +469 -0
  4. package/.opencode/agent/specops-integration-checker.md +443 -0
  5. package/.opencode/agent/specops-phase-researcher.md +547 -0
  6. package/.opencode/agent/specops-plan-checker.md +690 -0
  7. package/.opencode/agent/specops-planner.md +575 -0
  8. package/.opencode/agent/specops-project-researcher.md +354 -0
  9. package/.opencode/agent/specops-research-synthesizer.md +239 -0
  10. package/.opencode/agent/specops-roadmapper.md +642 -0
  11. package/.opencode/agent/specops-work-verifier.md +573 -0
  12. package/.opencode/references/checkpoints.md +776 -0
  13. package/.opencode/references/continuation-format.md +249 -0
  14. package/.opencode/references/decimal-phase-calculation.md +65 -0
  15. package/.opencode/references/git-integration.md +248 -0
  16. package/.opencode/references/git-planning-commit.md +38 -0
  17. package/.opencode/references/model-profile-resolution.md +34 -0
  18. package/.opencode/references/model-profiles.md +92 -0
  19. package/.opencode/references/phase-argument-parsing.md +61 -0
  20. package/.opencode/references/planning-config.md +196 -0
  21. package/.opencode/references/questioning.md +145 -0
  22. package/.opencode/references/tdd.md +263 -0
  23. package/.opencode/references/ui-brand.md +160 -0
  24. package/.opencode/references/verification-patterns.md +612 -0
  25. package/.opencode/skills/demand-analysis/SKILL.md +142 -10
  26. package/.opencode/templates/DEBUG.md +164 -0
  27. package/.opencode/templates/UAT.md +180 -0
  28. package/.opencode/templates/VALIDATION.md +76 -0
  29. package/.opencode/templates/codebase/architecture.md +255 -0
  30. package/.opencode/templates/codebase/concerns.md +310 -0
  31. package/.opencode/templates/codebase/conventions.md +307 -0
  32. package/.opencode/templates/codebase/integrations.md +280 -0
  33. package/.opencode/templates/codebase/stack.md +186 -0
  34. package/.opencode/templates/codebase/structure.md +285 -0
  35. package/.opencode/templates/codebase/testing.md +480 -0
  36. package/.opencode/templates/context.md +221 -0
  37. package/.opencode/templates/continue-here.md +78 -0
  38. package/.opencode/templates/debug-subagent-prompt.md +91 -0
  39. package/.opencode/templates/discovery.md +147 -0
  40. package/.opencode/templates/milestone-archive.md +123 -0
  41. package/.opencode/templates/milestone.md +115 -0
  42. package/.opencode/templates/phase-prompt.md +333 -0
  43. package/.opencode/templates/planner-subagent-prompt.md +117 -0
  44. package/.opencode/templates/project.md +184 -0
  45. package/.opencode/templates/requirements.md +130 -0
  46. package/.opencode/templates/research-project/ARCHITECTURE.md +204 -0
  47. package/.opencode/templates/research-project/FEATURES.md +147 -0
  48. package/.opencode/templates/research-project/PITFALLS.md +200 -0
  49. package/.opencode/templates/research-project/STACK.md +120 -0
  50. package/.opencode/templates/research-project/SUMMARY.md +170 -0
  51. package/.opencode/templates/research.md +278 -0
  52. package/.opencode/templates/retrospective.md +54 -0
  53. package/.opencode/templates/roadmap.md +202 -0
  54. package/.opencode/templates/state.md +176 -0
  55. package/.opencode/templates/summary-complex.md +59 -0
  56. package/.opencode/templates/summary-minimal.md +41 -0
  57. package/.opencode/templates/summary-standard.md +48 -0
  58. package/.opencode/templates/summary.md +248 -0
  59. package/.opencode/templates/user-setup.md +311 -0
  60. package/.opencode/templates/verification-report.md +322 -0
  61. package/.opencode/workflows/add-phase.md +111 -0
  62. package/.opencode/workflows/add-tests.md +350 -0
  63. package/.opencode/workflows/add-todo.md +157 -0
  64. package/.opencode/workflows/audit-milestone.md +297 -0
  65. package/.opencode/workflows/check-todos.md +176 -0
  66. package/.opencode/workflows/cleanup.md +152 -0
  67. package/.opencode/workflows/complete-milestone.md +763 -0
  68. package/.opencode/workflows/diagnose-issues.md +219 -0
  69. package/.opencode/workflows/discovery-phase.md +288 -0
  70. package/.opencode/workflows/discuss-phase.md +542 -0
  71. package/.opencode/workflows/execute-phase.md +449 -0
  72. package/.opencode/workflows/execute-plan.md +447 -0
  73. package/.opencode/workflows/health.md +156 -0
  74. package/.opencode/workflows/help.md +489 -0
  75. package/.opencode/workflows/insert-phase.md +129 -0
  76. package/.opencode/workflows/list-phase-assumptions.md +178 -0
  77. package/.opencode/workflows/map-codebase.md +315 -0
  78. package/.opencode/workflows/new-milestone.md +382 -0
  79. package/.opencode/workflows/new-project.md +1116 -0
  80. package/.opencode/workflows/pause-work.md +122 -0
  81. package/.opencode/workflows/plan-milestone-gaps.md +274 -0
  82. package/.opencode/workflows/plan-phase.md +569 -0
  83. package/.opencode/workflows/progress.md +381 -0
  84. package/.opencode/workflows/quick.md +453 -0
  85. package/.opencode/workflows/remove-phase.md +154 -0
  86. package/.opencode/workflows/research-phase.md +73 -0
  87. package/.opencode/workflows/resume-project.md +304 -0
  88. package/.opencode/workflows/set-profile.md +80 -0
  89. package/.opencode/workflows/settings.md +213 -0
  90. package/.opencode/workflows/transition.md +544 -0
  91. package/.opencode/workflows/update.md +219 -0
  92. package/.opencode/workflows/verify-phase.md +242 -0
  93. package/.opencode/workflows/verify-work.md +569 -0
  94. package/commands/specops/add-phase.md +43 -0
  95. package/commands/specops/add-tests.md +41 -0
  96. package/commands/specops/add-todo.md +47 -0
  97. package/commands/specops/audit-milestone.md +36 -0
  98. package/commands/specops/check-todos.md +45 -0
  99. package/commands/specops/cleanup.md +18 -0
  100. package/commands/specops/complete-milestone.md +136 -0
  101. package/commands/specops/debug.md +167 -0
  102. package/commands/specops/discuss-phase.md +83 -0
  103. package/commands/specops/execute-phase.md +41 -0
  104. package/commands/specops/health.md +22 -0
  105. package/commands/specops/help.md +22 -0
  106. package/commands/specops/insert-phase.md +32 -0
  107. package/commands/specops/join-discord.md +18 -0
  108. package/commands/specops/list-phase-assumptions.md +46 -0
  109. package/commands/specops/map-codebase.md +71 -0
  110. package/commands/specops/new-milestone.md +44 -0
  111. package/commands/specops/new-project.md +42 -0
  112. package/commands/specops/pause-work.md +38 -0
  113. package/commands/specops/plan-milestone-gaps.md +34 -0
  114. package/commands/specops/plan-phase.md +45 -0
  115. package/commands/specops/progress.md +24 -0
  116. package/commands/specops/quick.md +41 -0
  117. package/commands/specops/reapply-patches.md +111 -0
  118. package/commands/specops/remove-phase.md +31 -0
  119. package/commands/specops/research-phase.md +189 -0
  120. package/commands/specops/resume-work.md +40 -0
  121. package/commands/specops/set-profile.md +34 -0
  122. package/commands/specops/settings.md +36 -0
  123. package/commands/specops/update.md +37 -0
  124. package/commands/specops/verify-work.md +38 -0
  125. package/dist/__e2e__/01-state-engine.e2e.test.js +1 -1
  126. package/dist/acceptance/lazyDetector.js +1 -1
  127. package/dist/acceptance/lazyDetector.test.js +1 -1
  128. package/dist/acceptance/reporter.js +1 -1
  129. package/dist/acceptance/reporter.test.js +1 -1
  130. package/dist/acceptance/runner.js +1 -1
  131. package/dist/acceptance/runner.test.js +1 -1
  132. package/dist/cli.js +1 -1
  133. package/dist/context/index.js +1 -1
  134. package/dist/context/promptTemplate.js +1 -1
  135. package/dist/context/promptTemplate.test.js +1 -1
  136. package/dist/context/techContextLoader.js +1 -1
  137. package/dist/context/techContextLoader.test.js +1 -1
  138. package/dist/engine.js +1 -1
  139. package/dist/evolution/distiller.js +1 -1
  140. package/dist/evolution/index.js +1 -1
  141. package/dist/evolution/memoryGraph.js +1 -1
  142. package/dist/evolution/selector.js +1 -1
  143. package/dist/evolution/signals.js +1 -1
  144. package/dist/evolution/solidify.js +1 -1
  145. package/dist/evolution/store.js +1 -1
  146. package/dist/evolution/types.js +1 -1
  147. package/dist/init.d.ts +4 -3
  148. package/dist/init.js +1 -1
  149. package/dist/machines/agentMachine.js +1 -1
  150. package/dist/machines/agentMachine.test.js +1 -1
  151. package/dist/machines/supervisorMachine.js +1 -1
  152. package/dist/machines/supervisorMachine.test.js +1 -1
  153. package/dist/persistence/schema.js +1 -1
  154. package/dist/persistence/stateFile.js +1 -1
  155. package/dist/persistence/stateFile.test.js +1 -1
  156. package/dist/plugin-engine.js +1 -1
  157. package/dist/plugin.js +1 -1
  158. package/dist/types/index.js +1 -1
  159. package/dist/utils/id.js +1 -1
  160. package/package.json +2 -1
@@ -0,0 +1,1116 @@
1
+ <purpose>
2
+ 通过统一流程初始化新项目:提问、研究(可选)、需求、路线图。这是任何项目中最具杠杆效应的时刻——在这里深入提问意味着更好的计划、更好的执行、更好的结果。一个工作流带你从想法到准备规划。
3
+ </purpose>
4
+
5
+ <required_reading>
6
+ 在开始之前,阅读调用提示的 execution_context 中引用的所有文件。
7
+ </required_reading>
8
+
9
+ <auto_mode>
10
+ ## 自动模式检测
11
+
12
+ 检查 $ARGUMENTS 中是否存在 `--auto` 标志。
13
+
14
+ **如果是自动模式:**
15
+ - 跳过棕地映射提议(假设为绿地项目)
16
+ - 跳过深度提问(从提供的文档中提取上下文)
17
+ - 配置:YOLO 模式是隐含的(跳过该问题),但先询问深度/git/agents(步骤 2a)
18
+ - 配置完成后:使用智能默认值自动运行步骤 6-9:
19
+ - 研究:始终是
20
+ - 需求:包含提供文档中的所有基本功能 + 特性
21
+ - 需求审批:自动批准
22
+ - 路线图审批:自动批准
23
+
24
+ **文档要求:**
25
+ 自动模式需要一个想法文档——以下任一:
26
+ - 文件引用:`/specops:new-project --auto @prd.md`
27
+ - 在提示中粘贴/编写的文本
28
+
29
+ 如果未提供文档内容,报错:
30
+
31
+ ```
32
+ Error: --auto requires an idea document.
33
+
34
+ Usage:
35
+ /specops:new-project --auto @your-idea.md
36
+ /specops:new-project --auto [paste or write your idea here]
37
+
38
+ The document should describe what you want to build.
39
+ ```
40
+ </auto_mode>
41
+
42
+ <process>
43
+
44
+ ## 1. 设置
45
+
46
+ **必须首先执行——在任何用户交互之前执行这些检查:**
47
+
48
+ ```bash
49
+ INIT=$(node .opencode/bin/specops-tools.cjs init new-project)
50
+ ```
51
+
52
+ 解析 JSON 获取:`researcher_model`、`synthesizer_model`、`roadmapper_model`、`commit_docs`、`project_exists`、`has_codebase_map`、`planning_exists`、`has_existing_code`、`has_package_file`、`is_brownfield`、`needs_codebase_map`、`has_git`、`project_path`。
53
+
54
+ **如果 `project_exists` 为 true:** 报错——项目已初始化。使用 `/specops:progress`。
55
+
56
+ **如果 `has_git` 为 false:** 初始化 git:
57
+ ```bash
58
+ git init
59
+ ```
60
+
61
+ ## 2. 棕地提议
62
+
63
+ **如果是自动模式:** 跳到步骤 4(假设为绿地项目,从提供的文档合成 PROJECT.md)。
64
+
65
+ **如果 `needs_codebase_map` 为 true**(来自 init——检测到现有代码但没有代码库映射):
66
+
67
+ 使用 AskUserQuestion:
68
+ - header: "Codebase"
69
+ - question: "我检测到此目录中有现有代码。你想先映射代码库吗?"
70
+ - options:
71
+ - "先映射代码库" — 运行 /specops:map-codebase 了解现有架构(推荐)
72
+ - "跳过映射" — 继续项目初始化
73
+
74
+ **如果"先映射代码库":**
75
+ ```
76
+ 先运行 `/specops:map-codebase`,然后返回 `/specops:new-project`
77
+ ```
78
+ 退出命令。
79
+
80
+ **如果"跳过映射"或 `needs_codebase_map` 为 false:** 继续到步骤 3。
81
+
82
+ ## 2a. 自动模式配置(仅自动模式)
83
+
84
+ **如果是自动模式:** 在处理想法文档之前先收集配置设置。
85
+
86
+ YOLO 模式是隐含的(auto = YOLO)。询问剩余配置问题:
87
+
88
+ **第 1 轮——核心设置(3 个问题,无 Mode 问题):**
89
+
90
+ ```
91
+ AskUserQuestion([
92
+ {
93
+ header: "Depth",
94
+ question: "规划应该多详尽?",
95
+ multiSelect: false,
96
+ options: [
97
+ { label: "Quick (Recommended)", description: "快速交付(3-5 个阶段,每个 1-3 个计划)" },
98
+ { label: "Standard", description: "平衡范围和速度(5-8 个阶段,每个 3-5 个计划)" },
99
+ { label: "Comprehensive", description: "全面覆盖(8-12 个阶段,每个 5-10 个计划)" }
100
+ ]
101
+ },
102
+ {
103
+ header: "Execution",
104
+ question: "并行运行计划?",
105
+ multiSelect: false,
106
+ options: [
107
+ { label: "Parallel (Recommended)", description: "独立计划同时运行" },
108
+ { label: "Sequential", description: "一次一个计划" }
109
+ ]
110
+ },
111
+ {
112
+ header: "Git Tracking",
113
+ question: "将规划文档提交到 git?",
114
+ multiSelect: false,
115
+ options: [
116
+ { label: "Yes (Recommended)", description: "规划文档纳入版本控制" },
117
+ { label: "No", description: "保持 .planning/ 仅本地(添加到 .gitignore)" }
118
+ ]
119
+ }
120
+ ])
121
+ ```
122
+
123
+ **第 2 轮——工作流 Agent(与步骤 5 相同):**
124
+
125
+ ```
126
+ AskUserQuestion([
127
+ {
128
+ header: "Research",
129
+ question: "在规划每个阶段前进行研究?(增加 token/时间)",
130
+ multiSelect: false,
131
+ options: [
132
+ { label: "Yes (Recommended)", description: "调查领域,发现模式,发掘陷阱" },
133
+ { label: "No", description: "直接从需求开始规划" }
134
+ ]
135
+ },
136
+ {
137
+ header: "Plan Check",
138
+ question: "验证计划是否能达成目标?(增加 token/时间)",
139
+ multiSelect: false,
140
+ options: [
141
+ { label: "Yes (Recommended)", description: "在执行开始前发现缺口" },
142
+ { label: "No", description: "不验证直接执行计划" }
143
+ ]
144
+ },
145
+ {
146
+ header: "Verifier",
147
+ question: "每个阶段后验证工作是否满足需求?(增加 token/时间)",
148
+ multiSelect: false,
149
+ options: [
150
+ { label: "Yes (Recommended)", description: "确认交付物匹配阶段目标" },
151
+ { label: "No", description: "信任执行,跳过验证" }
152
+ ]
153
+ },
154
+ {
155
+ header: "AI Models",
156
+ question: "规划 Agent 使用哪些 AI 模型?",
157
+ multiSelect: false,
158
+ options: [
159
+ { label: "Balanced (Recommended)", description: "大多数 Agent 使用 Sonnet——良好的质量/成本比" },
160
+ { label: "Quality", description: "研究/路线图使用 Opus——更高成本,更深入分析" },
161
+ { label: "Budget", description: "尽可能使用 Haiku——最快,最低成本" }
162
+ ]
163
+ }
164
+ ])
165
+ ```
166
+
167
+ 创建 `.planning/config.json`,mode 设为 "yolo":
168
+
169
+ ```json
170
+ {
171
+ "mode": "yolo",
172
+ "depth": "[selected]",
173
+ "parallelization": true|false,
174
+ "commit_docs": true|false,
175
+ "model_profile": "quality|balanced|budget",
176
+ "workflow": {
177
+ "research": true|false,
178
+ "plan_check": true|false,
179
+ "verifier": true|false,
180
+ "auto_advance": true
181
+ }
182
+ }
183
+ ```
184
+
185
+ **如果 commit_docs = No:** 将 `.planning/` 添加到 `.gitignore`。
186
+
187
+ **提交 config.json:**
188
+
189
+ ```bash
190
+ mkdir -p .planning
191
+ node .opencode/bin/specops-tools.cjs commit "chore: add project config" --files .planning/config.json
192
+ ```
193
+
194
+ **将自动推进持久化到配置(在上下文压缩后仍然有效):**
195
+
196
+ ```bash
197
+ node .opencode/bin/specops-tools.cjs config-set workflow.auto_advance true
198
+ ```
199
+
200
+ 继续到步骤 4(跳过步骤 3 和 5)。
201
+
202
+ ## 3. 深度提问
203
+
204
+ **如果是自动模式:** 跳过(已在步骤 2a 中处理)。改为从提供的文档中提取项目上下文,然后继续到步骤 4。
205
+
206
+ **显示阶段横幅:**
207
+
208
+ ```
209
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
210
+ SpecOps ► 提问阶段
211
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
212
+ ```
213
+
214
+ **开启对话:**
215
+
216
+ 内联提问(自由形式,不使用 AskUserQuestion):
217
+
218
+ "你想构建什么?"
219
+
220
+ 等待他们的回复。这为你提供了提出智能后续问题所需的上下文。
221
+
222
+ **跟随线索:**
223
+
224
+ 根据他们所说的内容,提出深入其回复的后续问题。使用 AskUserQuestion 并提供探究他们提到内容的选项——解读、澄清、具体示例。
225
+
226
+ 持续跟随线索。每个回答都会打开新的线索去探索。询问:
227
+ - 什么让他们兴奋
228
+ - 什么问题激发了这个想法
229
+ - 模糊术语的含义
230
+ - 实际看起来会是什么样
231
+ - 什么已经决定了
232
+
233
+ 参考 `questioning.md` 获取技巧:
234
+ - 挑战模糊性
235
+ - 将抽象变具体
236
+ - 发掘假设
237
+ - 找到边界
238
+ - 揭示动机
239
+
240
+ **检查上下文(后台进行,不要说出来):**
241
+
242
+ 在进行过程中,心理检查 `questioning.md` 中的上下文清单。如果有缺口,自然地融入问题。不要突然切换到清单模式。
243
+
244
+ **决策门:**
245
+
246
+ 当你能写出清晰的 PROJECT.md 时,使用 AskUserQuestion:
247
+
248
+ - header: "Ready?"
249
+ - question: "我想我理解你的想法了。准备好创建 PROJECT.md 了吗?"
250
+ - options:
251
+ - "创建 PROJECT.md" — 让我们继续
252
+ - "继续探索" — 我想分享更多 / 继续问我
253
+
254
+ 如果"继续探索"——询问他们想添加什么,或识别缺口并自然地探究。
255
+
256
+ 循环直到选择"创建 PROJECT.md"。
257
+
258
+ ## 4. 编写 PROJECT.md
259
+
260
+ **如果是自动模式:** 从提供的文档合成。没有显示"Ready?"门——直接进入提交。
261
+
262
+ 将所有上下文合成到 `.planning/PROJECT.md`,使用 `templates/project.md` 中的模板。
263
+
264
+ **对于绿地项目:**
265
+
266
+ 将需求初始化为假设:
267
+
268
+ ```markdown
269
+ ## Requirements
270
+
271
+ ### Validated
272
+
273
+ (None yet — ship to validate)
274
+
275
+ ### Active
276
+
277
+ - [ ] [需求 1]
278
+ - [ ] [需求 2]
279
+ - [ ] [需求 3]
280
+
281
+ ### Out of Scope
282
+
283
+ - [排除项 1] — [原因]
284
+ - [排除项 2] — [原因]
285
+ ```
286
+
287
+ 所有 Active 需求在交付和验证之前都是假设。
288
+
289
+ **对于棕地项目(代码库映射已存在):**
290
+
291
+ 从现有代码推断 Validated 需求:
292
+
293
+ 1. 阅读 `.planning/codebase/ARCHITECTURE.md` 和 `STACK.md`
294
+ 2. 识别代码库已经做了什么
295
+ 3. 这些成为初始 Validated 集合
296
+
297
+ ```markdown
298
+ ## Requirements
299
+
300
+ ### Validated
301
+
302
+ - ✓ [现有功能 1] — existing
303
+ - ✓ [现有功能 2] — existing
304
+ - ✓ [现有功能 3] — existing
305
+
306
+ ### Active
307
+
308
+ - [ ] [新需求 1]
309
+ - [ ] [新需求 2]
310
+
311
+ ### Out of Scope
312
+
313
+ - [排除项 1] — [原因]
314
+ ```
315
+
316
+ **关键决策:**
317
+
318
+ 用提问期间做出的任何决策初始化:
319
+
320
+ ```markdown
321
+ ## Key Decisions
322
+
323
+ | Decision | Rationale | Outcome |
324
+ |----------|-----------|---------|
325
+ | [提问中的选择] | [原因] | — Pending |
326
+ ```
327
+
328
+ **最后更新页脚:**
329
+
330
+ ```markdown
331
+ ---
332
+ *Last updated: [date] after initialization*
333
+ ```
334
+
335
+ 不要压缩。捕获收集到的所有内容。
336
+
337
+ **提交 PROJECT.md:**
338
+
339
+ ```bash
340
+ mkdir -p .planning
341
+ node .opencode/bin/specops-tools.cjs commit "docs: initialize project" --files .planning/PROJECT.md
342
+ ```
343
+
344
+ ## 5. 工作流偏好
345
+
346
+ **如果是自动模式:** 跳过——配置已在步骤 2a 中收集。继续到步骤 5.5。
347
+
348
+ **检查全局默认值**(`.opencode/defaults.json`)。如果文件存在,提议使用保存的默认值:
349
+
350
+ ```
351
+ AskUserQuestion([
352
+ {
353
+ question: "使用你保存的默认设置?(来自 .opencode/defaults.json)",
354
+ header: "Defaults",
355
+ multiSelect: false,
356
+ options: [
357
+ { label: "Yes (Recommended)", description: "使用保存的默认值,跳过设置问题" },
358
+ { label: "No", description: "手动配置设置" }
359
+ ]
360
+ }
361
+ ])
362
+ ```
363
+
364
+ 如果"Yes":读取 `.opencode/defaults.json`,使用这些值填充 config.json,直接跳到下方的**提交 config.json**。
365
+
366
+ 如果"No"或 `.opencode/defaults.json` 不存在:继续下面的问题。
367
+
368
+ **第 1 轮——核心工作流设置(4 个问题):**
369
+
370
+ ```
371
+ questions: [
372
+ {
373
+ header: "Mode",
374
+ question: "你想如何工作?",
375
+ multiSelect: false,
376
+ options: [
377
+ { label: "YOLO (Recommended)", description: "自动批准,直接执行" },
378
+ { label: "Interactive", description: "每步确认" }
379
+ ]
380
+ },
381
+ {
382
+ header: "Depth",
383
+ question: "规划应该多详尽?",
384
+ multiSelect: false,
385
+ options: [
386
+ { label: "Quick", description: "快速交付(3-5 个阶段,每个 1-3 个计划)" },
387
+ { label: "Standard", description: "平衡范围和速度(5-8 个阶段,每个 3-5 个计划)" },
388
+ { label: "Comprehensive", description: "全面覆盖(8-12 个阶段,每个 5-10 个计划)" }
389
+ ]
390
+ },
391
+ {
392
+ header: "Execution",
393
+ question: "并行运行计划?",
394
+ multiSelect: false,
395
+ options: [
396
+ { label: "Parallel (Recommended)", description: "独立计划同时运行" },
397
+ { label: "Sequential", description: "一次一个计划" }
398
+ ]
399
+ },
400
+ {
401
+ header: "Git Tracking",
402
+ question: "将规划文档提交到 git?",
403
+ multiSelect: false,
404
+ options: [
405
+ { label: "Yes (Recommended)", description: "规划文档纳入版本控制" },
406
+ { label: "No", description: "保持 .planning/ 仅本地(添加到 .gitignore)" }
407
+ ]
408
+ }
409
+ ]
410
+ ```
411
+
412
+ **第 2 轮——工作流 Agent:**
413
+
414
+ 这些在规划/执行期间生成额外的 Agent。它们增加 token 和时间但提高质量。
415
+
416
+ | Agent | 运行时机 | 功能 |
417
+ |-------|----------|------|
418
+ | **Researcher** | 规划每个阶段之前 | 调查领域,发现模式,发掘陷阱 |
419
+ | **Plan Checker** | 计划创建之后 | 验证计划是否真正能达成阶段目标 |
420
+ | **Verifier** | 阶段执行之后 | 确认必要功能已交付 |
421
+
422
+ 重要项目推荐全部启用。快速实验可以跳过。
423
+
424
+ ```
425
+ questions: [
426
+ {
427
+ header: "Research",
428
+ question: "在规划每个阶段前进行研究?(增加 token/时间)",
429
+ multiSelect: false,
430
+ options: [
431
+ { label: "Yes (Recommended)", description: "调查领域,发现模式,发掘陷阱" },
432
+ { label: "No", description: "直接从需求开始规划" }
433
+ ]
434
+ },
435
+ {
436
+ header: "Plan Check",
437
+ question: "验证计划是否能达成目标?(增加 token/时间)",
438
+ multiSelect: false,
439
+ options: [
440
+ { label: "Yes (Recommended)", description: "在执行开始前发现缺口" },
441
+ { label: "No", description: "不验证直接执行计划" }
442
+ ]
443
+ },
444
+ {
445
+ header: "Verifier",
446
+ question: "每个阶段后验证工作是否满足需求?(增加 token/时间)",
447
+ multiSelect: false,
448
+ options: [
449
+ { label: "Yes (Recommended)", description: "确认交付物匹配阶段目标" },
450
+ { label: "No", description: "信任执行,跳过验证" }
451
+ ]
452
+ },
453
+ {
454
+ header: "AI Models",
455
+ question: "规划 Agent 使用哪些 AI 模型?",
456
+ multiSelect: false,
457
+ options: [
458
+ { label: "Balanced (Recommended)", description: "大多数 Agent 使用 Sonnet——良好的质量/成本比" },
459
+ { label: "Quality", description: "研究/路线图使用 Opus——更高成本,更深入分析" },
460
+ { label: "Budget", description: "尽可能使用 Haiku——最快,最低成本" }
461
+ ]
462
+ }
463
+ ]
464
+ ```
465
+
466
+ 创建 `.planning/config.json` 包含所有设置:
467
+
468
+ ```json
469
+ {
470
+ "mode": "yolo|interactive",
471
+ "depth": "quick|standard|comprehensive",
472
+ "parallelization": true|false,
473
+ "commit_docs": true|false,
474
+ "model_profile": "quality|balanced|budget",
475
+ "workflow": {
476
+ "research": true|false,
477
+ "plan_check": true|false,
478
+ "verifier": true|false
479
+ }
480
+ }
481
+ ```
482
+
483
+ **如果 commit_docs = No:**
484
+ - 在 config.json 中设置 `commit_docs: false`
485
+ - 将 `.planning/` 添加到 `.gitignore`(如需要则创建)
486
+
487
+ **如果 commit_docs = Yes:**
488
+ - 不需要额外的 gitignore 条目
489
+
490
+ **提交 config.json:**
491
+
492
+ ```bash
493
+ node .opencode/bin/specops-tools.cjs commit "chore: add project config" --files .planning/config.json
494
+ ```
495
+
496
+ **注意:** 随时运行 `/specops:settings` 更新这些偏好。
497
+
498
+ ## 5.5. 解析模型配置
499
+
500
+ 使用 init 返回的模型:`researcher_model`、`synthesizer_model`、`roadmapper_model`。
501
+
502
+ ## 6. 研究决策
503
+
504
+ **如果是自动模式:** 默认选择"先研究",无需询问。
505
+
506
+ 使用 AskUserQuestion:
507
+ - header: "Research"
508
+ - question: "在定义需求之前研究领域生态系统?"
509
+ - options:
510
+ - "先研究(推荐)" — 发现标准技术栈、预期功能、架构模式
511
+ - "跳过研究" — 我熟悉这个领域,直接进入需求
512
+
513
+ **如果"先研究":**
514
+
515
+ 显示阶段横幅:
516
+ ```
517
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
518
+ SpecOps ► 研究中
519
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
520
+
521
+ 正在研究 [领域] 生态系统...
522
+ ```
523
+
524
+ 创建研究目录:
525
+ ```bash
526
+ mkdir -p .planning/research
527
+ ```
528
+
529
+ **确定里程碑上下文:**
530
+
531
+ 检查是绿地还是后续里程碑:
532
+ - 如果 PROJECT.md 中没有"Validated"需求 → 绿地(从零开始构建)
533
+ - 如果存在"Validated"需求 → 后续里程碑(在现有应用上添加)
534
+
535
+ 显示生成指示器:
536
+ ```
537
+ ◆ 并行生成 4 个研究员...
538
+ → 技术栈研究
539
+ → 功能研究
540
+ → 架构研究
541
+ → 陷阱研究
542
+ ```
543
+
544
+ 并行生成 4 个 specops-project-researcher Agent,使用路径引用:
545
+
546
+ ```
547
+ Task(prompt="First, read .opencode/agent/specops-project-researcher.md for your role and instructions.
548
+
549
+ <research_type>
550
+ Project Research — Stack dimension for [domain].
551
+ </research_type>
552
+
553
+ <milestone_context>
554
+ [greenfield OR subsequent]
555
+
556
+ Greenfield: Research the standard stack for building [domain] from scratch.
557
+ Subsequent: Research what's needed to add [target features] to an existing [domain] app. Don't re-research the existing system.
558
+ </milestone_context>
559
+
560
+ <question>
561
+ What's the standard 2025 stack for [domain]?
562
+ </question>
563
+
564
+ <files_to_read>
565
+ - {project_path} (Project context and goals)
566
+ </files_to_read>
567
+
568
+ <downstream_consumer>
569
+ Your STACK.md feeds into roadmap creation. Be prescriptive:
570
+ - Specific libraries with versions
571
+ - Clear rationale for each choice
572
+ - What NOT to use and why
573
+ </downstream_consumer>
574
+
575
+ <quality_gate>
576
+ - [ ] Versions are current (verify with Context7/official docs, not training data)
577
+ - [ ] Rationale explains WHY, not just WHAT
578
+ - [ ] Confidence levels assigned to each recommendation
579
+ </quality_gate>
580
+
581
+ <output>
582
+ Write to: .planning/research/STACK.md
583
+ Use template: .opencode/templates/research-project/STACK.md
584
+ </output>
585
+ ", subagent_type="general-purpose", model="{researcher_model}", description="Stack research")
586
+
587
+ Task(prompt="First, read .opencode/agent/specops-project-researcher.md for your role and instructions.
588
+
589
+ <research_type>
590
+ Project Research — Features dimension for [domain].
591
+ </research_type>
592
+
593
+ <milestone_context>
594
+ [greenfield OR subsequent]
595
+
596
+ Greenfield: What features do [domain] products have? What's table stakes vs differentiating?
597
+ Subsequent: How do [target features] typically work? What's expected behavior?
598
+ </milestone_context>
599
+
600
+ <question>
601
+ What features do [domain] products have? What's table stakes vs differentiating?
602
+ </question>
603
+
604
+ <files_to_read>
605
+ - {project_path} (Project context)
606
+ </files_to_read>
607
+
608
+ <downstream_consumer>
609
+ Your FEATURES.md feeds into requirements definition. Categorize clearly:
610
+ - Table stakes (must have or users leave)
611
+ - Differentiators (competitive advantage)
612
+ - Anti-features (things to deliberately NOT build)
613
+ </downstream_consumer>
614
+
615
+ <quality_gate>
616
+ - [ ] Categories are clear (table stakes vs differentiators vs anti-features)
617
+ - [ ] Complexity noted for each feature
618
+ - [ ] Dependencies between features identified
619
+ </quality_gate>
620
+
621
+ <output>
622
+ Write to: .planning/research/FEATURES.md
623
+ Use template: .opencode/templates/research-project/FEATURES.md
624
+ </output>
625
+ ", subagent_type="general-purpose", model="{researcher_model}", description="Features research")
626
+
627
+ Task(prompt="First, read .opencode/agent/specops-project-researcher.md for your role and instructions.
628
+
629
+ <research_type>
630
+ Project Research — Architecture dimension for [domain].
631
+ </research_type>
632
+
633
+ <milestone_context>
634
+ [greenfield OR subsequent]
635
+
636
+ Greenfield: How are [domain] systems typically structured? What are major components?
637
+ Subsequent: How do [target features] integrate with existing [domain] architecture?
638
+ </milestone_context>
639
+
640
+ <question>
641
+ How are [domain] systems typically structured? What are major components?
642
+ </question>
643
+
644
+ <files_to_read>
645
+ - {project_path} (Project context)
646
+ </files_to_read>
647
+
648
+ <downstream_consumer>
649
+ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
650
+ - Component boundaries (what talks to what)
651
+ - Data flow (how information moves)
652
+ - Suggested build order (dependencies between components)
653
+ </downstream_consumer>
654
+
655
+ <quality_gate>
656
+ - [ ] Components clearly defined with boundaries
657
+ - [ ] Data flow direction explicit
658
+ - [ ] Build order implications noted
659
+ </quality_gate>
660
+
661
+ <output>
662
+ Write to: .planning/research/ARCHITECTURE.md
663
+ Use template: .opencode/templates/research-project/ARCHITECTURE.md
664
+ </output>
665
+ ", subagent_type="general-purpose", model="{researcher_model}", description="Architecture research")
666
+
667
+ Task(prompt="First, read .opencode/agent/specops-project-researcher.md for your role and instructions.
668
+
669
+ <research_type>
670
+ Project Research — Pitfalls dimension for [domain].
671
+ </research_type>
672
+
673
+ <milestone_context>
674
+ [greenfield OR subsequent]
675
+
676
+ Greenfield: What do [domain] projects commonly get wrong? Critical mistakes?
677
+ Subsequent: What are common mistakes when adding [target features] to [domain]?
678
+ </milestone_context>
679
+
680
+ <question>
681
+ What do [domain] projects commonly get wrong? Critical mistakes?
682
+ </question>
683
+
684
+ <files_to_read>
685
+ - {project_path} (Project context)
686
+ </files_to_read>
687
+
688
+ <downstream_consumer>
689
+ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
690
+ - Warning signs (how to detect early)
691
+ - Prevention strategy (how to avoid)
692
+ - Which phase should address it
693
+ </downstream_consumer>
694
+
695
+ <quality_gate>
696
+ - [ ] Pitfalls are specific to this domain (not generic advice)
697
+ - [ ] Prevention strategies are actionable
698
+ - [ ] Phase mapping included where relevant
699
+ </quality_gate>
700
+
701
+ <output>
702
+ Write to: .planning/research/PITFALLS.md
703
+ Use template: .opencode/templates/research-project/PITFALLS.md
704
+ </output>
705
+ ", subagent_type="general-purpose", model="{researcher_model}", description="Pitfalls research")
706
+ ```
707
+
708
+ 所有 4 个 Agent 完成后,生成合成器创建 SUMMARY.md:
709
+
710
+ ```
711
+ Task(prompt="
712
+ <task>
713
+ Synthesize research outputs into SUMMARY.md.
714
+ </task>
715
+
716
+ <files_to_read>
717
+ - .planning/research/STACK.md
718
+ - .planning/research/FEATURES.md
719
+ - .planning/research/ARCHITECTURE.md
720
+ - .planning/research/PITFALLS.md
721
+ </files_to_read>
722
+
723
+ <output>
724
+ Write to: .planning/research/SUMMARY.md
725
+ Use template: .opencode/templates/research-project/SUMMARY.md
726
+ Commit after writing.
727
+ </output>
728
+ ", subagent_type="specops-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
729
+ ```
730
+
731
+ 显示研究完成横幅和关键发现:
732
+ ```
733
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
734
+ SpecOps ► 研究完成 ✓
735
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
736
+
737
+ ## 关键发现
738
+
739
+ **技术栈:** [来自 SUMMARY.md]
740
+ **基本功能:** [来自 SUMMARY.md]
741
+ **注意事项:** [来自 SUMMARY.md]
742
+
743
+ 文件:`.planning/research/`
744
+ ```
745
+
746
+ **如果"跳过研究":** 继续到步骤 7。
747
+
748
+ ## 7. 定义需求
749
+
750
+ 显示阶段横幅:
751
+ ```
752
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
753
+ SpecOps ► 定义需求
754
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
755
+ ```
756
+
757
+ **加载上下文:**
758
+
759
+ 读取 PROJECT.md 并提取:
760
+ - 核心价值(必须工作的那一件事)
761
+ - 声明的约束(预算、时间线、技术限制)
762
+ - 任何明确的范围边界
763
+
764
+ **如果研究存在:** 读取 research/FEATURES.md 并提取功能类别。
765
+
766
+ **如果是自动模式:**
767
+ - 自动包含所有基本功能(用户期望这些)
768
+ - 包含提供文档中明确提到的功能
769
+ - 自动推迟文档中未提到的差异化功能
770
+ - 跳过按类别的 AskUserQuestion 循环
771
+ - 跳过"还有补充吗?"问题
772
+ - 跳过需求审批门
773
+ - 直接生成 REQUIREMENTS.md 并提交
774
+
775
+ **按类别展示功能(仅交互模式):**
776
+
777
+ ```
778
+ 以下是 [领域] 的功能:
779
+
780
+ ## 认证
781
+ **基本功能:**
782
+ - 邮箱/密码注册
783
+ - 邮箱验证
784
+ - 密码重置
785
+ - 会话管理
786
+
787
+ **差异化功能:**
788
+ - 魔法链接登录
789
+ - OAuth(Google、GitHub)
790
+ - 双因素认证
791
+
792
+ **研究备注:** [任何相关备注]
793
+
794
+ ---
795
+
796
+ ## [下一个类别]
797
+ ...
798
+ ```
799
+
800
+ **如果没有研究:** 通过对话收集需求。
801
+
802
+ 询问:"用户需要能做的主要事情是什么?"
803
+
804
+ 对于提到的每个功能:
805
+ - 提出澄清问题使其具体化
806
+ - 探究相关功能
807
+ - 按类别分组
808
+
809
+ **确定每个类别的范围:**
810
+
811
+ 对于每个类别,使用 AskUserQuestion:
812
+
813
+ - header: "[类别]"(最多 12 个字符)
814
+ - question: "哪些 [类别] 功能在 v1 中?"
815
+ - multiSelect: true
816
+ - options:
817
+ - "[功能 1]" — [简要描述]
818
+ - "[功能 2]" — [简要描述]
819
+ - "[功能 3]" — [简要描述]
820
+ - "v1 中不需要" — 推迟整个类别
821
+
822
+ 跟踪响应:
823
+ - 选中的功能 → v1 需求
824
+ - 未选中的基本功能 → v2(用户期望这些)
825
+ - 未选中的差异化功能 → 范围外
826
+
827
+ **识别缺口:**
828
+
829
+ 使用 AskUserQuestion:
830
+ - header: "补充"
831
+ - question: "有研究遗漏的需求吗?(你愿景中特有的功能)"
832
+ - options:
833
+ - "没有,研究已覆盖" — 继续
834
+ - "有,让我补充" — 捕获补充内容
835
+
836
+ **验证核心价值:**
837
+
838
+ 将需求与 PROJECT.md 中的核心价值交叉检查。如果检测到缺口,提出来。
839
+
840
+ **生成 REQUIREMENTS.md:**
841
+
842
+ 创建 `.planning/REQUIREMENTS.md` 包含:
843
+ - v1 需求按类别分组(复选框,REQ-ID)
844
+ - v2 需求(推迟的)
845
+ - 范围外(明确排除及理由)
846
+ - 可追溯性部分(空的,由路线图填充)
847
+
848
+ **REQ-ID 格式:** `[CATEGORY]-[NUMBER]`(AUTH-01、CONTENT-02)
849
+
850
+ **需求质量标准:**
851
+
852
+ 好的需求是:
853
+ - **具体且可测试的:** "用户可以通过邮件链接重置密码"(不是"处理密码重置")
854
+ - **以用户为中心的:** "用户可以 X"(不是"系统做 Y")
855
+ - **原子的:** 每个需求一个功能(不是"用户可以登录和管理个人资料")
856
+ - **独立的:** 对其他需求的依赖最小
857
+
858
+ 拒绝模糊的需求。推动具体化:
859
+ - "处理认证" → "用户可以使用邮箱/密码登录并跨会话保持登录"
860
+ - "支持分享" → "用户可以通过链接分享帖子,链接在接收者的浏览器中打开"
861
+
862
+ **展示完整需求列表(仅交互模式):**
863
+
864
+ 显示每个需求(不是数量)供用户确认:
865
+
866
+ ```
867
+ ## v1 需求
868
+
869
+ ### 认证
870
+ - [ ] **AUTH-01**: 用户可以使用邮箱/密码创建账户
871
+ - [ ] **AUTH-02**: 用户可以登录并跨会话保持登录
872
+ - [ ] **AUTH-03**: 用户可以从任何页面登出
873
+
874
+ ### 内容
875
+ - [ ] **CONT-01**: 用户可以创建文本帖子
876
+ - [ ] **CONT-02**: 用户可以编辑自己的帖子
877
+
878
+ [... 完整列表 ...]
879
+
880
+ ---
881
+
882
+ 这是否捕获了你要构建的内容?(是 / 调整)
883
+ ```
884
+
885
+ 如果"调整":返回范围确定。
886
+
887
+ **提交需求:**
888
+
889
+ ```bash
890
+ node .opencode/bin/specops-tools.cjs commit "docs: define v1 requirements" --files .planning/REQUIREMENTS.md
891
+ ```
892
+
893
+ ## 8. 创建路线图
894
+
895
+ 显示阶段横幅:
896
+ ```
897
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
898
+ SpecOps ► 创建路线图
899
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
900
+
901
+ ◆ 正在生成路线图制定者...
902
+ ```
903
+
904
+ 生成 specops-roadmapper Agent,使用路径引用:
905
+
906
+ ```
907
+ Task(prompt="
908
+ <planning_context>
909
+
910
+ <files_to_read>
911
+ - .planning/PROJECT.md (Project context)
912
+ - .planning/REQUIREMENTS.md (v1 Requirements)
913
+ - .planning/research/SUMMARY.md (Research findings - if exists)
914
+ - .planning/config.json (Depth and mode settings)
915
+ </files_to_read>
916
+
917
+ </planning_context>
918
+
919
+ <instructions>
920
+ Create roadmap:
921
+ 1. Derive phases from requirements (don't impose structure)
922
+ 2. Map every v1 requirement to exactly one phase
923
+ 3. Derive 2-5 success criteria per phase (observable user behaviors)
924
+ 4. Validate 100% coverage
925
+ 5. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
926
+ 6. Return ROADMAP CREATED with summary
927
+
928
+ Write files first, then return. This ensures artifacts persist even if context is lost.
929
+ </instructions>
930
+ ", subagent_type="specops-roadmapper", model="{roadmapper_model}", description="Create roadmap")
931
+ ```
932
+
933
+ **处理路线图制定者返回:**
934
+
935
+ **如果 `## ROADMAP BLOCKED`:**
936
+ - 展示阻塞信息
937
+ - 与用户合作解决
938
+ - 解决后重新生成
939
+
940
+ **如果 `## ROADMAP CREATED`:**
941
+
942
+ 读取创建的 ROADMAP.md 并内联美观展示:
943
+
944
+ ```
945
+ ---
946
+
947
+ ## 提议的路线图
948
+
949
+ **[N] 个阶段** | **[X] 个需求已映射** | 所有 v1 需求已覆盖 ✓
950
+
951
+ | # | 阶段 | 目标 | 需求 | 成功标准 |
952
+ |---|------|------|------|----------|
953
+ | 1 | [名称] | [目标] | [REQ-ID] | [数量] |
954
+ | 2 | [名称] | [目标] | [REQ-ID] | [数量] |
955
+ | 3 | [名称] | [目标] | [REQ-ID] | [数量] |
956
+ ...
957
+
958
+ ### 阶段详情
959
+
960
+ **Phase 1: [名称]**
961
+ 目标:[目标]
962
+ 需求:[REQ-ID]
963
+ 成功标准:
964
+ 1. [标准]
965
+ 2. [标准]
966
+ 3. [标准]
967
+
968
+ **Phase 2: [名称]**
969
+ 目标:[目标]
970
+ 需求:[REQ-ID]
971
+ 成功标准:
972
+ 1. [标准]
973
+ 2. [标准]
974
+
975
+ [... 所有阶段继续 ...]
976
+
977
+ ---
978
+ ```
979
+
980
+ **如果是自动模式:** 跳过审批门——自动批准并直接提交。
981
+
982
+ **关键:提交前征求批准(仅交互模式):**
983
+
984
+ 使用 AskUserQuestion:
985
+ - header: "Roadmap"
986
+ - question: "这个路线图结构适合你吗?"
987
+ - options:
988
+ - "批准" — 提交并继续
989
+ - "调整阶段" — 告诉我要改什么
990
+ - "查看完整文件" — 显示原始 ROADMAP.md
991
+
992
+ **如果"批准":** 继续提交。
993
+
994
+ **如果"调整阶段":**
995
+ - 获取用户的调整意见
996
+ - 使用修订上下文重新生成路线图制定者:
997
+ ```
998
+ Task(prompt="
999
+ <revision>
1000
+ User feedback on roadmap:
1001
+ [user's notes]
1002
+
1003
+ <files_to_read>
1004
+ - .planning/ROADMAP.md (Current roadmap to revise)
1005
+ </files_to_read>
1006
+
1007
+ Update the roadmap based on feedback. Edit files in place.
1008
+ Return ROADMAP REVISED with changes made.
1009
+ </revision>
1010
+ ", subagent_type="specops-roadmapper", model="{roadmapper_model}", description="Revise roadmap")
1011
+ ```
1012
+ - 展示修订后的路线图
1013
+ - 循环直到用户批准
1014
+
1015
+ **如果"查看完整文件":** 显示原始 `cat .planning/ROADMAP.md`,然后重新询问。
1016
+
1017
+ **提交路线图(批准后或自动模式):**
1018
+
1019
+ ```bash
1020
+ node .opencode/bin/specops-tools.cjs commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
1021
+ ```
1022
+
1023
+ ## 9. 完成
1024
+
1025
+ 展示完成摘要:
1026
+
1027
+ ```
1028
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1029
+ SpecOps ► 项目已初始化 ✓
1030
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1031
+
1032
+ **[项目名称]**
1033
+
1034
+ | 产物 | 位置 |
1035
+ |----------------|-----------------------------|
1036
+ | 项目 | `.planning/PROJECT.md` |
1037
+ | 配置 | `.planning/config.json` |
1038
+ | 研究 | `.planning/research/` |
1039
+ | 需求 | `.planning/REQUIREMENTS.md` |
1040
+ | 路线图 | `.planning/ROADMAP.md` |
1041
+
1042
+ **[N] 个阶段** | **[X] 个需求** | 准备构建 ✓
1043
+ ```
1044
+
1045
+ **如果是自动模式:**
1046
+
1047
+ ```
1048
+ ╔══════════════════════════════════════════╗
1049
+ ║ 自动推进 → 讨论 PHASE 1 ║
1050
+ ╚══════════════════════════════════════════╝
1051
+ ```
1052
+
1053
+ 退出 skill 并调用 SlashCommand("/specops:discuss-phase 1 --auto")
1054
+
1055
+ **如果是交互模式:**
1056
+
1057
+ ```
1058
+ ───────────────────────────────────────────────────────────────
1059
+
1060
+ ## ▶ 下一步
1061
+
1062
+ **Phase 1: [阶段名称]** — [ROADMAP.md 中的目标]
1063
+
1064
+ /specops:discuss-phase 1 — 收集上下文并澄清方案
1065
+
1066
+ <sub>/clear 先清理 → 全新上下文窗口</sub>
1067
+
1068
+ ---
1069
+
1070
+ **其他可用操作:**
1071
+ - /specops:plan-phase 1 — 跳过讨论,直接规划
1072
+
1073
+ ───────────────────────────────────────────────────────────────
1074
+ ```
1075
+
1076
+ </process>
1077
+
1078
+ <output>
1079
+
1080
+ - `.planning/PROJECT.md`
1081
+ - `.planning/config.json`
1082
+ - `.planning/research/`(如果选择了研究)
1083
+ - `STACK.md`
1084
+ - `FEATURES.md`
1085
+ - `ARCHITECTURE.md`
1086
+ - `PITFALLS.md`
1087
+ - `SUMMARY.md`
1088
+ - `.planning/REQUIREMENTS.md`
1089
+ - `.planning/ROADMAP.md`
1090
+ - `.planning/STATE.md`
1091
+
1092
+ </output>
1093
+
1094
+ <success_criteria>
1095
+
1096
+ - [ ] .planning/ 目录已创建
1097
+ - [ ] Git 仓库已初始化
1098
+ - [ ] 棕地检测已完成
1099
+ - [ ] 深度提问已完成(跟随线索,不急于求成)
1100
+ - [ ] PROJECT.md 捕获完整上下文 → **已提交**
1101
+ - [ ] config.json 包含工作流模式、深度、并行化设置 → **已提交**
1102
+ - [ ] 研究已完成(如果选择)——4 个并行 Agent 已生成 → **已提交**
1103
+ - [ ] 需求已收集(来自研究或对话)
1104
+ - [ ] 用户确定了每个类别的范围(v1/v2/范围外)
1105
+ - [ ] REQUIREMENTS.md 已创建并包含 REQ-ID → **已提交**
1106
+ - [ ] specops-roadmapper 已生成并附带上下文
1107
+ - [ ] 路线图文件立即写入(不是草稿)
1108
+ - [ ] 用户反馈已纳入(如有)
1109
+ - [ ] ROADMAP.md 已创建,包含阶段、需求映射、成功标准
1110
+ - [ ] STATE.md 已初始化
1111
+ - [ ] REQUIREMENTS.md 可追溯性已更新
1112
+ - [ ] 用户知道下一步是 `/specops:discuss-phase 1`
1113
+
1114
+ **原子提交:** 每个阶段立即提交其产物。如果上下文丢失,产物仍然保留。
1115
+
1116
+ </success_criteria>