@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
@@ -46,7 +46,7 @@ Verdict mapping:
46
46
  - `需要修改` / `Changes Requested` -> `Changes Requested`
47
47
  - `拒绝` / `Rejected` -> `Rejected`
48
48
 
49
- env-blocked counts do not affect mode selection.
49
+ manual-validation counts do not affect mode selection.
50
50
 
51
51
  ## Output Contract
52
52
 
@@ -46,7 +46,7 @@ node .agents/skills/code-task/scripts/detect-mode.js .agents/workspace/active/{t
46
46
  - `需要修改` / `Changes Requested` -> `Changes Requested`
47
47
  - `拒绝` / `Rejected` -> `Rejected`
48
48
 
49
- env-blocked 计数不参与 mode 判定。
49
+ manual-validation 计数不参与 mode 判定。
50
50
 
51
51
  ## 输出契约
52
52
 
@@ -27,9 +27,9 @@ Detailed priority rules:
27
27
  - Minor issues are optional only after Blockers and Majors are resolved
28
28
  - If you disagree with a finding, or judge it hallucinated after verification, do not silently skip it; give a counter-argument in the report's `## Per-Finding Verification` section and record it under unresolved issues
29
29
 
30
- ### Meta-category: env-blocked
30
+ ### Meta-category: manual-validation
31
31
 
32
- env-blocked findings are outside the repair scope. Handling rules:
32
+ manual-validation findings are outside the repair scope. Handling rules:
33
33
  - do not write code changes for these findings
34
34
  - list them unchanged in the code report's "Environment-Blocked Handling" section and mark them "outside AI repair scope"
35
35
  - do not repeat them under unresolved issues, to avoid visually double-counting them
@@ -66,7 +66,7 @@ Fix status:
66
66
  - Blockers fixed: {fixed-blockers}/{total-blockers}
67
67
  - Major issues fixed: {fixed-majors}/{total-majors}
68
68
  - Minor issues fixed: {fixed-minors}/{total-minors}
69
- - [If env-blocked > 0] env-blocked skipped: {count}
69
+ - [If manual-validation > 0] manual-validation skipped: {count}
70
70
  - All tests passing: {yes/no}
71
71
  - Review input: {review-artifact}
72
72
  - Code artifact: {code-artifact}
@@ -27,11 +27,11 @@
27
27
  - 只有在 Blocker 和 Major 都解决后,Minor 才是可选项
28
28
  - 如果你不同意某条审查意见,或核实后判定为幻觉,不要静默跳过,而是在报告 `## 对审查发现的逐条核实` 给出反证并记录到 unresolved issues
29
29
 
30
- ### 元类目:env-blocked
30
+ ### 元类目:manual-validation
31
31
 
32
- env-blocked 项不在修复范围。处理规则:
32
+ manual-validation 项不在修复范围。处理规则:
33
33
  - 不要为这些项编写代码改动
34
- - 在 code 报告的「环境性遗留处理」段落原样列出,标注「不在 AI 修复范围」
34
+ - 在 code 报告的「人工校验项处理」段落原样列出,标注「不在 AI 修复范围」
35
35
  - 不要在 unresolved 段落里重复列出(避免视觉计数翻倍)
36
36
  - 这些项的去向:维护者在 PR description 中以「待人工验证」清单承接
37
37
 
@@ -66,7 +66,7 @@ env-blocked 项不在修复范围。处理规则:
66
66
  - 阻塞项修复:{数量}/{总数}
67
67
  - 主要问题修复:{数量}/{总数}
68
68
  - 次要问题修复:{数量}/{总数}
69
- - [如 env-blocked > 0] 环境性遗留跳过:{数量}
69
+ - [如 manual-validation > 0] 人工校验项跳过:{数量}
70
70
  - 所有测试通过:{是/否}
71
71
  - 审查输入:{review-artifact}
72
72
  - 修复产物:{code-artifact}
@@ -9,7 +9,7 @@ Read this file before creating or updating the single reviewer-facing PR summary
9
9
  - Generate or update the `<!-- sync-pr:{task-id}:summary -->` comment with the canonical template from `.agents/rules/pr-sync.md`
10
10
  - When a matching summary comment already exists, PATCH only when the body changed; otherwise skip the write
11
11
  - In this skill, summary sync failures follow the existing `create-pr` error handling and must not roll back an already-created PR
12
- - Populate `{manual-verify-section}` per the aggregation rules in `.agents/rules/pr-sync.md`: include only post-code-stage checks that the AI cannot close on its own and that require a human to execute or judge; sources are `review-code*` "Environment-Blocked Findings" plus `code*` items that satisfy the admission boundary; each item must state "what to verify + location + why only a human can verify it". Render in two branches: **with retained items** → `### ⚠️ Manual Verification Required` heading + item list; **with none** → `### ✅ No Manual Verification Needed` heading + a single line (no ⚠️, no old list placeholder)
12
+ - Populate `{manual-validation-section}` per the aggregation rules in `.agents/rules/pr-sync.md`: include only post-code-stage checks that the AI cannot close on its own and that require a human to execute or judge; sources are `review-code*` "Manual Validation Items" plus `code*` items that satisfy the admission boundary; each item must state "what to verify + location + why only a human can verify it". Render in two branches: **with retained items** → `### ⚠️ Manual Verification Required` heading + item list; **with none** → `### ✅ No Manual Verification Needed` heading + a single line (no ⚠️, no old list placeholder)
13
13
 
14
14
  ## Result Reporting
15
15
 
@@ -9,7 +9,7 @@
9
9
  - 按 `.agents/rules/pr-sync.md` 中的唯一权威模板生成或更新 `<!-- sync-pr:{task-id}:summary -->` 评论
10
10
  - PR 已存在同标记评论时,只在正文变化时 PATCH;否则跳过写入
11
11
  - 本 skill 中,摘要同步失败沿用 `create-pr` 的现有错误处理,不回滚已经创建的 PR
12
- - 按 `.agents/rules/pr-sync.md` 的聚合规则填充 `{manual-verify-section}`:只收进入 code 阶段后 AI 无法自行关闭、需要人实际执行或判断的校验点;来源为 `review-code*` 的「环境性遗留」以及 `code*` 中满足准入边界的校验点;每条写明「校验什么 + 定位 + 为什么只能由人校验」。按两分支渲染:**有保留项** → `### ⚠️ 需人工校验` 标题 + 条目列表;**无保留项** → `### ✅ 无需人工校验` 标题 + 单行说明(不带 ⚠️、不写旧的列表占位)
12
+ - 按 `.agents/rules/pr-sync.md` 的聚合规则填充 `{manual-validation-section}`:只收进入 code 阶段后 AI 无法自行关闭、需要人实际执行或判断的校验点;来源为 `review-code*` 的「人工校验项」以及 `code*` 中满足准入边界的校验点;每条写明「校验什么 + 定位 + 为什么只能由人校验」。按两分支渲染:**有保留项** → `### ⚠️ 需人工校验` 标题 + 条目列表;**无保留项** → `### ✅ 无需人工校验` 标题 + 单行说明(不带 ⚠️、不写旧的列表占位)
13
13
 
14
14
  ## 结果回传
15
15
 
@@ -77,9 +77,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
77
77
  ```
78
78
 
79
79
  Set `current_step` to `requirement-analysis-review`, refresh task metadata, and append:
80
- `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Analysis (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 Analysis (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 Analysis (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 Analysis (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 requirement analysis needs broad rewriting or fresh clarification, 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=analysis` 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 the technical plan:
30
30
  - Gemini CLI: /agent-infra:plan-task {task-ref}
31
31
  - Codex CLI: $plan-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 /analyze-task.
33
+ [When manual-validation > 0, append:]
34
+ Reminder: manual-validation items belong in the PR description manual verification checklist and should not trigger /analyze-task.
35
35
  ```
36
36
 
37
37
  ### Scenario B: Approved with findings
@@ -51,8 +51,8 @@ Or proceed directly to planning:
51
51
  - Gemini CLI: /agent-infra:plan-task {task-ref}
52
52
  - Codex CLI: $plan-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 /analyze-task.
54
+ [When manual-validation > 0, append:]
55
+ Reminder: manual-validation items belong in the PR description manual verification checklist and should not trigger /analyze-task.
56
56
  ```
57
57
 
58
58
  ### Scenario C: Changes requested
@@ -67,8 +67,8 @@ Next step - revise requirement analysis:
67
67
  - Gemini CLI: /agent-infra:analyze-task {task-ref}
68
68
  - Codex CLI: $analyze-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 /analyze-task.
70
+ [When manual-validation > 0, append:]
71
+ Reminder: manual-validation items belong in the PR description manual verification checklist and should not trigger /analyze-task.
72
72
  ```
73
73
 
74
74
  ### Scenario D: Rejected
@@ -83,6 +83,6 @@ Next step - re-analyze:
83
83
  - Gemini CLI: /agent-infra:analyze-task {task-ref}
84
84
  - Codex CLI: $analyze-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 /analyze-task.
86
+ [When manual-validation > 0, append:]
87
+ Reminder: manual-validation items belong in the PR description manual verification checklist and should not trigger /analyze-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=analysis` 且 `status=needs-human-decision` 的行数,是「待人裁」项、不要求归零,也不参与场景判断。当 `{h} > 0` 时,必须在选定场景的「下一步」命令之前,按 `.agents/rules/next-step-output.md`「人工裁决待办前置块」逐项展开裁决项并提示先完成裁决
20
20
 
@@ -30,8 +30,8 @@
30
30
  - Gemini CLI:/agent-infra:plan-task {task-ref}
31
31
  - Codex CLI:$plan-task {task-ref}
32
32
 
33
- [当 env-blocked > 0 时,在最后附加一行:]
34
- 提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /analyze-task。
33
+ [当 manual-validation > 0 时,在最后附加一行:]
34
+ 提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /analyze-task。
35
35
  ```
36
36
 
37
37
  ### 场景 B:通过但有问题
@@ -51,8 +51,8 @@
51
51
  - Gemini CLI:/agent-infra:plan-task {task-ref}
52
52
  - Codex CLI:$plan-task {task-ref}
53
53
 
54
- [当 env-blocked > 0 时,在最后附加一行:]
55
- 提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /analyze-task。
54
+ [当 manual-validation > 0 时,在最后附加一行:]
55
+ 提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /analyze-task。
56
56
  ```
57
57
 
58
58
  ### 场景 C:需要修改
@@ -67,8 +67,8 @@
67
67
  - Gemini CLI:/agent-infra:analyze-task {task-ref}
68
68
  - Codex CLI:$analyze-task {task-ref}
69
69
 
70
- [当 env-blocked > 0 时,在最后附加一行:]
71
- 提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /analyze-task。
70
+ [当 manual-validation > 0 时,在最后附加一行:]
71
+ 提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /analyze-task。
72
72
  ```
73
73
 
74
74
  ### 场景 D:拒绝
@@ -83,6 +83,6 @@
83
83
  - Gemini CLI:/agent-infra:analyze-task {task-ref}
84
84
  - Codex CLI:$analyze-task {task-ref}
85
85
 
86
- [当 env-blocked > 0 时,在最后附加一行:]
87
- 提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /analyze-task。
86
+ [当 manual-validation > 0 时,在最后附加一行:]
87
+ 提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /analyze-task。
88
88
  ```
@@ -22,7 +22,7 @@ Use this template when writing `review-analysis.md` or `review-analysis-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-analysis.md` or `review-analysis-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 analysis 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 `analysis-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 requirement analysis artifact and `task.md` Activity Log so the report reflects the full analysis 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,确保报告反映完整的分析上下文。
@@ -96,10 +96,10 @@ date "+%Y-%m-%d %H:%M:%S%:z"
96
96
  ```
97
97
 
98
98
  Update task.md and append:
99
- `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Code (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}[ (+ {n} env-blocked)] → {artifact-filename}`
99
+ `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Code (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}, Manual-validation: {n} → {artifact-filename}`
100
100
 
101
- Omit the bracketed segment when env-blocked = 0; append ` (+ {n} env-blocked)` when env-blocked > 0.
102
- `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.
101
+ Always include the `Manual-validation: {n}` field in the done log, including when it is 0.
102
+ `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.
103
103
 
104
104
  If task.md contains a valid `issue_number`, perform these sync actions (skip and continue on any failure):
105
105
  - Read `.agents/rules/issue-sync.md` before syncing, and complete upstream repository detection plus permission detection
@@ -134,7 +134,7 @@ Choose exactly one branch based on the findings:
134
134
  - blockers that can be fixed in a focused pass -> changes requested
135
135
  - major redesign or re-implementation needed -> rejected
136
136
 
137
- env-blocked counts do not influence branch selection; they are appended to the summary line only.
137
+ manual-validation counts do not influence branch selection; they are displayed only as manual validation counts.
138
138
 
139
139
  > 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.
140
140
 
@@ -99,10 +99,10 @@ date "+%Y-%m-%d %H:%M:%S%:z"
99
99
  - `updated_at`:{当前时间}
100
100
  - `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
101
101
  - 追加:
102
- `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Code (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}[ (+ {n} env-blocked)] → {artifact-filename}`
102
+ `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Code (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}, Manual-validation: {n} → {artifact-filename}`
103
103
 
104
- env-blocked = 0 时省略括号部分;env-blocked > 0 时附加 ` (+ {n} env-blocked)`。
105
- `env-blocked` 是 `ai task log` 中 review 行「人工校验点」(EN `Manual-verify`)计数的数据源;不要新增并行人工验证字段。
104
+ 完成日志必须始终写入 `Manual-validation: {n}` 字段,0 也保留。
105
+ `manual-validation` 是 `ai task log` 中 review 行「人工校验点」(EN `Manual-validation`)计数的数据源;不要新增并行人工验证字段。
106
106
 
107
107
  如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续):
108
108
  - 执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测
@@ -137,7 +137,7 @@ node .agents/scripts/validate-artifact.js gate review-code .agents/workspace/act
137
137
  - 有 blocker,且可集中修复 -> 需要修改
138
138
  - 需要重大返工或重新实现 -> 拒绝
139
139
 
140
- env-blocked 的数量不参与分支选择,仅在数字摘要末尾附带显示。
140
+ manual-validation 的数量不参与分支选择,只作为人工校验计数显示。
141
141
 
142
142
  > 完整的 4 分支输出模板、判断规则和禁止条款见 `reference/output-templates.md`。向用户汇报审查结论前先读取 `reference/output-templates.md`。
143
143
 
@@ -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
  "证据原文",
@@ -6,8 +6,8 @@ Read this file before presenting the final review result to the user.
6
6
 
7
7
  ## Choose Exactly One Output Branch
8
8
 
9
- Apply these rules in order (**note: env-blocked counts do not participate in selection**):
10
- 1. if `Blocker = 0` and `Major = 0` and `Minor = 0`, use Branch A (regardless of whether env-blocked > 0)
9
+ Apply these rules in order (**note: manual-validation counts do not participate in selection**):
10
+ 1. if `Blocker = 0` and `Major = 0` and `Minor = 0`, use Branch A (regardless of whether manual-validation > 0)
11
11
  2. if `Blocker = 0` and (`Major > 0` or `Minor > 0`), use Branch B
12
12
  3. if `Blocker > 0` and the work can be repaired in a focused refinement pass, use Branch C
13
13
  4. if the task requires major redesign, broad reimplementation, or a restart, use Branch D
@@ -16,15 +16,15 @@ Prohibitions:
16
16
  - never skip the branch-selection step
17
17
  - never mix text from different branches
18
18
  - if `Blocker > 0`, never output an approval template
19
- - never count env-blocked findings as blockers / major issues / minor issues, and never use them to trigger Branch B/C/D
19
+ - never count manual-validation findings as blockers / major issues / minor issues, and never use them to trigger Branch B/C/D
20
20
  - always include every TUI command format in the selected branch
21
- - the count line always shows 5 numbers: the first three (Blockers / Major / Minor) must be 0 to proceed; the last two are "pending human" items and need not be zero — `Manual-verify` (`{e}`) = this round's env-blocked count, `Human-decision` (`{h}`) = the number of rows in task.md `## 审查分歧账本` with `stage=code` and `status=needs-human-decision`; neither participates in branch 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
21
+ - the count line always shows 5 numbers: the first three (Blockers / Major / Minor) must be 0 to proceed; the last two are "pending human" items and need not be zero — `Manual-validation` (`{e}`) = this round's manual-validation count, `Human-decision` (`{h}`) = the number of rows in task.md `## 审查分歧账本` with `stage=code` and `status=needs-human-decision`; neither participates in branch 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
22
22
 
23
23
  ### Branch A: Approved with No Findings
24
24
 
25
25
  ```text
26
26
  Task {task-id} review completed. Verdict: approved.
27
- - Blockers: 0 | Major: 0 | Minor: 0 | Manual-verify: {e} | Human-decision: {h}
27
+ - Blockers: 0 | Major: 0 | Minor: 0 | Manual-validation: {e} | Human-decision: {h}
28
28
  [- Review report: .agents/workspace/active/{task-id}/{review-artifact}]
29
29
 
30
30
  Next step - commit the code:
@@ -32,15 +32,15 @@ Next step - commit the code:
32
32
  - Gemini CLI: /agent-infra:commit
33
33
  - Codex CLI: $commit
34
34
 
35
- [When env-blocked > 0, append this final line:]
36
- Reminder: env-blocked findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
35
+ [When manual-validation > 0, append this final line:]
36
+ Reminder: manual-validation findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
37
37
  ```
38
38
 
39
39
  ### Branch B: Approved with Findings
40
40
 
41
41
  ```text
42
42
  Task {task-id} review completed. Verdict: approved.
43
- - Blockers: 0 | Major: {n} | Minor: {n} | Manual-verify: {e} | Human-decision: {h}
43
+ - Blockers: 0 | Major: {n} | Minor: {n} | Manual-validation: {e} | Human-decision: {h}
44
44
  - Review report: .agents/workspace/active/{task-id}/{review-artifact}
45
45
 
46
46
  Next step - fix before commit (recommended):
@@ -53,15 +53,15 @@ Or commit directly (skip fix):
53
53
  - Gemini CLI: /agent-infra:commit
54
54
  - Codex CLI: $commit
55
55
 
56
- [When env-blocked > 0, append this final line:]
57
- Reminder: env-blocked findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
56
+ [When manual-validation > 0, append this final line:]
57
+ Reminder: manual-validation findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
58
58
  ```
59
59
 
60
60
  ### Branch C: Changes Requested
61
61
 
62
62
  ```text
63
63
  Task {task-id} review completed. Verdict: changes requested.
64
- - Blockers: {n} | Major: {n} | Minor: {n} | Manual-verify: {e} | Human-decision: {h}
64
+ - Blockers: {n} | Major: {n} | Minor: {n} | Manual-validation: {e} | Human-decision: {h}
65
65
  - Review report: .agents/workspace/active/{task-id}/{review-artifact}
66
66
 
67
67
  Next step - fix the findings:
@@ -69,15 +69,15 @@ Next step - fix the findings:
69
69
  - Gemini CLI: /agent-infra:code-task {task-ref}
70
70
  - Codex CLI: $code-task {task-ref}
71
71
 
72
- [When env-blocked > 0, append this final line:]
73
- Reminder: env-blocked findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
72
+ [When manual-validation > 0, append this final line:]
73
+ Reminder: manual-validation findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
74
74
  ```
75
75
 
76
76
  ### Branch D: Rejected
77
77
 
78
78
  ```text
79
79
  Task {task-id} review completed. Verdict: rejected, re-design the technical plan.
80
- - Blockers: {n} | Major: {n} | Minor: {n} | Manual-verify: {e} | Human-decision: {h}
80
+ - Blockers: {n} | Major: {n} | Minor: {n} | Manual-validation: {e} | Human-decision: {h}
81
81
  - Review report: .agents/workspace/active/{task-id}/{review-artifact}
82
82
 
83
83
  Next step - re-design the technical plan:
@@ -87,6 +87,6 @@ Next step - re-design the technical plan:
87
87
 
88
88
  > 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.
89
89
 
90
- [When env-blocked > 0, append this final line:]
91
- Reminder: env-blocked findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
90
+ [When manual-validation > 0, append this final line:]
91
+ Reminder: manual-validation findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
92
92
  ```
@@ -6,8 +6,8 @@
6
6
 
7
7
  ## 选择唯一输出场景
8
8
 
9
- 按以下顺序判断(**注意:env-blocked 数量不参与判断**):
10
- 1. 如果 `Blocker = 0` 且 `Major = 0` 且 `Minor = 0`,使用场景 A(不管 env-blocked 是否 > 0)
9
+ 按以下顺序判断(**注意:manual-validation 数量不参与判断**):
10
+ 1. 如果 `Blocker = 0` 且 `Major = 0` 且 `Minor = 0`,使用场景 A(不管 manual-validation 是否 > 0)
11
11
  2. 如果 `Blocker = 0` 且(`Major > 0` 或 `Minor > 0`),使用场景 B
12
12
  3. 如果 `Blocker > 0`,且问题可以通过一次聚焦修复解决,使用场景 C
13
13
  4. 如果任务需要重大重构、大范围重写或整体重来,使用场景 D
@@ -16,9 +16,9 @@
16
16
  - 不要跳过场景判断步骤
17
17
  - 不要混用不同场景的文案
18
18
  - 只要 `Blocker > 0`,就绝对不能输出通过模板
19
- - env-blocked 项绝对不能被计入 blocker / major / minor 计数,也不能用作触发场景 B/C/D 的依据
19
+ - manual-validation 项绝对不能被计入 blocker / major / minor 计数,也不能用作触发场景 B/C/D 的依据
20
20
  - 所选场景中必须包含所有 TUI 命令格式
21
- - 计数行固定显示 5 个数字:前三项(阻塞 / 主要 / 次要)必须为 0 才进下一步;后两项是「待人处理」项、不要求归零——`人工校验点`(`{e}`)= 本轮 env-blocked 计数,`人工裁决`(`{h}`)= task.md `## 审查分歧账本` 中 `stage=code` 且 `status=needs-human-decision` 的行数;二者均不参与场景判断。当 `{h} > 0` 时,必须在选定场景的「下一步」命令之前,按 `.agents/rules/next-step-output.md`「人工裁决待办前置块」逐项展开裁决项并提示先完成裁决
21
+ - 计数行固定显示 5 个数字:前三项(阻塞 / 主要 / 次要)必须为 0 才进下一步;后两项是「待人处理」项、不要求归零——`人工校验点`(`{e}`)= 本轮 manual-validation 计数,`人工裁决`(`{h}`)= task.md `## 审查分歧账本` 中 `stage=code` 且 `status=needs-human-decision` 的行数;二者均不参与场景判断。当 `{h} > 0` 时,必须在选定场景的「下一步」命令之前,按 `.agents/rules/next-step-output.md`「人工裁决待办前置块」逐项展开裁决项并提示先完成裁决
22
22
 
23
23
  ### 场景 A:通过且无问题
24
24
 
@@ -32,8 +32,8 @@
32
32
  - Gemini CLI:/agent-infra:commit
33
33
  - Codex CLI:$commit
34
34
 
35
- [当 env-blocked > 0 时,在最后附加一行:]
36
- 提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
35
+ [当 manual-validation > 0 时,在最后附加一行:]
36
+ 提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
37
37
  ```
38
38
 
39
39
  ### 场景 B:通过但有问题
@@ -53,8 +53,8 @@
53
53
  - Gemini CLI:/agent-infra:commit
54
54
  - Codex CLI:$commit
55
55
 
56
- [当 env-blocked > 0 时,在最后附加一行:]
57
- 提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
56
+ [当 manual-validation > 0 时,在最后附加一行:]
57
+ 提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
58
58
  ```
59
59
 
60
60
  ### 场景 C:需要修改
@@ -69,8 +69,8 @@
69
69
  - Gemini CLI:/agent-infra:code-task {task-ref}
70
70
  - Codex CLI:$code-task {task-ref}
71
71
 
72
- [当 env-blocked > 0 时,在最后附加一行:]
73
- 提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
72
+ [当 manual-validation > 0 时,在最后附加一行:]
73
+ 提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
74
74
  ```
75
75
 
76
76
  ### 场景 D:拒绝
@@ -87,6 +87,6 @@
87
87
 
88
88
  > 注意:Rejected 表示实现方向需要整体重做,不是局部修复。`code-task/scripts/detect-mode.js` 分支 #7 会拒绝直接 `/code-task`,要求先重新方案设计。
89
89
 
90
- [当 env-blocked > 0 时,在最后附加一行:]
91
- 提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
90
+ [当 manual-validation > 0 时,在最后附加一行:]
91
+ 提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
92
92
  ```