@fitlab-ai/agent-infra 0.8.0 → 0.8.2

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 (86) hide show
  1. package/README.md +1 -1
  2. package/README.zh-CN.md +1 -1
  3. package/bin/cli.ts +4 -4
  4. package/dist/bin/cli.js +4 -4
  5. package/dist/lib/defaults.json +1 -0
  6. package/dist/lib/run/index.js +96 -5
  7. package/dist/lib/sandbox/capture.js +113 -4
  8. package/dist/lib/sandbox/commands/create.js +37 -4
  9. package/dist/lib/sandbox/commands/enter.js +7 -3
  10. package/dist/lib/sandbox/config.js +1 -1
  11. package/dist/lib/sandbox/credentials.js +42 -3
  12. package/dist/lib/sandbox/runtimes/base.dockerfile +13 -0
  13. package/dist/lib/sandbox/runtimes/node20.dockerfile +1 -1
  14. package/dist/lib/sandbox/runtimes/node22.dockerfile +1 -1
  15. package/dist/lib/sandbox/tools.js +9 -0
  16. package/dist/lib/server/adapters/feishu/index.js +5 -3
  17. package/dist/lib/server/adapters/feishu/transport.js +20 -2
  18. package/dist/lib/server/protocol.js +20 -4
  19. package/dist/lib/task/commands/log.js +36 -14
  20. package/dist/lib/task/commands/status.js +144 -45
  21. package/dist/lib/update.js +31 -0
  22. package/lib/defaults.json +1 -0
  23. package/lib/run/index.ts +119 -6
  24. package/lib/sandbox/capture.ts +136 -5
  25. package/lib/sandbox/commands/create.ts +42 -4
  26. package/lib/sandbox/commands/enter.ts +8 -2
  27. package/lib/sandbox/config.ts +1 -1
  28. package/lib/sandbox/credentials.ts +57 -3
  29. package/lib/sandbox/runtimes/base.dockerfile +13 -0
  30. package/lib/sandbox/runtimes/node20.dockerfile +1 -1
  31. package/lib/sandbox/runtimes/node22.dockerfile +1 -1
  32. package/lib/sandbox/tools.ts +9 -0
  33. package/lib/server/adapters/feishu/index.ts +5 -3
  34. package/lib/server/adapters/feishu/transport.ts +32 -3
  35. package/lib/server/protocol.ts +20 -4
  36. package/lib/task/commands/log.ts +36 -14
  37. package/lib/task/commands/status.ts +200 -58
  38. package/lib/update.ts +34 -0
  39. package/package.json +5 -4
  40. package/templates/.agents/README.en.md +3 -3
  41. package/templates/.agents/README.zh-CN.md +3 -3
  42. package/templates/.agents/rules/next-step-output.en.md +1 -1
  43. package/templates/.agents/rules/next-step-output.zh-CN.md +1 -1
  44. package/templates/.agents/rules/pr-sync.github.en.md +3 -3
  45. package/templates/.agents/rules/pr-sync.github.zh-CN.md +3 -3
  46. package/templates/.agents/rules/task-management.en.md +1 -1
  47. package/templates/.agents/rules/task-management.zh-CN.md +1 -1
  48. package/templates/.agents/skills/code-task/SKILL.en.md +1 -1
  49. package/templates/.agents/skills/code-task/SKILL.zh-CN.md +2 -2
  50. package/templates/.agents/skills/code-task/reference/dual-mode.en.md +1 -1
  51. package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +1 -1
  52. package/templates/.agents/skills/code-task/reference/fix-mode.en.md +3 -3
  53. package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +4 -4
  54. package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +1 -1
  55. package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +1 -1
  56. package/templates/.agents/skills/review-analysis/SKILL.en.md +2 -2
  57. package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +2 -2
  58. package/templates/.agents/skills/review-analysis/config/verify.en.json +1 -1
  59. package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +1 -1
  60. package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +11 -11
  61. package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +11 -11
  62. package/templates/.agents/skills/review-analysis/reference/report-template.en.md +4 -4
  63. package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +4 -4
  64. package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +5 -5
  65. package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +5 -5
  66. package/templates/.agents/skills/review-code/SKILL.en.md +4 -4
  67. package/templates/.agents/skills/review-code/SKILL.zh-CN.md +4 -4
  68. package/templates/.agents/skills/review-code/config/verify.en.json +1 -1
  69. package/templates/.agents/skills/review-code/config/verify.zh-CN.json +1 -1
  70. package/templates/.agents/skills/review-code/reference/output-templates.en.md +16 -16
  71. package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +12 -12
  72. package/templates/.agents/skills/review-code/reference/report-template.en.md +4 -4
  73. package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +4 -4
  74. package/templates/.agents/skills/review-code/reference/review-criteria.en.md +5 -5
  75. package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +5 -5
  76. package/templates/.agents/skills/review-plan/SKILL.en.md +2 -2
  77. package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +2 -2
  78. package/templates/.agents/skills/review-plan/config/verify.en.json +1 -1
  79. package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +1 -1
  80. package/templates/.agents/skills/review-plan/reference/output-templates.en.md +11 -11
  81. package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +11 -11
  82. package/templates/.agents/skills/review-plan/reference/report-template.en.md +4 -4
  83. package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +4 -4
  84. package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +5 -5
  85. package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +5 -5
  86. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +26 -1
@@ -24,7 +24,7 @@ Use this template when writing `review-code.md` or `review-code-r{N}.md`.
24
24
  - **Review Baseline Commit**: {raw git rev-parse HEAD} (baseline for the complete-task post-review commit gate; see `.agents/rules/review-handshake.md`)
25
25
  - **Reviewed Diff Fingerprint**: {raw node .agents/scripts/review-diff-fingerprint.js worktree HEAD}
26
26
  - **Overall Verdict**: {Approved / Changes Requested / Rejected} (pick exactly one; combined phrases will fail the verify gate)
27
- - **Findings (AI-actionable)**: 0 blockers, 0 majors, 0 minors / **env-blocked**: 0
27
+ - **Findings (AI-actionable)**: 0 blockers, 0 majors, 0 minors / **Manual validation**: 0
28
28
 
29
29
  ## Findings
30
30
 
@@ -48,17 +48,17 @@ Use this template when writing `review-code.md` or `review-code-r{N}.md`.
48
48
  **File**: `{file-path}:{line-number}`
49
49
  **Suggestion**: {improvement suggestion}
50
50
 
51
- ## Environment-Blocked Findings
51
+ ## Manual Validation Items
52
52
 
53
53
  > 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.
54
54
 
55
- #### 1. {environment-blocked finding title}
55
+ #### 1. {manual validation item title}
56
56
  **File**: `{file-path}:{line-number}` (if applicable)
57
57
  **Description**: {details}
58
58
  **Required Environment**: {e.g. Docker sandbox / macOS host / privileged root / third-party account}
59
59
  **Manual Verification Steps**: {steps for the human verifier}
60
60
 
61
- > If this round has no env-blocked findings, keep the section heading and write "None".
61
+ > If this round has no Manual validation items, keep the section heading and write "None".
62
62
 
63
63
 
64
64
  ## Review Disagreement Ledger Writeback
@@ -24,7 +24,7 @@
24
24
  - **审查基线提交**:{git rev-parse HEAD 原文}(complete-task 的 post-review commit 门禁基线;详见 `.agents/rules/review-handshake.md`)
25
25
  - **审查差异指纹**:{node .agents/scripts/review-diff-fingerprint.js worktree HEAD 原文}
26
26
  - **总体结论**:{通过 / 需要修改 / 拒绝}(恰取一个;禁止写组合短语,否则 verify gate 失败)
27
- - **发现(AI 可处理)**:0 阻塞项,0 主要,0 次要 / **env-blocked**:0
27
+ - **发现(AI 可处理)**:0 阻塞项,0 主要,0 次要 / **人工校验**:0
28
28
 
29
29
  ## 问题清单
30
30
 
@@ -48,17 +48,17 @@
48
48
  **文件**:`{file-path}:{line-number}`
49
49
  **建议**:{improvement suggestion}
50
50
 
51
- ## 环境性遗留
51
+ ## 人工校验项
52
52
 
53
53
  > AI agent 在本执行环境无法闭环的项;不参与下一轮 refine。维护者在 PR description 中以「待人工验证」清单承接。
54
54
 
55
- #### 1. {环境性项标题}
55
+ #### 1. {人工校验项标题}
56
56
  **文件**:`{file-path}:{line-number}`(如适用)
57
57
  **说明**:{details}
58
58
  **所需环境**:{e.g. Docker 沙箱 / macOS host / 特权 root / 第三方账号}
59
59
  **待人工执行的验证步骤**:{steps for the human verifier}
60
60
 
61
- > 如本轮无 env-blocked 项,保留段落标题并写「(无)」。
61
+ > 如本轮无人工校验项,保留段落标题并写「(无)」。
62
62
 
63
63
 
64
64
  ## 审查分歧账本回写
@@ -30,7 +30,7 @@ Follow the `code-review` step in `.agents/workflows/feature-development.yaml`.
30
30
  3. **Actionable**: suggest a concrete fix
31
31
  4. **Severity-based**: clearly distinguish blockers, major issues, and minor issues
32
32
 
33
- ## Environment-Blocked Classification
33
+ ## Manual Validation Classification
34
34
 
35
35
  Some findings cannot be closed by an AI agent in the current execution environment, for example:
36
36
 
@@ -41,11 +41,11 @@ Some findings cannot be closed by an AI agent in the current execution environme
41
41
 
42
42
  **Decision tree**: "Can the AI agent close this item independently without changing the environment?"
43
43
  - Yes -> blocker / major / minor, based on risk
44
- - No -> **env-blocked** (a meta-category, not part of severity ordering)
44
+ - No -> **manual-validation** (a manual-validation meta-category, not part of severity ordering)
45
45
 
46
- Where env-blocked items go:
47
- - Record them in an independent review report section named "Environment-Blocked Findings"
48
- - Include them at the end of the numeric summary, for example `(+ 1 env-blocked)`
46
+ Where manual-validation items go:
47
+ - Record them in an independent review report section named "Manual Validation Items"
48
+ - Record the done-note source field as `Manual-validation: 1`; `ai task log` normalizes it into review rows
49
49
  - Do **not** include them in the code-task fix loop; maintainers carry them in the PR description under manual verification
50
50
 
51
51
  Also inspect `git diff`, the latest code artifact, latest technical-plan review artifact, and `task.md` Activity Log so the report reflects the full change context.
@@ -30,7 +30,7 @@
30
30
  3. **可执行**:给出明确可落地的修复建议
31
31
  4. **按严重程度分类**:明确区分 blocker、major 和 minor
32
32
 
33
- ## 环境性遗留分类
33
+ ## 人工校验项分类
34
34
 
35
35
  某些发现项是 AI agent 在本执行环境**无法闭环**的,例如:
36
36
 
@@ -41,11 +41,11 @@
41
41
 
42
42
  **分类决策树**:「AI agent 能否在不改环境的前提下独立闭环这一项?」
43
43
  - 是 -> blocker / major / minor 之一(按风险定档)
44
- - 否 -> **env-blocked**(元类目,不参与严重程度排序)
44
+ - 否 -> **manual-validation**(人工校验元类目,不参与严重程度排序)
45
45
 
46
- env-blocked 项的去向:
47
- - 写入 review 报告独立段落「环境性遗留」
48
- - 在数字摘要末尾附带显示(如 `(+ 1 env-blocked)`)
46
+ manual-validation 项的去向:
47
+ - 写入 review 报告独立段落「人工校验项」
48
+ - done note 中写入源字段 `Manual-validation: 1`;`ai task log` 归一化展示到 review 行
49
49
  - **不**进入 code-task 修复循环;维护者在 PR description 中以「待人工验证」清单形式承接
50
50
 
51
51
  同时检查 `git diff`、最新实现产物、最新技术方案审查产物和 `task.md` Activity Log,确保报告反映完整的变更上下文。
@@ -77,9 +77,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
77
77
  ```
78
78
 
79
79
  Set `current_step` to `technical-design-review`, refresh task metadata, and append:
80
- `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Plan (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}[ (+ {n} env-blocked)] → {review-artifact}`
80
+ `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Plan (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}, Manual-validation: {n} → {review-artifact}`
81
81
 
82
- `env-blocked` is the data source for the `Manual-verify` count folded into review rows in `ai task log`; do not add a parallel manual-verification field.
82
+ `manual-validation` is the data source for the `Manual-validation` count folded into review rows in `ai task log`; do not add a parallel manual-verification field.
83
83
 
84
84
  If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md`, sync the task comment, and publish the `{review-artifact}` comment.
85
85
 
@@ -88,9 +88,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
88
88
  - `updated_at`:{当前时间}
89
89
  - `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
90
90
  - 追加:
91
- `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Plan (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}[ (+ {n} env-blocked)] → {review-artifact}`
91
+ `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Plan (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}, Manual-validation: {n} → {review-artifact}`
92
92
 
93
- `env-blocked` 是 `ai task log` 中 review 行「人工校验点」(EN `Manual-verify`)计数的数据源;不要新增并行人工验证字段。
93
+ `manual-validation` 是 `ai task log` 中 review 行「人工校验点」(EN `Manual-validation`)计数的数据源;不要新增并行人工验证字段。
94
94
 
95
95
  如果 task.md 中存在有效的 `issue_number`,执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测,然后同步 task 评论并发布 `{review-artifact}` 评论。
96
96
 
@@ -20,7 +20,7 @@
20
20
  "required_sections": [
21
21
  "Review Summary",
22
22
  "Findings",
23
- "Environment-Blocked Findings",
23
+ "Manual Validation Items",
24
24
  "Conclusion and Recommendations",
25
25
  "State Check",
26
26
  "Evidence",
@@ -20,7 +20,7 @@
20
20
  "required_sections": [
21
21
  "审查摘要",
22
22
  "问题清单",
23
- "环境性遗留",
23
+ "人工校验项",
24
24
  "结论与建议",
25
25
  "状态核对",
26
26
  "证据原文",
@@ -4,8 +4,8 @@ Read this file before presenting the final review result to the user.
4
4
 
5
5
  ## Select exactly one output scenario
6
6
 
7
- Evaluate in this order (**env-blocked count does not participate in selection**):
8
- 1. If `Blocker = 0`, `Major = 0`, and `Minor = 0`, use Scenario A, regardless of env-blocked count
7
+ Evaluate in this order (**manual-validation count does not participate in selection**):
8
+ 1. If `Blocker = 0`, `Major = 0`, and `Minor = 0`, use Scenario A, regardless of manual-validation count
9
9
  2. If `Blocker = 0` and (`Major > 0` or `Minor > 0`), use Scenario B
10
10
  3. If `Blocker > 0` and the issues can be handled by one focused revision, use Scenario C
11
11
  4. If the technical plan needs major redesign, broad rewriting, or a restart, use Scenario D
@@ -14,7 +14,7 @@ Rules:
14
14
  - Do not skip scenario selection
15
15
  - Do not mix text from multiple scenarios
16
16
  - If `Blocker > 0`, never use an approved template
17
- - Never count env-blocked items as blocker / major / minor or use them to trigger Scenario B/C/D
17
+ - Never count manual-validation items as blocker / major / minor or use them to trigger Scenario B/C/D
18
18
  - The selected scenario must include all TUI command formats
19
19
  - The count line always shows 4 numbers: the first three (Blockers / Major / Minor) must be 0 to proceed; the fourth, `Human-decision` (`{h}`), is the number of rows in task.md `## 审查分歧账本` with `stage=plan` and `status=needs-human-decision` — a "pending human ruling" item that need not be zero and does not participate in scenario selection. When `{h} > 0`, before the selected scenario's "Next steps" commands you must expand each pending ruling per the "Pending human-decision pre-block" in `.agents/rules/next-step-output.md` and prompt to resolve them first
20
20
 
@@ -30,8 +30,8 @@ Next step - write code:
30
30
  - Gemini CLI: /agent-infra:code-task {task-ref}
31
31
  - Codex CLI: $code-task {task-ref}
32
32
 
33
- [When env-blocked > 0, append:]
34
- Reminder: env-blocked items belong in the PR description manual verification checklist and should not trigger /plan-task.
33
+ [When manual-validation > 0, append:]
34
+ Reminder: manual-validation items belong in the PR description manual verification checklist and should not trigger /plan-task.
35
35
  ```
36
36
 
37
37
  ### Scenario B: Approved with findings
@@ -51,8 +51,8 @@ Or proceed directly to coding:
51
51
  - Gemini CLI: /agent-infra:code-task {task-ref}
52
52
  - Codex CLI: $code-task {task-ref}
53
53
 
54
- [When env-blocked > 0, append:]
55
- Reminder: env-blocked items belong in the PR description manual verification checklist and should not trigger /plan-task.
54
+ [When manual-validation > 0, append:]
55
+ Reminder: manual-validation items belong in the PR description manual verification checklist and should not trigger /plan-task.
56
56
  ```
57
57
 
58
58
  ### Scenario C: Changes requested
@@ -67,8 +67,8 @@ Next step - revise technical plan:
67
67
  - Gemini CLI: /agent-infra:plan-task {task-ref}
68
68
  - Codex CLI: $plan-task {task-ref}
69
69
 
70
- [When env-blocked > 0, append:]
71
- Reminder: env-blocked items belong in the PR description manual verification checklist and should not trigger /plan-task.
70
+ [When manual-validation > 0, append:]
71
+ Reminder: manual-validation items belong in the PR description manual verification checklist and should not trigger /plan-task.
72
72
  ```
73
73
 
74
74
  ### Scenario D: Rejected
@@ -83,6 +83,6 @@ Next step - redesign:
83
83
  - Gemini CLI: /agent-infra:plan-task {task-ref}
84
84
  - Codex CLI: $plan-task {task-ref}
85
85
 
86
- [When env-blocked > 0, append:]
87
- Reminder: env-blocked items belong in the PR description manual verification checklist and should not trigger /plan-task.
86
+ [When manual-validation > 0, append:]
87
+ Reminder: manual-validation items belong in the PR description manual verification checklist and should not trigger /plan-task.
88
88
  ```
@@ -4,8 +4,8 @@
4
4
 
5
5
  ## 选择唯一输出场景
6
6
 
7
- 按以下顺序判断(**注意:env-blocked 数量不参与判断**):
8
- 1. 如果 `Blocker = 0` 且 `Major = 0` 且 `Minor = 0`,使用场景 A(不管 env-blocked 是否 > 0)
7
+ 按以下顺序判断(**注意:manual-validation 数量不参与判断**):
8
+ 1. 如果 `Blocker = 0` 且 `Major = 0` 且 `Minor = 0`,使用场景 A(不管 manual-validation 是否 > 0)
9
9
  2. 如果 `Blocker = 0` 且(`Major > 0` 或 `Minor > 0`),使用场景 B
10
10
  3. 如果 `Blocker > 0`,且问题可以通过一次聚焦修复解决,使用场景 C
11
11
  4. 如果技术方案需要重大重构、大范围重写或整体重来,使用场景 D
@@ -14,7 +14,7 @@
14
14
  - 不要跳过场景判断步骤
15
15
  - 不要混用不同场景的文案
16
16
  - 只要 `Blocker > 0`,就绝对不能输出通过模板
17
- - env-blocked 项绝对不能被计入 blocker / major / minor 计数,也不能用作触发场景 B/C/D 的依据
17
+ - manual-validation 项绝对不能被计入 blocker / major / minor 计数,也不能用作触发场景 B/C/D 的依据
18
18
  - 所选场景中必须包含所有 TUI 命令格式
19
19
  - 计数行固定显示 4 个数字:前三项(阻塞 / 主要 / 次要)必须为 0 才进下一步;第四项 `人工裁决`(`{h}`)= task.md `## 审查分歧账本` 中 `stage=plan` 且 `status=needs-human-decision` 的行数,是「待人裁」项、不要求归零,也不参与场景判断。当 `{h} > 0` 时,必须在选定场景的「下一步」命令之前,按 `.agents/rules/next-step-output.md`「人工裁决待办前置块」逐项展开裁决项并提示先完成裁决
20
20
 
@@ -30,8 +30,8 @@
30
30
  - Gemini CLI:/agent-infra:code-task {task-ref}
31
31
  - Codex CLI:$code-task {task-ref}
32
32
 
33
- [当 env-blocked > 0 时,在最后附加一行:]
34
- 提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /plan-task。
33
+ [当 manual-validation > 0 时,在最后附加一行:]
34
+ 提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /plan-task。
35
35
  ```
36
36
 
37
37
  ### 场景 B:通过但有问题
@@ -51,8 +51,8 @@
51
51
  - Gemini CLI:/agent-infra:code-task {task-ref}
52
52
  - Codex CLI:$code-task {task-ref}
53
53
 
54
- [当 env-blocked > 0 时,在最后附加一行:]
55
- 提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /plan-task。
54
+ [当 manual-validation > 0 时,在最后附加一行:]
55
+ 提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /plan-task。
56
56
  ```
57
57
 
58
58
  ### 场景 C:需要修改
@@ -67,8 +67,8 @@
67
67
  - Gemini CLI:/agent-infra:plan-task {task-ref}
68
68
  - Codex CLI:$plan-task {task-ref}
69
69
 
70
- [当 env-blocked > 0 时,在最后附加一行:]
71
- 提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /plan-task。
70
+ [当 manual-validation > 0 时,在最后附加一行:]
71
+ 提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /plan-task。
72
72
  ```
73
73
 
74
74
  ### 场景 D:拒绝
@@ -83,6 +83,6 @@
83
83
  - Gemini CLI:/agent-infra:plan-task {task-ref}
84
84
  - Codex CLI:$plan-task {task-ref}
85
85
 
86
- [当 env-blocked > 0 时,在最后附加一行:]
87
- 提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /plan-task。
86
+ [当 manual-validation > 0 时,在最后附加一行:]
87
+ 提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /plan-task。
88
88
  ```
@@ -22,7 +22,7 @@ Use this template when writing `review-plan.md` or `review-plan-r{N}.md`.
22
22
  - **Review Time**: {timestamp}
23
23
  - **Scope**: {file-count and major modules}
24
24
  - **Overall Verdict**: {Approved / Changes Requested / Rejected}
25
- - **Findings (AI-actionable)**: 0 blockers, 0 majors, 0 minors / **env-blocked**: 0
25
+ - **Findings (AI-actionable)**: 0 blockers, 0 majors, 0 minors / **Manual validation**: 0
26
26
 
27
27
  ## Findings
28
28
 
@@ -46,17 +46,17 @@ Use this template when writing `review-plan.md` or `review-plan-r{N}.md`.
46
46
  **File**: `{file-path}:{line-number}`
47
47
  **Suggestion**: {improvement suggestion}
48
48
 
49
- ## Environment-Blocked Findings
49
+ ## Manual Validation Items
50
50
 
51
51
  > Items the AI agent cannot close in the current execution environment; they do not participate in the next plan round. Maintainers carry them in the PR description as a "manual verification required" checklist.
52
52
 
53
- #### 1. {environment-blocked finding title}
53
+ #### 1. {manual validation item title}
54
54
  **File**: `{file-path}:{line-number}` (if applicable)
55
55
  **Description**: {details}
56
56
  **Required Environment**: {e.g. Docker sandbox / macOS host / privileged root / third-party account}
57
57
  **Manual Verification Steps**: {steps for the human verifier}
58
58
 
59
- > If this round has no env-blocked findings, keep the section heading and write "None".
59
+ > If this round has no Manual validation items, keep the section heading and write "None".
60
60
 
61
61
 
62
62
  ## Review Disagreement Ledger Writeback
@@ -22,7 +22,7 @@
22
22
  - **审查时间**:{timestamp}
23
23
  - **审查范围**:{file-count and major modules}
24
24
  - **总体结论**:{通过 / 需要修改 / 拒绝}
25
- - **发现(AI 可处理)**:0 阻塞项,0 主要,0 次要 / **env-blocked**:0
25
+ - **发现(AI 可处理)**:0 阻塞项,0 主要,0 次要 / **人工校验**:0
26
26
 
27
27
  ## 问题清单
28
28
 
@@ -46,17 +46,17 @@
46
46
  **文件**:`{file-path}:{line-number}`
47
47
  **建议**:{improvement suggestion}
48
48
 
49
- ## 环境性遗留
49
+ ## 人工校验项
50
50
 
51
51
  > AI agent 在本执行环境无法闭环的项;不参与下一轮 refine。维护者在 PR description 中以「待人工验证」清单承接。
52
52
 
53
- #### 1. {环境性项标题}
53
+ #### 1. {人工校验项标题}
54
54
  **文件**:`{file-path}:{line-number}`(如适用)
55
55
  **说明**:{details}
56
56
  **所需环境**:{e.g. Docker 沙箱 / macOS host / 特权 root / 第三方账号}
57
57
  **待人工执行的验证步骤**:{steps for the human verifier}
58
58
 
59
- > 如本轮无 env-blocked 项,保留段落标题并写「(无)」。
59
+ > 如本轮无人工校验项,保留段落标题并写「(无)」。
60
60
 
61
61
 
62
62
  ## 审查分歧账本回写
@@ -29,7 +29,7 @@ Follow the `design-review` step in `.agents/workflows/feature-development.yaml`.
29
29
  3. **Actionable**: suggest a concrete fix
30
30
  4. **Severity-based**: clearly distinguish blockers, major issues, and minor issues
31
31
 
32
- ## Environment-Blocked Classification
32
+ ## Manual Validation Classification
33
33
 
34
34
  Some findings cannot be closed by an AI agent in the current execution environment, for example:
35
35
 
@@ -40,11 +40,11 @@ Some findings cannot be closed by an AI agent in the current execution environme
40
40
 
41
41
  **Decision tree**: "Can the AI agent close this item independently without changing the environment?"
42
42
  - Yes -> blocker / major / minor, based on risk
43
- - No -> **env-blocked** (a meta-category, not part of severity ordering)
43
+ - No -> **manual-validation** (a manual-validation meta-category, not part of severity ordering)
44
44
 
45
- Where env-blocked items go:
46
- - Record them in an independent review report section named "Environment-Blocked Findings"
47
- - Include them at the end of the numeric summary, for example `(+ 1 env-blocked)`
45
+ Where manual-validation items go:
46
+ - Record them in an independent review report section named "Manual Validation Items"
47
+ - Record the done-note source field as `Manual-validation: 1`; `ai task log` normalizes it into review rows
48
48
  - Do **not** include them in the code-task fix loop; maintainers carry them in the PR description under manual verification
49
49
 
50
50
  Also inspect the latest technical plan artifact, latest requirement-analysis review artifact, and `task.md` Activity Log so the report reflects the full design context.
@@ -29,7 +29,7 @@
29
29
  3. **可执行**:给出明确可落地的修复建议
30
30
  4. **按严重程度分类**:明确区分 blocker、major 和 minor
31
31
 
32
- ## 环境性遗留分类
32
+ ## 人工校验项分类
33
33
 
34
34
  某些发现项是 AI agent 在本执行环境**无法闭环**的,例如:
35
35
 
@@ -40,11 +40,11 @@
40
40
 
41
41
  **分类决策树**:「AI agent 能否在不改环境的前提下独立闭环这一项?」
42
42
  - 是 -> blocker / major / minor 之一(按风险定档)
43
- - 否 -> **env-blocked**(元类目,不参与严重程度排序)
43
+ - 否 -> **manual-validation**(人工校验元类目,不参与严重程度排序)
44
44
 
45
- env-blocked 项的去向:
46
- - 写入 review 报告独立段落「环境性遗留」
47
- - 在数字摘要末尾附带显示(如 `(+ 1 env-blocked)`)
45
+ manual-validation 项的去向:
46
+ - 写入 review 报告独立段落「人工校验项」
47
+ - done note 中写入源字段 `Manual-validation: 1`;`ai task log` 归一化展示到 review 行
48
48
  - **不**进入 code-task 修复循环;维护者在 PR description 中以「待人工验证」清单形式承接
49
49
 
50
50
  同时检查最新技术方案产物、最新需求分析审查产物和 `task.md` Activity Log,确保报告反映完整的设计上下文。
@@ -29,6 +29,7 @@ const DEFAULTS = {
29
29
  "node22"
30
30
  ],
31
31
  "tools": [
32
+ "agent-infra",
32
33
  "claude-code",
33
34
  "codex",
34
35
  "gemini-cli",
@@ -86,6 +87,9 @@ const DEFAULTS = {
86
87
  };
87
88
 
88
89
  const PACKAGE_NAME = '@fitlab-ai/agent-infra';
90
+ const AGENT_INFRA_SANDBOX_TOOL = 'agent-infra';
91
+ const LEGACY_DEFAULT_SANDBOX_TOOLS = ['claude-code', 'codex', 'gemini-cli', 'opencode'];
92
+ const DEFAULT_SANDBOX_TOOLS = [AGENT_INFRA_SANDBOX_TOOL, ...LEGACY_DEFAULT_SANDBOX_TOOLS];
89
93
  // Add a new identifier here only after shipping matching .{platform}. template variants.
90
94
  const KNOWN_PLATFORMS = new Set(['github']);
91
95
  const KNOWN_LANGUAGES = new Set(['en', 'zh-CN']);
@@ -123,6 +127,26 @@ function isPathOwnedByDisabledTUI(rel, enabledSet) {
123
127
  return false;
124
128
  }
125
129
 
130
+ function isLegacyDefaultSandboxTools(value) {
131
+ if (!Array.isArray(value) || value.length !== LEGACY_DEFAULT_SANDBOX_TOOLS.length) {
132
+ return false;
133
+ }
134
+ const tools = new Set(value);
135
+ return LEGACY_DEFAULT_SANDBOX_TOOLS.every(tool => tools.has(tool));
136
+ }
137
+
138
+ function migrateSandboxTools(cfg) {
139
+ const tools = cfg.sandbox?.tools;
140
+ if (!isLegacyDefaultSandboxTools(tools)) {
141
+ return false;
142
+ }
143
+ cfg.sandbox = {
144
+ ...cfg.sandbox,
145
+ tools: [...DEFAULT_SANDBOX_TOOLS]
146
+ };
147
+ return true;
148
+ }
149
+
126
150
  function norm(p) { return p.replace(/\\/g, '/'); }
127
151
 
128
152
  function normDir(p) {
@@ -1296,6 +1320,7 @@ function syncTemplates(projectRoot, templateRootOverride) {
1296
1320
  ) > 0;
1297
1321
 
1298
1322
  const prevVersion = cfg.templateVersion;
1323
+ const sandboxToolsMigrated = migrateSandboxTools(cfg);
1299
1324
 
1300
1325
  cfg.files.managed = managed;
1301
1326
  cfg.files.merged = merged;
@@ -1303,7 +1328,7 @@ function syncTemplates(projectRoot, templateRootOverride) {
1303
1328
  cfg.templateVersion = version;
1304
1329
  delete cfg.templateSource;
1305
1330
 
1306
- report.configUpdated = hasChanges || prevVersion !== version || hadTemplateSource;
1331
+ report.configUpdated = hasChanges || prevVersion !== version || hadTemplateSource || sandboxToolsMigrated;
1307
1332
 
1308
1333
  fs.writeFileSync(cfgPath, JSON.stringify(cfg, null, 2) + '\n', 'utf8');
1309
1334