6aspec 3.0.0-dev.3 → 3.0.0-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.6aspec/rules/brown/brown_analyze_sop.md +6 -1
- package/.6aspec/rules/brown/brown_implement_sop.md +7 -6
- package/.6aspec/rules/brown/subagents/spec-compliance-reviewer.md +42 -4
- package/.6aspec/rules/common/code-reviewer-agent.md +118 -0
- package/.claude/agents/{implementer.md → 6aspec-brown-implementer.md} +2 -1
- package/.claude/agents/{spec-compliance-reviewer.md → 6aspec-brown-spec-compliance-reviewer.md} +2 -1
- package/.claude/agents/6aspec-code-reviewer.md +7 -0
- package/.claude/commands/6aspec/brown/analyze.md +1 -1
- package/.claude/commands/6aspec/brown/design.md +1 -1
- package/.claude/commands/6aspec/brown/quick.md +1 -1
- package/.claude/commands/6aspec/brown/review.md +1 -1
- package/.claude/commands/6aspec/brown/specs.md +1 -1
- package/.claude/commands/6aspec/brown/tasks.md +1 -1
- package/.claude/commands/6aspec/review.md +56 -0
- package/.claude/settings.local.json +3 -1
- package/.cursor/agents/6aspec-brown-implementer.md +7 -0
- package/.cursor/agents/6aspec-brown-spec-compliance-reviewer.md +8 -0
- package/.cursor/agents/6aspec-code-reviewer.md +8 -0
- package/.cursor/commands/6aspec-brown-analyze.md +9 -0
- package/.cursor/commands/{6aspec/brown/design.md → 6aspec-brown-design.md} +1 -1
- package/.cursor/commands/{6aspec/brown/quick.md → 6aspec-brown-quick.md} +1 -1
- package/.cursor/commands/{6aspec/brown/review.md → 6aspec-brown-review.md} +1 -1
- package/.cursor/commands/{6aspec/brown/specs.md → 6aspec-brown-specs.md} +1 -1
- package/.cursor/commands/{6aspec/brown/tasks.md → 6aspec-brown-tasks.md} +1 -1
- package/.cursor/commands/6aspec-review.md +56 -0
- package/package.json +1 -1
- package/.claude/commands/6aspec/brown/impact.md +0 -11
- package/.claude/commands/6aspec/brown/understand.md +0 -11
- package/.cursor/commands/6aspec/brown/impact.md +0 -9
- package/.cursor/commands/6aspec/brown/understand.md +0 -9
- /package/.cursor/commands/{6aspec/brown/archive.md → 6aspec-brown-archive.md} +0 -0
- /package/.cursor/commands/{6aspec/brown/continue.md → 6aspec-brown-continue.md} +0 -0
- /package/.cursor/commands/{6aspec/brown/explore.md → 6aspec-brown-explore.md} +0 -0
- /package/.cursor/commands/{6aspec/brown/ff.md → 6aspec-brown-ff.md} +0 -0
- /package/.cursor/commands/{6aspec/brown/implement.md → 6aspec-brown-implement.md} +0 -0
- /package/.cursor/commands/{6aspec/brown/list.md → 6aspec-brown-list.md} +0 -0
- /package/.cursor/commands/{6aspec/brown/new.md → 6aspec-brown-new.md} +0 -0
- /package/.cursor/commands/{6aspec/brown/proposal.md → 6aspec-brown-proposal.md} +0 -0
- /package/.cursor/commands/{6aspec/brown/rollback.md → 6aspec-brown-rollback.md} +0 -0
- /package/.cursor/commands/{6aspec/brown/status.md → 6aspec-brown-status.md} +0 -0
- /package/.cursor/commands/{6aspec/brown/update.md → 6aspec-brown-update.md} +0 -0
- /package/.cursor/commands/{6aspec/brown/verify.md → 6aspec-brown-verify.md} +0 -0
- /package/.cursor/commands/{6aspec/code.md → 6aspec-code.md} +0 -0
- /package/.cursor/commands/{6aspec/green/archive.md → 6aspec-green-archive.md} +0 -0
- /package/.cursor/commands/{6aspec/green/clarify.md → 6aspec-green-clarify.md} +0 -0
- /package/.cursor/commands/{6aspec/green/continue.md → 6aspec-green-continue.md} +0 -0
- /package/.cursor/commands/{6aspec/green/design.md → 6aspec-green-design.md} +0 -0
- /package/.cursor/commands/{6aspec/green/implement.md → 6aspec-green-implement.md} +0 -0
- /package/.cursor/commands/{6aspec/green/import-model-table.md → 6aspec-green-import-model-table.md} +0 -0
- /package/.cursor/commands/{6aspec/green/init.md → 6aspec-green-init.md} +0 -0
- /package/.cursor/commands/{6aspec/green/model.md → 6aspec-green-model.md} +0 -0
- /package/.cursor/commands/{6aspec/green/new.md → 6aspec-green-new.md} +0 -0
- /package/.cursor/commands/{6aspec/green/rollback.md → 6aspec-green-rollback.md} +0 -0
- /package/.cursor/commands/{6aspec/green/status.md → 6aspec-green-status.md} +0 -0
- /package/.cursor/commands/{6aspec/green/tasks.md → 6aspec-green-tasks.md} +0 -0
- /package/.cursor/commands/{6aspec/green/visual-logic.md → 6aspec-green-visual-logic.md} +0 -0
|
@@ -159,7 +159,11 @@ b. **判断是否需要追问或指出风险**:
|
|
|
159
159
|
- 答案清晰完整且无风险 → 继续
|
|
160
160
|
- **不涉及技术实现层面的问题**(事务、通知机制、回滚策略等),那是 design 阶段的职责
|
|
161
161
|
|
|
162
|
-
c.
|
|
162
|
+
c. **追问时先写文档,再提问**:
|
|
163
|
+
- 将追问内容追加到 analysis.md "待澄清问题"章节(标注为追问,例:`> 追问:[追问内容]`)
|
|
164
|
+
- 再向用户提问
|
|
165
|
+
|
|
166
|
+
d. **追问格式**(简洁,不重复已知信息):
|
|
163
167
|
> "关于[具体问题],你提到了[用户答案],我想进一步确认:[追问内容]"
|
|
164
168
|
|
|
165
169
|
d. **禁止**:不得在用户未回答完所有问题时自动进入影响面分析
|
|
@@ -283,6 +287,7 @@ e. **持续更新文档**:每次用户回复后,更新 analysis.md,确保
|
|
|
283
287
|
- 代码范围确认前不得生成问题清单
|
|
284
288
|
- 问题必须按维度分组,不得使用扁平编号列表
|
|
285
289
|
- 每次用户回复后必须更新 analysis.md,保持文档与对话同步
|
|
290
|
+
- 追问必须先写入 analysis.md "待澄清问题"章节,再向用户提问
|
|
286
291
|
- 追问时一次最多提出 1-2 个问题,不得连续追问超过 3 轮同一问题
|
|
287
292
|
- 必须用户明确确认澄清完成后才能进入影响面分析
|
|
288
293
|
- 影响面分析只做粗粒度评估(模块范围、schema变更、间接影响有/无),不做函数级映射
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
|
|
42
42
|
**a. 派发 implementer agent**
|
|
43
43
|
|
|
44
|
-
调用 `implementer` agent,传入以下内容:
|
|
44
|
+
调用 `6aspec-brown-implementer` agent,传入以下内容:
|
|
45
45
|
|
|
46
46
|
```
|
|
47
|
-
请用 implementer agent 实现以下任务:
|
|
47
|
+
请用 6aspec-brown-implementer agent 实现以下任务:
|
|
48
48
|
|
|
49
49
|
需求名称:[name]
|
|
50
50
|
TASK 文件路径:6aspecdoc/brown/[name]/tasks/TASK-<序号>.md
|
|
@@ -63,14 +63,15 @@
|
|
|
63
63
|
|
|
64
64
|
**b. 派发 spec compliance reviewer agent**
|
|
65
65
|
|
|
66
|
-
调用 `spec-compliance-reviewer` agent,传入以下内容:
|
|
66
|
+
调用 `6aspec-brown-spec-compliance-reviewer` agent,传入以下内容:
|
|
67
67
|
|
|
68
68
|
```
|
|
69
|
-
请用 spec-compliance-reviewer agent 审查以下任务的实现:
|
|
69
|
+
请用 6aspec-brown-spec-compliance-reviewer agent 审查以下任务的实现:
|
|
70
70
|
|
|
71
71
|
需求名称:[name]
|
|
72
72
|
TASK 文件路径:6aspecdoc/brown/[name]/tasks/TASK-<序号>.md
|
|
73
73
|
specs.md 路径:6aspecdoc/brown/[name]/artifacts/specs.md
|
|
74
|
+
design.md 路径:6aspecdoc/brown/[name]/artifacts/design.md
|
|
74
75
|
|
|
75
76
|
Implementer 报告:
|
|
76
77
|
[implementer agent 的完整报告]
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
|
|
79
80
|
**处理 review 结果**:
|
|
80
81
|
- `✅ 通过`:标记任务完成,继续下一个任务
|
|
81
|
-
- `❌ 有问题`:重新调用 implementer agent 修复,传入原有上下文 + reviewer 的完整反馈(具体缺失/多余/偏差及文件路径);修复后再次调用 reviewer;**最多循环 3 次**
|
|
82
|
+
- `❌ 有问题`:重新调用 6aspec-brown-implementer agent 修复,传入原有上下文 + reviewer 的完整反馈(具体缺失/多余/偏差及文件路径);修复后再次调用 reviewer;**最多循环 3 次**
|
|
82
83
|
- **超过 3 次仍未通过**:暂停,向用户报告每轮的问题和修复情况,让用户决定如何处理
|
|
83
84
|
|
|
84
85
|
**c. 标记任务完成**
|
|
@@ -156,7 +157,7 @@
|
|
|
156
157
|
## 防护措施
|
|
157
158
|
|
|
158
159
|
- 必须先完成 Phase 4(Tasks)
|
|
159
|
-
- 主 agent 只做协调,不直接写代码;实现由 `implementer` agent 完成,验证由 `spec-compliance-reviewer` agent 完成
|
|
160
|
+
- 主 agent 只做协调,不直接写代码;实现由 `6aspec-brown-implementer` agent 完成,验证由 `6aspec-brown-spec-compliance-reviewer` agent 完成
|
|
160
161
|
- 串行执行,不并行调用多个 implementer agent
|
|
161
162
|
- implementer agent 报告 BLOCKED 时必须暂停并向用户报告,不得强行重试
|
|
162
163
|
- spec compliance review 必须通过才能标记任务完成,不得跳过
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
- **TASK 文件**:主 agent 传入的 `TASK 文件路径`,读取任务详情、实现步骤、验收标准、涉及文件
|
|
10
10
|
- **specs.md**:主 agent 传入的 `specs.md 路径`,读取该任务引用的 AC/Scenario 原文
|
|
11
|
+
- **design.md**:主 agent 传入的 `design.md 路径`,读取该任务相关的技术方案与约束(接口、流程、关键决策)
|
|
12
|
+
|
|
13
|
+
> 如果缺少 `design.md` 路径或无法读取 design 内容:**直接判定不通过**(无法验证是否绕过设计)。
|
|
11
14
|
|
|
12
15
|
## 重要:不要信任 implementer 的报告
|
|
13
16
|
|
|
@@ -19,7 +22,10 @@ Implementer 的报告可能不完整或过于乐观。你**必须独立验证**
|
|
|
19
22
|
|
|
20
23
|
## 你的职责
|
|
21
24
|
|
|
22
|
-
读取 implementer
|
|
25
|
+
读取 implementer 修改的文件,验证以下内容:
|
|
26
|
+
|
|
27
|
+
- **阻塞项**:1~5 任一不满足都必须判定 ❌
|
|
28
|
+
- **风险提示**:测试覆盖默认不作为阻塞项(除非 TASK/specs.md/design.md 明确要求必须补测试)
|
|
23
29
|
|
|
24
30
|
**1. 没有少做(Missing)**
|
|
25
31
|
- 任务要求的每一项是否都已实现?
|
|
@@ -37,6 +43,24 @@ Implementer 的报告可能不完整或过于乐观。你**必须独立验证**
|
|
|
37
43
|
- 是否用了正确的方式解决了正确的问题?
|
|
38
44
|
- 业务语义是否与 specs.md 的 AC/Scenario 一致?
|
|
39
45
|
|
|
46
|
+
**4. 设计一致性(Design Compliance)**
|
|
47
|
+
- 是否严格符合 design.md 的技术方案与约束?(接口形态、流程编排、关键决策)
|
|
48
|
+
- 是否存在绕过设计/偏离设计的实现?(即便功能表面可用也必须判定不通过)
|
|
49
|
+
|
|
50
|
+
**5. 边界与正确性(Boundary & Correctness)**
|
|
51
|
+
- 是否存在幂等问题(重复请求/重试导致重复写入、重复扣款、重复发消息等)?
|
|
52
|
+
- 是否存在空值/缺省值处理问题(NPE、字段缺失、空集合、空字符串等)?
|
|
53
|
+
- 是否存在并发/竞态问题(重复提交、并发更新丢失、顺序依赖被破坏等)?
|
|
54
|
+
|
|
55
|
+
> 要求:必须以 `specs.md` / `design.md` / `TASK` 中可追溯的约束为判定基准。
|
|
56
|
+
> - 如果你发现“必须明确但 specs/design 没写清”的边界规则,判定为 **规格/设计缺口** 并判定不通过,要求补齐 artifacts 后重审(不得在实现阶段临时发明规则)。
|
|
57
|
+
|
|
58
|
+
**6. 测试覆盖关键场景(Testing Adequacy,默认仅风险提示)**
|
|
59
|
+
- 评估测试是否覆盖该任务涉及的关键 AC/Scenario。
|
|
60
|
+
- 评估是否覆盖关键边界场景(幂等/空值/并发)对应的用例或回归点。
|
|
61
|
+
- 如果 implementer 报告明确无测试,且你也未发现相关测试文件:仅记录为**风险提示**,不要仅因无测试而判定不通过。
|
|
62
|
+
- 只有当 TASK/specs.md/design.md **明确要求必须补测试**时,缺失测试才属于 Missing 并必须判定 ❌。
|
|
63
|
+
|
|
40
64
|
## 报告格式
|
|
41
65
|
|
|
42
66
|
**如果通过**:
|
|
@@ -44,8 +68,10 @@ Implementer 的报告可能不完整或过于乐观。你**必须独立验证**
|
|
|
44
68
|
✅ 规格合规
|
|
45
69
|
|
|
46
70
|
验证结论:
|
|
47
|
-
- 已实现:[
|
|
48
|
-
-
|
|
71
|
+
- 已实现:[列出已覆盖的要求(按 TASK / specs.md 逐条)]
|
|
72
|
+
- 设计一致性:符合 design.md(如有关键约束请点名)
|
|
73
|
+
- 边界检查:幂等/空值/并发关键点已覆盖(列出证据)
|
|
74
|
+
- 测试覆盖(风险提示):[如有,列出覆盖的 AC/Scenario + 关键边界用例;如无,标注风险]
|
|
49
75
|
```
|
|
50
76
|
|
|
51
77
|
**如果有问题**:
|
|
@@ -60,6 +86,18 @@ Implementer 的报告可能不完整或过于乐观。你**必须独立验证**
|
|
|
60
86
|
|
|
61
87
|
理解偏差(Misunderstood):
|
|
62
88
|
- [具体偏差描述,含文件路径和行号]
|
|
89
|
+
|
|
90
|
+
设计偏离(Design Compliance):
|
|
91
|
+
- [具体偏离点,引用 design.md 条目/段落 + 对应代码文件路径和行号]
|
|
92
|
+
|
|
93
|
+
边界问题(Boundary & Correctness):
|
|
94
|
+
- [幂等/空值/并发问题的具体描述,含文件路径和行号]
|
|
95
|
+
|
|
96
|
+
规格/设计缺口(Spec/Design Gap):
|
|
97
|
+
- [需要补齐的 specs/design 条目,说明为什么这是必须的验收基准]
|
|
98
|
+
|
|
99
|
+
风险提示(Risks,非阻塞):
|
|
100
|
+
- 测试覆盖风险:implementer 报告无测试/未发现测试文件,建议补充覆盖关键场景与边界用例
|
|
63
101
|
```
|
|
64
102
|
|
|
65
|
-
|
|
103
|
+
问题描述必须具体、可操作,包含文件路径和行号,让 implementer 能直接定位并修复或推动补齐 artifacts。
|
|
@@ -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
|
+
- 回避给出明确结论
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "6aspec:review"
|
|
3
|
+
description: 独立代码审查命令,不绑定任何流程,随时可用
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review
|
|
7
|
+
|
|
8
|
+
对当前代码变更进行独立审查。
|
|
9
|
+
|
|
10
|
+
## 步骤
|
|
11
|
+
|
|
12
|
+
### 1. 解析输入
|
|
13
|
+
|
|
14
|
+
用户可以提供以下参数(均可选):
|
|
15
|
+
- `<description>` — 变更描述
|
|
16
|
+
- `--base <SHA>` — 起始 commit(默认:HEAD~1)
|
|
17
|
+
- `--head <SHA>` — 结束 commit(默认:HEAD)
|
|
18
|
+
- `--plan <file>` — 需求/计划文件路径
|
|
19
|
+
|
|
20
|
+
如果没有提供任何参数,使用默认值(HEAD~1..HEAD)。
|
|
21
|
+
|
|
22
|
+
### 2. 确定 git 范围
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
git log --oneline -10
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
显示最近 10 条 commit,帮助用户确认审查范围。
|
|
29
|
+
|
|
30
|
+
如果用户未指定 SHA,使用:
|
|
31
|
+
- BASE_SHA = HEAD~1
|
|
32
|
+
- HEAD_SHA = HEAD
|
|
33
|
+
|
|
34
|
+
### 3. 派发 6aspec-code-reviewer agent
|
|
35
|
+
|
|
36
|
+
调用 `6aspec-code-reviewer` agent,传入:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
变更描述:[用户提供的描述,或"最近一次提交的变更"]
|
|
40
|
+
需求/计划:[--plan 指定的文件路径,或"无"]
|
|
41
|
+
BASE_SHA:[base SHA]
|
|
42
|
+
HEAD_SHA:[head SHA]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 4. 展示审查结果
|
|
46
|
+
|
|
47
|
+
直接展示 agent 返回的完整审查报告。
|
|
48
|
+
|
|
49
|
+
## 使用示例
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
/6aspec:review
|
|
53
|
+
/6aspec:review 实现了用户认证功能
|
|
54
|
+
/6aspec:review --base abc1234 --head def5678
|
|
55
|
+
/6aspec:review --plan 6aspecdoc/brown/add-user-auth/artifacts/specs.md
|
|
56
|
+
```
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
"Bash(xargs sed -i '' 's/6A_\\\\\\([a-z_]*\\\\\\)\\\\.md/green_\\\\1.md/g')",
|
|
23
23
|
"Bash(openspec --help)",
|
|
24
24
|
"Bash(openspec schemas --json 2>/dev/null | head -100)",
|
|
25
|
-
"Bash(openspec status --json 2>/dev/null | head -50)"
|
|
25
|
+
"Bash(openspec status --json 2>/dev/null | head -50)",
|
|
26
|
+
"WebSearch",
|
|
27
|
+
"Bash(git mv:*)"
|
|
26
28
|
]
|
|
27
29
|
}
|
|
28
30
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 需求澄清与影响面分析(合并原 Understand + Impact)
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
1. Immediate response upon activation: brown field requirement workflow - **Analyze** has been activated
|
|
7
|
+
2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
|
|
8
|
+
3. Read file: `.6aspec/rules/brown/brown_analyze_sop.md`
|
|
9
|
+
4. Strictly follow the SOP defined in that file
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 独立代码审查,不绑定任何流程,随时可用
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review
|
|
7
|
+
|
|
8
|
+
对当前代码变更进行独立审查。
|
|
9
|
+
|
|
10
|
+
## 步骤
|
|
11
|
+
|
|
12
|
+
### 1. 解析输入
|
|
13
|
+
|
|
14
|
+
用户可以提供以下参数(均可选):
|
|
15
|
+
- `<description>` — 变更描述
|
|
16
|
+
- `--base <SHA>` — 起始 commit(默认:HEAD~1)
|
|
17
|
+
- `--head <SHA>` — 结束 commit(默认:HEAD)
|
|
18
|
+
- `--plan <file>` — 需求/计划文件路径
|
|
19
|
+
|
|
20
|
+
如果没有提供任何参数,使用默认值(HEAD~1..HEAD)。
|
|
21
|
+
|
|
22
|
+
### 2. 确定 git 范围
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
git log --oneline -10
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
显示最近 10 条 commit,帮助用户确认审查范围。
|
|
29
|
+
|
|
30
|
+
如果用户未指定 SHA,使用:
|
|
31
|
+
- BASE_SHA = HEAD~1
|
|
32
|
+
- HEAD_SHA = HEAD
|
|
33
|
+
|
|
34
|
+
### 3. 派发 6aspec-code-reviewer agent
|
|
35
|
+
|
|
36
|
+
调用 `6aspec-code-reviewer` agent,传入:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
变更描述:[用户提供的描述,或"最近一次提交的变更"]
|
|
40
|
+
需求/计划:[--plan 指定的文件路径,或"无"]
|
|
41
|
+
BASE_SHA:[base SHA]
|
|
42
|
+
HEAD_SHA:[head SHA]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 4. 展示审查结果
|
|
46
|
+
|
|
47
|
+
直接展示 agent 返回的完整审查报告。
|
|
48
|
+
|
|
49
|
+
## 使用示例
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
/6aspec:review
|
|
53
|
+
/6aspec:review 实现了用户认证功能
|
|
54
|
+
/6aspec:review --base abc1234 --head def5678
|
|
55
|
+
/6aspec:review --plan 6aspecdoc/brown/add-user-auth/artifacts/specs.md
|
|
56
|
+
```
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "6aspec:brown: Impact"
|
|
3
|
-
description: Phase 2 - 影响面分析与非功能需求评估
|
|
4
|
-
category: Workflow
|
|
5
|
-
tags: [workflow, requirement, analysis]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
1. Immediate response upon activation: brown field requirement workflow - **Impact** has been activated
|
|
9
|
-
2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
|
|
10
|
-
3. Read file: `.6aspec/rules/brown/brown_impact_sop.md`
|
|
11
|
-
4. Strictly follow the SOP defined in that file
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "6aspec:brown: Understand"
|
|
3
|
-
description: Phase 1 - 需求理解与现状分析
|
|
4
|
-
category: Workflow
|
|
5
|
-
tags: [workflow, requirement, analysis]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
1. Immediate response upon activation: brown field requirement workflow - **Understand** has been activated
|
|
9
|
-
2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
|
|
10
|
-
3. Read file: `.6aspec/rules/brown/brown_understand_sop.md`
|
|
11
|
-
4. Strictly follow the SOP defined in that file
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Phase 2 - 影响面分析与非功能需求评估
|
|
3
|
-
alwaysApply: false
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
1. Immediate response upon activation: brown field requirement workflow - **Impact** has been activated
|
|
7
|
-
2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
|
|
8
|
-
3. Read file: `.6aspec/rules/brown/brown_impact_sop.md`
|
|
9
|
-
4. Strictly follow the SOP defined in that file
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Phase 1 - 需求理解与现状分析
|
|
3
|
-
alwaysApply: false
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
1. Immediate response upon activation: brown field requirement workflow - **Understand** has been activated
|
|
7
|
-
2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
|
|
8
|
-
3. Read file: `.6aspec/rules/brown/brown_understand_sop.md`
|
|
9
|
-
4. Strictly follow the SOP defined in that file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/.cursor/commands/{6aspec/green/import-model-table.md → 6aspec-green-import-model-table.md}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|