@pigcloud/skills 1.0.5 → 1.0.7

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 (35) hide show
  1. package/CHANGELOG.md +34 -70
  2. package/README.en.md +4 -3
  3. package/README.md +54 -74
  4. package/bin/cli.js +16 -15
  5. package/package.json +69 -69
  6. package/rules/coding/implementation.md +26 -30
  7. package/rules/product/project-context.md +29 -29
  8. package/rules/skill-profile-map.json +6 -5
  9. package/rules/skill-profile-map.md +6 -5
  10. package/scripts/ci-validator.sh +19 -19
  11. package/scripts/validate-skill-shapes.js +5 -4
  12. package/skills/{api-docs → api-contract-docs}/SKILL.md +5 -4
  13. package/skills/{extract-business-facts → business-fact-extraction}/SKILL.md +9 -8
  14. package/skills/{extract-business-facts → business-fact-extraction}/scripts/write-knowledge-base.js +4 -3
  15. package/skills/code-review/SKILL.md +7 -6
  16. package/skills/code-review/references/template-review.md +39 -214
  17. package/skills/domain-modeling/SKILL.md +4 -3
  18. package/skills/domain-modeling/references/distillation-checklist.md +44 -152
  19. package/skills/feature-build/SKILL.md +10 -10
  20. package/skills/feature-build/references/comment-specification.md +89 -102
  21. package/skills/knowledge-capture/SKILL.md +1 -1
  22. package/skills/{performance-check → performance-audit}/SKILL.md +5 -4
  23. package/skills/project-bootstrap/SKILL.md +3 -2
  24. package/skills/references/business-fact-extraction.md +9 -8
  25. package/skills/references/engineering-delivery-method.md +4 -3
  26. package/skills/references/engineering-delivery-template.md +3 -2
  27. package/skills/references/golden-prompt-suite.js +44 -43
  28. package/skills/references/project-requirement-alignment.md +2 -1
  29. package/skills/references/rule-loading-map.md +4 -3
  30. package/skills/references/skill-authoring-standard.md +4 -3
  31. package/skills/references/skill-reference-matrix.md +15 -14
  32. package/skills/{security-review → security-audit}/SKILL.md +4 -2
  33. package/skills/{spec → spec-refinement}/SKILL.md +19 -18
  34. package/skills/technical-design/SKILL.md +11 -10
  35. package/skills/test-design/SKILL.md +2 -1
@@ -1,12 +1,12 @@
1
1
  #!/bin/bash
2
- # ci-validator.sh - Skills CI 验证脚本
3
- # 用于验证技能文件的完整性和规范性
2
+ # ci-validator.sh - Skills CI 楠岃瘉鑴氭湰
3
+ # 鐢ㄤ簬楠岃瘉鎶€鑳芥枃浠剁殑瀹屾暣鎬у拰瑙勮寖鎬?
4
4
 
5
5
  set -e
6
6
 
7
7
  echo "=== Skills CI Validator ==="
8
8
 
9
- # 1. 检查技能文件完整性
9
+ # 1. 妫€鏌ユ妧鑳芥枃浠跺畬鏁存€?
10
10
  echo "[1/5] Checking skill files..."
11
11
  SKILLS_DIR="${SKILLS_DIR:-.trae/skills}"
12
12
  ERROR_COUNT=0
@@ -14,7 +14,7 @@ ERROR_COUNT=0
14
14
  for skill in $(find "$SKILLS_DIR" -name "SKILL.md" -type f); do
15
15
  skill_name=$(basename $(dirname "$skill"))
16
16
 
17
- # 检查 frontmatter
17
+ # 妫€鏌?frontmatter
18
18
  if ! grep -q "^name:" "$skill"; then
19
19
  echo "ERROR: Missing 'name' in $skill"
20
20
  ERROR_COUNT=$((ERROR_COUNT + 1))
@@ -30,7 +30,7 @@ for skill in $(find "$SKILLS_DIR" -name "SKILL.md" -type f); do
30
30
  echo "WARN: Missing 'version' in $skill"
31
31
  fi
32
32
 
33
- # 检查必要章节
33
+ # 妫€鏌ュ繀瑕佺珷鑺?
34
34
  for section in "When to Run" "Workflow"; do
35
35
  if ! grep -q "## $section" "$skill"; then
36
36
  echo "ERROR: Missing '$section' section in $skill"
@@ -38,21 +38,21 @@ for skill in $(find "$SKILLS_DIR" -name "SKILL.md" -type f); do
38
38
  fi
39
39
  done
40
40
 
41
- # 检查 Lifecycle Position(新增)
41
+ # 妫€鏌?Lifecycle Position锛堟柊澧烇級
42
42
  if ! grep -q "## Lifecycle Position" "$skill"; then
43
43
  echo "WARN: Missing 'Lifecycle Position' in $skill (recommended)"
44
44
  fi
45
45
 
46
- echo "✓ $skill_name valid"
46
+ echo "鉁?$skill_name valid"
47
47
  done
48
48
 
49
49
  if [ "$ERROR_COUNT" -gt 0 ]; then
50
50
  echo "ERROR: $ERROR_COUNT errors found in skill files"
51
51
  exit 1
52
52
  fi
53
- echo "Skill files valid"
53
+ echo "鉁?Skill files valid"
54
54
 
55
- # 2. 检查生命周期映射完整性
55
+ # 2. 妫€鏌ョ敓鍛藉懆鏈熸槧灏勫畬鏁存€?
56
56
  echo "[2/5] Checking lifecycle mapping..."
57
57
  LIFECYCLE_STAGES="define plan build verify review ship meta"
58
58
  for stage in $LIFECYCLE_STAGES; do
@@ -60,11 +60,11 @@ for stage in $LIFECYCLE_STAGES; do
60
60
  if [ "$count" -eq 0 ] && [ "$stage" != "meta" ]; then
61
61
  echo "WARN: No skill mapped to '$stage' stage"
62
62
  else
63
- echo "✓ $stage stage has $count skills"
63
+ echo "鉁?$stage stage has $count skills"
64
64
  fi
65
65
  done
66
66
 
67
- # 3. 检查技能间依赖一致性
67
+ # 3. 妫€鏌ユ妧鑳介棿渚濊禆涓€鑷存€?
68
68
  echo "[3/5] Checking skill dependencies..."
69
69
  for skill in $(find "$SKILLS_DIR" -name "SKILL.md" -type f); do
70
70
  deps=$(grep "^dependencies:" "$skill" | sed 's/dependencies: //' | tr ',' ' ' 2>/dev/null || echo "")
@@ -81,34 +81,34 @@ if [ "$ERROR_COUNT" -gt 0 ]; then
81
81
  echo "ERROR: Dependency errors found"
82
82
  exit 1
83
83
  fi
84
- echo "Dependencies valid"
84
+ echo "鉁?Dependencies valid"
85
85
 
86
- # 4. 检查 Reference Checklists
86
+ # 4. 妫€鏌?Reference Checklists
87
87
  echo "[4/5] Checking reference checklists..."
88
- REQUIRED_CHECKLISTS="coding-checklist.md solid-checklist.md security-checklist.md performance-checklist.md anti-rationalization.md"
88
+ REQUIRED_CHECKLISTS="coding-checklist.md solid-checklist.md security-checklist.md performance-auditlist.md anti-rationalization.md"
89
89
  for checklist in $REQUIRED_CHECKLISTS; do
90
90
  found=$(find "$SKILLS_DIR" -name "$checklist" -type f | wc -l)
91
91
  if [ "$found" -eq 0 ]; then
92
92
  echo "WARN: Missing reference checklist '$checklist'"
93
93
  else
94
- echo "Found $checklist"
94
+ echo "鉁?Found $checklist"
95
95
  fi
96
96
  done
97
97
 
98
- # 5. 检查 Agent Personas Slash Commands
98
+ # 5. 妫€鏌?Agent Personas 鍜?Slash Commands
99
99
  echo "[5/5] Checking agent personas and slash commands..."
100
100
  if [ ! -f "$SKILLS_DIR/../references/agent-personas.md" ]; then
101
101
  echo "WARN: Missing agent-personas.md"
102
102
  else
103
- echo "Found agent-personas.md"
103
+ echo "鉁?Found agent-personas.md"
104
104
  fi
105
105
 
106
106
  if [ ! -f "$SKILLS_DIR/../references/slash-commands.md" ]; then
107
107
  echo "WARN: Missing slash-commands.md"
108
108
  else
109
- echo "Found slash-commands.md"
109
+ echo "鉁?Found slash-commands.md"
110
110
  fi
111
111
 
112
112
  echo "=== CI Validator Complete ==="
113
113
  echo "All checks passed!"
114
- exit 0
114
+ exit 0
@@ -6,13 +6,13 @@ const path = require('path');
6
6
  const repoRoot = path.join(__dirname, '..');
7
7
  const skillsRoot = path.join(repoRoot, 'skills');
8
8
  const enhancedTemplateSkills = new Set([
9
- 'spec',
9
+ 'spec-refinement',
10
10
  'technical-design',
11
11
  'feature-build',
12
12
  'code-review',
13
- 'security-review',
14
- 'performance-check',
15
- 'extract-business-facts',
13
+ 'security-audit',
14
+ 'performance-audit',
15
+ 'business-fact-extraction',
16
16
  ]);
17
17
  const enhancedSections = [
18
18
  '## Quick Start',
@@ -140,3 +140,4 @@ try {
140
140
  console.error(error.message);
141
141
  process.exitCode = 1;
142
142
  }
143
+
@@ -1,10 +1,10 @@
1
1
  ---
2
- name: api-docs
3
- description: 当接口需要可复用参考文档时,记录稳定的 API 行为、请求/响应契约和示例
2
+ name: api-contract-docs
3
+ description: 当接口需要可复用参考文档时,记录稳定的 API 行为、请求、响应契约和示例
4
4
  lifecycle_stage: capture
5
5
  rule_profile: api
6
6
  dependencies:
7
- - spec
7
+ - spec-refinement
8
8
  triggers:
9
9
  - API docs
10
10
  - contract
@@ -36,7 +36,7 @@ refs:
36
36
  - rules/index.md
37
37
  ---
38
38
 
39
- # API Docs
39
+ # API Contract Docs
40
40
 
41
41
  ## Purpose
42
42
 
@@ -74,3 +74,4 @@ Write clear API documentation and contracts for already defined behavior.
74
74
  - `skills/references/prompt-replay-checklist.md`
75
75
  - `skills/references/full-chain-replay-scenarios.md`
76
76
  - `rules/index.md`
77
+
@@ -1,6 +1,6 @@
1
1
  ---
2
- name: extract-business-facts
3
- description: Extract business facts, current behaviors, invariants, and terminology from code, tests, logs, and docs when Codex needs to reverse-engineer what the system actually does or prepare evidence-backed input for domain modeling, spec refinement, or knowledge capture.
2
+ name: business-fact-extraction
3
+ description: Codex 需要逆向理解系统真实行为或为领域建模、需求细化或知识沉淀准备证据时,从代码、测试、日志和文档中提取业务事实、当前行为、不变量和术语
4
4
  lifecycle_stage: analysis
5
5
  rule_profile: modeling
6
6
  dependencies: []
@@ -30,7 +30,7 @@ workflow:
30
30
  - mark each fact as evidence-backed, inferred, or unknown
31
31
  - summarize gaps, contradictions, and open questions
32
32
  - choose the destination knowledge-base files before writing the final note
33
- - hand off to domain-modeling, spec, or knowledge-capture
33
+ - hand off to domain-modeling, spec-refinement, or knowledge-capture
34
34
  gates:
35
35
  - stop at fact extraction
36
36
  - do not design a new solution
@@ -43,7 +43,7 @@ refs:
43
43
  - docs/codewiki-knowledge-base.md
44
44
  ---
45
45
 
46
- # Extract Business Facts
46
+ # Business Fact Extraction
47
47
 
48
48
  ## Purpose
49
49
 
@@ -59,12 +59,12 @@ Turn code-backed evidence into reusable business facts.
59
59
  - Start from code paths, tests, docs, runtime traces, and schemas.
60
60
  - Produce the output in three stages: code facts, business facts, and CodeWiki updates.
61
61
  - Keep evidence, inference, and unknowns distinct.
62
- - Hand off the result when the facts are stable enough for `domain-modeling`, `spec`, or `knowledge-capture`.
62
+ - Hand off the result when the facts are stable enough for `domain-modeling`, `spec-refinement`, or `knowledge-capture`.
63
63
 
64
64
  ## Write Back
65
65
 
66
66
  - When the user wants persistence, render the staged output into a JSON fact pack.
67
- - Use `skills/extract-business-facts/scripts/write-knowledge-base.js` to write the pack into the knowledge-base files.
67
+ - Use `skills/business-fact-extraction/scripts/write-knowledge-base.js` to write the pack into the knowledge-base files.
68
68
  - Keep the pack keyed by target file path under `knowledge-base/`.
69
69
  - Write only the smallest matching file for each fact.
70
70
  - Treat the script as a writer, not as a second analysis pass.
@@ -251,7 +251,7 @@ Turn code-backed evidence into reusable business facts.
251
251
  - decision: inventory must be reserved before order confirmation
252
252
  - reason: avoid overselling
253
253
  - date or context: 2026-06-22, order flow review
254
- - affected artifact: checkout spec
254
+ - affected artifact: checkout spec-refinement
255
255
  - notes: failure should return a clear stock shortage message
256
256
 
257
257
  #### `knowledge-base/requirements/acceptance.md`
@@ -303,7 +303,7 @@ Turn code-backed evidence into reusable business facts.
303
303
  5. Map each section to the exact knowledge-base files it should update.
304
304
  6. Mark each fact as evidence-backed, inferred, or unknown.
305
305
  7. Summarize gaps, contradictions, and open questions.
306
- 8. Hand off to `domain-modeling`, `spec`, or `knowledge-capture`.
306
+ 8. Hand off to `domain-modeling`, `spec-refinement`, or `knowledge-capture`.
307
307
 
308
308
  ## Replay Signals
309
309
 
@@ -334,3 +334,4 @@ Turn code-backed evidence into reusable business facts.
334
334
  - `skills/references/skill-reference-matrix.md`
335
335
  - `skills/references/rule-loading-map.md`
336
336
  - `docs/codewiki-knowledge-base.md`
337
+
@@ -4,8 +4,8 @@ const fs = require('fs');
4
4
  const path = require('path');
5
5
 
6
6
  const REPO_ROOT = path.join(__dirname, '..', '..', '..');
7
- const START_MARKER = '<!-- extract-business-facts:start -->';
8
- const END_MARKER = '<!-- extract-business-facts:end -->';
7
+ const START_MARKER = '<!-- business-fact-extraction:start -->';
8
+ const END_MARKER = '<!-- business-fact-extraction:end -->';
9
9
 
10
10
  const FILE_FIELD_ORDER = {
11
11
  'knowledge-base/realtime-code/modules.md': ['module', 'current responsibility', 'key entry points', 'important constraints', 'last verified'],
@@ -43,7 +43,7 @@ const SAMPLE_PACK = {
43
43
  decision: 'inventory must be reserved before order confirmation',
44
44
  reason: 'avoid overselling',
45
45
  'date or context': '2026-06-22, order flow review',
46
- 'affected artifact': 'checkout spec',
46
+ 'affected artifact': 'checkout spec-refinement',
47
47
  notes: 'failure should return a clear stock shortage message'
48
48
  }
49
49
  ],
@@ -225,3 +225,4 @@ try {
225
225
  console.error(error.message);
226
226
  process.exitCode = 1;
227
227
  }
228
+
@@ -26,8 +26,8 @@ workflow:
26
26
  - lock the review scope
27
27
  - identify the tech stack and load the matching review overlay(s)
28
28
  - inspect correctness, maintainability, and regression risk
29
- - route security-specific issues to `security-review`
30
- - route performance-specific issues to `performance-check`
29
+ - route security-specific issues to `security-audit`
30
+ - route performance-specific issues to `performance-audit`
31
31
  - rank findings by severity
32
32
  - produce an actionable review report
33
33
  gates:
@@ -63,8 +63,8 @@ Review a change set and return actionable findings.
63
63
  - Identify the stack(s) first. This repository may apply Java, Vue, or mixed-stack review overlays.
64
64
  - Read the diff with the current rules bundle in mind.
65
65
  - Report findings with severity and a concrete fix path.
66
- - If the issue is clearly about auth, secrets, or exposure, hand off to `security-review`.
67
- - If the issue is clearly about latency, throughput, or resource usage, hand off to `performance-check`.
66
+ - If the issue is clearly about auth, secrets, or exposure, hand off to `security-audit`.
67
+ - If the issue is clearly about latency, throughput, or resource usage, hand off to `performance-audit`.
68
68
  - Keep stack-specific concerns in the matching overlay and keep the core review generic.
69
69
 
70
70
  ## Report Format
@@ -96,8 +96,8 @@ Review a change set and return actionable findings.
96
96
  1. Lock the review scope.
97
97
  2. Identify the stack overlays and load the matching review baseline(s) when applicable.
98
98
  3. Inspect correctness, maintainability, and regression risk.
99
- 4. Route security-specific issues to `security-review`.
100
- 5. Route performance-specific issues to `performance-check`.
99
+ 4. Route security-specific issues to `security-audit`.
100
+ 5. Route performance-specific issues to `performance-audit`.
101
101
  6. Rank findings by severity.
102
102
  7. Produce an actionable review report.
103
103
 
@@ -133,3 +133,4 @@ Review a change set and return actionable findings.
133
133
  - `rules/review/code.md`
134
134
  - `rules/review/java.md`
135
135
  - `rules/review/vue.md`
136
+
@@ -1,214 +1,39 @@
1
- # 代码评审报告模板
2
-
3
- > 用于 code-review Skill 输出的标准格式
4
-
5
- ---
6
-
7
- ## 模板内容
8
-
9
- ```markdown
10
- # 代码评审报告
11
-
12
- ## 评审概要
13
-
14
- | 字段 | 内容 |
15
- |------|------|
16
- | 评审时间 | {datetime} |
17
- | 评审文件数 | {count} |
18
- | 变更行数 | +{add} / -{del} |
19
- | 评审耗时 | {duration} |
20
- | 规则覆盖率 | {coverage}% |
21
- | Rubric 评分 | {score}/10 |
22
-
23
- ---
24
-
25
- ## 问题列表
26
-
27
- ### P0 问题(阻断性 - 必须修复)
28
-
29
- #### 问题 #1
30
-
31
- | 字段 | 内容 |
32
- |------|------|
33
- | 文件 | `{filePath}` |
34
- | 行号 | {lineNumber} |
35
- | 规则 | {ruleId}: {ruleName} |
36
- | 类型 | MUST / NEVER |
37
- | 问题 | {问题描述} |
38
- | 代码 | `{问题代码片段}` |
39
- | 修复 | `{修复建议}` |
40
- | 依据 | [规则定义](references/rules.md#{ruleId}) |
41
-
42
- ---
43
-
44
- ### P1 问题(严重 - 必须修复)
45
-
46
- #### 问题 #2
47
-
48
- | 字段 | 内容 |
49
- |------|------|
50
- | 文件 | `{filePath}` |
51
- | 行号 | {lineNumber} |
52
- | 规则 | {ruleId}: {ruleName} |
53
- | 类型 | MUST / NEVER |
54
- | 问题 | {问题描述} |
55
- | 代码 | `{问题代码片段}` |
56
- | 修复 | `{修复建议}` |
57
- | 依据 | [规则定义](references/rules.md#{ruleId}) |
58
-
59
- ---
60
-
61
- ### P2 问题(最佳实践 - 建议修复)
62
-
63
- #### 问题 #3
64
-
65
- | 字段 | 内容 |
66
- |------|------|
67
- | 文件 | `{filePath}` |
68
- | 行号 | {lineNumber} |
69
- | 规则 | {ruleId}: {ruleName} |
70
- | 问题 | {问题描述} |
71
- | 修复 | `{修复建议}` |
72
-
73
- ---
74
-
75
- ### P3 问题(建议改进)
76
-
77
- #### 问题 #4
78
-
79
- | 字段 | 内容 |
80
- |------|------|
81
- | 文件 | `{filePath}` |
82
- | 规则 | {ruleId}: {ruleName} |
83
- | 问题 | {问题描述} |
84
- | 建议 | `{改进建议}` |
85
-
86
- ---
87
-
88
- ## 跨模块影响分析
89
-
90
- ### 变更文件
91
-
92
- | 文件 | 类型 | 模块 |
93
- |------|------|------|
94
- | `{filePath}` | 新增 / 修改 / 删除 | `{module}` |
95
-
96
- ### 影响模块
97
-
98
- | 模块 | 影响类型 | 变更内容 | 建议 |
99
- |------|----------|----------|------|
100
- | `{module}` | API变更 / 依赖变更 / 数据变更 | `{content}` | `{suggestion}` |
101
-
102
- ### 依赖关系图
103
-
104
- ```
105
- {moduleA} → {moduleB} → {moduleC}
106
-
107
- {moduleD}
108
- ```
109
-
110
- ---
111
-
112
- ## 安全检查结果
113
-
114
- | 维度 | 结果 | 问题数 | 详情 |
115
- |------|------|--------|------|
116
- | 硬编码 | ✅ / ⚠️ | {count} | {details} |
117
- | 日志 | ✅ / ⚠️ | {count} | {details} |
118
- | SQL注入 | ✅ / ⚠️ | {count} | {details} |
119
- | XSS | ✅ / ⚠️ | {count} | {details} |
120
-
121
- ---
122
-
123
- ## 性能检查结果
124
-
125
- | 维度 | 结果 | 问题数 | 详情 |
126
- |------|------|--------|------|
127
- | N+1查询 | ✅ / ⚠️ | {count} | {details} |
128
- | Left-fuzzy LIKE | ✅ / ⚠️ | {count} | {details} |
129
- | 批量操作 | ✅ / ⚠️ | {count} | {details} |
130
-
131
- ---
132
-
133
- ## Rubric 自检结果
134
-
135
- | 规则 | 结果 | 说明 |
136
- |------|------|------|
137
- | R1: 渐进式加载 | ✅ / ⚠️ | {message} |
138
- | R2: 规则覆盖率 | ✅ / ⚠️ | {coverage}% |
139
- | R3: 位置准确性 | ✅ / ⚠️ | 偏差 {diff} 行 |
140
- | R4: 可解释性 | ✅ / ⚠️ | {coverage}% |
141
- | R5: 问题分级 | ✅ / ⚠️ | {message} |
142
- | R6: 跨模块影响 | ✅ / ⚠️ | {message} |
143
- | R7: 输出格式 | ✅ / ⚠️ | {message} |
144
- | R8: 确认节点 | ✅ / ⚠️ | {message} |
145
- | R9: Pre-Delivery | ✅ / ⚠️ | {message} |
146
- | R10: 反 Slop | ✅ / ⚠️ | {message} |
147
-
148
- ---
149
-
150
- ## 评审结论
151
-
152
- | 结论 | 条件 | 当前状态 |
153
- |------|------|----------|
154
- | ✅ 通过 | 0 个 P0/P1 问题 | {status} |
155
- | ⚠️ 需修改后通过 | 有 P0/P1 问题,修复后重新评审 | {status} |
156
- | ❌ 不通过 | >5 个 P0 问题 | {status} |
157
-
158
- ---
159
-
160
- ## 下一步建议
161
-
162
- 1. {修复建议1}
163
- 2. {修复建议2}
164
- 3. 执行 `mvn compile -q` 验证编译
165
- 4. 执行 `mvn test -q` 验证测试
166
- 5. 重新提交评审
167
-
168
- ---
169
-
170
- ## 评审人
171
-
172
- | 字段 | 内容 |
173
- |------|------|
174
- | 评审工具 | pig-skills code-review v{version} |
175
- | 评审模型 | {model} |
176
- | Rubric 评分 | {score}/10 |
177
-
178
- ---
179
-
180
- *报告生成时间: {timestamp}*
181
- ```
182
-
183
- ---
184
-
185
- ## 使用说明
186
-
187
- ### 填充变量
188
-
189
- | 变量 | 来源 |
190
- |------|------|
191
- | `{datetime}` | 当前时间 |
192
- | `{count}` | Git diff 文件数 |
193
- | `{add}` / `{del}` | Git diff 行数统计 |
194
- | `{duration}` | 评审耗时 |
195
- | `{coverage}` | lint 脚本计算 |
196
- | `{score}` | Rubric 自检结果 |
197
- | `{filePath}` | 变更文件路径 |
198
- | `{lineNumber}` | lint 脚本定位 |
199
- | `{ruleId}` | 规则ID(MUST-001 等) |
200
- | `{ruleName}` | 规则名称 |
201
- | `{module}` | 模块名称(包路径) |
202
-
203
- ### 输出位置
204
-
205
- ```
206
- .agents/specs/REVIEW-{timestamp}.md
207
- ```
208
-
209
- ### 命名规则
210
-
211
- ```
212
- REVIEW-{YYYYMMDD}-{HHMMSS}.md
213
- 例如: REVIEW-20260616-143000.md
214
- ```
1
+ # 代码审查报告模板
2
+
3
+ > 代码审查结果的标准输出格式,用于保持结论清晰、可复核、可归档。
4
+
5
+ ---
6
+
7
+ ## 基本信息
8
+
9
+ | 字段 | 说明 |
10
+ |------|------|
11
+ | 审查时间 | {datetime} |
12
+ | 审查对象 | {repo / branch / pr} |
13
+ | 审查人 | {reviewer} |
14
+ | 审查范围 | {diff / files / modules} |
15
+
16
+ ## 结论摘要
17
+
18
+ - 总体结论:{pass / pass with comments / fail}
19
+ - 风险等级:{low / medium / high}
20
+ - 是否建议合并:{yes / no}
21
+
22
+ ## 发现项
23
+
24
+ | 等级 | 文件 | 问题 | 建议 |
25
+ |------|------|------|------|
26
+ | P0 | {file} | {issue} | {fix} |
27
+ | P1 | {file} | {issue} | {fix} |
28
+ | P2 | {file} | {issue} | {fix} |
29
+
30
+ ## 验证信息
31
+
32
+ - 已运行的检查:{lint / test / manual check}
33
+ - 未覆盖的风险:{gaps}
34
+ - 需要补充的证据:{evidence}
35
+
36
+ ## 备注
37
+
38
+ - 如果没有发现问题,也要明确说明“未发现阻断项”。
39
+ - 如果有假设,要明确标注假设来源。
@@ -23,7 +23,7 @@ workflow:
23
23
  - extract the core domain terms
24
24
  - group concepts by boundary
25
25
  - identify aggregates and dependencies
26
- - hand off to technical-design or spec
26
+ - hand off to technical-design or spec-refinement
27
27
  gates:
28
28
  - stop at domain boundaries
29
29
  - do not implement code
@@ -51,14 +51,14 @@ Extract domain boundaries and core concepts from messy input.
51
51
  1. Extract the core domain terms.
52
52
  2. Group concepts by boundary.
53
53
  3. Identify aggregates and dependencies.
54
- 4. Hand off to `technical-design` or `spec`.
54
+ 4. Hand off to `technical-design` or `spec-refinement`.
55
55
 
56
56
  ## Replay Signals
57
57
 
58
58
  - Input signal: existing business language, product context, code, or documents.
59
59
  - Output to verify: domain map, core concepts, boundary notes.
60
60
  - Stop signal: implementation code or PRD drafting.
61
- - Handoff signal: the boundary map is ready for `technical-design` or `spec`.
61
+ - Handoff signal: the boundary map is ready for `technical-design` or `spec-refinement`.
62
62
 
63
63
  ## Examples
64
64
 
@@ -78,3 +78,4 @@ Extract domain boundaries and core concepts from messy input.
78
78
  - `skills/references/rule-loading-map.md`
79
79
  - `skills/references/prompt-replay-checklist.md`
80
80
  - `skills/references/full-chain-replay-scenarios.md`
81
+