@fitlab-ai/agent-infra 0.6.5 → 0.7.1
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/README.md +51 -25
- package/README.zh-CN.md +49 -23
- package/bin/cli.ts +1 -1
- package/dist/bin/cli.js +1 -1
- package/dist/lib/builtin-tuis.js +45 -0
- package/dist/lib/defaults.json +4 -0
- package/dist/lib/init.js +65 -23
- package/dist/lib/prompt.js +49 -1
- package/dist/lib/sandbox/commands/create.js +4 -2
- package/dist/lib/sandbox/commands/enter.js +15 -4
- package/dist/lib/sandbox/commands/list-running.js +153 -0
- package/dist/lib/sandbox/commands/ls.js +24 -45
- package/dist/lib/sandbox/commands/rebuild.js +7 -13
- package/dist/lib/sandbox/commands/rm.js +2 -0
- package/dist/lib/sandbox/config.js +3 -0
- package/dist/lib/sandbox/image-prune.js +18 -0
- package/dist/lib/sandbox/index.js +2 -1
- package/dist/lib/sandbox/runtimes/ai-tools.dockerfile +10 -6
- package/dist/lib/sandbox/task-resolver.js +18 -0
- package/dist/lib/sandbox/tools.js +213 -8
- package/dist/lib/update.js +70 -18
- package/lib/builtin-tuis.ts +55 -0
- package/lib/defaults.json +4 -0
- package/lib/init.ts +97 -35
- package/lib/prompt.ts +54 -1
- package/lib/sandbox/commands/create.ts +10 -2
- package/lib/sandbox/commands/enter.ts +14 -4
- package/lib/sandbox/commands/list-running.ts +188 -0
- package/lib/sandbox/commands/ls.ts +28 -49
- package/lib/sandbox/commands/rebuild.ts +12 -14
- package/lib/sandbox/commands/rm.ts +3 -0
- package/lib/sandbox/config.ts +7 -0
- package/lib/sandbox/image-prune.ts +23 -0
- package/lib/sandbox/index.ts +2 -1
- package/lib/sandbox/runtimes/ai-tools.dockerfile +10 -6
- package/lib/sandbox/task-resolver.ts +23 -1
- package/lib/sandbox/tools.ts +248 -9
- package/lib/update.ts +85 -30
- package/package.json +1 -1
- package/templates/.agents/QUICKSTART.en.md +1 -1
- package/templates/.agents/QUICKSTART.zh-CN.md +1 -1
- package/templates/.agents/README.en.md +111 -2
- package/templates/.agents/README.zh-CN.md +111 -2
- package/templates/.agents/rules/create-issue.en.md +1 -1
- package/templates/.agents/rules/create-issue.github.en.md +1 -1
- package/templates/.agents/rules/create-issue.github.zh-CN.md +1 -1
- package/templates/.agents/rules/create-issue.zh-CN.md +1 -1
- package/templates/.agents/rules/issue-sync.github.en.md +6 -5
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +6 -5
- package/templates/.agents/rules/milestone-inference.github.en.md +2 -2
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +2 -2
- package/templates/.agents/rules/no-mid-flow-questions.en.md +57 -0
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +57 -0
- package/templates/.agents/rules/pr-sync.github.en.md +4 -5
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +4 -5
- package/templates/.agents/rules/task-management.en.md +9 -6
- package/templates/.agents/rules/task-management.zh-CN.md +9 -6
- package/templates/.agents/rules/task-short-id.en.md +141 -0
- package/templates/.agents/rules/task-short-id.zh-CN.md +124 -0
- package/templates/.agents/rules/testing-discipline.en.md +2 -2
- package/templates/.agents/rules/testing-discipline.zh-CN.md +2 -2
- package/templates/.agents/scripts/task-short-id.js +713 -0
- package/templates/.agents/scripts/validate-artifact.js +1 -1
- package/templates/.agents/skills/analyze-task/SKILL.en.md +20 -4
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +20 -5
- package/templates/.agents/skills/block-task/SKILL.en.md +12 -0
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +12 -1
- package/templates/.agents/skills/cancel-task/SKILL.en.md +12 -0
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +12 -1
- package/templates/.agents/skills/check-task/SKILL.en.md +47 -32
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +46 -32
- package/templates/.agents/skills/close-codescan/SKILL.en.md +11 -0
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +11 -0
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +11 -0
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +11 -0
- package/templates/.agents/skills/code-task/SKILL.en.md +121 -0
- package/templates/.agents/skills/{implement-task → code-task}/SKILL.zh-CN.md +55 -25
- package/templates/.agents/skills/{implement-task → code-task}/config/verify.en.json +4 -4
- package/templates/.agents/skills/{implement-task → code-task}/config/verify.zh-CN.json +4 -4
- package/templates/.agents/skills/{implement-task → code-task}/reference/branch-management.zh-CN.md +2 -2
- package/templates/.agents/skills/{implement-task/reference/implementation-rules.en.md → code-task/reference/code-rules.en.md} +6 -6
- package/templates/.agents/skills/{implement-task/reference/implementation-rules.zh-CN.md → code-task/reference/code-rules.zh-CN.md} +3 -3
- package/templates/.agents/skills/code-task/reference/dual-mode.en.md +69 -0
- package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +69 -0
- package/templates/.agents/skills/{refine-task/reference/fix-workflow.en.md → code-task/reference/fix-mode.en.md} +12 -12
- package/templates/.agents/skills/{refine-task/reference/fix-workflow.zh-CN.md → code-task/reference/fix-mode.zh-CN.md} +8 -8
- package/templates/.agents/skills/code-task/reference/output-template.en.md +20 -0
- package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +20 -0
- package/templates/.agents/skills/{implement-task → code-task}/reference/report-template.en.md +4 -4
- package/templates/.agents/skills/{implement-task → code-task}/reference/report-template.zh-CN.md +3 -3
- package/templates/.agents/skills/code-task/scripts/detect-mode.js +370 -0
- package/templates/.agents/skills/commit/SKILL.en.md +6 -2
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +6 -2
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +10 -6
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +10 -6
- package/templates/.agents/skills/complete-task/SKILL.en.md +17 -3
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +17 -4
- package/templates/.agents/skills/create-pr/SKILL.en.md +21 -1
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +21 -1
- package/templates/.agents/skills/create-task/SKILL.en.md +14 -0
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +14 -1
- package/templates/.agents/skills/import-codescan/SKILL.en.md +15 -1
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +15 -1
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +16 -2
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +16 -2
- package/templates/.agents/skills/import-issue/SKILL.en.md +17 -3
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +17 -3
- package/templates/.agents/skills/plan-task/SKILL.en.md +8 -4
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +8 -5
- package/templates/.agents/skills/restore-task/SKILL.en.md +16 -3
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +16 -4
- package/templates/.agents/skills/review-analysis/SKILL.en.md +80 -0
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +105 -0
- package/templates/.agents/skills/review-analysis/config/verify.en.json +51 -0
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +51 -0
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +87 -0
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +87 -0
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +90 -0
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +91 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +47 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +47 -0
- package/templates/.agents/skills/{review-task → review-code}/SKILL.en.md +15 -9
- package/templates/.agents/skills/{review-task → review-code}/SKILL.zh-CN.md +19 -10
- package/templates/.agents/skills/{review-task → review-code}/config/verify.en.json +7 -5
- package/templates/.agents/skills/{review-task → review-code}/config/verify.zh-CN.json +6 -4
- package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.en.md +21 -17
- package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.zh-CN.md +19 -15
- package/templates/.agents/skills/{review-task → review-code}/reference/report-template.en.md +5 -6
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +91 -0
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +48 -0
- package/templates/.agents/skills/{review-task → review-code}/reference/review-criteria.zh-CN.md +10 -4
- package/templates/.agents/skills/review-plan/SKILL.en.md +80 -0
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +105 -0
- package/templates/.agents/skills/{refine-task → review-plan}/config/verify.en.json +14 -10
- package/templates/.agents/skills/{refine-task → review-plan}/config/verify.zh-CN.json +14 -10
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +87 -0
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +87 -0
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +90 -0
- package/templates/.agents/skills/{review-task → review-plan}/reference/report-template.zh-CN.md +3 -3
- package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +47 -0
- package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +47 -0
- package/templates/.agents/skills/test/SKILL.en.md +2 -2
- package/templates/.agents/skills/test/SKILL.zh-CN.md +13 -31
- package/templates/.agents/skills/update-agent-infra/SKILL.en.md +1 -0
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +1 -0
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +113 -21
- package/templates/.agents/templates/task.en.md +4 -3
- package/templates/.agents/templates/task.zh-CN.md +3 -2
- package/templates/.agents/workflows/bug-fix.en.yaml +126 -80
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +90 -44
- package/templates/.agents/workflows/feature-development.en.yaml +115 -70
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +92 -47
- package/templates/.agents/workflows/refactoring.en.yaml +123 -78
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +89 -44
- package/templates/.claude/commands/code-task.en.md +8 -0
- package/templates/.claude/commands/code-task.zh-CN.md +8 -0
- package/templates/.claude/commands/review-analysis.en.md +8 -0
- package/templates/.claude/commands/review-analysis.zh-CN.md +8 -0
- package/templates/.claude/commands/review-code.en.md +8 -0
- package/templates/.claude/commands/review-code.zh-CN.md +8 -0
- package/templates/.claude/commands/review-plan.en.md +8 -0
- package/templates/.claude/commands/review-plan.zh-CN.md +8 -0
- package/templates/.gemini/commands/_project_/archive-tasks.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/code-task.en.toml +8 -0
- package/templates/.gemini/commands/_project_/code-task.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/review-analysis.en.toml +8 -0
- package/templates/.gemini/commands/_project_/review-analysis.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/review-code.en.toml +8 -0
- package/templates/.gemini/commands/_project_/review-code.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/review-plan.en.toml +8 -0
- package/templates/.gemini/commands/_project_/review-plan.zh-CN.toml +8 -0
- package/templates/.opencode/commands/code-task.en.md +11 -0
- package/templates/.opencode/commands/code-task.zh-CN.md +11 -0
- package/templates/.opencode/commands/review-analysis.en.md +11 -0
- package/templates/.opencode/commands/review-analysis.zh-CN.md +11 -0
- package/templates/.opencode/commands/review-code.en.md +11 -0
- package/templates/.opencode/commands/review-code.zh-CN.md +11 -0
- package/templates/.opencode/commands/review-plan.en.md +11 -0
- package/templates/.opencode/commands/review-plan.zh-CN.md +11 -0
- package/templates/.agents/skills/implement-task/SKILL.en.md +0 -173
- package/templates/.agents/skills/implement-task/reference/output-template.en.md +0 -20
- package/templates/.agents/skills/implement-task/reference/output-template.zh-CN.md +0 -20
- package/templates/.agents/skills/refine-task/SKILL.en.md +0 -153
- package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +0 -153
- package/templates/.agents/skills/refine-task/reference/report-template.en.md +0 -64
- package/templates/.agents/skills/refine-task/reference/report-template.zh-CN.md +0 -64
- package/templates/.agents/skills/review-task/reference/review-criteria.en.md +0 -42
- package/templates/.claude/commands/implement-task.en.md +0 -8
- package/templates/.claude/commands/implement-task.zh-CN.md +0 -8
- package/templates/.claude/commands/refine-task.en.md +0 -8
- package/templates/.claude/commands/refine-task.zh-CN.md +0 -8
- package/templates/.claude/commands/review-task.en.md +0 -8
- package/templates/.claude/commands/review-task.zh-CN.md +0 -8
- package/templates/.gemini/commands/_project_/implement-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/refine-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/review-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +0 -8
- package/templates/.opencode/commands/implement-task.en.md +0 -11
- package/templates/.opencode/commands/implement-task.zh-CN.md +0 -11
- package/templates/.opencode/commands/refine-task.en.md +0 -11
- package/templates/.opencode/commands/refine-task.zh-CN.md +0 -11
- package/templates/.opencode/commands/review-task.en.md +0 -11
- package/templates/.opencode/commands/review-task.zh-CN.md +0 -11
- /package/templates/.agents/skills/{implement-task → code-task}/reference/branch-management.en.md +0 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# 审查报告模板
|
|
2
|
+
|
|
3
|
+
编写 `review-analysis.md` 或 `review-analysis-r{N}.md` 时使用本模板。
|
|
4
|
+
|
|
5
|
+
## 输出模板
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# 代码审查报告
|
|
9
|
+
|
|
10
|
+
- **审查轮次**:第 {review-round} 轮
|
|
11
|
+
- **产物文件**:`{review-artifact}`
|
|
12
|
+
- **审查输入**:
|
|
13
|
+
- `{code-artifact}`
|
|
14
|
+
- `{code-artifact}`(如存在)
|
|
15
|
+
|
|
16
|
+
## 状态核对
|
|
17
|
+
|
|
18
|
+
> 粘贴状态核对命令原文;每条命令以 `$ ` 开头。
|
|
19
|
+
|
|
20
|
+
## 审查摘要
|
|
21
|
+
|
|
22
|
+
- **审查者**:{reviewer-name}
|
|
23
|
+
- **审查时间**:{timestamp}
|
|
24
|
+
- **审查范围**:{file-count and major modules}
|
|
25
|
+
- **总体结论**:{通过 / 需要修改 / 拒绝}
|
|
26
|
+
- **发现(AI 可处理)**:0 阻塞项,0 主要,0 次要 / **env-blocked**:0
|
|
27
|
+
|
|
28
|
+
## 问题清单
|
|
29
|
+
|
|
30
|
+
### 阻塞项(必须修复)
|
|
31
|
+
|
|
32
|
+
#### 1. {问题标题}
|
|
33
|
+
**文件**:`{file-path}:{line-number}`
|
|
34
|
+
**说明**:{details}
|
|
35
|
+
**修复建议**:{fix suggestion}
|
|
36
|
+
|
|
37
|
+
### 主要问题(建议修复)
|
|
38
|
+
|
|
39
|
+
#### 1. {问题标题}
|
|
40
|
+
**文件**:`{file-path}:{line-number}`
|
|
41
|
+
**说明**:{details}
|
|
42
|
+
**修复建议**:{fix suggestion}
|
|
43
|
+
|
|
44
|
+
### 次要问题(可选改进)
|
|
45
|
+
|
|
46
|
+
#### 1. {改进点}
|
|
47
|
+
**文件**:`{file-path}:{line-number}`
|
|
48
|
+
**建议**:{improvement suggestion}
|
|
49
|
+
|
|
50
|
+
## 环境性遗留
|
|
51
|
+
|
|
52
|
+
> AI agent 在本执行环境无法闭环的项;不参与下一轮 refine。维护者在 PR description 中以「待人工验证」清单承接。
|
|
53
|
+
|
|
54
|
+
#### 1. {环境性项标题}
|
|
55
|
+
**文件**:`{file-path}:{line-number}`(如适用)
|
|
56
|
+
**说明**:{details}
|
|
57
|
+
**所需环境**:{e.g. Docker 沙箱 / macOS host / 特权 root / 第三方账号}
|
|
58
|
+
**待人工执行的验证步骤**:{steps for the human verifier}
|
|
59
|
+
|
|
60
|
+
> 如本轮无 env-blocked 项,保留段落标题并写「(无)」。
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## 证据原文
|
|
64
|
+
|
|
65
|
+
> 每条“我验证了 X”断言都要配对对应 tool output 原文;gate 仅校验本段存在和至少一行 `$ `。
|
|
66
|
+
|
|
67
|
+
- 断言:{verified claim}
|
|
68
|
+
```text
|
|
69
|
+
$ {command}
|
|
70
|
+
{raw output}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## 亮点
|
|
74
|
+
|
|
75
|
+
- {what went well}
|
|
76
|
+
|
|
77
|
+
## 与方案一致性
|
|
78
|
+
|
|
79
|
+
- [ ] 实现与技术方案一致
|
|
80
|
+
- [ ] 没有意外的范围扩张
|
|
81
|
+
|
|
82
|
+
## 结论与建议
|
|
83
|
+
|
|
84
|
+
### 审查决定
|
|
85
|
+
- [ ] 通过
|
|
86
|
+
- [ ] 需要修改
|
|
87
|
+
- [ ] 拒绝
|
|
88
|
+
|
|
89
|
+
### 下一步
|
|
90
|
+
{recommended next step}
|
|
91
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Review Criteria
|
|
2
|
+
|
|
3
|
+
Read this file before reviewing requirement analysis artifacts or classifying finding severity.
|
|
4
|
+
|
|
5
|
+
## Requirement Analysis Review
|
|
6
|
+
|
|
7
|
+
Follow the `analysis-review` step in `.agents/workflows/feature-development.yaml`.
|
|
8
|
+
|
|
9
|
+
**Required review areas**:
|
|
10
|
+
- [ ] Requirement scope, goals, and non-goals are clear
|
|
11
|
+
- [ ] Acceptance criteria are verifiable
|
|
12
|
+
- [ ] Affected areas, dependencies, and constraints are sufficiently identified
|
|
13
|
+
- [ ] Risks, edge cases, and open questions are recorded
|
|
14
|
+
- [ ] The design stage has enough input to proceed
|
|
15
|
+
- [ ] The analysis matches the original Issue or user request
|
|
16
|
+
|
|
17
|
+
**Common anti-examples**:
|
|
18
|
+
- Treating implementation design as requirement analysis and locking in technical details too early
|
|
19
|
+
- Restating the Issue without adding impact scope, risks, or acceptance criteria
|
|
20
|
+
- Presenting uncertain information as fact without marking assumptions or open questions
|
|
21
|
+
|
|
22
|
+
## Common Review Principles
|
|
23
|
+
|
|
24
|
+
1. **Strict but fair**: identify issues and acknowledge solid work
|
|
25
|
+
2. **Specific**: cite exact file paths and line numbers
|
|
26
|
+
3. **Actionable**: suggest a concrete fix
|
|
27
|
+
4. **Severity-based**: clearly distinguish blockers, major issues, and minor issues
|
|
28
|
+
|
|
29
|
+
## Environment-Blocked Classification
|
|
30
|
+
|
|
31
|
+
Some findings cannot be closed by an AI agent in the current execution environment, for example:
|
|
32
|
+
|
|
33
|
+
- Missing Docker / sandbox access for end-to-end validation
|
|
34
|
+
- Missing a specific OS for macOS-only behavior
|
|
35
|
+
- Missing third-party accounts / OAuth
|
|
36
|
+
- Missing privileged operations such as root, sudo, or special network access
|
|
37
|
+
|
|
38
|
+
**Decision tree**: "Can the AI agent close this item independently without changing the environment?"
|
|
39
|
+
- Yes -> blocker / major / minor, based on risk
|
|
40
|
+
- No -> **env-blocked** (a meta-category, not part of severity ordering)
|
|
41
|
+
|
|
42
|
+
Where env-blocked items go:
|
|
43
|
+
- Record them in an independent review report section named "Environment-Blocked Findings"
|
|
44
|
+
- Include them at the end of the numeric summary, for example `(+ 1 env-blocked)`
|
|
45
|
+
- Do **not** include them in the code-task fix loop; maintainers carry them in the PR description under manual verification
|
|
46
|
+
|
|
47
|
+
Also inspect the latest requirement analysis artifact and `task.md` Activity Log so the report reflects the full analysis context.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# 审查标准
|
|
2
|
+
|
|
3
|
+
在审查需求分析或划分问题严重程度之前先读取本文件。
|
|
4
|
+
|
|
5
|
+
## 执行需求分析审查
|
|
6
|
+
|
|
7
|
+
遵循 `.agents/workflows/feature-development.yaml` 中的 `analysis-review` 步骤。
|
|
8
|
+
|
|
9
|
+
**必查范围**:
|
|
10
|
+
- [ ] 需求范围、目标和非目标是否清晰
|
|
11
|
+
- [ ] 验收标准是否可验证
|
|
12
|
+
- [ ] 受影响区域、依赖和约束是否识别充分
|
|
13
|
+
- [ ] 风险、边界情况和开放问题是否记录
|
|
14
|
+
- [ ] 后续设计阶段是否有足够输入
|
|
15
|
+
- [ ] 与原始 Issue / 用户需求是否一致
|
|
16
|
+
|
|
17
|
+
**常见反例**:
|
|
18
|
+
- 把实现方案当作需求分析,提前锁定技术细节
|
|
19
|
+
- 只复述 Issue 文案,没有补充影响范围、风险和验收标准
|
|
20
|
+
- 对无法确认的信息直接下结论,没有标记假设或开放问题
|
|
21
|
+
|
|
22
|
+
## 通用审查原则
|
|
23
|
+
|
|
24
|
+
1. **严格但公正**:既要指出问题,也要承认做得好的部分
|
|
25
|
+
2. **具体**:引用准确的文件路径和行号
|
|
26
|
+
3. **可执行**:给出明确可落地的修复建议
|
|
27
|
+
4. **按严重程度分类**:明确区分 blocker、major 和 minor
|
|
28
|
+
|
|
29
|
+
## 环境性遗留分类
|
|
30
|
+
|
|
31
|
+
某些发现项是 AI agent 在本执行环境**无法闭环**的,例如:
|
|
32
|
+
|
|
33
|
+
- 缺 Docker / 沙箱而无法跑端到端验证
|
|
34
|
+
- 缺特定 OS(macOS-only 行为)
|
|
35
|
+
- 缺第三方账号 / OAuth
|
|
36
|
+
- 缺特权操作(root、sudo、特殊网络)
|
|
37
|
+
|
|
38
|
+
**分类决策树**:「AI agent 能否在不改环境的前提下独立闭环这一项?」
|
|
39
|
+
- 是 -> blocker / major / minor 之一(按风险定档)
|
|
40
|
+
- 否 -> **env-blocked**(元类目,不参与严重程度排序)
|
|
41
|
+
|
|
42
|
+
env-blocked 项的去向:
|
|
43
|
+
- 写入 review 报告独立段落「环境性遗留」
|
|
44
|
+
- 在数字摘要末尾附带显示(如 `(+ 1 env-blocked)`)
|
|
45
|
+
- **不**进入 code-task 修复循环;维护者在 PR description 中以「待人工验证」清单形式承接
|
|
46
|
+
|
|
47
|
+
同时检查最新需求分析产物和 `task.md` Activity Log,确保报告反映完整的分析上下文。
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: review-
|
|
3
|
-
description: "Review
|
|
2
|
+
name: review-code
|
|
3
|
+
description: "Review code implementation and output a code review report"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Code Review
|
|
7
7
|
|
|
8
|
-
Review the latest
|
|
8
|
+
Review the latest code round and produce `review-code.md` or `review-code-r{N}.md`.
|
|
9
9
|
|
|
10
10
|
## Boundary / Critical Rules
|
|
11
11
|
|
|
@@ -36,23 +36,27 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
36
36
|
|
|
37
37
|
Before the state check is complete, do not make external-state assertions such as "the code is unchanged", "tests passed", or "there are no other references", including in reasoning. This gate is only a structural floor; evidence pairing and authenticity still require the report template and review discipline.
|
|
38
38
|
|
|
39
|
+
## Task id short ref
|
|
40
|
+
|
|
41
|
+
> If `{task-id}` begins with `#`, follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
42
|
+
|
|
39
43
|
## Steps
|
|
40
44
|
|
|
41
45
|
### 1. Verify Prerequisites
|
|
42
46
|
|
|
43
47
|
Require:
|
|
44
48
|
- `.agents/workspace/active/{task-id}/task.md`
|
|
45
|
-
- at least one
|
|
49
|
+
- at least one code artifact: `code.md` or `code-r{N}.md`
|
|
46
50
|
|
|
47
51
|
### 2. Determine Review Round
|
|
48
52
|
|
|
49
53
|
Scan the task directory and record:
|
|
50
54
|
- `{review-round}`
|
|
51
|
-
- `{review-artifact}` as `review.md` or `review-r{N}.md`
|
|
55
|
+
- `{review-artifact}` as `review-code.md` or `review-code-r{N}.md`
|
|
52
56
|
|
|
53
57
|
### 3. Read Implementation and Refinement Context
|
|
54
58
|
|
|
55
|
-
Read the highest-round
|
|
59
|
+
Read the highest-round code artifact and, if present, the highest-round fix artifact.
|
|
56
60
|
|
|
57
61
|
### 4. Perform the Review
|
|
58
62
|
|
|
@@ -91,7 +95,7 @@ If task.md contains a valid `issue_number`, perform these sync actions (skip and
|
|
|
91
95
|
Run the verification gate to confirm the task artifact and sync state are valid:
|
|
92
96
|
|
|
93
97
|
```bash
|
|
94
|
-
node .agents/scripts/validate-artifact.js gate review-
|
|
98
|
+
node .agents/scripts/validate-artifact.js gate review-code .agents/workspace/active/{task-id} {review-artifact} --format text
|
|
95
99
|
```
|
|
96
100
|
|
|
97
101
|
Handle the result as follows:
|
|
@@ -105,6 +109,8 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
105
109
|
|
|
106
110
|
> Execute this step only after the verification gate passes.
|
|
107
111
|
|
|
112
|
+
> **Important — branch labels are not values for the verdict field**. The four labels below are user-output template categories (scenarios A/B/C/D), **not** values for the `**Overall Verdict**:` field. The field accepts exactly one of the three canonical values (`Approved` / `Changes Requested` / `Rejected`, or zh-CN `通过` / `需要修改` / `拒绝`); combined phrases like `Approved with issues` will be rejected by the verify gate.
|
|
113
|
+
|
|
108
114
|
Choose exactly one branch based on the findings:
|
|
109
115
|
- no blockers, no major, no minor -> approved with no issues
|
|
110
116
|
- no blockers, but major or minor findings -> approved with issues
|
|
@@ -127,11 +133,11 @@ Include all TUI command formats in the next-step output. If `.agents/.airc.json`
|
|
|
127
133
|
|
|
128
134
|
## Notes
|
|
129
135
|
|
|
130
|
-
- Round 1 uses `review.md`; later rounds use `review-r{N}.md`
|
|
136
|
+
- Round 1 uses `review-code.md`; later rounds use `review-code-r{N}.md`
|
|
131
137
|
- Always cite concrete file paths and line numbers in findings
|
|
132
138
|
- Review severity must distinguish blockers, major issues, and minor issues
|
|
133
139
|
|
|
134
140
|
## Error Handling
|
|
135
141
|
|
|
136
142
|
- Task not found: `Task {task-id} not found`
|
|
137
|
-
- Missing
|
|
143
|
+
- Missing code report: `Code report not found, please run the code-task skill first`
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: review-
|
|
3
|
-
description: "
|
|
2
|
+
name: review-code
|
|
3
|
+
description: "审查代码实现并输出代码审查报告"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# 代码审查
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
审查最新代码轮次,并产出 `review-code.md` 或 `review-code-r{N}.md`。
|
|
9
9
|
|
|
10
10
|
## 行为边界 / 关键规则
|
|
11
11
|
|
|
@@ -36,19 +36,22 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
36
36
|
|
|
37
37
|
状态核对完成前,禁止任何关于外部状态的断言(例如“代码没变”“测试已通过”“没有其他引用”),包括思考阶段。本门禁只提供结构下限;逐条证据配对和真实性仍需按报告模板与审查要求核对。
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## 任务入参短号别名
|
|
40
|
+
|
|
41
|
+
> 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
40
42
|
|
|
43
|
+
## 执行步骤
|
|
41
44
|
### 1. 验证前置条件
|
|
42
45
|
|
|
43
46
|
要求存在:
|
|
44
47
|
- `.agents/workspace/active/{task-id}/task.md`
|
|
45
|
-
- 至少一个实现产物:`
|
|
48
|
+
- 至少一个实现产物:`code.md` 或 `code-r{N}.md`
|
|
46
49
|
|
|
47
50
|
### 2. 确定审查轮次
|
|
48
51
|
|
|
49
52
|
扫描任务目录并记录:
|
|
50
53
|
- `{review-round}`
|
|
51
|
-
- 作为本轮产物的 `{review-artifact}`,格式为 `review.md` 或 `review-r{N}.md`
|
|
54
|
+
- 作为本轮产物的 `{review-artifact}`,格式为 `review-code.md` 或 `review-code-r{N}.md`
|
|
52
55
|
|
|
53
56
|
### 3. 阅读实现与修复上下文
|
|
54
57
|
|
|
@@ -75,7 +78,11 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
75
78
|
date "+%Y-%m-%d %H:%M:%S%:z"
|
|
76
79
|
```
|
|
77
80
|
|
|
78
|
-
|
|
81
|
+
- `current_step`:code-review
|
|
82
|
+
- `assigned_to`:{当前代理}
|
|
83
|
+
- `updated_at`:{当前时间}
|
|
84
|
+
- `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
|
|
85
|
+
- 追加:
|
|
79
86
|
`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code Review (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}[ (+ {n} env-blocked)] → {artifact-filename}`
|
|
80
87
|
|
|
81
88
|
env-blocked = 0 时省略括号部分;env-blocked > 0 时附加 ` (+ {n} env-blocked)`。
|
|
@@ -91,7 +98,7 @@ env-blocked = 0 时省略括号部分;env-blocked > 0 时附加 ` (+ {n} env-b
|
|
|
91
98
|
运行完成校验,确认任务产物和同步状态符合规范:
|
|
92
99
|
|
|
93
100
|
```bash
|
|
94
|
-
node .agents/scripts/validate-artifact.js gate review-
|
|
101
|
+
node .agents/scripts/validate-artifact.js gate review-code .agents/workspace/active/{task-id} {review-artifact} --format text
|
|
95
102
|
```
|
|
96
103
|
|
|
97
104
|
处理结果:
|
|
@@ -105,6 +112,8 @@ node .agents/scripts/validate-artifact.js gate review-task .agents/workspace/act
|
|
|
105
112
|
|
|
106
113
|
> 仅在校验通过后执行本步骤。
|
|
107
114
|
|
|
115
|
+
> **重要:分支名 ≠ 字段值**。以下 4 个标签是用户输出模板的分类(场景 A/B/C/D),**不是**产物 `**总体结论**:` 字段的取值。产物字段只取 3 个规范值之一(`通过` / `需要修改` / `拒绝`,或 EN 对应 `Approved` / `Changes Requested` / `Rejected`);写成 `通过但有问题`、`通过 / 需要修改` 等组合短语会被 verify gate 拦下。
|
|
116
|
+
|
|
108
117
|
必须先判断结果,再只选择一个输出分支:
|
|
109
118
|
- 无 blocker、major、minor -> 通过且无问题
|
|
110
119
|
- 无 blocker,但有 major 或 minor -> 通过但有问题
|
|
@@ -127,11 +136,11 @@ env-blocked 的数量不参与分支选择,仅在数字摘要末尾附带显
|
|
|
127
136
|
|
|
128
137
|
## 注意事项
|
|
129
138
|
|
|
130
|
-
- 首轮审查使用 `review.md`,后续轮次使用 `review-r{N}.md`
|
|
139
|
+
- 首轮审查使用 `review-code.md`,后续轮次使用 `review-code-r{N}.md`
|
|
131
140
|
- 所有问题都要引用具体文件路径和行号
|
|
132
141
|
- 严重程度必须区分 blocker、major、minor
|
|
133
142
|
|
|
134
143
|
## 错误处理
|
|
135
144
|
|
|
136
145
|
- 任务未找到:`Task {task-id} not found`
|
|
137
|
-
- 缺少实现报告:`
|
|
146
|
+
- 缺少实现报告:`Code report not found, please run the code-task skill first`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"skill": "review-
|
|
2
|
+
"skill": "review-code",
|
|
3
3
|
"checks": {
|
|
4
4
|
"task-meta": {
|
|
5
5
|
"required_fields": [
|
|
@@ -12,21 +12,23 @@
|
|
|
12
12
|
"agent_infra_version",
|
|
13
13
|
"current_step",
|
|
14
14
|
"assigned_to"
|
|
15
|
-
]
|
|
15
|
+
],
|
|
16
|
+
"expected_step": "code-review"
|
|
16
17
|
},
|
|
17
18
|
"artifact": {
|
|
18
|
-
"file_pattern": "review.md|review-r{N}.md",
|
|
19
|
+
"file_pattern": "review-code.md|review-code-r{N}.md",
|
|
19
20
|
"required_sections": [
|
|
20
21
|
"Review Summary",
|
|
21
22
|
"Findings",
|
|
22
23
|
"Environment-Blocked Findings",
|
|
23
|
-
"Conclusion and
|
|
24
|
+
"Conclusion and Recommendations",
|
|
24
25
|
"State Check",
|
|
25
26
|
"Evidence"
|
|
26
27
|
],
|
|
27
28
|
"required_patterns": [
|
|
28
29
|
"^### Approval Decision$",
|
|
29
|
-
"^\\$ "
|
|
30
|
+
"^\\$ ",
|
|
31
|
+
"^- \\*\\*Overall Verdict\\*\\*[::]\\s*(?:通过|需要修改|拒绝|Approved|Changes Requested|Rejected)\\s*$"
|
|
30
32
|
],
|
|
31
33
|
"freshness_minutes": 30
|
|
32
34
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"skill": "review-
|
|
2
|
+
"skill": "review-code",
|
|
3
3
|
"checks": {
|
|
4
4
|
"task-meta": {
|
|
5
5
|
"required_fields": [
|
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
"agent_infra_version",
|
|
13
13
|
"current_step",
|
|
14
14
|
"assigned_to"
|
|
15
|
-
]
|
|
15
|
+
],
|
|
16
|
+
"expected_step": "code-review"
|
|
16
17
|
},
|
|
17
18
|
"artifact": {
|
|
18
|
-
"file_pattern": "review.md|review-r{N}.md",
|
|
19
|
+
"file_pattern": "review-code.md|review-code-r{N}.md",
|
|
19
20
|
"required_sections": [
|
|
20
21
|
"审查摘要",
|
|
21
22
|
"问题清单",
|
|
@@ -26,7 +27,8 @@
|
|
|
26
27
|
],
|
|
27
28
|
"required_patterns": [
|
|
28
29
|
"^### 审查决定$",
|
|
29
|
-
"^\\$ "
|
|
30
|
+
"^\\$ ",
|
|
31
|
+
"^- \\*\\*总体结论\\*\\*[::]\\s*(?:通过|需要修改|拒绝|Approved|Changes Requested|Rejected)\\s*$"
|
|
30
32
|
],
|
|
31
33
|
"freshness_minutes": 30
|
|
32
34
|
},
|
package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.en.md
RENAMED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Read this file before presenting the final review result to the user.
|
|
4
4
|
|
|
5
|
+
> This file describes the four **user reply** categories (Branches A/B/C/D) used in the "Inform User" step. It is **not** the value of the review-code artifact's `**Overall Verdict**:` field — that field is fixed to one of three canonical tokens (`Approved` / `Changes Requested` / `Rejected`, or zh-CN `通过` / `需要修改` / `拒绝`). Do not mix the two.
|
|
6
|
+
|
|
5
7
|
## Choose Exactly One Output Branch
|
|
6
8
|
|
|
7
9
|
Apply these rules in order (**note: env-blocked counts do not participate in selection**):
|
|
@@ -30,7 +32,7 @@ Next step - commit the code:
|
|
|
30
32
|
- Codex CLI: $commit
|
|
31
33
|
|
|
32
34
|
[When env-blocked > 0, append this final line:]
|
|
33
|
-
Reminder: env-blocked findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /
|
|
35
|
+
Reminder: env-blocked findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
|
|
34
36
|
```
|
|
35
37
|
|
|
36
38
|
### Branch B: Approved with Findings
|
|
@@ -40,18 +42,18 @@ Task {task-id} review completed. Verdict: approved.
|
|
|
40
42
|
- Blockers: 0 | Major: {n} | Minor: {n}[ | env-blocked: {n} (outside AI repair scope)]
|
|
41
43
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
42
44
|
|
|
43
|
-
Next step -
|
|
44
|
-
- Claude Code / OpenCode: /
|
|
45
|
-
- Gemini CLI: /agent-infra:
|
|
46
|
-
- Codex CLI: $
|
|
45
|
+
Next step - fix before commit (recommended):
|
|
46
|
+
- Claude Code / OpenCode: /code-task {task-id}
|
|
47
|
+
- Gemini CLI: /agent-infra:code-task {task-id}
|
|
48
|
+
- Codex CLI: $code-task {task-id}
|
|
47
49
|
|
|
48
|
-
Or commit directly (skip
|
|
50
|
+
Or commit directly (skip fix):
|
|
49
51
|
- Claude Code / OpenCode: /commit
|
|
50
52
|
- Gemini CLI: /agent-infra:commit
|
|
51
53
|
- Codex CLI: $commit
|
|
52
54
|
|
|
53
55
|
[When env-blocked > 0, append this final line:]
|
|
54
|
-
Reminder: env-blocked findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /
|
|
56
|
+
Reminder: env-blocked findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
|
|
55
57
|
```
|
|
56
58
|
|
|
57
59
|
### Branch C: Changes Requested
|
|
@@ -62,26 +64,28 @@ Task {task-id} review completed. Verdict: changes requested.
|
|
|
62
64
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
63
65
|
|
|
64
66
|
Next step - fix the findings:
|
|
65
|
-
- Claude Code / OpenCode: /
|
|
66
|
-
- Gemini CLI: /agent-infra:
|
|
67
|
-
- Codex CLI: $
|
|
67
|
+
- Claude Code / OpenCode: /code-task {task-id}
|
|
68
|
+
- Gemini CLI: /agent-infra:code-task {task-id}
|
|
69
|
+
- Codex CLI: $code-task {task-id}
|
|
68
70
|
|
|
69
71
|
[When env-blocked > 0, append this final line:]
|
|
70
|
-
Reminder: env-blocked findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /
|
|
72
|
+
Reminder: env-blocked findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
|
|
71
73
|
```
|
|
72
74
|
|
|
73
75
|
### Branch D: Rejected
|
|
74
76
|
|
|
75
77
|
```text
|
|
76
|
-
Task {task-id} review completed. Verdict: rejected,
|
|
78
|
+
Task {task-id} review completed. Verdict: rejected, re-design the technical plan.
|
|
77
79
|
- Blockers: {n} | Major: {n} | Minor: {n}[ | env-blocked: {n} (outside AI repair scope)]
|
|
78
80
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
79
81
|
|
|
80
|
-
Next step - re-
|
|
81
|
-
- Claude Code / OpenCode: /
|
|
82
|
-
- Gemini CLI: /agent-infra:
|
|
83
|
-
- Codex CLI: $
|
|
82
|
+
Next step - re-design the technical plan:
|
|
83
|
+
- Claude Code / OpenCode: /plan-task {task-id}
|
|
84
|
+
- Gemini CLI: /agent-infra:plan-task {task-id}
|
|
85
|
+
- Codex CLI: $plan-task {task-id}
|
|
86
|
+
|
|
87
|
+
> Note: Rejected means the implementation direction needs to be reworked end-to-end, not patched locally. `code-task/scripts/detect-mode.js` branch #7 refuses a direct `/code-task` and requires a fresh plan first.
|
|
84
88
|
|
|
85
89
|
[When env-blocked > 0, append this final line:]
|
|
86
|
-
Reminder: env-blocked findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /
|
|
90
|
+
Reminder: env-blocked findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
|
|
87
91
|
```
|
package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.zh-CN.md
RENAMED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
在向用户汇报最终审查结论之前先读取本文件。
|
|
4
4
|
|
|
5
|
+
> 本文件描述的是**用户回执文本**的 4 个分类(场景 A/B/C/D),用于「向用户汇报结论」步骤。它**不是** review-code 产物的 `**总体结论**:` 字段值——字段值固定为 3 个规范 token(`通过` / `需要修改` / `拒绝`,或 EN 对应 `Approved` / `Changes Requested` / `Rejected`)。两者不可混用。
|
|
6
|
+
|
|
5
7
|
## 选择唯一输出场景
|
|
6
8
|
|
|
7
9
|
按以下顺序判断(**注意:env-blocked 数量不参与判断**):
|
|
@@ -30,7 +32,7 @@
|
|
|
30
32
|
- Codex CLI:$commit
|
|
31
33
|
|
|
32
34
|
[当 env-blocked > 0 时,在最后附加一行:]
|
|
33
|
-
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /
|
|
35
|
+
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
|
|
34
36
|
```
|
|
35
37
|
|
|
36
38
|
### 场景 B:通过但有问题
|
|
@@ -41,9 +43,9 @@
|
|
|
41
43
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
42
44
|
|
|
43
45
|
下一步 - 修复问题后提交(推荐):
|
|
44
|
-
- Claude Code / OpenCode:/
|
|
45
|
-
- Gemini CLI:/agent-infra:
|
|
46
|
-
- Codex CLI:$
|
|
46
|
+
- Claude Code / OpenCode:/code-task {task-id}
|
|
47
|
+
- Gemini CLI:/agent-infra:code-task {task-id}
|
|
48
|
+
- Codex CLI:$code-task {task-id}
|
|
47
49
|
|
|
48
50
|
或直接提交(跳过修复):
|
|
49
51
|
- Claude Code / OpenCode:/commit
|
|
@@ -51,7 +53,7 @@
|
|
|
51
53
|
- Codex CLI:$commit
|
|
52
54
|
|
|
53
55
|
[当 env-blocked > 0 时,在最后附加一行:]
|
|
54
|
-
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /
|
|
56
|
+
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
|
|
55
57
|
```
|
|
56
58
|
|
|
57
59
|
### 场景 C:需要修改
|
|
@@ -62,26 +64,28 @@
|
|
|
62
64
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
63
65
|
|
|
64
66
|
下一步 - 修复问题:
|
|
65
|
-
- Claude Code / OpenCode:/
|
|
66
|
-
- Gemini CLI:/agent-infra:
|
|
67
|
-
- Codex CLI:$
|
|
67
|
+
- Claude Code / OpenCode:/code-task {task-id}
|
|
68
|
+
- Gemini CLI:/agent-infra:code-task {task-id}
|
|
69
|
+
- Codex CLI:$code-task {task-id}
|
|
68
70
|
|
|
69
71
|
[当 env-blocked > 0 时,在最后附加一行:]
|
|
70
|
-
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /
|
|
72
|
+
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
|
|
71
73
|
```
|
|
72
74
|
|
|
73
75
|
### 场景 D:拒绝
|
|
74
76
|
|
|
75
77
|
```text
|
|
76
|
-
任务 {task-id}
|
|
78
|
+
任务 {task-id} 代码审查完成。结论:拒绝,需要重新设计方案。
|
|
77
79
|
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n}[ | 环境性遗留:{n}(不在 AI 修复范围)]
|
|
78
80
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
79
81
|
|
|
80
|
-
下一步 -
|
|
81
|
-
- Claude Code / OpenCode:/
|
|
82
|
-
- Gemini CLI:/agent-infra:
|
|
83
|
-
- Codex CLI:$
|
|
82
|
+
下一步 - 重新设计技术方案:
|
|
83
|
+
- Claude Code / OpenCode:/plan-task {task-id}
|
|
84
|
+
- Gemini CLI:/agent-infra:plan-task {task-id}
|
|
85
|
+
- Codex CLI:$plan-task {task-id}
|
|
86
|
+
|
|
87
|
+
> 注意:Rejected 表示实现方向需要整体重做,不是局部修复。`code-task/scripts/detect-mode.js` 分支 #7 会拒绝直接 `/code-task`,要求先重新方案设计。
|
|
84
88
|
|
|
85
89
|
[当 env-blocked > 0 时,在最后附加一行:]
|
|
86
|
-
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /
|
|
90
|
+
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
|
|
87
91
|
```
|
package/templates/.agents/skills/{review-task → review-code}/reference/report-template.en.md
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Review Report Template
|
|
2
2
|
|
|
3
|
-
Use this template when writing `review.md` or `review-r{N}.md`.
|
|
3
|
+
Use this template when writing `review-code.md` or `review-code-r{N}.md`.
|
|
4
4
|
|
|
5
5
|
## Output Template
|
|
6
6
|
|
|
@@ -9,9 +9,8 @@ Use this template when writing `review.md` or `review-r{N}.md`.
|
|
|
9
9
|
|
|
10
10
|
- **Review Round**: Round {review-round}
|
|
11
11
|
- **Artifact File**: `{review-artifact}`
|
|
12
|
-
- **
|
|
13
|
-
- `{
|
|
14
|
-
- `{refinement-artifact}` (if present)
|
|
12
|
+
- **Review Input**:
|
|
13
|
+
- `{code-artifact}`
|
|
15
14
|
|
|
16
15
|
## State Check
|
|
17
16
|
|
|
@@ -22,7 +21,7 @@ Use this template when writing `review.md` or `review-r{N}.md`.
|
|
|
22
21
|
- **Reviewer**: {reviewer-name}
|
|
23
22
|
- **Review Time**: {timestamp}
|
|
24
23
|
- **Scope**: {file-count and major modules}
|
|
25
|
-
- **Overall Verdict**: {Approved / Changes Requested / Rejected}
|
|
24
|
+
- **Overall Verdict**: {Approved / Changes Requested / Rejected} (pick exactly one; combined phrases will fail the verify gate)
|
|
26
25
|
- **Findings (AI-actionable)**: 0 blockers, 0 majors, 0 minors / **env-blocked**: 0
|
|
27
26
|
|
|
28
27
|
## Findings
|
|
@@ -49,7 +48,7 @@ Use this template when writing `review.md` or `review-r{N}.md`.
|
|
|
49
48
|
|
|
50
49
|
## Environment-Blocked Findings
|
|
51
50
|
|
|
52
|
-
> Items the AI agent cannot close in the current execution environment; they do not participate in the next
|
|
51
|
+
> Items the AI agent cannot close in the current execution environment; they do not participate in the next code round. Maintainers carry them in the PR description as a "manual verification required" checklist.
|
|
53
52
|
|
|
54
53
|
#### 1. {environment-blocked finding title}
|
|
55
54
|
**File**: `{file-path}:{line-number}` (if applicable)
|