@fitlab-ai/agent-infra 0.6.0 → 0.6.2-alpha.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 +12 -12
- package/README.zh-CN.md +12 -12
- package/bin/cli.ts +5 -1
- package/dist/bin/cli.js +6 -1
- package/dist/lib/defaults.json +5 -4
- package/dist/lib/sandbox/config.js +25 -7
- package/dist/lib/sandbox/runtime-engines.js +27 -0
- package/dist/package.json +1 -1
- package/lib/defaults.json +5 -4
- package/lib/sandbox/config.ts +35 -7
- package/lib/sandbox/runtime-engines.ts +39 -0
- package/package.json +5 -3
- package/templates/.agents/README.en.md +8 -8
- package/templates/.agents/README.zh-CN.md +8 -8
- package/templates/{.claude → .agents}/hooks/check-version-format.sh +3 -3
- package/templates/.agents/rules/create-issue.github.en.md +6 -0
- package/templates/.agents/rules/create-issue.github.zh-CN.md +6 -0
- package/templates/.agents/rules/issue-fields.github.en.md +155 -0
- package/templates/.agents/rules/issue-fields.github.zh-CN.md +155 -0
- package/templates/.agents/rules/issue-pr-commands.github.en.md +1 -0
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +1 -0
- package/templates/.agents/rules/issue-sync.github.en.md +2 -1
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +2 -1
- package/templates/.agents/rules/release-commands.github.en.md +9 -3
- package/templates/.agents/rules/release-commands.github.zh-CN.md +9 -3
- package/templates/.agents/rules/task-management.en.md +17 -9
- package/templates/.agents/rules/task-management.zh-CN.md +17 -9
- package/templates/.agents/rules/testing-discipline.en.md +40 -0
- package/templates/.agents/rules/testing-discipline.zh-CN.md +40 -0
- package/templates/.agents/rules/version-stamp.en.md +29 -0
- package/templates/.agents/rules/version-stamp.zh-CN.md +29 -0
- package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +143 -6
- package/templates/.agents/scripts/validate-artifact.js +32 -5
- package/templates/.agents/skills/analyze-task/SKILL.en.md +3 -0
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +3 -0
- package/templates/.agents/skills/analyze-task/config/verify.json +2 -0
- package/templates/.agents/skills/block-task/SKILL.en.md +3 -0
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +3 -0
- package/templates/.agents/skills/block-task/config/verify.json +1 -0
- package/templates/.agents/skills/cancel-task/SKILL.en.md +3 -0
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +3 -0
- package/templates/.agents/skills/cancel-task/config/verify.json +1 -0
- package/templates/.agents/skills/commit/SKILL.en.md +10 -0
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/commit/config/verify.json +1 -0
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +5 -0
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +5 -0
- package/templates/.agents/skills/complete-task/SKILL.en.md +4 -0
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +4 -0
- package/templates/.agents/skills/complete-task/config/verify.json +2 -0
- package/templates/.agents/skills/create-pr/SKILL.en.md +5 -1
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +5 -1
- package/templates/.agents/skills/create-pr/config/verify.json +1 -0
- package/templates/.agents/skills/create-release-note/SKILL.en.md +8 -11
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +8 -11
- package/templates/.agents/skills/create-task/SKILL.en.md +9 -0
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +9 -0
- package/templates/.agents/skills/create-task/config/verify.json +1 -0
- package/templates/.agents/skills/implement-task/SKILL.en.md +16 -1
- package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +16 -1
- package/templates/.agents/skills/implement-task/config/verify.json +2 -0
- package/templates/.agents/skills/import-codescan/config/verify.json +1 -0
- package/templates/.agents/skills/import-dependabot/config/verify.json +1 -0
- package/templates/.agents/skills/import-issue/SKILL.en.md +10 -0
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/import-issue/config/verify.json +1 -0
- package/templates/.agents/skills/plan-task/SKILL.en.md +3 -0
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +3 -0
- package/templates/.agents/skills/plan-task/config/verify.json +2 -0
- package/templates/.agents/skills/refine-task/SKILL.en.md +15 -1
- package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +15 -1
- package/templates/.agents/skills/refine-task/config/verify.json +2 -0
- package/templates/.agents/skills/refine-task/reference/fix-workflow.en.md +9 -0
- package/templates/.agents/skills/refine-task/reference/fix-workflow.zh-CN.md +9 -0
- package/templates/.agents/skills/refine-task/reference/report-template.en.md +11 -0
- package/templates/.agents/skills/refine-task/reference/report-template.zh-CN.md +11 -0
- package/templates/.agents/skills/restore-task/SKILL.en.md +3 -0
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +3 -0
- package/templates/.agents/skills/restore-task/config/verify.json +1 -0
- package/templates/.agents/skills/review-task/SKILL.en.md +16 -1
- package/templates/.agents/skills/review-task/SKILL.zh-CN.md +16 -1
- package/templates/.agents/skills/review-task/config/verify.json +3 -0
- package/templates/.agents/skills/review-task/reference/output-templates.en.md +20 -5
- package/templates/.agents/skills/review-task/reference/output-templates.zh-CN.md +20 -5
- package/templates/.agents/skills/review-task/reference/report-template.en.md +13 -0
- package/templates/.agents/skills/review-task/reference/report-template.zh-CN.md +13 -0
- package/templates/.agents/skills/review-task/reference/review-criteria.en.md +18 -0
- package/templates/.agents/skills/review-task/reference/review-criteria.zh-CN.md +18 -0
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +5 -4
- package/templates/.agents/templates/task.en.md +5 -0
- package/templates/.agents/templates/task.zh-CN.md +5 -0
- package/templates/.claude/settings.json +1 -1
- package/templates/.codex/hooks.json +17 -0
|
@@ -12,6 +12,16 @@ Review the latest implementation round and produce `review.md` or `review-r{N}.m
|
|
|
12
12
|
- This skill reviews code and writes a report; it does not modify product code
|
|
13
13
|
- After executing this skill, you **must** immediately update task.md
|
|
14
14
|
|
|
15
|
+
Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
|
|
16
|
+
|
|
17
|
+
## Common Rationalizations and Rebuttals
|
|
18
|
+
|
|
19
|
+
| Rationalization | Rebuttal |
|
|
20
|
+
|------|------|
|
|
21
|
+
| "It was only one line, so it cannot affect behavior." | Line count is not impact; read the full `git diff` and trace the downstream effect of each change. |
|
|
22
|
+
| "It looks mostly fine, so approve it." | The verdict must be backed by blocker/major/minor counts, and every finding must cite file:line; do not approve from impression. |
|
|
23
|
+
| "The test change looks reasonable, so I can skim it." | Before reviewing test changes, check `.agents/rules/testing-discipline.md` item by item (see the step 4 gate). |
|
|
24
|
+
|
|
15
25
|
## Steps
|
|
16
26
|
|
|
17
27
|
### 1. Verify Prerequisites
|
|
@@ -35,6 +45,7 @@ Read the highest-round implementation artifact and, if present, the highest-roun
|
|
|
35
45
|
Follow `.agents/workflows/feature-development.yaml` and inspect `git diff` for the full change context.
|
|
36
46
|
|
|
37
47
|
> Detailed review criteria, severity rules, and reviewer expectations live in `reference/review-criteria.md`. Read `reference/review-criteria.md` before reviewing.
|
|
48
|
+
> Test review gate: when `git diff` touches test files, read `.agents/rules/testing-discipline.md` first and check it item by item, especially "do not add negative assertions when a positive assertion already covers the behavior".
|
|
38
49
|
|
|
39
50
|
### 5. Write the Review Report
|
|
40
51
|
|
|
@@ -51,7 +62,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
51
62
|
```
|
|
52
63
|
|
|
53
64
|
Update task.md and append:
|
|
54
|
-
`- {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} → {artifact-filename}`
|
|
65
|
+
`- {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}`
|
|
66
|
+
|
|
67
|
+
Omit the bracketed segment when env-blocked = 0; append ` (+ {n} env-blocked)` when env-blocked > 0.
|
|
55
68
|
|
|
56
69
|
If task.md contains a valid `issue_number`, perform these sync actions (skip and continue on any failure):
|
|
57
70
|
- Read `.agents/rules/issue-sync.md` before syncing, and complete upstream repository detection plus permission detection
|
|
@@ -84,6 +97,8 @@ Choose exactly one branch based on the findings:
|
|
|
84
97
|
- blockers that can be fixed in a focused pass -> changes requested
|
|
85
98
|
- major redesign or re-implementation needed -> rejected
|
|
86
99
|
|
|
100
|
+
env-blocked counts do not influence branch selection; they are appended to the summary line only.
|
|
101
|
+
|
|
87
102
|
> The full four-branch output templates, selection rules, and prohibition clauses live in `reference/output-templates.md`. Read `reference/output-templates.md` before reporting the review result.
|
|
88
103
|
|
|
89
104
|
Include all TUI command formats in the next-step output. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
|
|
@@ -12,6 +12,16 @@ description: "审查任务实现并输出代码审查报告"
|
|
|
12
12
|
- 本技能只审查代码并写报告,不修改业务代码
|
|
13
13
|
- 执行本技能后,你**必须**立即更新 task.md
|
|
14
14
|
|
|
15
|
+
版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
|
|
16
|
+
|
|
17
|
+
## 常见违规借口与反驳
|
|
18
|
+
|
|
19
|
+
| 借口 | 反驳 |
|
|
20
|
+
|------|------|
|
|
21
|
+
| 「只改了一行,不影响功能」 | 行数不等于影响面;必须读完整 `git diff` 并定位每处改动的下游效果。 |
|
|
22
|
+
| 「大体没问题,给个 Approved」 | 结论必须由 blocker/major/minor 计数支撑,每个问题引用文件:行号,不能凭印象放行。 |
|
|
23
|
+
| 「测试改动看着合理,跳过细看」 | 审查测试变更前必须逐条核对 `.agents/rules/testing-discipline.md`(见步骤 4 门禁)。 |
|
|
24
|
+
|
|
15
25
|
## 执行步骤
|
|
16
26
|
|
|
17
27
|
### 1. 验证前置条件
|
|
@@ -35,6 +45,7 @@ description: "审查任务实现并输出代码审查报告"
|
|
|
35
45
|
遵循 `.agents/workflows/feature-development.yaml`,并同时检查 `git diff` 获取完整变更上下文。
|
|
36
46
|
|
|
37
47
|
> 详细审查标准、严重程度划分和 reviewer 关注点见 `reference/review-criteria.md`。执行此步骤前先读取 `reference/review-criteria.md`。
|
|
48
|
+
> 测试审查硬门禁:当 `git diff` 触及测试文件时,必须先读取 `.agents/rules/testing-discipline.md` 并逐条核对(尤其"正向已覆盖时不应再加反向断言")。
|
|
38
49
|
|
|
39
50
|
### 5. 编写审查报告
|
|
40
51
|
|
|
@@ -51,7 +62,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
51
62
|
```
|
|
52
63
|
|
|
53
64
|
更新 task.md,并追加:
|
|
54
|
-
`- {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} → {artifact-filename}`
|
|
65
|
+
`- {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}`
|
|
66
|
+
|
|
67
|
+
env-blocked = 0 时省略括号部分;env-blocked > 0 时附加 ` (+ {n} env-blocked)`。
|
|
55
68
|
|
|
56
69
|
如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续):
|
|
57
70
|
- 执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测
|
|
@@ -84,6 +97,8 @@ node .agents/scripts/validate-artifact.js gate review-task .agents/workspace/act
|
|
|
84
97
|
- 有 blocker,且可集中修复 -> 需要修改
|
|
85
98
|
- 需要重大返工或重新实现 -> 拒绝
|
|
86
99
|
|
|
100
|
+
env-blocked 的数量不参与分支选择,仅在数字摘要末尾附带显示。
|
|
101
|
+
|
|
87
102
|
> 完整的 4 分支输出模板、判断规则和禁止条款见 `reference/output-templates.md`。向用户汇报审查结论前先读取 `reference/output-templates.md`。
|
|
88
103
|
|
|
89
104
|
向用户展示下一步时,必须包含所有 TUI 命令格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"status",
|
|
10
10
|
"created_at",
|
|
11
11
|
"updated_at",
|
|
12
|
+
"agent_infra_version",
|
|
12
13
|
"current_step",
|
|
13
14
|
"assigned_to"
|
|
14
15
|
]
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
"required_sections": [
|
|
19
20
|
"审查摘要",
|
|
20
21
|
"问题清单",
|
|
22
|
+
"环境性遗留",
|
|
21
23
|
"结论与建议"
|
|
22
24
|
],
|
|
23
25
|
"required_patterns": [
|
|
@@ -36,6 +38,7 @@
|
|
|
36
38
|
"verify_comment_content": true,
|
|
37
39
|
"verify_task_comment_content": true,
|
|
38
40
|
"verify_issue_type": true,
|
|
41
|
+
"verify_issue_fields": false,
|
|
39
42
|
"verify_milestone": true,
|
|
40
43
|
"expected_status_label_key": "inProgress",
|
|
41
44
|
"expected_comment_marker_key": "artifact"
|
|
@@ -4,8 +4,8 @@ Read this file before presenting the final review result to the user.
|
|
|
4
4
|
|
|
5
5
|
## Choose Exactly One Output Branch
|
|
6
6
|
|
|
7
|
-
Apply these rules in order:
|
|
8
|
-
1. if `Blocker = 0` and `Major = 0` and `Minor = 0`, use Branch A
|
|
7
|
+
Apply these rules in order (**note: env-blocked counts do not participate in selection**):
|
|
8
|
+
1. if `Blocker = 0` and `Major = 0` and `Minor = 0`, use Branch A (regardless of whether env-blocked > 0)
|
|
9
9
|
2. if `Blocker = 0` and (`Major > 0` or `Minor > 0`), use Branch B
|
|
10
10
|
3. if `Blocker > 0` and the work can be repaired in a focused refinement pass, use Branch C
|
|
11
11
|
4. if the task requires major redesign, broad reimplementation, or a restart, use Branch D
|
|
@@ -14,25 +14,30 @@ Prohibitions:
|
|
|
14
14
|
- never skip the branch-selection step
|
|
15
15
|
- never mix text from different branches
|
|
16
16
|
- if `Blocker > 0`, never output an approval template
|
|
17
|
+
- never count env-blocked findings as blockers / major issues / minor issues, and never use them to trigger Branch B/C/D
|
|
17
18
|
- always include every TUI command format in the selected branch
|
|
18
19
|
|
|
19
20
|
### Branch A: Approved with No Findings
|
|
20
21
|
|
|
21
22
|
```text
|
|
22
23
|
Task {task-id} review completed. Verdict: approved.
|
|
23
|
-
- Blockers: 0 | Major: 0 | Minor: 0
|
|
24
|
+
- Blockers: 0 | Major: 0 | Minor: 0[ | env-blocked: {n} (outside AI repair scope)]
|
|
25
|
+
[- Review report: .agents/workspace/active/{task-id}/{review-artifact}]
|
|
24
26
|
|
|
25
27
|
Next step - commit the code:
|
|
26
28
|
- Claude Code / OpenCode: /commit
|
|
27
29
|
- Gemini CLI: /agent-infra:commit
|
|
28
30
|
- Codex CLI: $commit
|
|
31
|
+
|
|
32
|
+
[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 /refine-task.
|
|
29
34
|
```
|
|
30
35
|
|
|
31
36
|
### Branch B: Approved with Findings
|
|
32
37
|
|
|
33
38
|
```text
|
|
34
39
|
Task {task-id} review completed. Verdict: approved.
|
|
35
|
-
- Blockers: 0 | Major: {n} | Minor: {n}
|
|
40
|
+
- Blockers: 0 | Major: {n} | Minor: {n}[ | env-blocked: {n} (outside AI repair scope)]
|
|
36
41
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
37
42
|
|
|
38
43
|
Next step - refine before commit (recommended):
|
|
@@ -44,29 +49,39 @@ Or commit directly (skip refinement):
|
|
|
44
49
|
- Claude Code / OpenCode: /commit
|
|
45
50
|
- Gemini CLI: /agent-infra:commit
|
|
46
51
|
- Codex CLI: $commit
|
|
52
|
+
|
|
53
|
+
[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 /refine-task.
|
|
47
55
|
```
|
|
48
56
|
|
|
49
57
|
### Branch C: Changes Requested
|
|
50
58
|
|
|
51
59
|
```text
|
|
52
60
|
Task {task-id} review completed. Verdict: changes requested.
|
|
53
|
-
- Blockers: {n} | Major: {n} | Minor: {n}
|
|
61
|
+
- Blockers: {n} | Major: {n} | Minor: {n}[ | env-blocked: {n} (outside AI repair scope)]
|
|
54
62
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
55
63
|
|
|
56
64
|
Next step - fix the findings:
|
|
57
65
|
- Claude Code / OpenCode: /refine-task {task-id}
|
|
58
66
|
- Gemini CLI: /agent-infra:refine-task {task-id}
|
|
59
67
|
- Codex CLI: $refine-task {task-id}
|
|
68
|
+
|
|
69
|
+
[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 /refine-task.
|
|
60
71
|
```
|
|
61
72
|
|
|
62
73
|
### Branch D: Rejected
|
|
63
74
|
|
|
64
75
|
```text
|
|
65
76
|
Task {task-id} review completed. Verdict: rejected, major rework required.
|
|
77
|
+
- Blockers: {n} | Major: {n} | Minor: {n}[ | env-blocked: {n} (outside AI repair scope)]
|
|
66
78
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
67
79
|
|
|
68
80
|
Next step - re-implement:
|
|
69
81
|
- Claude Code / OpenCode: /implement-task {task-id}
|
|
70
82
|
- Gemini CLI: /agent-infra:implement-task {task-id}
|
|
71
83
|
- Codex CLI: $implement-task {task-id}
|
|
84
|
+
|
|
85
|
+
[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 /refine-task.
|
|
72
87
|
```
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## 选择唯一输出场景
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
1. 如果 `Blocker = 0` 且 `Major = 0` 且 `Minor = 0`,使用场景 A
|
|
7
|
+
按以下顺序判断(**注意:env-blocked 数量不参与判断**):
|
|
8
|
+
1. 如果 `Blocker = 0` 且 `Major = 0` 且 `Minor = 0`,使用场景 A(不管 env-blocked 是否 > 0)
|
|
9
9
|
2. 如果 `Blocker = 0` 且(`Major > 0` 或 `Minor > 0`),使用场景 B
|
|
10
10
|
3. 如果 `Blocker > 0`,且问题可以通过一次聚焦修复解决,使用场景 C
|
|
11
11
|
4. 如果任务需要重大重构、大范围重写或整体重来,使用场景 D
|
|
@@ -14,25 +14,30 @@
|
|
|
14
14
|
- 不要跳过场景判断步骤
|
|
15
15
|
- 不要混用不同场景的文案
|
|
16
16
|
- 只要 `Blocker > 0`,就绝对不能输出通过模板
|
|
17
|
+
- env-blocked 项绝对不能被计入 blocker / major / minor 计数,也不能用作触发场景 B/C/D 的依据
|
|
17
18
|
- 所选场景中必须包含所有 TUI 命令格式
|
|
18
19
|
|
|
19
20
|
### 场景 A:通过且无问题
|
|
20
21
|
|
|
21
22
|
```text
|
|
22
23
|
任务 {task-id} 代码审查完成。结论:通过。
|
|
23
|
-
- 阻塞项:0 | 主要问题:0 | 次要问题:0
|
|
24
|
+
- 阻塞项:0 | 主要问题:0 | 次要问题:0[ | 环境性遗留:{n}(不在 AI 修复范围)]
|
|
25
|
+
[- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}]
|
|
24
26
|
|
|
25
27
|
下一步 - 提交代码:
|
|
26
28
|
- Claude Code / OpenCode:/commit
|
|
27
29
|
- Gemini CLI:/agent-infra:commit
|
|
28
30
|
- Codex CLI:$commit
|
|
31
|
+
|
|
32
|
+
[当 env-blocked > 0 时,在最后附加一行:]
|
|
33
|
+
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /refine-task。
|
|
29
34
|
```
|
|
30
35
|
|
|
31
36
|
### 场景 B:通过但有问题
|
|
32
37
|
|
|
33
38
|
```text
|
|
34
39
|
任务 {task-id} 代码审查完成。结论:通过。
|
|
35
|
-
- 阻塞项:0 | 主要问题:{n} | 次要问题:{n}
|
|
40
|
+
- 阻塞项:0 | 主要问题:{n} | 次要问题:{n}[ | 环境性遗留:{n}(不在 AI 修复范围)]
|
|
36
41
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
37
42
|
|
|
38
43
|
下一步 - 修复问题后提交(推荐):
|
|
@@ -44,29 +49,39 @@
|
|
|
44
49
|
- Claude Code / OpenCode:/commit
|
|
45
50
|
- Gemini CLI:/agent-infra:commit
|
|
46
51
|
- Codex CLI:$commit
|
|
52
|
+
|
|
53
|
+
[当 env-blocked > 0 时,在最后附加一行:]
|
|
54
|
+
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /refine-task。
|
|
47
55
|
```
|
|
48
56
|
|
|
49
57
|
### 场景 C:需要修改
|
|
50
58
|
|
|
51
59
|
```text
|
|
52
60
|
任务 {task-id} 代码审查完成。结论:需要修改。
|
|
53
|
-
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n}
|
|
61
|
+
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n}[ | 环境性遗留:{n}(不在 AI 修复范围)]
|
|
54
62
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
55
63
|
|
|
56
64
|
下一步 - 修复问题:
|
|
57
65
|
- Claude Code / OpenCode:/refine-task {task-id}
|
|
58
66
|
- Gemini CLI:/agent-infra:refine-task {task-id}
|
|
59
67
|
- Codex CLI:$refine-task {task-id}
|
|
68
|
+
|
|
69
|
+
[当 env-blocked > 0 时,在最后附加一行:]
|
|
70
|
+
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /refine-task。
|
|
60
71
|
```
|
|
61
72
|
|
|
62
73
|
### 场景 D:拒绝
|
|
63
74
|
|
|
64
75
|
```text
|
|
65
76
|
任务 {task-id} 代码审查完成。结论:拒绝,需要重大返工。
|
|
77
|
+
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n}[ | 环境性遗留:{n}(不在 AI 修复范围)]
|
|
66
78
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
67
79
|
|
|
68
80
|
下一步 - 重新实现:
|
|
69
81
|
- Claude Code / OpenCode:/implement-task {task-id}
|
|
70
82
|
- Gemini CLI:/agent-infra:implement-task {task-id}
|
|
71
83
|
- Codex CLI:$implement-task {task-id}
|
|
84
|
+
|
|
85
|
+
[当 env-blocked > 0 时,在最后附加一行:]
|
|
86
|
+
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /refine-task。
|
|
72
87
|
```
|
|
@@ -19,6 +19,7 @@ Use this template when writing `review.md` or `review-r{N}.md`.
|
|
|
19
19
|
- **Review Time**: {timestamp}
|
|
20
20
|
- **Scope**: {file-count and major modules}
|
|
21
21
|
- **Overall Verdict**: {Approved / Changes Requested / Rejected}
|
|
22
|
+
- **Findings (AI-actionable)**: 0 blockers, 0 majors, 0 minors / **env-blocked**: 0
|
|
22
23
|
|
|
23
24
|
## Findings
|
|
24
25
|
|
|
@@ -42,6 +43,18 @@ Use this template when writing `review.md` or `review-r{N}.md`.
|
|
|
42
43
|
**File**: `{file-path}:{line-number}`
|
|
43
44
|
**Suggestion**: {improvement suggestion}
|
|
44
45
|
|
|
46
|
+
## Environment-Blocked Findings
|
|
47
|
+
|
|
48
|
+
> Items the AI agent cannot close in the current execution environment; they do not participate in the next refine round. Maintainers carry them in the PR description as a "manual verification required" checklist.
|
|
49
|
+
|
|
50
|
+
#### 1. {environment-blocked finding title}
|
|
51
|
+
**File**: `{file-path}:{line-number}` (if applicable)
|
|
52
|
+
**Description**: {details}
|
|
53
|
+
**Required Environment**: {e.g. Docker sandbox / macOS host / privileged root / third-party account}
|
|
54
|
+
**Manual Verification Steps**: {steps for the human verifier}
|
|
55
|
+
|
|
56
|
+
> If this round has no env-blocked findings, keep the section heading and write "None".
|
|
57
|
+
|
|
45
58
|
## Highlights
|
|
46
59
|
|
|
47
60
|
- {what went well}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- **审查时间**:{timestamp}
|
|
20
20
|
- **审查范围**:{file-count and major modules}
|
|
21
21
|
- **总体结论**:{通过 / 需要修改 / 拒绝}
|
|
22
|
+
- **发现(AI 可处理)**:0 阻塞项,0 主要,0 次要 / **env-blocked**:0
|
|
22
23
|
|
|
23
24
|
## 问题清单
|
|
24
25
|
|
|
@@ -42,6 +43,18 @@
|
|
|
42
43
|
**文件**:`{file-path}:{line-number}`
|
|
43
44
|
**建议**:{improvement suggestion}
|
|
44
45
|
|
|
46
|
+
## 环境性遗留
|
|
47
|
+
|
|
48
|
+
> AI agent 在本执行环境无法闭环的项;不参与下一轮 refine。维护者在 PR description 中以「待人工验证」清单承接。
|
|
49
|
+
|
|
50
|
+
#### 1. {环境性项标题}
|
|
51
|
+
**文件**:`{file-path}:{line-number}`(如适用)
|
|
52
|
+
**说明**:{details}
|
|
53
|
+
**所需环境**:{e.g. Docker 沙箱 / macOS host / 特权 root / 第三方账号}
|
|
54
|
+
**待人工执行的验证步骤**:{steps for the human verifier}
|
|
55
|
+
|
|
56
|
+
> 如本轮无 env-blocked 项,保留段落标题并写「(无)」。
|
|
57
|
+
|
|
45
58
|
## 亮点
|
|
46
59
|
|
|
47
60
|
- {what went well}
|
|
@@ -21,4 +21,22 @@ Follow the `code-review` step in `.agents/workflows/feature-development.yaml`.
|
|
|
21
21
|
3. **Actionable**: suggest a concrete fix
|
|
22
22
|
4. **Severity-based**: distinguish blockers, major issues, and minor improvements
|
|
23
23
|
|
|
24
|
+
## Environment-Blocked Classification
|
|
25
|
+
|
|
26
|
+
Some findings cannot be closed by the AI agent in the current execution environment, for example:
|
|
27
|
+
|
|
28
|
+
- missing Docker / sandbox access for end-to-end verification
|
|
29
|
+
- missing a specific OS (macOS-only behavior)
|
|
30
|
+
- missing a third-party account / OAuth access
|
|
31
|
+
- missing privileged operations (root, sudo, special network access)
|
|
32
|
+
|
|
33
|
+
**Classification decision tree**: "Can the AI agent close this without changing the environment?"
|
|
34
|
+
- yes -> one of blocker / major / minor (based on risk)
|
|
35
|
+
- no -> **env-blocked** (a meta-category, not part of severity ordering)
|
|
36
|
+
|
|
37
|
+
Where env-blocked findings go:
|
|
38
|
+
- record them in the independent review report section "Environment-Blocked Findings"
|
|
39
|
+
- append them to the end of numeric summaries (for example, `(+ 1 env-blocked)`)
|
|
40
|
+
- do **not** send them into the refine loop; maintainers carry them in the PR description as a "manual verification required" checklist
|
|
41
|
+
|
|
24
42
|
Also inspect `git diff` so the report reflects the full change context.
|
|
@@ -21,4 +21,22 @@
|
|
|
21
21
|
3. **可执行**:给出明确可落地的修复建议
|
|
22
22
|
4. **按严重程度分类**:明确区分 blocker、major 和 minor
|
|
23
23
|
|
|
24
|
+
## 环境性遗留分类
|
|
25
|
+
|
|
26
|
+
某些发现项是 AI agent 在本执行环境**无法闭环**的,例如:
|
|
27
|
+
|
|
28
|
+
- 缺 Docker / 沙箱而无法跑端到端验证
|
|
29
|
+
- 缺特定 OS(macOS-only 行为)
|
|
30
|
+
- 缺第三方账号 / OAuth
|
|
31
|
+
- 缺特权操作(root、sudo、特殊网络)
|
|
32
|
+
|
|
33
|
+
**分类决策树**:「AI agent 能否在不改环境的前提下独立闭环这一项?」
|
|
34
|
+
- 是 -> blocker / major / minor 之一(按风险定档)
|
|
35
|
+
- 否 -> **env-blocked**(元类目,不参与严重程度排序)
|
|
36
|
+
|
|
37
|
+
env-blocked 项的去向:
|
|
38
|
+
- 写入 review 报告独立段落「环境性遗留」
|
|
39
|
+
- 在数字摘要末尾附带显示(如 `(+ 1 env-blocked)`)
|
|
40
|
+
- **不**进入 refine 循环;维护者在 PR description 中以「待人工验证」清单形式承接
|
|
41
|
+
|
|
24
42
|
同时检查 `git diff`,确保报告反映完整的变更上下文。
|
|
@@ -26,13 +26,13 @@ const DEFAULTS = {
|
|
|
26
26
|
"sandbox": {
|
|
27
27
|
"engine": null,
|
|
28
28
|
"runtimes": [
|
|
29
|
-
"
|
|
29
|
+
"node22"
|
|
30
30
|
],
|
|
31
31
|
"tools": [
|
|
32
32
|
"claude-code",
|
|
33
33
|
"codex",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
34
|
+
"gemini-cli",
|
|
35
|
+
"opencode"
|
|
36
36
|
],
|
|
37
37
|
"dockerfile": null,
|
|
38
38
|
"vm": {
|
|
@@ -48,6 +48,7 @@ const DEFAULTS = {
|
|
|
48
48
|
"managed": [
|
|
49
49
|
".agents/QUICKSTART.md",
|
|
50
50
|
".agents/README.md",
|
|
51
|
+
".agents/hooks/",
|
|
51
52
|
".agents/rules/",
|
|
52
53
|
".agents/scripts/",
|
|
53
54
|
".agents/skills/",
|
|
@@ -55,7 +56,7 @@ const DEFAULTS = {
|
|
|
55
56
|
".agents/workflows/",
|
|
56
57
|
".agents/workspace/README.md",
|
|
57
58
|
".claude/commands/",
|
|
58
|
-
".
|
|
59
|
+
".codex/hooks.json",
|
|
59
60
|
".gemini/commands/",
|
|
60
61
|
".git-hooks/check-version-format.sh",
|
|
61
62
|
".github/scripts/",
|
|
@@ -6,6 +6,11 @@ workflow: feature-development # feature-development | bug-fix | code-review | r
|
|
|
6
6
|
status: open # open | in-progress | review | blocked | completed
|
|
7
7
|
created_at: YYYY-MM-DDTHH:mm:ss±HH:MM
|
|
8
8
|
updated_at: YYYY-MM-DDTHH:mm:ss±HH:MM
|
|
9
|
+
agent_infra_version: v0.0.0 # Current agent-infra version; refreshed by workflow commands
|
|
10
|
+
priority: # Optional Issue field: Urgent | High | Medium | Low
|
|
11
|
+
effort: # Optional Issue field: High | Medium | Low
|
|
12
|
+
start_date: # Optional Issue field for Feature: YYYY-MM-DD
|
|
13
|
+
target_date: # Optional Issue field for Feature: YYYY-MM-DD
|
|
9
14
|
current_step: analysis # analysis | design | implementation | review | fix | commit
|
|
10
15
|
assigned_to: # claude | codex | gemini | opencode | human
|
|
11
16
|
---
|
|
@@ -6,6 +6,11 @@ workflow: feature-development # feature-development | bug-fix | code-review | r
|
|
|
6
6
|
status: open # open | in-progress | review | blocked | completed
|
|
7
7
|
created_at: YYYY-MM-DDTHH:mm:ss±HH:MM
|
|
8
8
|
updated_at: YYYY-MM-DDTHH:mm:ss±HH:MM
|
|
9
|
+
agent_infra_version: v0.0.0 # 当前 agent-infra 版本;由工作流命令刷新
|
|
10
|
+
priority: # 可选 Issue 字段:Urgent | High | Medium | Low
|
|
11
|
+
effort: # 可选 Issue 字段:High | Medium | Low
|
|
12
|
+
start_date: # Feature 可选 Issue 字段:YYYY-MM-DD
|
|
13
|
+
target_date: # Feature 可选 Issue 字段:YYYY-MM-DD
|
|
9
14
|
current_step: analysis # analysis | design | implementation | review | fix | commit
|
|
10
15
|
assigned_to: # claude | codex | gemini | opencode | human
|
|
11
16
|
---
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PreToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "^Bash$",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "sh \"$(git rev-parse --show-toplevel)/.agents/hooks/check-version-format.sh\"",
|
|
10
|
+
"timeout": 5,
|
|
11
|
+
"statusMessage": "Checking template version before git commit"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|