6aspec 3.0.0-dev.2 → 3.0.0-dev.21
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/biz/code.md +7 -3
- package/.6aspec/rules/brown/brown_analyze_sop.md +7 -2
- package/.6aspec/rules/brown/brown_archive_sop.md +3 -2
- package/.6aspec/rules/brown/brown_continue_sop.md +1 -3
- package/.6aspec/rules/brown/brown_implement_sop.md +41 -15
- package/.6aspec/rules/brown/brown_new_sop.md +10 -6
- package/.6aspec/rules/brown/brown_quick_sop.md +1 -1
- package/.6aspec/rules/brown/brown_rollback_sop.md +3 -7
- package/.6aspec/rules/brown/brown_tasks_sop.md +8 -13
- package/.6aspec/rules/brown/brown_update_sop.md +4 -9
- package/.6aspec/rules/brown/subagents/implementer.md +35 -8
- package/.6aspec/rules/brown/subagents/spec-compliance-reviewer.md +80 -10
- package/.6aspec/rules/common/code-reviewer-agent.md +141 -0
- package/.agents/skills/6aspec-brown-analyze/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-archive/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-continue/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-design/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-explore/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-ff/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-implement/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-list/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-new/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-proposal/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-quick/SKILL.md +10 -0
- package/{.cursor/commands/6aspec/brown/impact.md → .agents/skills/6aspec-brown-review/SKILL.md} +5 -4
- package/.agents/skills/6aspec-brown-rollback/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-specs/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-status/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-tasks/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-update/SKILL.md +10 -0
- package/.agents/skills/6aspec-brown-verify/SKILL.md +10 -0
- package/.agents/skills/6aspec-review/SKILL.md +36 -0
- package/.claude/agents/{implementer.md → 6aspec-brown-implementer.md} +2 -1
- package/.claude/agents/6aspec-brown-spec-compliance-reviewer.md +7 -0
- 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 +66 -0
- package/.claude/settings.local.json +1 -22
- package/.codex/agents/6aspec-brown-implementer.toml +11 -0
- package/.codex/agents/6aspec-brown-spec-compliance-reviewer.toml +11 -0
- package/.codex/agents/6aspec-code-reviewer.toml +11 -0
- 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/implement.md → 6aspec-brown-implement.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 +66 -0
- package/lib/cli.js +47 -11
- package/lib/installer.js +74 -23
- package/package.json +3 -1
- package/.claude/agents/spec-compliance-reviewer.md +0 -6
- package/.claude/commands/6aspec/brown/impact.md +0 -11
- package/.claude/commands/6aspec/brown/understand.md +0 -11
- 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/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
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Code Reviewer Agent
|
|
2
|
+
|
|
3
|
+
你是一个代码审查专家,负责审查代码变更的生产就绪性。
|
|
4
|
+
|
|
5
|
+
## 任务
|
|
6
|
+
|
|
7
|
+
1. 优先使用调用方提供的 DIFF(unified diff)获取变更内容;若未提供且 git 可用,则通过 git diff 获取
|
|
8
|
+
2. 对照需求/计划检查实现
|
|
9
|
+
3. 从代码质量、架构、测试、需求符合度四个维度评估
|
|
10
|
+
4. 按严重程度分类问题
|
|
11
|
+
5. 给出明确的合并建议
|
|
12
|
+
|
|
13
|
+
## 输入
|
|
14
|
+
|
|
15
|
+
调用方会提供(均可选):
|
|
16
|
+
- `变更描述`:做了什么
|
|
17
|
+
- `需求/计划`:应该做什么(可选,文件路径或文字描述)
|
|
18
|
+
- `DIFF`:本次变更的 unified diff 文本(**优先**)
|
|
19
|
+
- `BASE_SHA`:起始 commit(可选,用于 git diff fallback)
|
|
20
|
+
- `HEAD_SHA`:结束 commit(可选,用于 git diff fallback)
|
|
21
|
+
|
|
22
|
+
## 执行步骤
|
|
23
|
+
|
|
24
|
+
### 1. 获取变更内容
|
|
25
|
+
|
|
26
|
+
按优先级选择输入来源:
|
|
27
|
+
|
|
28
|
+
1) **如果提供了 `DIFF`**:
|
|
29
|
+
- 直接基于 `DIFF` 进行审查(不要再运行 git diff)。
|
|
30
|
+
|
|
31
|
+
2) **否则,如果提供了 `BASE_SHA`/`HEAD_SHA` 且 git 可用**:
|
|
32
|
+
```bash
|
|
33
|
+
git diff --stat {BASE_SHA}..{HEAD_SHA}
|
|
34
|
+
git diff {BASE_SHA}..{HEAD_SHA}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
3) **否则,如果未提供 SHA 但 git 可用**:
|
|
38
|
+
|
|
39
|
+
收集工作区所有未提交的变更(不包含已 commit 的代码):
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# 已追踪文件的修改(未 add)
|
|
43
|
+
git diff
|
|
44
|
+
|
|
45
|
+
# 已 add 但未 commit 的变更
|
|
46
|
+
git diff --cached
|
|
47
|
+
|
|
48
|
+
# 未追踪的新文件(未 add),转成 unified diff 格式
|
|
49
|
+
git ls-files --others --exclude-standard | while read f; do
|
|
50
|
+
diff -u /dev/null "$f" || true
|
|
51
|
+
done
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
将以上三部分合并为完整 diff 进行审查。如果三部分均为空,提示用户"当前工作区没有任何未提交的变更"。
|
|
55
|
+
|
|
56
|
+
4) **否则(git 不可用)**:
|
|
57
|
+
- 提示用户"当前目录不是 git 仓库,请通过 --diff 参数提供 unified diff 文件"。
|
|
58
|
+
|
|
59
|
+
### 2. 读取需求(如果提供了文件路径)
|
|
60
|
+
|
|
61
|
+
读取需求/计划文件,理解预期行为。
|
|
62
|
+
|
|
63
|
+
### 3. 执行审查
|
|
64
|
+
|
|
65
|
+
**代码质量**
|
|
66
|
+
- 关注点分离是否清晰?
|
|
67
|
+
- 错误处理是否完善?
|
|
68
|
+
- 类型安全(如适用)?
|
|
69
|
+
- 是否遵循 DRY 原则?
|
|
70
|
+
- 边界情况是否处理?
|
|
71
|
+
|
|
72
|
+
**架构**
|
|
73
|
+
- 设计决策是否合理?
|
|
74
|
+
- 是否考虑可扩展性?
|
|
75
|
+
- 性能影响?
|
|
76
|
+
- 安全隐患?
|
|
77
|
+
|
|
78
|
+
**测试**
|
|
79
|
+
- 测试是否真正测试了逻辑(而非只测 mock)?
|
|
80
|
+
- 边界情况是否覆盖?
|
|
81
|
+
- 是否需要集成测试?
|
|
82
|
+
- 所有测试是否通过?
|
|
83
|
+
|
|
84
|
+
**需求符合度**
|
|
85
|
+
- 是否满足所有需求?
|
|
86
|
+
- 实现是否与规格一致?
|
|
87
|
+
- 是否有范围蔓延?
|
|
88
|
+
- 破坏性变更是否有文档?
|
|
89
|
+
|
|
90
|
+
**生产就绪性**
|
|
91
|
+
- Schema 变更是否有迁移策略?
|
|
92
|
+
- 是否考虑向后兼容?
|
|
93
|
+
- 文档是否完整?
|
|
94
|
+
- 是否有明显 bug?
|
|
95
|
+
|
|
96
|
+
## 输出格式
|
|
97
|
+
|
|
98
|
+
### 亮点
|
|
99
|
+
[做得好的地方,具体到文件:行号]
|
|
100
|
+
|
|
101
|
+
### 问题
|
|
102
|
+
|
|
103
|
+
#### 严重(必须修复)
|
|
104
|
+
[Bug、安全问题、数据丢失风险、功能损坏]
|
|
105
|
+
|
|
106
|
+
#### 重要(应该修复)
|
|
107
|
+
[架构问题、缺失功能、错误处理不足、测试缺口]
|
|
108
|
+
|
|
109
|
+
#### 次要(可以改进)
|
|
110
|
+
[代码风格、优化机会、文档改进]
|
|
111
|
+
|
|
112
|
+
**每个问题格式**:
|
|
113
|
+
- 文件:行号
|
|
114
|
+
- 问题描述
|
|
115
|
+
- 为什么重要
|
|
116
|
+
- 如何修复(如果不明显)
|
|
117
|
+
|
|
118
|
+
### 建议
|
|
119
|
+
[代码质量、架构或流程的改进建议]
|
|
120
|
+
|
|
121
|
+
### 评估
|
|
122
|
+
|
|
123
|
+
**可以合并?** [是 / 否 / 修复后可以]
|
|
124
|
+
|
|
125
|
+
**理由**:[1-2 句技术评估]
|
|
126
|
+
|
|
127
|
+
## 规则
|
|
128
|
+
|
|
129
|
+
**要做**:
|
|
130
|
+
- 按实际严重程度分类(不是所有问题都是严重)
|
|
131
|
+
- 具体指出(文件:行号,不要模糊)
|
|
132
|
+
- 解释问题为什么重要
|
|
133
|
+
- 承认做得好的地方
|
|
134
|
+
- 给出明确结论
|
|
135
|
+
|
|
136
|
+
**不要做**:
|
|
137
|
+
- 不检查就说"看起来不错"
|
|
138
|
+
- 把小问题标为严重
|
|
139
|
+
- 对没有审查的代码给反馈
|
|
140
|
+
- 模糊表述("改进错误处理")
|
|
141
|
+
- 回避给出明确结论
|
|
@@ -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: "执行任务实现;可选 --skipTest=true|false(未写则 false)"
|
|
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
|
package/{.cursor/commands/6aspec/brown/impact.md → .agents/skills/6aspec-brown-review/SKILL.md}
RENAMED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
name: "6aspec-brown-review"
|
|
3
|
+
description: "实施后评估"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# 操作流程
|
|
7
|
+
1. Immediate response upon activation: brown field requirement workflow - **6aspec-brown-review** has been activated
|
|
7
8
|
2. **Read and strictly follow the brown field constitution**: `.6aspec/rules/brown/brown_constitution.md`
|
|
8
|
-
3. Read file: `.6aspec/rules/brown/
|
|
9
|
+
3. Read file: `.6aspec/rules/brown/brown_review_sop.md`
|
|
9
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,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "6aspec-review"
|
|
3
|
+
description: "独立代码审查(优先 DIFF,其次 git diff),不绑定任何流程,随时可用"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 操作流程
|
|
7
|
+
|
|
8
|
+
1. Immediate response upon activation: independent code review workflow - **6aspec-review** has been activated
|
|
9
|
+
|
|
10
|
+
2. 解析输入参数(均可选):
|
|
11
|
+
- `<description>`:变更描述(默认:"最近一次提交的变更")
|
|
12
|
+
- `--diff <file>`:unified diff 文件路径(优先)
|
|
13
|
+
- `--base <SHA>`:起始 commit(默认:HEAD~1)
|
|
14
|
+
- `--head <SHA>`:结束 commit(默认:HEAD)
|
|
15
|
+
- `--plan <file>`:需求/计划文件路径(可选)
|
|
16
|
+
|
|
17
|
+
3. 确定变更来源:
|
|
18
|
+
- 若提供 `--diff`:读取该文件内容作为 `DIFF`
|
|
19
|
+
- 否则:使用 git 范围(`BASE_SHA`/`HEAD_SHA`)
|
|
20
|
+
- 若用户未指定:`BASE_SHA=HEAD~1`,`HEAD_SHA=HEAD`
|
|
21
|
+
- 可运行 `git log --oneline -10` 展示最近提交,便于用户确认范围
|
|
22
|
+
|
|
23
|
+
4. 派发 `6aspec-code-reviewer` agent,并传入以下信息(按实际可得填写;无 DIFF 时不要伪造 DIFF):
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
变更描述:<description>
|
|
27
|
+
需求/计划:<--plan 文件路径 或 "无">
|
|
28
|
+
DIFF:<--diff 文件内容(如提供)>
|
|
29
|
+
BASE_SHA:<--base 或 HEAD~1>
|
|
30
|
+
HEAD_SHA:<--head 或 HEAD>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
5. 展示审查结果:直接输出 `6aspec-code-reviewer` 返回的完整审查报告。
|
|
34
|
+
|
|
35
|
+
6. 无法获取变更集时的处理:
|
|
36
|
+
- 若既未提供 `--diff`,又无法使用 git 获取 diff:停止并提示用户提供 `--diff <file>`(unified diff)。
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "6aspec:review"
|
|
3
|
+
description: 独立代码审查命令,不绑定任何流程,随时可用
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review
|
|
7
|
+
|
|
8
|
+
对当前代码变更进行独立审查。
|
|
9
|
+
|
|
10
|
+
## 步骤
|
|
11
|
+
|
|
12
|
+
### 1. 解析输入
|
|
13
|
+
|
|
14
|
+
用户可以提供以下参数(均可选):
|
|
15
|
+
- `<description>` — 变更描述
|
|
16
|
+
- `--diff <file>` — 本次变更的 unified diff 文件路径(优先)
|
|
17
|
+
- `--base <SHA>` — 起始 commit(默认:HEAD~1)
|
|
18
|
+
- `--head <SHA>` — 结束 commit(默认:HEAD)
|
|
19
|
+
- `--plan <file>` — 需求/计划文件路径
|
|
20
|
+
|
|
21
|
+
如果未提供 `--diff/--base/--head`,使用默认值(HEAD~1..HEAD)。
|
|
22
|
+
|
|
23
|
+
### 2. 确定变更来源
|
|
24
|
+
|
|
25
|
+
- 如果提供了 `--diff`:读取 diff 文件内容作为 `DIFF`,并直接进入步骤 3。
|
|
26
|
+
- 否则:使用 git 范围。
|
|
27
|
+
|
|
28
|
+
### 3. (可选)展示 git 范围
|
|
29
|
+
|
|
30
|
+
当使用 git 范围时:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git log --oneline -10
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
显示最近 10 条 commit,帮助用户确认审查范围。
|
|
37
|
+
|
|
38
|
+
如果用户未指定 SHA,使用:
|
|
39
|
+
- BASE_SHA = HEAD~1
|
|
40
|
+
- HEAD_SHA = HEAD
|
|
41
|
+
|
|
42
|
+
### 4. 派发 6aspec-code-reviewer agent
|
|
43
|
+
|
|
44
|
+
调用 `6aspec-code-reviewer` agent,传入:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
变更描述:[用户提供的描述,或"最近一次提交的变更"]
|
|
48
|
+
需求/计划:[--plan 指定的文件路径,或"无"]
|
|
49
|
+
DIFF:[--diff 指定文件内容(如提供)]
|
|
50
|
+
BASE_SHA:[base SHA(如使用 git)]
|
|
51
|
+
HEAD_SHA:[head SHA(如使用 git)]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 5. 展示审查结果
|
|
55
|
+
|
|
56
|
+
直接展示 agent 返回的完整审查报告。
|
|
57
|
+
|
|
58
|
+
## 使用示例
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
/6aspec:review
|
|
62
|
+
/6aspec:review 实现了用户认证功能
|
|
63
|
+
/6aspec:review --diff /tmp/change.patch
|
|
64
|
+
/6aspec:review --base abc1234 --head def5678
|
|
65
|
+
/6aspec:review --plan 6aspecdoc/brown/add-user-auth/artifacts/specs.md
|
|
66
|
+
```
|
|
@@ -1,28 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"permissions": {
|
|
3
3
|
"allow": [
|
|
4
|
-
"Bash(
|
|
5
|
-
"Bash(xargs -I {} basename {})",
|
|
6
|
-
"Bash(git mv 6A_constitution.md green_constitution.md)",
|
|
7
|
-
"Bash(git mv 6A_design_sop.md green_design_sop.md)",
|
|
8
|
-
"Bash(git mv 6A_import_model_table_sop.md green_import_model_table_sop.md)",
|
|
9
|
-
"Bash(git mv 6A_init_event_list_sop.md green_init_event_list_sop.md)",
|
|
10
|
-
"Bash(git mv 6A_init_map_sop.md green_init_map_sop.md)",
|
|
11
|
-
"Bash(git mv 6A_model_sop.md green_model_sop.md)",
|
|
12
|
-
"Bash(git mv 6A_new_sop.md green_new_sop.md)",
|
|
13
|
-
"Bash(git mv 6A_rollback_sop.md green_rollback_sop.md)",
|
|
14
|
-
"Bash(git mv 6A_visual_logic_sop.md green_visual_logic_sop.md)",
|
|
15
|
-
"Bash(git mv 6A_code_implementation_sop.md green_code_implementation_sop.md)",
|
|
16
|
-
"Bash(git mv 6A_archive_sop.md green_archive_sop.md)",
|
|
17
|
-
"Bash(git mv 6A_continue_sop.md green_continue_sop.md)",
|
|
18
|
-
"Bash(git mv 6A_tasks_sop.md green_tasks_sop.md)",
|
|
19
|
-
"Bash(git mv 6A_clarify_sop.md green_clarify_sop.md)",
|
|
20
|
-
"Bash(git mv 6A_status_sop.md green_status_sop.md)",
|
|
21
|
-
"Bash(ls -la .6aspec/rules/green/6A_*.md)",
|
|
22
|
-
"Bash(xargs sed -i '' 's/6A_\\\\\\([a-z_]*\\\\\\)\\\\.md/green_\\\\1.md/g')",
|
|
23
|
-
"Bash(openspec --help)",
|
|
24
|
-
"Bash(openspec schemas --json 2>/dev/null | head -100)",
|
|
25
|
-
"Bash(openspec status --json 2>/dev/null | head -50)"
|
|
4
|
+
"Bash(git status:*)"
|
|
26
5
|
]
|
|
27
6
|
}
|
|
28
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# .codex/agents/6aspec-brown-implementer.toml
|
|
2
|
+
|
|
3
|
+
name = "6aspec-brown-implementer"
|
|
4
|
+
description = "执行棕地需求的单个 TASK 实现,包括写代码、单元测试和自我审查"
|
|
5
|
+
|
|
6
|
+
# read-only | workspace-write | danger-full-access
|
|
7
|
+
sandbox_mode = "workspace-write"
|
|
8
|
+
|
|
9
|
+
developer_instructions = """
|
|
10
|
+
读取并严格遵循:`.6aspec/rules/brown/subagents/implementer.md`
|
|
11
|
+
"""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# .codex/agents/6aspec-brown-spec-compliance-reviewer.toml
|
|
2
|
+
|
|
3
|
+
name = "6aspec-brown-spec-compliance-reviewer"
|
|
4
|
+
description = "检查实现是否符合 TASK 与 specs.md 的 AC/Scenario(不审查 design.md)"
|
|
5
|
+
|
|
6
|
+
# read-only | workspace-write | danger-full-access
|
|
7
|
+
sandbox_mode = "read-only"
|
|
8
|
+
|
|
9
|
+
developer_instructions = """
|
|
10
|
+
读取并严格遵循:`.6aspec/rules/brown/subagents/spec-compliance-reviewer.md`
|
|
11
|
+
"""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# .codex/agents/6aspec-code-reviewer.toml
|
|
2
|
+
|
|
3
|
+
name = "6aspec-code-reviewer"
|
|
4
|
+
description = "审查代码变更的生产就绪性,从代码质量、架构、测试、需求符合度四个维度评估,给出明确的合并建议"
|
|
5
|
+
|
|
6
|
+
# read-only | workspace-write | danger-full-access
|
|
7
|
+
sandbox_mode = "read-only"
|
|
8
|
+
|
|
9
|
+
developer_instructions = """
|
|
10
|
+
读取并严格遵循:`.6aspec/rules/common/code-reviewer-agent.md`
|
|
11
|
+
"""
|
|
@@ -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
|