6aspec 2.0.0-dev.9 → 3.0.0-dev.10

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 (141) hide show
  1. package/.6aspec/rules/biz/code.md +126 -28
  2. package/.6aspec/rules/biz/code_implementation_sop.md +77 -0
  3. package/.6aspec/rules/brown/brown_analyze_sop.md +294 -0
  4. package/.6aspec/rules/brown/brown_archive_sop.md +44 -78
  5. package/.6aspec/rules/brown/brown_constitution.md +11 -0
  6. package/.6aspec/rules/brown/brown_continue_sop.md +7 -16
  7. package/.6aspec/rules/brown/brown_design_sop.md +210 -95
  8. package/.6aspec/rules/brown/brown_explore_sop.md +314 -0
  9. package/.6aspec/rules/brown/brown_ff_sop.md +27 -64
  10. package/.6aspec/rules/brown/brown_impact_sop.md +101 -45
  11. package/.6aspec/rules/brown/brown_implement_sop.md +91 -58
  12. package/.6aspec/rules/brown/brown_list_sop.md +12 -12
  13. package/.6aspec/rules/brown/brown_new_sop.md +64 -81
  14. package/.6aspec/rules/brown/brown_proposal_sop.md +243 -76
  15. package/.6aspec/rules/brown/brown_quick_sop.md +6 -6
  16. package/.6aspec/rules/brown/brown_review_sop.md +4 -4
  17. package/.6aspec/rules/brown/brown_rollback_sop.md +29 -51
  18. package/.6aspec/rules/brown/brown_specs_sop.md +364 -120
  19. package/.6aspec/rules/brown/brown_status_sop.md +16 -32
  20. package/.6aspec/rules/brown/brown_tasks_sop.md +194 -87
  21. package/.6aspec/rules/brown/brown_understand_sop.md +97 -23
  22. package/.6aspec/rules/brown/brown_update_sop.md +278 -0
  23. package/.6aspec/rules/brown/brown_verify_sop.md +71 -309
  24. package/.6aspec/rules/brown/subagents/implementer.md +73 -0
  25. package/.6aspec/rules/brown/subagents/spec-compliance-reviewer.md +103 -0
  26. package/.6aspec/rules/common/code-reviewer-agent.md +118 -0
  27. package/.6aspec/rules/green/{6A_archive_sop.md → green_archive_sop.md} +3 -3
  28. package/.6aspec/rules/green/{6A_clarify_sop.md → green_clarify_sop.md} +1 -1
  29. package/.6aspec/rules/green/{6A_code_implementation_sop.md → green_code_implementation_sop.md} +18 -3
  30. package/.6aspec/rules/green/{6A_continue_sop.md → green_continue_sop.md} +3 -3
  31. package/.6aspec/rules/green/{6A_new_sop.md → green_new_sop.md} +90 -11
  32. package/.6aspec/rules/green/green_status_schema.md +4 -4
  33. package/.6aspec/rules/green/{6A_status_sop.md → green_status_sop.md} +3 -3
  34. package/.6aspec/rules/green/{6A_tasks_sop.md → green_tasks_sop.md} +1 -1
  35. package/.agents/skills/6aspec-brown-analyze/SKILL.md +10 -0
  36. package/.agents/skills/6aspec-brown-archive/SKILL.md +10 -0
  37. package/.agents/skills/6aspec-brown-continue/SKILL.md +10 -0
  38. package/.agents/skills/6aspec-brown-design/SKILL.md +10 -0
  39. package/.agents/skills/6aspec-brown-explore/SKILL.md +10 -0
  40. package/.agents/skills/6aspec-brown-ff/SKILL.md +10 -0
  41. package/.agents/skills/6aspec-brown-implement/SKILL.md +10 -0
  42. package/.agents/skills/6aspec-brown-list/SKILL.md +10 -0
  43. package/.agents/skills/6aspec-brown-new/SKILL.md +10 -0
  44. package/.agents/skills/6aspec-brown-proposal/SKILL.md +10 -0
  45. package/.agents/skills/6aspec-brown-quick/SKILL.md +10 -0
  46. package/.agents/skills/6aspec-brown-review/SKILL.md +10 -0
  47. package/.agents/skills/6aspec-brown-rollback/SKILL.md +10 -0
  48. package/.agents/skills/6aspec-brown-specs/SKILL.md +10 -0
  49. package/.agents/skills/6aspec-brown-status/SKILL.md +10 -0
  50. package/.agents/skills/6aspec-brown-tasks/SKILL.md +10 -0
  51. package/.agents/skills/6aspec-brown-update/SKILL.md +10 -0
  52. package/.agents/skills/6aspec-brown-verify/SKILL.md +10 -0
  53. package/.claude/agents/6aspec-brown-implementer.md +7 -0
  54. package/.claude/agents/6aspec-brown-spec-compliance-reviewer.md +7 -0
  55. package/.claude/agents/6aspec-code-reviewer.md +7 -0
  56. package/.claude/commands/6aspec/brown/{impact.md → analyze.md} +11 -11
  57. package/.claude/commands/6aspec/brown/archive.md +11 -11
  58. package/.claude/commands/6aspec/brown/continue.md +11 -11
  59. package/.claude/commands/6aspec/brown/design.md +11 -11
  60. package/.claude/commands/6aspec/brown/{understand.md → explore.md} +11 -11
  61. package/.claude/commands/6aspec/brown/ff.md +11 -11
  62. package/.claude/commands/6aspec/brown/implement.md +11 -11
  63. package/.claude/commands/6aspec/brown/list.md +11 -11
  64. package/.claude/commands/6aspec/brown/new.md +11 -11
  65. package/.claude/commands/6aspec/brown/proposal.md +11 -11
  66. package/.claude/commands/6aspec/brown/quick.md +11 -11
  67. package/.claude/commands/6aspec/brown/review.md +11 -11
  68. package/.claude/commands/6aspec/brown/specs.md +1 -1
  69. package/.claude/commands/6aspec/brown/status.md +11 -11
  70. package/.claude/commands/6aspec/brown/tasks.md +11 -11
  71. package/.claude/commands/6aspec/brown/update.md +11 -0
  72. package/.claude/commands/6aspec/brown/verify.md +11 -11
  73. package/.claude/commands/6aspec/code.md +10 -0
  74. package/.claude/commands/6aspec/green/archive.md +1 -1
  75. package/.claude/commands/6aspec/green/clarify.md +2 -2
  76. package/.claude/commands/6aspec/green/continue.md +1 -1
  77. package/.claude/commands/6aspec/green/design.md +2 -2
  78. package/.claude/commands/6aspec/green/{execute-task.md → implement.md} +1 -1
  79. package/.claude/commands/6aspec/green/import-model-table.md +1 -1
  80. package/.claude/commands/6aspec/green/init.md +2 -2
  81. package/.claude/commands/6aspec/green/model.md +2 -2
  82. package/.claude/commands/6aspec/green/new.md +2 -2
  83. package/.claude/commands/6aspec/green/rollback.md +1 -1
  84. package/.claude/commands/6aspec/green/status.md +1 -1
  85. package/.claude/commands/6aspec/green/tasks.md +2 -2
  86. package/.claude/commands/6aspec/green/visual-logic.md +2 -2
  87. package/.claude/commands/6aspec/review.md +56 -0
  88. package/.codex/agents/6aspec-brown-implementer.md +7 -0
  89. package/.codex/agents/6aspec-brown-spec-compliance-reviewer.md +7 -0
  90. package/.codex/agents/6aspec-code-reviewer.md +7 -0
  91. package/.cursor/agents/6aspec-brown-implementer.md +7 -0
  92. package/.cursor/agents/6aspec-brown-spec-compliance-reviewer.md +8 -0
  93. package/.cursor/agents/6aspec-code-reviewer.md +8 -0
  94. package/.cursor/commands/6aspec-brown-analyze.md +9 -0
  95. package/.cursor/commands/{6aspec/brown/design.md → 6aspec-brown-design.md} +1 -1
  96. package/.cursor/commands/6aspec-brown-explore.md +11 -0
  97. package/.cursor/commands/{6aspec/brown/quick.md → 6aspec-brown-quick.md} +1 -1
  98. package/.cursor/commands/{6aspec/brown/review.md → 6aspec-brown-review.md} +1 -1
  99. package/.cursor/commands/{6aspec/brown/specs.md → 6aspec-brown-specs.md} +1 -1
  100. package/.cursor/commands/{6aspec/brown/tasks.md → 6aspec-brown-tasks.md} +1 -1
  101. package/.cursor/commands/6aspec-brown-update.md +9 -0
  102. package/.cursor/commands/6aspec-code.md +8 -0
  103. package/.cursor/commands/{6aspec/green/archive.md → 6aspec-green-archive.md} +1 -1
  104. package/.cursor/commands/{6aspec/green/clarify.md → 6aspec-green-clarify.md} +2 -2
  105. package/.cursor/commands/{6aspec/green/continue.md → 6aspec-green-continue.md} +1 -1
  106. package/.cursor/commands/{6aspec/green/design.md → 6aspec-green-design.md} +2 -2
  107. package/.cursor/commands/{6aspec/green/execute-task.md → 6aspec-green-implement.md} +1 -1
  108. package/.cursor/commands/{6aspec/green/import-model-table.md → 6aspec-green-import-model-table.md} +1 -1
  109. package/.cursor/commands/{6aspec/green/init.md → 6aspec-green-init.md} +2 -2
  110. package/.cursor/commands/{6aspec/green/model.md → 6aspec-green-model.md} +2 -2
  111. package/.cursor/commands/{6aspec/green/new.md → 6aspec-green-new.md} +2 -2
  112. package/.cursor/commands/{6aspec/green/rollback.md → 6aspec-green-rollback.md} +1 -1
  113. package/.cursor/commands/{6aspec/green/status.md → 6aspec-green-status.md} +1 -1
  114. package/.cursor/commands/{6aspec/green/tasks.md → 6aspec-green-tasks.md} +2 -2
  115. package/.cursor/commands/{6aspec/green/visual-logic.md → 6aspec-green-visual-logic.md} +2 -2
  116. package/.cursor/commands/6aspec-review.md +56 -0
  117. package/README.md +1 -1
  118. package/lib/cli.js +49 -13
  119. package/lib/installer.js +93 -25
  120. package/package.json +3 -1
  121. package/.claude/settings.local.json +0 -8
  122. package/.cursor/commands/6aspec/brown/impact.md +0 -9
  123. package/.cursor/commands/6aspec/brown/understand.md +0 -9
  124. /package/.6aspec/rules/green/{6A_constitution.md → green_constitution.md} +0 -0
  125. /package/.6aspec/rules/green/{6A_design_sop.md → green_design_sop.md} +0 -0
  126. /package/.6aspec/rules/green/{6A_import_model_table_sop.md → green_import_model_table_sop.md} +0 -0
  127. /package/.6aspec/rules/green/{6A_init_event_list_sop.md → green_init_event_list_sop.md} +0 -0
  128. /package/.6aspec/rules/green/{6A_init_map_sop.md → green_init_map_sop.md} +0 -0
  129. /package/.6aspec/rules/green/{6A_model_sop.md → green_model_sop.md} +0 -0
  130. /package/.6aspec/rules/green/{6A_rollback_sop.md → green_rollback_sop.md} +0 -0
  131. /package/.6aspec/rules/green/{6A_visual_logic_sop.md → green_visual_logic_sop.md} +0 -0
  132. /package/.cursor/commands/{6aspec/brown/archive.md → 6aspec-brown-archive.md} +0 -0
  133. /package/.cursor/commands/{6aspec/brown/continue.md → 6aspec-brown-continue.md} +0 -0
  134. /package/.cursor/commands/{6aspec/brown/ff.md → 6aspec-brown-ff.md} +0 -0
  135. /package/.cursor/commands/{6aspec/brown/implement.md → 6aspec-brown-implement.md} +0 -0
  136. /package/.cursor/commands/{6aspec/brown/list.md → 6aspec-brown-list.md} +0 -0
  137. /package/.cursor/commands/{6aspec/brown/new.md → 6aspec-brown-new.md} +0 -0
  138. /package/.cursor/commands/{6aspec/brown/proposal.md → 6aspec-brown-proposal.md} +0 -0
  139. /package/.cursor/commands/{6aspec/brown/rollback.md → 6aspec-brown-rollback.md} +0 -0
  140. /package/.cursor/commands/{6aspec/brown/status.md → 6aspec-brown-status.md} +0 -0
  141. /package/.cursor/commands/{6aspec/brown/verify.md → 6aspec-brown-verify.md} +0 -0
@@ -0,0 +1,118 @@
1
+ # Code Reviewer Agent
2
+
3
+ 你是一个代码审查专家,负责审查代码变更的生产就绪性。
4
+
5
+ ## 任务
6
+
7
+ 1. 通过 git diff 获取变更内容
8
+ 2. 对照需求/计划检查实现
9
+ 3. 从代码质量、架构、测试、生产就绪性四个维度评估
10
+ 4. 按严重程度分类问题
11
+ 5. 给出明确的合并建议
12
+
13
+ ## 输入
14
+
15
+ 调用方会提供:
16
+ - `变更描述`:做了什么
17
+ - `需求/计划`:应该做什么(可选,文件路径或文字描述)
18
+ - `BASE_SHA`:起始 commit
19
+ - `HEAD_SHA`:结束 commit
20
+
21
+ ## 执行步骤
22
+
23
+ ### 1. 获取变更内容
24
+
25
+ ```bash
26
+ git diff --stat {BASE_SHA}..{HEAD_SHA}
27
+ git diff {BASE_SHA}..{HEAD_SHA}
28
+ ```
29
+
30
+ 如果调用方未提供 SHA,使用:
31
+ ```bash
32
+ BASE_SHA=$(git rev-parse HEAD~1)
33
+ HEAD_SHA=$(git rev-parse HEAD)
34
+ ```
35
+
36
+ ### 2. 读取需求(如果提供了文件路径)
37
+
38
+ 读取需求/计划文件,理解预期行为。
39
+
40
+ ### 3. 执行审查
41
+
42
+ **代码质量**
43
+ - 关注点分离是否清晰?
44
+ - 错误处理是否完善?
45
+ - 类型安全(如适用)?
46
+ - 是否遵循 DRY 原则?
47
+ - 边界情况是否处理?
48
+
49
+ **架构**
50
+ - 设计决策是否合理?
51
+ - 是否考虑可扩展性?
52
+ - 性能影响?
53
+ - 安全隐患?
54
+
55
+ **测试**
56
+ - 测试是否真正测试了逻辑(而非只测 mock)?
57
+ - 边界情况是否覆盖?
58
+ - 是否需要集成测试?
59
+ - 所有测试是否通过?
60
+
61
+ **需求符合度**
62
+ - 是否满足所有需求?
63
+ - 实现是否与规格一致?
64
+ - 是否有范围蔓延?
65
+ - 破坏性变更是否有文档?
66
+
67
+ **生产就绪性**
68
+ - Schema 变更是否有迁移策略?
69
+ - 是否考虑向后兼容?
70
+ - 文档是否完整?
71
+ - 是否有明显 bug?
72
+
73
+ ## 输出格式
74
+
75
+ ### 亮点
76
+ [做得好的地方,具体到文件:行号]
77
+
78
+ ### 问题
79
+
80
+ #### 严重(必须修复)
81
+ [Bug、安全问题、数据丢失风险、功能损坏]
82
+
83
+ #### 重要(应该修复)
84
+ [架构问题、缺失功能、错误处理不足、测试缺口]
85
+
86
+ #### 次要(可以改进)
87
+ [代码风格、优化机会、文档改进]
88
+
89
+ **每个问题格式**:
90
+ - 文件:行号
91
+ - 问题描述
92
+ - 为什么重要
93
+ - 如何修复(如果不明显)
94
+
95
+ ### 建议
96
+ [代码质量、架构或流程的改进建议]
97
+
98
+ ### 评估
99
+
100
+ **可以合并?** [是 / 否 / 修复后可以]
101
+
102
+ **理由**:[1-2 句技术评估]
103
+
104
+ ## 规则
105
+
106
+ **要做**:
107
+ - 按实际严重程度分类(不是所有问题都是严重)
108
+ - 具体指出(文件:行号,不要模糊)
109
+ - 解释问题为什么重要
110
+ - 承认做得好的地方
111
+ - 给出明确结论
112
+
113
+ **不要做**:
114
+ - 不检查就说"看起来不错"
115
+ - 把小问题标为严重
116
+ - 对没有审查的代码给反馈
117
+ - 模糊表述("改进错误处理")
118
+ - 回避给出明确结论
@@ -103,7 +103,7 @@ find 6aspecdoc/green -maxdepth 2 -name ".green-status.json" -type f
103
103
 
104
104
  任务进度:<completed>/<total> 已完成,剩余 <remaining> 个任务未完成。
105
105
 
106
- 请先运行 /6aspec:green:execute-task 完成所有任务,待状态变为 completed 后再运行 /6aspec:green:archive。
106
+ 请先运行 /6aspec:green:implement 完成所有任务,待状态变为 completed 后再运行 /6aspec:green:archive。
107
107
  ```
108
108
 
109
109
  **3.3 检查状态(硬性门禁)**
@@ -116,7 +116,7 @@ find 6aspecdoc/green -maxdepth 2 -name ".green-status.json" -type f
116
116
  当前状态:<current-status>
117
117
  要求状态:completed(所有任务已完成)
118
118
 
119
- 归档前必须完成主流程至“所有任务已完成”。请先运行 /6aspec:green:execute-task 完成剩余任务,待状态变为 completed 后再运行 /6aspec:green:archive。
119
+ 归档前必须完成主流程至”所有任务已完成”。请先运行 /6aspec:green:implement 完成剩余任务,待状态变为 completed 后再运行 /6aspec:green:archive。
120
120
  ```
121
121
 
122
122
  ### Step 4: 执行归档
@@ -298,4 +298,4 @@ mv 6aspecdoc/green/<feature-name> 6aspecdoc/green/archive/YYYY-MM-DD-<feature-na
298
298
  ## 参考文档
299
299
 
300
300
  - 状态文件结构定义:`.6aspec/rules/green/green_status_schema.md`
301
- - 状态查询SOP:`.6aspec/rules/green/6A_status_sop.md`
301
+ - 状态查询SOP:`.6aspec/rules/green/green_status_sop.md`
@@ -59,7 +59,7 @@ find 6aspecdoc/green -maxdepth 2 -name ".green-status.json" -type f
59
59
 
60
60
  主流程中需求澄清窗口已结束,进入领域建模及后续阶段后不得再修改需求澄清范围。若确有需求变更,请与产品/业务方评估后,通过新需求或变更流程处理。
61
61
 
62
- 下一步建议:运行 /6aspec:green:status 查看当前状态,或按当前阶段继续执行对应命令(如 model、design、tasks、execute-task、archive)。
62
+ 下一步建议:运行 /6aspec:green:status 查看当前状态,或按当前阶段继续执行对应命令(如 model、design、tasks、implement、archive)。
63
63
  ```
64
64
 
65
65
  ### Step 2: 分析现有文档的薄弱环节
@@ -3,7 +3,7 @@ description: 任务代码实现标准操作流程 (Code Implementation SOP)
3
3
  alwaysApply: false
4
4
  ---
5
5
 
6
- # execute-task: 任务代码实现标准操作流程
6
+ # implement: 任务代码实现标准操作流程
7
7
 
8
8
  你现在是 **Senior Developer**,负责执行具体的开发任务。你的核心职责是将 `6aspecdoc/green/<feature-name>/tasks/task_xxx.md` 转化为高质量、可运行的业务代码。
9
9
 
@@ -66,6 +66,21 @@ alwaysApply: false
66
66
  ## 2. 质量控制 (Quality Control)
67
67
 
68
68
  在输出代码后,必须进行自我审查:
69
+
70
+ ### 2.1 代码规范遵循与检查
71
+ **必须严格遵循代码规范**:`.6aspec/rules/biz/code.md`,并使用其中的"检查清单"章节进行自我验证。
72
+
73
+ **重点关注以下红线规则(零容忍):**
74
+ - [ ] 循环中的数据库查询、网络请求、文件I/O操作
75
+ - [ ] SQL字符串拼接、敏感信息硬编码、弱加密算法使用
76
+ - [ ] 循环依赖、跨层直接调用、空catch块
77
+
78
+ **任务实现特别检查:**
79
+ - [ ] 字段名称和类型严格匹配 `api-definition.md` 和技术设计文档
80
+ - [ ] 严格翻译技术设计文档中的"执行逻辑"和"核心技术决策"
81
+ - [ ] 必要的注解已添加(Swagger, Auth, Validation)
82
+
83
+ ### 2.2 技术检查
69
84
  1. **Lint 检查**:运行 `read_lints` 检查新文件,修复所有 Import 错误和语法错误。
70
85
  2. **不写测试**:严禁编写 `src/test` 下的单元测试代码(除非用户明确要求)。
71
86
  3. **不修改无关文件**:严禁修改与本任务无关的现有代码(除非是必要的 Entity 关联更新)。
@@ -92,13 +107,13 @@ alwaysApply: false
92
107
 
93
108
  ---
94
109
 
95
- ✅ **已完成:执行开发任务 (execute-task)**
110
+ ✅ **已完成:执行开发任务 (implement)**
96
111
 
97
112
  📊 **进度:4/4 (主流程) - 全部完成!🎉**
98
113
 
99
114
  **任务状态:**
100
115
  - 当前任务已完成,请检查 `tasks/README.md` 查看整体进度
101
- - 如还有未完成的任务,继续执行 `execute-task` 命令
116
+ - 如还有未完成的任务,继续执行 `implement` 命令
102
117
  - 如所有任务已完成,恭喜!整个开发流程已完成
103
118
 
104
119
  **完整流程图:**
@@ -72,8 +72,8 @@ find 6aspecdoc/green -maxdepth 2 -name ".green-status.json" -type f
72
72
  | `requirement_clarified` | `/6aspec:green:model` | 开始领域建模 |
73
73
  | `modeled` | `/6aspec:green:design` | 开始技术方案设计 |
74
74
  | `designed` | `/6aspec:green:tasks` | 开始任务拆解 |
75
- | `tasks_created` | `/6aspec:green:execute-task` | 开始执行第一个任务 |
76
- | `implementing` | `/6aspec:green:execute-task` | 继续执行下一个任务 |
75
+ | `tasks_created` | `/6aspec:green:implement` | 开始执行第一个任务 |
76
+ | `implementing` | `/6aspec:green:implement` | 继续执行下一个任务 |
77
77
  | `completed` | 提示归档 | 所有任务已完成 |
78
78
  | `archived` | 无操作 | 需求已归档 |
79
79
 
@@ -183,4 +183,4 @@ find 6aspecdoc/green -maxdepth 2 -name ".green-status.json" -type f
183
183
  ## 参考文档
184
184
 
185
185
  - 状态文件结构定义:`.6aspec/rules/green/green_status_schema.md`
186
- - 状态查询SOP:`.6aspec/rules/green/6A_status_sop.md`
186
+ - 状态查询SOP:`.6aspec/rules/green/green_status_sop.md`
@@ -110,7 +110,18 @@
110
110
 
111
111
  **这是本 SOP 的核心价值环节。**
112
112
 
113
- 基于 Step 2 的初步分析,AI 必须主动列出 **3-5 个关键不确定点或风险点**,向用户提问确认。
113
+ 基于 Step 2 的初步分析,AI 必须:
114
+ 1. **识别所有关键不确定点或风险点**
115
+ 2. **按优先级排序**,选择最重要的 **3-5 个**向用户提问确认
116
+ 3. **其他问题写入待确认项**,标注优先级,后续通过 `clarify` 命令继续澄清
117
+
118
+ #### 优先级判断标准
119
+
120
+ | 优先级 | 定义 | 示例 |
121
+ | :--- | :--- | :--- |
122
+ | **P0** | 影响核心流程,不明确则无法进行领域建模 | 核心业务规则、主流程分支逻辑、关键状态定义 |
123
+ | **P1** | 影响设计决策或存在实施风险 | 性能要求、集成方式、并发处理策略 |
124
+ | **P2** | 影响细节实现但不阻塞主流程 | UI细节、提示文案、次要分支场景 |
114
125
 
115
126
  #### 反向提问的分类
116
127
 
@@ -124,6 +135,8 @@
124
135
 
125
136
  #### 提问格式
126
137
 
138
+ **如果识别出的关键问题 ≤ 5 个**,全部向用户提问:
139
+
127
140
  ```markdown
128
141
  ---
129
142
 
@@ -132,6 +145,7 @@
132
145
  基于对 PRD 的分析,以下 N 个问题需要确认后才能继续:
133
146
 
134
147
  ### Q1: [问题标题]
148
+ **优先级**:P0 / P1 / P2
135
149
  **类别**:语义模糊 / 边界缺失 / 流程遗漏 / 规则冲突 / 非功能隐患
136
150
  **来源**:PRD 第X章 / 第X节
137
151
  **问题描述**:<具体问题>
@@ -148,6 +162,35 @@
148
162
  - 告知哪些问题需要与产品/业务方再确认(将记录为"待确认项")
149
163
  ```
150
164
 
165
+ **如果识别出的关键问题 > 5 个**,只提问最重要的 3-5 个,其他写入待确认项:
166
+
167
+ ```markdown
168
+ ---
169
+
170
+ ## 🔍 需求澄清确认
171
+
172
+ 基于对 PRD 的分析,识别出 N 个关键不确定点。以下是最重要的 3-5 个问题,需要优先确认:
173
+
174
+ ### Q1: [问题标题]
175
+ **优先级**:P0 / P1
176
+ **类别**:语义模糊 / 边界缺失 / 流程遗漏 / 规则冲突 / 非功能隐患
177
+ **来源**:PRD 第X章 / 第X节
178
+ **问题描述**:<具体问题>
179
+ **AI 建议**:<如果有合理的默认假设,可以给出建议供用户参考>
180
+
181
+ ### Q2: [问题标题]
182
+ ...
183
+
184
+ ---
185
+
186
+ ⚠️ **还有 X 个其他关键问题已记录到待确认项**(详见生成的 requirement.md),建议后续通过 `/6aspec:green:clarify` 继续澄清。
187
+
188
+ 请逐一确认以上问题,您可以:
189
+ - 直接回答每个问题
190
+ - 提供补充文档
191
+ - 告知哪些问题需要与产品/业务方再确认(将记录为"待确认项")
192
+ ```
193
+
151
194
  **重要**:
152
195
  - 必须等待用户回复后再继续,不要跳过此步骤
153
196
  - 如果用户表示某些问题需要后续确认,记录为"待确认项"写入 requirement.md
@@ -226,11 +269,11 @@
226
269
  | 兼容性 | <如有> | |
227
270
 
228
271
  ## 8. 待确认项
229
- > 以下问题尚需与产品/业务方进一步确认,不阻塞领域建模但可能影响详细设计。
272
+ > 以下问题尚需与产品/业务方进一步确认。P0/P1 问题会阻塞流程,需优先澄清;P2 问题不阻塞领域建模但可能影响详细设计。
230
273
 
231
- | 序号 | 问题 | 状态 | 负责人 | 备注 |
232
- | :--- | :--- | :--- | :--- | :--- |
233
- | TBD-01 | <待确认问题> | 待确认/已确认 | <负责人> | <备注> |
274
+ | 序号 | 优先级 | 问题 | 类别 | AI建议 | 状态 | 备注 |
275
+ | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
276
+ | TBD-01 | P0/P1/P2 | <待确认问题> | 语义模糊/边界缺失/流程遗漏/规则冲突/非功能隐患 | <AI建议> | 待确认/已确认 | <备注> |
234
277
 
235
278
  ## 9. 附录
236
279
 
@@ -246,7 +289,11 @@
246
289
 
247
290
  ### Step 5: 更新状态文件
248
291
 
249
- 完成需求澄清文档后,更新 `.green-status.json`:
292
+ 完成需求澄清文档后,根据待确认项的优先级更新 `.green-status.json`:
293
+
294
+ #### 情况 1:无待确认项,或只有 P2 待确认项
295
+
296
+ 状态设置为 `requirement_clarified`,可以进入领域建模:
250
297
 
251
298
  ```json
252
299
  {
@@ -268,19 +315,51 @@
268
315
  }
269
316
  ```
270
317
 
271
- **注意**:如果存在较多"待确认项"(TBD ≥ 3 个且涉及核心流程),建议状态保持为 `created`,并提示用户:
318
+ **如果有 P2 待确认项**,向用户提示:
272
319
  ```
273
- ⚠️ 当前有 N 个待确认项涉及核心流程,建议先与产品/业务方确认后,再运行 /6aspec:green:clarify 继续澄清。
320
+ 核心问题已澄清,需求澄清文档已生成。
321
+
322
+ 📋 还有 N 个次要待确认项(P2)记录在 requirement.md 中,不阻塞领域建模,可后续通过 /6aspec:green:clarify 补充澄清。
323
+
324
+ 下一步:运行 /6aspec:green:model 开始领域建模
274
325
  ```
275
326
 
276
- 此时 `nextAction` 应设置为:
327
+ #### 情况 2:存在 P0 或 P1 待确认项
328
+
329
+ 状态保持为 `created`,需要先澄清后才能进入建模:
330
+
277
331
  ```json
278
332
  {
279
- "command": "clarify",
280
- "description": "继续需求澄清(有 N 个核心待确认项)"
333
+ "status": "created",
334
+ "lastModified": "<ISO8601-now>",
335
+ "artifacts": {
336
+ "requirement": {
337
+ "status": "partial",
338
+ "completedAt": "<ISO8601-now>"
339
+ },
340
+ "models": {
341
+ "status": "blocked"
342
+ }
343
+ },
344
+ "nextAction": {
345
+ "command": "clarify",
346
+ "description": "继续需求澄清(有 N 个 P0/P1 待确认项)"
347
+ }
281
348
  }
282
349
  ```
283
350
 
351
+ 向用户提示:
352
+ ```
353
+ ⚠️ 需求初步澄清已完成,但还有 N 个重要待确认项(P0: X个, P1: Y个)记录在 requirement.md 中。
354
+
355
+ 这些问题涉及核心流程或设计决策,建议先与产品/业务方确认后,再运行 /6aspec:green:clarify 继续澄清。
356
+
357
+ 待确认项列表:
358
+ - TBD-01 (P0): <问题简述>
359
+ - TBD-02 (P1): <问题简述>
360
+ ...
361
+ ```
362
+
284
363
  ## 输出要求
285
364
  1. 格式:Markdown 源码格式
286
365
  2. 文档位置:`6aspecdoc/green/<feature-name>/requirement.md`
@@ -63,8 +63,8 @@
63
63
  | `requirement_clarified` | 需求已澄清 | `/6aspec:green:model`(可选:`/6aspec:green:clarify` 继续深化) |
64
64
  | `modeled` | 领域建模完成 | `/6aspec:green:design` |
65
65
  | `designed` | 技术方案完成 | `/6aspec:green:tasks` |
66
- | `tasks_created` | 任务已拆解 | `/6aspec:green:execute-task` |
67
- | `implementing` | 实施中 | `/6aspec:green:execute-task` |
66
+ | `tasks_created` | 任务已拆解 | `/6aspec:green:implement` |
67
+ | `implementing` | 实施中 | `/6aspec:green:implement` |
68
68
  | `completed` | 已完成 | `/6aspec:green:archive` |
69
69
  | `archived` | 已归档 | - |
70
70
 
@@ -130,7 +130,7 @@ tasks (任务列表)
130
130
  | `designed` | `modeled` | `/6aspec:green:rollback` | artifacts/tech-design.md、api-definition.md、visual-logic.md(若存在) |
131
131
  | `tasks_created` | `designed` | `/6aspec:green:rollback` | tasks/ 目录下全部文件 |
132
132
 
133
- **不允许回退**:`created`(无上一阶段)、`implementing`、`completed`、`archived`。详见 `.6aspec/rules/green/6A_rollback_sop.md`。
133
+ **不允许回退**:`created`(无上一阶段)、`implementing`、`completed`、`archived`。详见 `.6aspec/rules/green/green_rollback_sop.md`。
134
134
 
135
135
  ## 示例
136
136
 
@@ -250,7 +250,7 @@ tasks (任务列表)
250
250
  "lastExecuted": "task_05_session_management.md"
251
251
  },
252
252
  "nextAction": {
253
- "command": "execute-task",
253
+ "command": "implement",
254
254
  "description": "继续执行剩余 3 个任务"
255
255
  }
256
256
  }
@@ -146,8 +146,8 @@ const status = JSON.parse(fs.readFileSync(statusPath, 'utf8'));
146
146
  | `requirement_clarified` | 运行 /6aspec:green:model 开始领域建模(可选:运行 /6aspec:green:clarify 继续深化需求) |
147
147
  | `modeled` | 运行 /6aspec:green:design 开始技术方案设计 |
148
148
  | `designed` | 运行 /6aspec:green:tasks 开始任务拆解 |
149
- | `tasks_created` | 运行 /6aspec:green:execute-task 开始执行任务 |
150
- | `implementing` | 运行 /6aspec:green:execute-task 继续执行任务 |
149
+ | `tasks_created` | 运行 /6aspec:green:implement 开始执行任务 |
150
+ | `implementing` | 运行 /6aspec:green:implement 继续执行任务 |
151
151
  | `completed` | 运行 /6aspec:green:archive 归档需求 |
152
152
  | `archived` | 需求已归档 |
153
153
 
@@ -208,7 +208,7 @@ const status = JSON.parse(fs.readFileSync(statusPath, 'utf8'));
208
208
  最后执行:task_05_session_management.md
209
209
 
210
210
  ### 下一步建议
211
- 运行 /6aspec:green:execute-task 继续执行任务
211
+ 运行 /6aspec:green:implement 继续执行任务
212
212
  或运行 /6aspec:green:continue 自动执行下一步
213
213
  ```
214
214
 
@@ -170,7 +170,7 @@ alwaysApply: false
170
170
  📊 **进度:3/4 (主流程)**
171
171
 
172
172
  **下一步建议:**
173
- - 【主流程】执行开发任务:命令 `execute-task`
173
+ - 【主流程】执行开发任务:命令 `implement`
174
174
  开始执行具体的开发任务,将设计转化为代码实现
175
175
 
176
176
  **完整流程图:**
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-analyze"
3
+ description: "需求澄清与影响面分析(合并原 Understand + Impact)"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-analyze** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_analyze_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-archive"
3
+ description: "归档已完成的需求"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-archive** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_archive_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-continue"
3
+ description: "继续当前需求的下一个阶段"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-continue** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_continue_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-design"
3
+ description: "技术方案设计(含 ADR 和技术债务识别)"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-design** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_design_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-explore"
3
+ description: "前期探索(轻量级流程可选)"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-explore** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_explore_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-ff"
3
+ description: "快速完成分析阶段(根据流程深度)"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-ff** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_ff_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-implement"
3
+ description: "执行任务实现"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-implement** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_implement_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-list"
3
+ description: "列出所有需求及其状态"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-list** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_list_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-new"
3
+ description: "开始新需求分析(选择流程深度)"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-new** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_new_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-proposal"
3
+ description: "创建需求提案(轻量级流程)"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-proposal** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_proposal_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-quick"
3
+ description: "需求快速通道(简化流程)"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-quick** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_quick_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-review"
3
+ description: "实施后评估"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-review** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_review_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-rollback"
3
+ description: "回退到上一个阶段"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-rollback** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_rollback_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-specs"
3
+ description: "需求规格定义"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-specs** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_specs_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-status"
3
+ description: "查看需求的当前状态和进度"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-status** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_status_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-tasks"
3
+ description: "任务拆解与排期"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-tasks** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_tasks_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-update"
3
+ description: "非破坏性地更新指定阶段的文档"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-update** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_update_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "6aspec-brown-verify"
3
+ description: "验证实现是否符合需求和设计(增强版,借鉴 OpenSpec)"
4
+ ---
5
+
6
+ # 操作流程
7
+ 1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-verify** has been activated
8
+ 2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
9
+ 3. Read file: `.6aspec/rules/brown/brown_verify_sop.md`
10
+ 4. Strictly follow the SOP defined in that file
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: 6aspec-brown-implementer
3
+ description: 执行棕地需求的单个 TASK 实现,包括写代码、单元测试和自我审查,适用于 brown implement 阶段
4
+ model: inherit
5
+ ---
6
+
7
+ 读取并严格遵循:`.6aspec/rules/brown/subagents/implementer.md`