6aspec 3.0.0-dev.3 → 3.0.0-dev.30

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 (107) hide show
  1. package/.6aspec/rules/biz/code.md +56 -97
  2. package/.6aspec/rules/biz/code_implementation_sop.md +7 -0
  3. package/.6aspec/rules/biz/java-build-test.md +28 -0
  4. package/.6aspec/rules/biz/use_case_orchestration_rule.md +63 -0
  5. package/.6aspec/rules/brown/brown_analyze_sop.md +6 -1
  6. package/.6aspec/rules/brown/brown_implement_sop.md +41 -15
  7. package/.6aspec/rules/brown/brown_tasks_sop.md +8 -13
  8. package/.6aspec/rules/brown/subagents/implementer.md +65 -26
  9. package/.6aspec/rules/brown/subagents/spec-compliance-reviewer.md +82 -10
  10. package/.6aspec/rules/common/code-reviewer-agent.md +149 -0
  11. package/.agents/skills/6aspec-brown-analyze/SKILL.md +10 -0
  12. package/.agents/skills/6aspec-brown-analyze/agents/openai.yaml +2 -0
  13. package/.agents/skills/6aspec-brown-archive/SKILL.md +10 -0
  14. package/.agents/skills/6aspec-brown-archive/agents/openai.yaml +6 -0
  15. package/.agents/skills/6aspec-brown-continue/SKILL.md +10 -0
  16. package/.agents/skills/6aspec-brown-continue/agents/openai.yaml +6 -0
  17. package/.agents/skills/6aspec-brown-design/SKILL.md +10 -0
  18. package/.agents/skills/6aspec-brown-design/agents/openai.yaml +2 -0
  19. package/.agents/skills/6aspec-brown-explore/SKILL.md +10 -0
  20. package/.agents/skills/6aspec-brown-explore/agents/openai.yaml +2 -0
  21. package/.agents/skills/6aspec-brown-ff/SKILL.md +10 -0
  22. package/.agents/skills/6aspec-brown-ff/agents/openai.yaml +2 -0
  23. package/.agents/skills/6aspec-brown-implement/SKILL.md +10 -0
  24. package/.agents/skills/6aspec-brown-implement/agents/openai.yaml +2 -0
  25. package/.agents/skills/6aspec-brown-list/SKILL.md +10 -0
  26. package/.agents/skills/6aspec-brown-list/agents/openai.yaml +2 -0
  27. package/.agents/skills/6aspec-brown-new/SKILL.md +10 -0
  28. package/.agents/skills/6aspec-brown-new/agents/openai.yaml +6 -0
  29. package/.agents/skills/6aspec-brown-proposal/SKILL.md +10 -0
  30. package/.agents/skills/6aspec-brown-proposal/agents/openai.yaml +2 -0
  31. package/.agents/skills/6aspec-brown-quick/SKILL.md +10 -0
  32. package/.agents/skills/6aspec-brown-quick/agents/openai.yaml +2 -0
  33. package/{.cursor/commands/6aspec/brown/impact.md → .agents/skills/6aspec-brown-review/SKILL.md} +5 -4
  34. package/.agents/skills/6aspec-brown-review/agents/openai.yaml +2 -0
  35. package/.agents/skills/6aspec-brown-rollback/SKILL.md +10 -0
  36. package/.agents/skills/6aspec-brown-rollback/agents/openai.yaml +6 -0
  37. package/.agents/skills/6aspec-brown-specs/SKILL.md +10 -0
  38. package/.agents/skills/6aspec-brown-specs/agents/openai.yaml +2 -0
  39. package/.agents/skills/6aspec-brown-status/SKILL.md +10 -0
  40. package/.agents/skills/6aspec-brown-status/agents/openai.yaml +7 -0
  41. package/.agents/skills/6aspec-brown-tasks/SKILL.md +10 -0
  42. package/.agents/skills/6aspec-brown-tasks/agents/openai.yaml +2 -0
  43. package/.agents/skills/6aspec-brown-update/SKILL.md +10 -0
  44. package/.agents/skills/6aspec-brown-update/agents/openai.yaml +5 -0
  45. package/.agents/skills/6aspec-brown-verify/SKILL.md +10 -0
  46. package/.agents/skills/6aspec-brown-verify/agents/openai.yaml +5 -0
  47. package/.agents/skills/6aspec-code/SKILL.md +9 -0
  48. package/.agents/skills/6aspec-code/agents/openai.yaml +2 -0
  49. package/.agents/skills/6aspec-review/SKILL.md +66 -0
  50. package/.agents/skills/6aspec-review/agents/openai.yaml +7 -0
  51. package/.claude/agents/{implementer.md → 6aspec-brown-implementer.md} +2 -1
  52. package/.claude/agents/6aspec-brown-spec-compliance-reviewer.md +7 -0
  53. package/.claude/agents/6aspec-code-reviewer.md +7 -0
  54. package/.claude/commands/6aspec/brown/analyze.md +1 -1
  55. package/.claude/commands/6aspec/brown/design.md +1 -1
  56. package/.claude/commands/6aspec/brown/quick.md +1 -1
  57. package/.claude/commands/6aspec/brown/review.md +1 -1
  58. package/.claude/commands/6aspec/brown/specs.md +1 -1
  59. package/.claude/commands/6aspec/brown/tasks.md +1 -1
  60. package/.claude/commands/6aspec/review.md +66 -0
  61. package/.claude/settings.local.json +1 -22
  62. package/.codex/agents/6aspec-brown-implementer.toml +11 -0
  63. package/.codex/agents/6aspec-brown-spec-compliance-reviewer.toml +13 -0
  64. package/.codex/agents/6aspec-code-reviewer.toml +13 -0
  65. package/.cursor/agents/6aspec-brown-implementer.md +7 -0
  66. package/.cursor/agents/6aspec-brown-spec-compliance-reviewer.md +8 -0
  67. package/.cursor/agents/6aspec-code-reviewer.md +8 -0
  68. package/.cursor/commands/6aspec-brown-analyze.md +9 -0
  69. package/.cursor/commands/{6aspec/brown/design.md → 6aspec-brown-design.md} +1 -1
  70. package/.cursor/commands/{6aspec/brown/implement.md → 6aspec-brown-implement.md} +1 -1
  71. package/.cursor/commands/{6aspec/brown/quick.md → 6aspec-brown-quick.md} +1 -1
  72. package/.cursor/commands/{6aspec/brown/review.md → 6aspec-brown-review.md} +1 -1
  73. package/.cursor/commands/{6aspec/brown/specs.md → 6aspec-brown-specs.md} +1 -1
  74. package/.cursor/commands/{6aspec/brown/tasks.md → 6aspec-brown-tasks.md} +1 -1
  75. package/.cursor/commands/6aspec-review.md +66 -0
  76. package/lib/cli.js +47 -11
  77. package/lib/installer.js +74 -23
  78. package/package.json +3 -1
  79. package/.claude/agents/spec-compliance-reviewer.md +0 -6
  80. package/.claude/commands/6aspec/brown/impact.md +0 -11
  81. package/.claude/commands/6aspec/brown/understand.md +0 -11
  82. package/.cursor/commands/6aspec/brown/understand.md +0 -9
  83. /package/.cursor/commands/{6aspec/brown/archive.md → 6aspec-brown-archive.md} +0 -0
  84. /package/.cursor/commands/{6aspec/brown/continue.md → 6aspec-brown-continue.md} +0 -0
  85. /package/.cursor/commands/{6aspec/brown/explore.md → 6aspec-brown-explore.md} +0 -0
  86. /package/.cursor/commands/{6aspec/brown/ff.md → 6aspec-brown-ff.md} +0 -0
  87. /package/.cursor/commands/{6aspec/brown/list.md → 6aspec-brown-list.md} +0 -0
  88. /package/.cursor/commands/{6aspec/brown/new.md → 6aspec-brown-new.md} +0 -0
  89. /package/.cursor/commands/{6aspec/brown/proposal.md → 6aspec-brown-proposal.md} +0 -0
  90. /package/.cursor/commands/{6aspec/brown/rollback.md → 6aspec-brown-rollback.md} +0 -0
  91. /package/.cursor/commands/{6aspec/brown/status.md → 6aspec-brown-status.md} +0 -0
  92. /package/.cursor/commands/{6aspec/brown/update.md → 6aspec-brown-update.md} +0 -0
  93. /package/.cursor/commands/{6aspec/brown/verify.md → 6aspec-brown-verify.md} +0 -0
  94. /package/.cursor/commands/{6aspec/code.md → 6aspec-code.md} +0 -0
  95. /package/.cursor/commands/{6aspec/green/archive.md → 6aspec-green-archive.md} +0 -0
  96. /package/.cursor/commands/{6aspec/green/clarify.md → 6aspec-green-clarify.md} +0 -0
  97. /package/.cursor/commands/{6aspec/green/continue.md → 6aspec-green-continue.md} +0 -0
  98. /package/.cursor/commands/{6aspec/green/design.md → 6aspec-green-design.md} +0 -0
  99. /package/.cursor/commands/{6aspec/green/implement.md → 6aspec-green-implement.md} +0 -0
  100. /package/.cursor/commands/{6aspec/green/import-model-table.md → 6aspec-green-import-model-table.md} +0 -0
  101. /package/.cursor/commands/{6aspec/green/init.md → 6aspec-green-init.md} +0 -0
  102. /package/.cursor/commands/{6aspec/green/model.md → 6aspec-green-model.md} +0 -0
  103. /package/.cursor/commands/{6aspec/green/new.md → 6aspec-green-new.md} +0 -0
  104. /package/.cursor/commands/{6aspec/green/rollback.md → 6aspec-green-rollback.md} +0 -0
  105. /package/.cursor/commands/{6aspec/green/status.md → 6aspec-green-status.md} +0 -0
  106. /package/.cursor/commands/{6aspec/green/tasks.md → 6aspec-green-tasks.md} +0 -0
  107. /package/.cursor/commands/{6aspec/green/visual-logic.md → 6aspec-green-visual-logic.md} +0 -0
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: "6aspec-review"
3
+ description: "独立代码审查。用于审查指定 diff 文件或 git 提交范围内的代码变更,并输出完整审查报告。"
4
+ ---
5
+
6
+ # 操作流程
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
+ ```
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "6ASpec code review"
3
+ short_description: "仅在显式调用时审查 diff 文件或指定 git 范围变更"
4
+ default_prompt: "使用 $6aspec-review 审查一个 diff 文件或 git 提交范围,并输出完整审查报告。"
5
+
6
+ policy:
7
+ allow_implicit_invocation: false
@@ -1,6 +1,7 @@
1
1
  ---
2
- name: implementer
2
+ name: 6aspec-brown-implementer
3
3
  description: 执行棕地需求的单个 TASK 实现,包括写代码、单元测试和自我审查,适用于 brown implement 阶段
4
+ model: inherit
4
5
  ---
5
6
 
6
7
  读取并严格遵循:`.6aspec/rules/brown/subagents/implementer.md`
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: 6aspec-brown-spec-compliance-reviewer
3
+ description: 检查实现是否符合 TASK 与 specs.md 的 AC/Scenario(不审查 design.md;设计对齐由实现阶段与 verify 等负责)
4
+ model: gpt-5.3-codex
5
+ ---
6
+
7
+ 读取并严格遵循:`.6aspec/rules/brown/subagents/spec-compliance-reviewer.md`
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: 6aspec-code-reviewer
3
+ description: 审查代码变更的生产就绪性,从代码质量、架构、测试、需求符合度四个维度评估,给出明确的合并建议
4
+ model: gpt-5.3-codex
5
+ ---
6
+
7
+ 读取并严格遵循:`.6aspec/rules/common/code-reviewer-agent.md`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "6aspec:brown: Analyze"
3
- description: Phase 1 - 需求澄清与影响面分析(合并原 Understand + Impact)
3
+ description: 需求澄清与影响面分析(合并原 Understand + Impact)
4
4
  category: Workflow
5
5
  tags: [workflow, requirement, analysis]
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "6aspec:brown: Design"
3
- description: Phase 3 - 技术方案设计(含 ADR 和技术债务识别)
3
+ description: 技术方案设计(含 ADR 和技术债务识别)
4
4
  category: Workflow
5
5
  tags: [workflow, requirement, design]
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "6aspec:brown: Quick"
3
- description: P2 需求快速通道(简化流程)
3
+ description: 需求快速通道(简化流程)
4
4
  category: Workflow
5
5
  tags: [workflow, requirement, quick]
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "6aspec:brown: Review"
3
- description: Phase 7 - 实施后评估
3
+ description: 实施后评估
4
4
  category: Workflow
5
5
  tags: [workflow, requirement, review]
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "6aspec:brown: Specs"
3
- description: Phase 1.5 - 需求规格定义
3
+ description: 需求规格定义
4
4
  category: Workflow
5
5
  tags: [workflow, requirement, specs]
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "6aspec:brown: Tasks"
3
- description: Phase 4 - 任务拆解与排期
3
+ description: 任务拆解与排期
4
4
  category: Workflow
5
5
  tags: [workflow, requirement, tasks]
6
6
  ---
@@ -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(ls -la .claude/commands/6aspec/green/*.md)",
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,13 @@
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
+ model = "gpt-5.2-codex"
10
+
11
+ developer_instructions = """
12
+ 读取并严格遵循:`.6aspec/rules/brown/subagents/spec-compliance-reviewer.md`
13
+ """
@@ -0,0 +1,13 @@
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
+ model = "gpt-5.2-codex"
10
+
11
+ developer_instructions = """
12
+ 读取并严格遵循:`.6aspec/rules/common/code-reviewer-agent.md`
13
+ """
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: 6aspec-brown-implementer
3
+ description: 执行棕地需求的单个 TASK 实现,包括写代码、单元测试和自我审查(Cursor 版)
4
+ model: inherit
5
+ ---
6
+
7
+ 读取并严格遵循:`.6aspec/rules/brown/subagents/implementer.md`
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: 6aspec-brown-spec-compliance-reviewer
3
+ description: 检查实现是否符合 TASK 与 specs.md 的 AC/Scenario(不审查 design.md;设计对齐由实现阶段与 verify 等流程负责)
4
+ model: gpt-5.3-codex
5
+ readonly: true
6
+ ---
7
+
8
+ 读取并严格遵循:`.6aspec/rules/brown/subagents/spec-compliance-reviewer.md`
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: 6aspec-code-reviewer
3
+ description: 审查代码变更的生产就绪性,从代码质量、架构、测试、需求符合度四个维度评估,给出明确的合并建议
4
+ model: gpt-5.3-codex
5
+ readonly: true
6
+ ---
7
+
8
+ 读取并严格遵循:`.6aspec/rules/common/code-reviewer-agent.md`
@@ -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
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Phase 3 - 技术方案设计(含 ADR 和技术债务识别)
2
+ description: 技术方案设计(含 ADR 和技术债务识别)
3
3
  alwaysApply: false
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: 执行任务实现
2
+ description: 执行任务实现;可选 --skipTest=true|false(未写则 false,标准单测模式)
3
3
  alwaysApply: false
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: P2 需求快速通道(简化流程)
2
+ description: 需求快速通道(简化流程)
3
3
  alwaysApply: false
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Phase 7 - 实施后评估
2
+ description: 实施后评估
3
3
  alwaysApply: false
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Phase 1.5 - 需求规格定义
2
+ description: 需求规格定义
3
3
  alwaysApply: false
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Phase 4 - 任务拆解与排期
2
+ description: 任务拆解与排期
3
3
  alwaysApply: false
4
4
  ---
5
5
 
@@ -0,0 +1,66 @@
1
+ ---
2
+ description: 独立代码审查(优先 DIFF,其次 git diff),不绑定任何流程,随时可用
3
+ alwaysApply: false
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
+ ```
package/lib/cli.js CHANGED
@@ -17,14 +17,37 @@ const CONFIG_FILE = '.6aspec/init.json';
17
17
  const TOOLS = [
18
18
  { id: 'cursor', name: 'Cursor', desc: 'Cursor IDE 配置' },
19
19
  { id: 'claude', name: 'Claude Code', desc: 'Claude Code CLI 配置' },
20
+ { id: 'codex', name: 'Codex CLI', desc: 'Codex CLI skills/agents 配置' },
20
21
  ];
21
22
 
22
23
  // Only the 6aspec-owned subdirectory is removed — user's own commands are untouched
23
24
  const TOOL_DIRS = {
24
25
  cursor: ['.cursor/commands/6aspec'],
25
26
  claude: ['.claude/commands/6aspec', '.claude/agents'],
27
+ codex: [
28
+ '.agents/skills/6aspec-brown-new',
29
+ '.agents/skills/6aspec-brown-explore',
30
+ '.agents/skills/6aspec-brown-analyze',
31
+ '.agents/skills/6aspec-brown-proposal',
32
+ '.agents/skills/6aspec-brown-specs',
33
+ '.agents/skills/6aspec-brown-design',
34
+ '.agents/skills/6aspec-brown-tasks',
35
+ '.agents/skills/6aspec-brown-implement',
36
+ '.agents/skills/6aspec-brown-verify',
37
+ '.agents/skills/6aspec-brown-review',
38
+ '.agents/skills/6aspec-brown-archive',
39
+ '.agents/skills/6aspec-brown-continue',
40
+ '.agents/skills/6aspec-brown-status',
41
+ '.agents/skills/6aspec-brown-list',
42
+ '.agents/skills/6aspec-brown-ff',
43
+ '.agents/skills/6aspec-brown-quick',
44
+ '.agents/skills/6aspec-brown-rollback',
45
+ '.agents/skills/6aspec-brown-update',
46
+ '.codex/agents/6aspec-brown-implementer.toml',
47
+ '.codex/agents/6aspec-brown-spec-compliance-reviewer.toml',
48
+ '.codex/agents/6aspec-code-reviewer.toml',
49
+ ],
26
50
  };
27
-
28
51
  // ─── Welcome Screen with Animation ──────────────────────────────────
29
52
 
30
53
  // Braille spinner frames
@@ -272,15 +295,23 @@ function writeConfig(targetDir, tools) {
272
295
 
273
296
  // ─── Tool removal ───────────────────────────────────────────────────
274
297
 
275
- function removeDirRecursive(dirPath) {
276
- if (!fs.existsSync(dirPath)) return;
277
- const entries = fs.readdirSync(dirPath, { withFileTypes: true });
278
- for (const entry of entries) {
279
- const full = path.join(dirPath, entry.name);
280
- if (entry.isDirectory()) removeDirRecursive(full);
281
- else fs.unlinkSync(full);
298
+ function removePathRecursive(targetPath) {
299
+ if (!fs.existsSync(targetPath)) return;
300
+ const stat = fs.lstatSync(targetPath);
301
+
302
+ if (stat.isDirectory()) {
303
+ const entries = fs.readdirSync(targetPath, { withFileTypes: true });
304
+ for (const entry of entries) {
305
+ const full = path.join(targetPath, entry.name);
306
+ if (entry.isDirectory()) removePathRecursive(full);
307
+ else fs.unlinkSync(full);
308
+ }
309
+ fs.rmdirSync(targetPath);
310
+ return;
282
311
  }
283
- fs.rmdirSync(dirPath);
312
+
313
+ // file or symlink
314
+ fs.unlinkSync(targetPath);
284
315
  }
285
316
 
286
317
  function removeToolFiles(targetDir, tools) {
@@ -289,13 +320,12 @@ function removeToolFiles(targetDir, tools) {
289
320
  for (const rel of dirs) {
290
321
  const full = path.join(targetDir, rel);
291
322
  if (fs.existsSync(full)) {
292
- removeDirRecursive(full);
323
+ removePathRecursive(full);
293
324
  console.log(`${GREEN}[INFO]${RESET} 已删除 ${rel}`);
294
325
  }
295
326
  }
296
327
  }
297
328
  }
298
-
299
329
  // Simple y/N prompt (readline, no raw mode needed)
300
330
  function promptConfirm(question) {
301
331
  return new Promise((resolve) => {
@@ -380,6 +410,9 @@ async function init(args) {
380
410
  case 'claude':
381
411
  installer.installClaude();
382
412
  break;
413
+ case 'codex':
414
+ installer.installCodex();
415
+ break;
383
416
  }
384
417
  }
385
418
 
@@ -439,6 +472,9 @@ async function update(args) {
439
472
  case 'claude':
440
473
  installer.installClaude();
441
474
  break;
475
+ case 'codex':
476
+ installer.installCodex();
477
+ break;
442
478
  }
443
479
  }
444
480