@fitlab-ai/agent-infra 0.11.15 → 0.12.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.
Files changed (265) hide show
  1. package/bin/cli.ts +1 -1
  2. package/dist/bin/cli.js +1 -1
  3. package/dist/bin/internal-cli.js +6 -1
  4. package/dist/lib/agent-clients/adapters/codex-lifecycle/recovery.js +6 -6
  5. package/dist/lib/agent-clients/adapters/codex-lifecycle/store.js +8 -18
  6. package/dist/lib/agent-clients/adapters/codex-orchestration.js +1 -1
  7. package/dist/lib/decide.js +2 -7
  8. package/dist/lib/internal/cli-route-inventory.js +3 -0
  9. package/dist/lib/internal/manual-validation.js +19 -33
  10. package/dist/lib/internal/platform-comment.js +59 -9
  11. package/dist/lib/internal/task-activity.js +1 -12
  12. package/dist/lib/internal/task-event.js +1 -12
  13. package/dist/lib/internal/task-ledger.js +1 -12
  14. package/dist/lib/internal/task-operation-registry.js +2 -1
  15. package/dist/lib/internal/task-qualification.js +6 -15
  16. package/dist/lib/internal/task-review.js +3 -16
  17. package/dist/lib/internal/task-short-id.js +2 -1
  18. package/dist/lib/internal/task-verify.js +1 -11
  19. package/dist/lib/internal/task-warning.js +1 -12
  20. package/dist/lib/internal/task-workspace.js +43 -0
  21. package/dist/lib/merge.js +4 -3
  22. package/dist/lib/platform/issue-comments.js +373 -267
  23. package/dist/lib/platform/issue-summary-content.js +112 -0
  24. package/dist/lib/platform/pr-change-report.js +175 -26
  25. package/dist/lib/platform/pr-summary-content.js +54 -0
  26. package/dist/lib/platform/pr-summary.js +321 -296
  27. package/dist/lib/platform/pull-requests.js +3 -15
  28. package/dist/lib/platform/summary-content-pipeline.js +18 -0
  29. package/dist/lib/pr-review/evidence-grading.js +3 -2
  30. package/dist/lib/process-data/index.js +5 -4
  31. package/dist/lib/process-data/sources.js +6 -0
  32. package/dist/lib/run/index.js +3 -2
  33. package/dist/lib/sandbox/commands/create.js +5 -1
  34. package/dist/lib/sandbox/commands/enter.js +1 -1
  35. package/dist/lib/sandbox/commands/list-running.js +2 -1
  36. package/dist/lib/sandbox/control/client.js +8 -13
  37. package/dist/lib/sandbox/control/completed-reentry.js +2 -1
  38. package/dist/lib/sandbox/control/task-view.js +4 -2
  39. package/dist/lib/sandbox/mounts.js +4 -4
  40. package/dist/lib/sandbox/recovery.js +26 -16
  41. package/dist/lib/sandbox/removal.js +62 -12
  42. package/dist/lib/sandbox/task-resolver.js +9 -6
  43. package/dist/lib/sandbox/workspace-identity.js +6 -5
  44. package/dist/lib/sandbox/workspace-view.js +29 -22
  45. package/dist/lib/task/activity-intent.js +2 -12
  46. package/dist/lib/task/artifact-lifecycle.js +17 -11
  47. package/dist/lib/task/artifact-operations.js +41 -49
  48. package/dist/lib/task/capabilities.js +2 -2
  49. package/dist/lib/task/commands/ls.js +4 -3
  50. package/dist/lib/task/commands/status.js +1 -1
  51. package/dist/lib/task/commit-operation.js +6 -6
  52. package/dist/lib/task/control-authority.js +32 -32
  53. package/dist/lib/task/create-service.js +2 -4
  54. package/dist/lib/task/create.js +12 -65
  55. package/dist/lib/task/delegation-receipts.js +1 -1
  56. package/dist/lib/task/delivery.js +2 -8
  57. package/dist/lib/task/events.js +5 -31
  58. package/dist/lib/task/finalization.js +33 -29
  59. package/dist/lib/task/lifecycle.js +9 -48
  60. package/dist/lib/task/local-artifact-finalization.js +1 -2
  61. package/dist/lib/task/orchestration.js +24 -57
  62. package/dist/lib/task/platform-operation-recovery.js +87 -88
  63. package/dist/lib/task/resolve-ref.js +17 -12
  64. package/dist/lib/task/review-finalization.js +2 -35
  65. package/dist/lib/task/review-identity.js +3 -1
  66. package/dist/lib/task/short-id.js +10 -8
  67. package/dist/lib/task/verification-engine.js +19 -58
  68. package/dist/lib/task/workspace-root.js +59 -0
  69. package/dist/lib/task/workspace-snapshot.js +4 -3
  70. package/dist/lifecycle-build-manifest.json +3 -3
  71. package/lib/agent-clients/adapters/codex-lifecycle/recovery.ts +6 -6
  72. package/lib/agent-clients/adapters/codex-lifecycle/store.ts +8 -34
  73. package/lib/agent-clients/adapters/codex-orchestration.ts +1 -1
  74. package/lib/decide.ts +2 -7
  75. package/lib/internal/cli-route-inventory.ts +2 -0
  76. package/lib/internal/manual-validation.ts +20 -37
  77. package/lib/internal/platform-comment.ts +49 -6
  78. package/lib/internal/task-activity.ts +1 -10
  79. package/lib/internal/task-event.ts +1 -10
  80. package/lib/internal/task-ledger.ts +1 -10
  81. package/lib/internal/task-operation-registry.ts +2 -1
  82. package/lib/internal/task-qualification.ts +5 -11
  83. package/lib/internal/task-review.ts +3 -14
  84. package/lib/internal/task-short-id.ts +2 -1
  85. package/lib/internal/task-verify.ts +1 -9
  86. package/lib/internal/task-warning.ts +1 -10
  87. package/lib/internal/task-workspace.ts +39 -0
  88. package/lib/merge.ts +4 -3
  89. package/lib/platform/issue-comments.ts +478 -280
  90. package/lib/platform/issue-summary-content.ts +132 -0
  91. package/lib/platform/pr-change-report.ts +165 -20
  92. package/lib/platform/pr-summary-content.ts +60 -0
  93. package/lib/platform/pr-summary.ts +367 -269
  94. package/lib/platform/pull-requests.ts +3 -24
  95. package/lib/platform/summary-content-pipeline.ts +23 -0
  96. package/lib/pr-review/evidence-grading.ts +3 -2
  97. package/lib/process-data/index.ts +4 -3
  98. package/lib/process-data/sources.ts +6 -0
  99. package/lib/run/index.ts +3 -2
  100. package/lib/sandbox/commands/create.ts +5 -1
  101. package/lib/sandbox/commands/enter.ts +1 -1
  102. package/lib/sandbox/commands/list-running.ts +2 -1
  103. package/lib/sandbox/control/client.ts +7 -12
  104. package/lib/sandbox/control/completed-reentry.ts +2 -1
  105. package/lib/sandbox/control/task-view.ts +4 -2
  106. package/lib/sandbox/mounts.ts +4 -4
  107. package/lib/sandbox/recovery.ts +26 -18
  108. package/lib/sandbox/removal.ts +60 -27
  109. package/lib/sandbox/task-resolver.ts +9 -6
  110. package/lib/sandbox/workspace-identity.ts +6 -5
  111. package/lib/sandbox/workspace-view.ts +28 -20
  112. package/lib/task/activity-intent.ts +3 -17
  113. package/lib/task/artifact-lifecycle.ts +39 -11
  114. package/lib/task/artifact-operations.ts +28 -35
  115. package/lib/task/capabilities.ts +2 -2
  116. package/lib/task/commands/ls.ts +4 -3
  117. package/lib/task/commands/status.ts +1 -1
  118. package/lib/task/commit-operation.ts +5 -6
  119. package/lib/task/control-authority.ts +29 -35
  120. package/lib/task/create-service.ts +2 -4
  121. package/lib/task/create.ts +10 -51
  122. package/lib/task/delegation-receipts.ts +1 -1
  123. package/lib/task/delivery.ts +2 -10
  124. package/lib/task/events.ts +5 -32
  125. package/lib/task/finalization.ts +27 -30
  126. package/lib/task/lifecycle.ts +9 -50
  127. package/lib/task/local-artifact-finalization.ts +1 -4
  128. package/lib/task/orchestration.ts +31 -80
  129. package/lib/task/platform-operation-recovery.ts +70 -82
  130. package/lib/task/resolve-ref.ts +18 -12
  131. package/lib/task/review-finalization.ts +2 -52
  132. package/lib/task/review-identity.ts +3 -1
  133. package/lib/task/short-id.ts +10 -8
  134. package/lib/task/verification-engine.ts +20 -62
  135. package/lib/task/workspace-root.ts +78 -0
  136. package/lib/task/workspace-snapshot.ts +4 -3
  137. package/package.json +1 -1
  138. package/templates/.agents/QUICKSTART.en.md +19 -8
  139. package/templates/.agents/QUICKSTART.zh-CN.md +19 -8
  140. package/templates/.agents/README.en.md +10 -15
  141. package/templates/.agents/README.zh-CN.md +9 -13
  142. package/templates/.agents/rules/issue-sync.en.md +1 -1
  143. package/templates/.agents/rules/issue-sync.zh-CN.md +1 -1
  144. package/templates/.agents/rules/lifecycle-orchestration.en.md +1 -1
  145. package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +1 -1
  146. package/templates/.agents/rules/next-step-output.en.md +2 -2
  147. package/templates/.agents/rules/next-step-output.zh-CN.md +2 -2
  148. package/templates/.agents/rules/pr-sync.en.md +5 -3
  149. package/templates/.agents/rules/pr-sync.zh-CN.md +7 -10
  150. package/templates/.agents/rules/release-commands.en.md +3 -0
  151. package/templates/.agents/rules/release-commands.zh-CN.md +3 -0
  152. package/templates/.agents/rules/task-management.en.md +0 -2
  153. package/templates/.agents/rules/task-management.zh-CN.md +0 -2
  154. package/templates/.agents/rules/task-short-id.en.md +2 -2
  155. package/templates/.agents/rules/task-short-id.zh-CN.md +2 -2
  156. package/templates/.agents/scripts/task-short-id.js +2 -8
  157. package/templates/.agents/skills/analyze-task/SKILL.en.md +6 -6
  158. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +6 -6
  159. package/templates/.agents/skills/analyze-task/config/verify.en.json +0 -1
  160. package/templates/.agents/skills/analyze-task/config/verify.zh-CN.json +0 -1
  161. package/templates/.agents/skills/archive-tasks/SKILL.en.md +5 -5
  162. package/templates/.agents/skills/archive-tasks/SKILL.zh-CN.md +5 -5
  163. package/templates/.agents/skills/archive-tasks/scripts/archive-tasks.sh +10 -2
  164. package/templates/.agents/skills/block-task/SKILL.en.md +4 -4
  165. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +5 -5
  166. package/templates/.agents/skills/block-task/config/verify.json +0 -1
  167. package/templates/.agents/skills/cancel-task/SKILL.en.md +7 -7
  168. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +7 -7
  169. package/templates/.agents/skills/cancel-task/config/verify.json +0 -1
  170. package/templates/.agents/skills/code-task/SKILL.en.md +1 -1
  171. package/templates/.agents/skills/code-task/SKILL.zh-CN.md +3 -3
  172. package/templates/.agents/skills/code-task/config/verify.en.json +0 -1
  173. package/templates/.agents/skills/code-task/config/verify.zh-CN.json +0 -1
  174. package/templates/.agents/skills/code-task/reference/output-template.en.md +1 -1
  175. package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +1 -1
  176. package/templates/.agents/skills/commit/SKILL.en.md +1 -1
  177. package/templates/.agents/skills/commit/SKILL.zh-CN.md +1 -1
  178. package/templates/.agents/skills/commit/config/verify.json +0 -1
  179. package/templates/.agents/skills/commit/reference/commit-orchestration.en.md +2 -2
  180. package/templates/.agents/skills/commit/reference/commit-orchestration.zh-CN.md +2 -2
  181. package/templates/.agents/skills/commit/reference/pr-summary-sync.en.md +2 -2
  182. package/templates/.agents/skills/commit/reference/pr-summary-sync.zh-CN.md +2 -2
  183. package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +2 -2
  184. package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +2 -2
  185. package/templates/.agents/skills/complete-manual-validation/config/verify.en.json +0 -1
  186. package/templates/.agents/skills/complete-manual-validation/config/verify.zh-CN.json +0 -1
  187. package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +3 -3
  188. package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +3 -3
  189. package/templates/.agents/skills/complete-task/SKILL.en.md +15 -30
  190. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +17 -32
  191. package/templates/.agents/skills/complete-task/config/verify.en.json +0 -1
  192. package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +0 -1
  193. package/templates/.agents/skills/create-pr/SKILL.en.md +3 -3
  194. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +3 -3
  195. package/templates/.agents/skills/create-pr/config/verify.json +0 -1
  196. package/templates/.agents/skills/create-pr/reference/change-report.en.md +10 -3
  197. package/templates/.agents/skills/create-pr/reference/change-report.zh-CN.md +10 -3
  198. package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +3 -3
  199. package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +3 -3
  200. package/templates/.agents/skills/create-release-note/SKILL.en.md +2 -2
  201. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +2 -2
  202. package/templates/.agents/skills/create-task/SKILL.en.md +4 -22
  203. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +4 -22
  204. package/templates/.agents/skills/create-task/config/verify.json +0 -1
  205. package/templates/.agents/skills/import-codescan/SKILL.en.md +1 -1
  206. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
  207. package/templates/.agents/skills/import-codescan/config/verify.json +0 -1
  208. package/templates/.agents/skills/import-dependabot/SKILL.en.md +3 -3
  209. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +3 -3
  210. package/templates/.agents/skills/import-dependabot/config/verify.json +0 -1
  211. package/templates/.agents/skills/import-issue/SKILL.en.md +5 -5
  212. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +5 -5
  213. package/templates/.agents/skills/import-issue/config/verify.json +0 -1
  214. package/templates/.agents/skills/plan-task/SKILL.en.md +5 -5
  215. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +5 -5
  216. package/templates/.agents/skills/plan-task/config/verify.en.json +0 -1
  217. package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +0 -1
  218. package/templates/.agents/skills/restore-task/SKILL.en.md +2 -2
  219. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +3 -3
  220. package/templates/.agents/skills/restore-task/config/verify.json +0 -1
  221. package/templates/.agents/skills/review-analysis/SKILL.en.md +1 -1
  222. package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +2 -2
  223. package/templates/.agents/skills/review-analysis/config/verify.en.json +0 -1
  224. package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +0 -1
  225. package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +5 -5
  226. package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +5 -5
  227. package/templates/.agents/skills/review-code/SKILL.en.md +2 -2
  228. package/templates/.agents/skills/review-code/SKILL.zh-CN.md +2 -2
  229. package/templates/.agents/skills/review-code/reference/output-templates.en.md +4 -4
  230. package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +4 -4
  231. package/templates/.agents/skills/review-plan/SKILL.en.md +1 -1
  232. package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +2 -2
  233. package/templates/.agents/skills/review-plan/config/verify.en.json +0 -1
  234. package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +0 -1
  235. package/templates/.agents/skills/review-plan/reference/output-templates.en.md +5 -5
  236. package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +5 -5
  237. package/templates/.agents/skills/review-pr/SKILL.en.md +2 -2
  238. package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +2 -2
  239. package/templates/.agents/skills/review-pr/config/verify.en.json +0 -1
  240. package/templates/.agents/skills/review-pr/config/verify.zh-CN.json +0 -1
  241. package/templates/.agents/skills/review-pr/reference/output-guidance.en.md +1 -1
  242. package/templates/.agents/skills/review-pr/reference/output-guidance.zh-CN.md +1 -1
  243. package/templates/.agents/skills/run-manual-validation/config/verify.en.json +0 -1
  244. package/templates/.agents/skills/run-manual-validation/config/verify.zh-CN.json +0 -1
  245. package/templates/.agents/skills/run-task/SKILL.en.md +1 -1
  246. package/templates/.agents/skills/run-task/SKILL.zh-CN.md +1 -1
  247. package/templates/.agents/skills/test/SKILL.en.md +0 -3
  248. package/templates/.agents/skills/test/SKILL.zh-CN.md +0 -3
  249. package/templates/.agents/skills/test-integration/SKILL.en.md +0 -3
  250. package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +0 -3
  251. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +13 -6
  252. package/templates/.agents/skills/upgrade-dependency/SKILL.en.md +0 -3
  253. package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +0 -3
  254. package/templates/.agents/skills/watch-pr/SKILL.en.md +4 -4
  255. package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +4 -4
  256. package/templates/.agents/skills/watch-pr/config/verify.json +0 -1
  257. package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.en.md +3 -3
  258. package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.zh-CN.md +3 -3
  259. package/templates/.agents/templates/handoff.en.md +1 -1
  260. package/templates/.agents/templates/handoff.zh-CN.md +1 -1
  261. package/templates/.agents/workflows/bug-fix.en.yaml +1 -1
  262. package/templates/.agents/workflows/feature-development.en.yaml +1 -1
  263. package/templates/.agents/workflows/refactoring.en.yaml +1 -1
  264. package/dist/lib/task/task-execution-lock.js +0 -250
  265. package/lib/task/task-execution-lock.ts +0 -320
@@ -53,16 +53,23 @@ node -p "'v' + require('./package.json').version"
53
53
 
54
54
  ## 创建第一个任务
55
55
 
56
+ 先通过统一 resolver 取得宿主任务根,供以下示例使用:
57
+
58
+ ```bash
59
+ TASK_WORKSPACE_ROOT=$(agent-infra-internal task-workspace resolve --boundary host | node -e 'let input="";process.stdin.setEncoding("utf8");process.stdin.on("data",chunk=>input+=chunk);process.stdin.on("end",()=>process.stdout.write(JSON.parse(input).root));')
60
+ ```
61
+
56
62
  1. 将任务模板复制到活跃工作区:
57
63
 
58
64
  ```bash
59
- cp .agents/templates/task.md .agents/workspace/active/task-001.md
65
+ mkdir -p "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120000"
66
+ cp .agents/templates/task.md "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120000/task.md"
60
67
  ```
61
68
 
62
69
  2. 填写任务元数据:
63
70
 
64
71
  ```yaml
65
- id: task-001
72
+ id: TASK-20260101-120000
66
73
  type: feature # feature | bugfix | refactor | docs | chore
67
74
  status: active # active | blocked | completed
68
75
  assigned_to: claude # claude | codex | antigravity | opencode | human
@@ -92,7 +99,7 @@ Claude Code 擅长代码库探索和理解文件间的复杂关系。
92
99
  agy
93
100
 
94
101
  # 示例提示:
95
- # "基于 .agents/workspace/active/task-001.md 中的分析结果,
102
+ # "基于 $TASK_WORKSPACE_ROOT/active/TASK-20260101-120000/task.md 中的分析结果,
96
103
  # 创建技术设计方案。定义接口并概述实现思路。"
97
104
  ```
98
105
 
@@ -103,7 +110,7 @@ agy
103
110
  codex
104
111
 
105
112
  # 示例提示:
106
- # "实现 .agents/workspace/active/task-001.md 中描述的变更。
113
+ # "实现 $TASK_WORKSPACE_ROOT/active/TASK-20260101-120000/task.md 中描述的变更。
107
114
  # 遵循设计部分。为此工作创建新分支。"
108
115
  ```
109
116
 
@@ -130,7 +137,8 @@ claude
130
137
 
131
138
  ```bash
132
139
  # 快速缺陷修复工作流
133
- cp .agents/templates/task.md .agents/workspace/active/bugfix-001.md
140
+ mkdir -p "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120000"
141
+ cp .agents/templates/task.md "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120000/task.md"
134
142
  # 编辑任务,然后:
135
143
  # 1. 使用 Claude Code 分析
136
144
  # 2. 使用 Codex/OpenCode 修复
@@ -144,7 +152,8 @@ cp .agents/templates/task.md .agents/workspace/active/bugfix-001.md
144
152
  3. **报告**:从模板生成审查报告。
145
153
 
146
154
  ```bash
147
- cp .agents/templates/review-report.md .agents/workspace/active/review-pr-42.md
155
+ mkdir -p "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120001"
156
+ cp .agents/templates/review-report.md "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120001/review-report.md"
148
157
  # 使用 Claude Code 填写审查内容
149
158
  ```
150
159
 
@@ -156,7 +165,8 @@ cp .agents/templates/review-report.md .agents/workspace/active/review-pr-42.md
156
165
  4. **验证**(Claude Code):确保没有回归问题,运行测试。
157
166
 
158
167
  ```bash
159
- cp .agents/templates/task.md .agents/workspace/active/refactor-001.md
168
+ mkdir -p "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120002"
169
+ cp .agents/templates/task.md "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120002/task.md"
160
170
  # 按照 .agents/workflows/refactoring.yaml 中的重构工作流执行
161
171
  ```
162
172
 
@@ -165,7 +175,8 @@ cp .agents/templates/task.md .agents/workspace/active/refactor-001.md
165
175
  在 AI 工具之间切换时,创建交接文档:
166
176
 
167
177
  ```bash
168
- cp .agents/templates/handoff.md .agents/workspace/active/handoff-task-001-phase2.md
178
+ mkdir -p "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120003"
179
+ cp .agents/templates/handoff.md "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120003/handoff.md"
169
180
  ```
170
181
 
171
182
  填写:
@@ -35,24 +35,19 @@ This dual-config approach ensures every AI tool receives appropriate project con
35
35
  code-review.yaml # Code review workflow
36
36
  refactoring.yaml # Refactoring workflow
37
37
  rules/ # Collaboration rule index (see rules/README.md)
38
- workspace/ # Runtime workspace (git-ignored)
39
- active/ # Currently active tasks
40
- blocked/ # Blocked tasks
41
- completed/ # Completed tasks
42
- logs/ # Collaboration logs
43
-
44
38
  .claude/ # Claude Code specific config
45
39
  CLAUDE.md # Project instructions for Claude
46
40
  commands/ # Slash commands
47
41
  settings.json # Claude settings
48
42
  ```
49
43
 
50
- The whole `.agents/workspace/` tree is runtime-only and git-ignored. `active/`
51
- contains current tasks, `blocked/` contains paused tasks, `completed/` contains
52
- finished tasks, and `archive/` stores archived history. Runtime logs and process
53
- evidence may also be created below this root. Do not place content here that must
54
- be shared through Git; collaboration rules, templates, and workflows belong in
55
- the version-controlled `.agents/` tree.
44
+ The host task workspace root is `~/.agent-infra/task-workspaces/<project-key>`;
45
+ the container root is `/task-workspace`. Resolve the current host root with
46
+ `agent-infra-internal task-workspace resolve --boundary host` and a task's exact
47
+ directory with `agent-infra-internal task-context resolve --task <task-id>`.
48
+ `active/`, `blocked/`, `completed/`, `archive/`, and `active/.short-ids.json` live
49
+ under that root and contain runtime data. The `<task-workspace>` placeholder used
50
+ in these guides means the resolver's returned root; it is not a repository path.
56
51
 
57
52
  ## Collaboration Model
58
53
 
@@ -101,7 +96,7 @@ Each AI tool has different strengths. Use them accordingly:
101
96
  ## Quick Start
102
97
 
103
98
  1. **Read the quick start guide**: See `QUICKSTART.md` for step-by-step instructions.
104
- 2. **Create a task**: Copy `.agents/templates/task.md` to `.agents/workspace/active/`.
99
+ 2. **Create a task**: Use the `create-task` workflow; the host writes task data to the project task root.
105
100
  3. **Assign to an AI**: Update the `assigned_to` field in the task metadata.
106
101
  4. **Run the workflow**: Follow the appropriate workflow in `.agents/workflows/`.
107
102
  5. **Hand off**: When switching AIs, create a handoff document from the template.
@@ -386,7 +381,7 @@ No. Claude Code reads from `.claude/CLAUDE.md`, and all other tools read from `A
386
381
 
387
382
  ### Q: How do tasks get passed between AI tools?
388
383
 
389
- Through handoff documents stored in `.agents/workspace/`. Each handoff includes context, progress, and next steps so the receiving AI can continue seamlessly.
384
+ Through handoff documents stored in `<task-workspace>/`. Each handoff includes context, progress, and next steps so the receiving AI can continue seamlessly.
390
385
 
391
386
  ### Q: What if an AI tool doesn't support AGENTS.md?
392
387
 
@@ -398,4 +393,4 @@ It's not recommended. The workflow model is sequential -- one AI per phase. Para
398
393
 
399
394
  ### Q: Where are runtime files stored?
400
395
 
401
- In `.agents/workspace/`, which is git-ignored. Only templates and workflow definitions in `.agents/` are version-controlled.
396
+ In `<task-workspace>/`, which is git-ignored. Only templates and workflow definitions in `.agents/` are version-controlled.
@@ -35,22 +35,18 @@
35
35
  code-review.yaml # 代码审查工作流
36
36
  refactoring.yaml # 重构工作流
37
37
  rules/ # 协作规则索引(见 rules/README.md)
38
- workspace/ # 运行时工作区(已被 git ignore)
39
- active/ # 当前活跃任务
40
- blocked/ # 被阻塞的任务
41
- completed/ # 已完成的任务
42
- logs/ # 协作日志
43
-
44
38
  .claude/ # Claude Code 专属配置
45
39
  CLAUDE.md # Claude 项目指令
46
40
  commands/ # 斜杠命令
47
41
  settings.json # Claude 设置
48
42
  ```
49
43
 
50
- 整个 `.agents/workspace/` 目录树都只保存运行时数据,并被 git ignore。`active/`
51
- 保存当前任务,`blocked/` 保存暂停任务,`completed/` 保存已完成任务,`archive/`
52
- 保存归档历史;运行时日志和过程证据也可能出现在该根目录下。不要在这里存放必须
53
- 通过 Git 共享的内容;协作规则、模板和工作流应放在受版本控制的 `.agents/` 目录中。
44
+ 宿主任务根为 `~/.agent-infra/task-workspaces/<project-key>`,容器任务根为
45
+ `/task-workspace`。使用 `agent-infra-internal task-workspace resolve --boundary host`
46
+ 取得当前项目的宿主根,使用 `agent-infra-internal task-context resolve --task <task-id>`
47
+ 取得某个任务的精确目录。`active/`、`blocked/`、`completed/`、`archive/` 和
48
+ `active/.short-ids.json` 都位于任务根中;这些路径只保存运行时数据,不通过 Git
49
+ 共享。文中的 `<task-workspace>` 表示由上述 resolver 返回的根,不是仓库内目录。
54
50
 
55
51
  ## 协作模型
56
52
 
@@ -99,7 +95,7 @@
99
95
  ## 快速入门
100
96
 
101
97
  1. **阅读快速入门指南**:参见 `QUICKSTART.md` 获取分步说明。
102
- 2. **创建任务**:将 `.agents/templates/task.md` 复制到 `.agents/workspace/active/`。
98
+ 2. **创建任务**:通过 `create-task` 工作流创建任务;任务数据由宿主写入项目任务根。
103
99
  3. **分配给 AI**:更新任务元数据中的 `assigned_to` 字段。
104
100
  4. **执行工作流**:按照 `.agents/workflows/` 中相应的工作流执行。
105
101
  5. **交接**:切换 AI 时,从模板创建交接文档。
@@ -384,7 +380,7 @@ agent-infra-internal task-verify {task-id} <verification-event> [--artifact <art
384
380
 
385
381
  ### Q:任务如何在 AI 工具之间传递?
386
382
 
387
- 通过存储在 `.agents/workspace/` 中的交接文档。每份交接文档包含上下文、进度和后续步骤,让接收方 AI 能无缝接续。
383
+ 通过存储在 `<task-workspace>/` 中的交接文档。每份交接文档包含上下文、进度和后续步骤,让接收方 AI 能无缝接续。
388
384
 
389
385
  ### Q:如果某个 AI 工具不支持 AGENTS.md 怎么办?
390
386
 
@@ -396,4 +392,4 @@ agent-infra-internal task-verify {task-id} <verification-event> [--artifact <art
396
392
 
397
393
  ### Q:运行时文件存储在哪里?
398
394
 
399
- 在 `.agents/workspace/` 中,该目录已被 git ignore。只有 `.agents/` 中的模板和工作流定义受版本控制。
395
+ 在 `<task-workspace>/` 中,该目录已被 git ignore。只有 `.agents/` 中的模板和工作流定义受版本控制。
@@ -22,7 +22,7 @@ Comments use `platform-comment`; Issue resources use `platform-issue`:
22
22
  ```bash
23
23
  agent-infra-internal platform-comment list --issue <issue-token> [--cwd <path>]
24
24
  agent-infra-internal platform-comment recover --issue <issue-token> --task-id <TASK-id> \
25
- --output <.agents/workspace/.restore-staging-*/task.md> [--cwd <path>]
25
+ --output <<task-workspace>/.restore-staging-*/task.md> [--cwd <path>]
26
26
  agent-infra-internal platform-issue inspect {task-id}
27
27
  agent-infra-internal platform-issue create {task-id} --agent {standard-agent-token}
28
28
  agent-infra-internal platform-issue bind {task-id} --issue {issue-token} --agent {standard-agent-token}
@@ -26,7 +26,7 @@
26
26
  agent-infra-internal platform-context resolve [--cwd <path>]
27
27
  agent-infra-internal platform-comment list --issue <issue-token> [--cwd <path>]
28
28
  agent-infra-internal platform-comment recover --issue <issue-token> --task-id <TASK-id> \
29
- --output <.agents/workspace/.restore-staging-*/task.md> [--cwd <path>]
29
+ --output <<task-workspace>/.restore-staging-*/task.md> [--cwd <path>]
30
30
  agent-infra-internal platform-comment owner <task-ref>
31
31
  agent-infra-internal platform-comment sync <task-ref> \
32
32
  --kind task|artifact|summary|cancel --agent {standard-agent-token} \
@@ -10,7 +10,7 @@
10
10
 
11
11
  ## Current Execution Records
12
12
 
13
- `orchestration.json` records stages, model policy, child identity, and actual outcomes. Records use the current structure; trusted local operators may correct them and rerun validation. Existing task write locks and atomic writes protect updates.
13
+ `orchestration.json` records stages, model policy, child identity, and actual outcomes. Records use the current structure; trusted local operators may correct them and rerun validation. Stages for one task run sequentially; atomic writes and identity/state validation continue to protect state updates.
14
14
 
15
15
  ## Current Host
16
16
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  ## 当前执行记录
12
12
 
13
- `orchestration.json` 记录阶段、模型策略、child 身份及实际执行结果。记录必须符合当前结构;本地操作者可直接修正后重新校验。已有任务写锁与原子写入继续保护写操作。
13
+ `orchestration.json` 记录阶段、模型策略、child 身份及实际执行结果。记录必须符合当前结构;本地操作者可直接修正后重新校验。同一任务的阶段按序调用;原子写入、身份校验和状态校验继续保护状态更新。
14
14
 
15
15
  ## 当前宿主
16
16
 
@@ -17,7 +17,7 @@ This file defines three **independent** rules for a skill's "notify-user / Next
17
17
 
18
18
  - **Next-step TUI commands** (`/analyze-task`, `/{{project}}:review-code`, `$create-pr`, etc., including commands inside Markdown table cells) → always use `{task-ref}` (short id).
19
19
  - **"Task info" / "Task status" structured field lines** → show full id and short id together: `- Task ID: {task-id} (short id {task-ref})`.
20
- - **Report titles** (`Task {task-id} ... completed`) and **artifact paths** (`.agents/workspace/active/{task-id}/...`) → keep the full `{task-id}` (physical path and archive key, must not change).
20
+ - **Report titles** (`Task {task-id} ... completed`) and **artifact paths** (`<task-workspace>/active/{task-id}/...`) → keep the full `{task-id}` (physical path and archive key, must not change).
21
21
 
22
22
  ## Unified Client Command Rendering
23
23
 
@@ -39,7 +39,7 @@ agent-infra-internal agent-client next-steps \
39
39
 
40
40
  ## Obtaining the short id (`{task-ref}`)
41
41
 
42
- The single source of truth for short ids is the registry `.agents/workspace/active/.short-ids.json` (via `task-short-id.js`). **Never** read the `short_id` field from task.md frontmatter (that field is not authoritative).
42
+ The single source of truth for short ids is the registry `<task-workspace>/active/.short-ids.json` (via `task-short-id.js`). **Never** read the `short_id` field from task.md frontmatter (that field is not authoritative).
43
43
 
44
44
  Once the full `$task_id` is resolved, use the snippet below to look up the short id; it returns bare `NN` on hit and falls back to the full `TASK-id` on miss:
45
45
 
@@ -17,7 +17,7 @@
17
17
 
18
18
  - **下一步 TUI 命令**(`/analyze-task`、`/{{project}}:review-code`、`$create-pr` 等,含 Markdown 表格单元格内的命令)→ 一律用 `{task-ref}`(短号)。
19
19
  - **「任务信息」/「任务状态」结构化字段行** → 完整 ID 与短号同显:`- 任务 ID:{task-id}(短号 {task-ref})`。
20
- - **报告标题**(`任务 {task-id} ... 完成`)与**产出文件路径**(`.agents/workspace/active/{task-id}/...`)→ 保持完整 `{task-id}`(物理路径与归档键,不可改)。
20
+ - **报告标题**(`任务 {task-id} ... 完成`)与**产出文件路径**(`<task-workspace>/active/{task-id}/...`)→ 保持完整 `{task-id}`(物理路径与归档键,不可改)。
21
21
 
22
22
  ## 统一客户端命令渲染
23
23
 
@@ -39,7 +39,7 @@ agent-infra-internal agent-client next-steps \
39
39
 
40
40
  ## 取短号(`{task-ref}`)
41
41
 
42
- 短号唯一真源是注册表 `.agents/workspace/active/.short-ids.json`(经 `task-short-id.js`)。**禁止**读取 task.md frontmatter 的 `short_id` 字段(该字段不可信)。
42
+ 短号唯一真源是注册表 `<task-workspace>/active/.short-ids.json`(经 `task-short-id.js`)。**禁止**读取 task.md frontmatter 的 `short_id` 字段(该字段不可信)。
43
43
 
44
44
  在已解析出完整 `$task_id` 后,用以下片段反查短号;命中返回裸数字 `NN`,未命中自动回退完整 `TASK-id`:
45
45
 
@@ -21,11 +21,11 @@ agent-infra-internal platform-pr change-report {task-id} \
21
21
 
22
22
  agent-infra-internal platform-pr summary-sync {task-id} \
23
23
  --agent {standard-agent-token} --body-file {summary-body-file} \
24
- --change-report-file .agents/workspace/active/{task-id}/pr-change-report.json \
24
+ --change-report-file <task-workspace>/active/{task-id}/pr-change-report.json \
25
25
  --result {primary-result}
26
26
  ```
27
27
 
28
- Use only canonical inputs returned by the context command. The precheck must contain file evidence for six fixed checks; `formalReview` is always false and `needs-review` routes to `review-code`. Write the plain body with exactly one `<!-- canonical-pr-change-report -->` placeholder, without a report heading/JSON, marker, or SHA. The core validates the task-intent digest, bound PR identity, complete patch SHA, and mechanical totals before rendering the report, then owns `<!-- sync-pr:{task-id}:summary -->`, authoritative `<!-- last-commit: ... -->`, create/update/no-op behavior, and duplicate-marker conflicts. Missing, stale, invalid, or bypassed report input never publishes; summary failure never rolls back a PR or commit.
28
+ Use only canonical inputs returned by the context command. The precheck must contain file evidence for six fixed checks; `formalReview` is always false and `needs-review` routes to `review-code`. Generate a typed JSON payload with `overview:string`, `tests:{state,detail}`, `review:{state,detail}`, `manualValidation:{state,detail}`, `humanDecisions:{open,resolved,detail}`, and `risks:string`. Detail fields are non-empty, counts are non-negative integers, and structure checks do not assess semantic quality. Use `not-started`/`pending` for tests that have not started, `none`/`not-observed`/`not-published` for absent or unobserved remote Reviews, and `pending` for manual validation that has not run. Human-decision counts come from the task ledger. The renderer supplies fixed sections and the canonical report placeholder. The core validates the task-intent digest, bound PR identity, complete patch SHA, and mechanical totals before rendering the report, then owns markers, HEAD metadata, and create/update/no-op behavior.
29
29
 
30
30
  The canonical comment envelope produced by the core is:
31
31
 
@@ -40,7 +40,9 @@ The canonical comment envelope produced by the core is:
40
40
  ### PR Code Changes
41
41
  ```
42
42
 
43
- Canonical inputs include `manual-validation.md`. The manual-validation section is one of `### ✅ Manual Validation Passed`, `### ⚠️ Manual Verification Required`, or `### ✅ No Manual Verification Needed`; `complete-manual-validation` refreshes the same summary in place. The PR code-change section uses authoritative base/head facts from `platform-pr inspect` and the complete `git diff --find-renames --numstat base...head`, reconciles runtime, test, skill/rule, template, documentation, and other categories, and explains renames, mechanical mirrors, and potentially unnecessary changes. The caller supplies the placeholder; the core renderer supplies the canonical `### PR Code Changes` section.
43
+ Canonical inputs include `manual-validation.md`. The manual-validation `state` can be `required`, `pending`, `passed`, `none`/`not-required`, or `not-observed`. English headings such as `### ⚠️ Manual Verification Required`, `### ✅ Manual Validation Passed`, and `### ✅ No Manual Verification Needed` are documentation labels; the current renderer emits Chinese headings. `complete-manual-validation` refreshes the same summary in place. The PR code-change section uses authoritative base/head facts from `platform-pr inspect` and the complete `git diff --find-renames --numstat base...head`, reconciles runtime, test, skill/rule, template, documentation, and other categories, and explains renames, mechanical mirrors, and potentially unnecessary changes. The core renderer supplies the canonical `### PR Code Changes` section. After publishing, the core reads comments back and requires one summary marker with a body that exactly matches the canonical rendered body; mismatch or read failure uses the existing coordinator/recovery path.
44
+
45
+ Examples include `required`, `pending`, `passed`, `none`/`not-required`, and `not-observed`; this list is illustrative, not exhaustive. The renderer also accepts `unavailable` and other non-empty states through its existing fallback. English headings below are documentation labels; the current renderer emits the stated Chinese headings. `required` retains each item, location, and reason under `### ⚠️ 需人工校验`. `pending` means validation has not started or remains incomplete and renders as `### ⏳ 人工验证待收尾`. `passed` (`### ✅ Manual Validation Passed` in this documentation; `### ✅ 人工验证已通过` from the renderer) is publishable only through the final `complete-manual-validation` coordinator after it writes a valid receipt. Preserve the receipt marker bound to the transaction, receipt, evidence, and current PR head; never infer passed status from summary text or another state. `none`/`not-required` renders as `### ✅ 无需人工校验` only when no manual item is required and carries no passed receipt. `not-observed` means the state has not been read and renders as `### ℹ️ 尚未读取人工校验状态`.
44
46
 
45
47
  ```bash
46
48
  agent-infra-internal task-warning {task-id} add --step {step} --severity WARNING \
@@ -18,17 +18,14 @@ PR 摘要的语义聚合由模型完成;任务意图 digest、完整三点 dif
18
18
  agent-infra-internal platform-pr summary-context {task-id}
19
19
  ```
20
20
 
21
- 只使用返回的 canonical latest `plan*`、`review-plan*`、`code*`、`review-code*`、`manual-validation*`(包括 `manual-validation.md`)。模型据此生成 reviewer 摘要正文,至少包含:
21
+ 只使用返回的 canonical latest `plan*`、`review-plan*`、`code*`、`review-code*`、`manual-validation*`(包括 `manual-validation.md`)。模型生成 PR 专属 JSON payload:`overview:string`、`tests:{state,detail}`、`review:{state,detail}`、`manualValidation:{state,detail}`、`humanDecisions:{open,resolved,detail}`、`risks:string`。说明字段为非空字符串,计数为非负整数;结构校验不评价内容语义。
22
22
 
23
- - 变更摘要与实现范围
24
- - 测试结果
25
- - 审查历程与当前结论
26
- - 人工校验三态:`### ⚠️ 需人工校验`、`### ✅ 人工验证已通过` 或 `### ✅ 无需人工校验`
27
- - 变更摘要、实现范围、测试结果、审查历程和人工校验三态
28
- - 一个 `<!-- canonical-pr-change-report -->` 占位符;`### PR 代码增减` 由 core renderer 基于权威 diff 生成,调用方不自行写标题或统计
23
+ 测试尚未启动用 `not-started`/`pending`,暂无远端 Review 用 `none`/`not-observed`/`not-published`,待人工校验用 `pending`,不得渲染为通过或零值。决策计数来自当前任务账本。renderer 固定生成完整章节并加入一个 canonical 报告占位符;代码增减仍由现有 report renderer 输出。
29
24
 
30
25
  保留人工校验项时,每条写明校验内容、定位和只能人工完成的原因。
31
26
 
27
+ 例如可见状态包括 `required`、`pending`、`passed`、`none`/`not-required` 和 `not-observed`;这些是示例而非穷举。renderer 也接受 `unavailable` 及其他非空状态,并按现有 fallback 渲染。英文标题是文档标签;当前 renderer 输出下列中文标题:`required` 使用 `### ⚠️ 需人工校验` 并保留每项内容、定位和原因;`pending` 使用 `### ⏳ 人工验证待收尾`;`passed` 使用 `### ✅ 人工验证已通过`,但仅允许 `complete-manual-validation` 的 final coordinator 写入有效 receipt 后发布,并保留绑定 transaction、receipt、evidence 和当前 PR head 的凭据标记;不得根据摘要文字或其他状态推断通过。`none`/`not-required` 仅在无需人工校验时使用 `### ✅ 无需人工校验`,不附加通过凭据;`not-observed` 使用 `### ℹ️ 尚未读取人工校验状态`。
28
+
32
29
  core 最终包装出的 canonical 评论结构为:
33
30
 
34
31
  ```markdown
@@ -54,16 +51,16 @@ precheck 必须覆盖六项固定检查并提供文件证据;`formalReview`
54
51
 
55
52
  ## 发布
56
53
 
57
- 把聚合后的纯正文写入 `{summary-body-file}`,不要自行添加 marker 或 commit SHA:
54
+ 把聚合后的 JSON payload 写入 `{summary-body-file}`,不要自行添加 marker 或 commit SHA:
58
55
 
59
56
  ```bash
60
57
  agent-infra-internal platform-pr summary-sync {task-id} \
61
58
  --agent {standard-agent-token} --body-file {summary-body-file} \
62
- --change-report-file .agents/workspace/active/{task-id}/pr-change-report.json \
59
+ --change-report-file <task-workspace>/active/{task-id}/pr-change-report.json \
63
60
  --result {primary-result}
64
61
  ```
65
62
 
66
- 正文必须恰好包含一次 `<!-- canonical-pr-change-report -->`,不得自行拼接报告标题/JSON、marker 或 last-commit。core 会重新校验任务意图 digest、绑定 PR identity、完整 patch SHA 和机械统计,由 renderer 生成报告段,再包装唯一 `<!-- sync-pr:{task-id}:summary -->` 和权威 `<!-- last-commit: ... -->`,分页查找 PR 普通评论:不存在则创建、正文变化则原地更新、无差异则 no-op、重复 marker 或报告失配则稳定失败。正文通过文件输入,调用方不得拼 shell/heredoc。
63
+ core 校验结构后插入报告占位符,重新校验任务意图 digest、PR identity、完整 patch SHA 和机械统计,生成报告段,再包装 marker 与权威 HEAD。发布后使用 `comments.list` 回读并要求唯一 marker 和正文完全匹配;不符或读取失败沿用现有 coordinator/recovery。payload 通过文件输入,调用方不得拼 shell/heredoc。
67
64
 
68
65
  ## 结果回传
69
66
 
@@ -19,6 +19,9 @@ The result contains `history`, `pullRequests`, `closingIssues`, and commit `auth
19
19
  - Render an identity as `@login` only when `resolution` is `platform-user` or `platform-noreply` and `login` is non-empty.
20
20
  - Exclude `resolution: unresolved` identities from the release-note contributor list. Never infer a login from a name, email address, domain, brand, or same-named platform account, and never substitute a guessed personal or organization account.
21
21
  - Do not publish unresolved identity emails or identity-verification TODOs in Release notes. Record any required investigation outside the release workflow without creating a platform mention.
22
+ - Use plain-text `@login` mentions in Release notes; do not wrap mentions in Markdown links.
23
+ - **Dependabot-specific normalization**: Typed context may return the same Dependabot automation account as `app/dependabot` or `dependabot[bot]`. For these resolved identities, render release-note items and Contributors as plain-text `@dependabot`, and merge counts under the normalized `@dependabot`. Do not output `@app/dependabot` or `@dependabot[bot]`, and do not turn `@dependabot` into a Markdown link.
24
+ - This Dependabot mapping is an explicit exception for this project's Release notes. Use the typed `login` for all other identities; do not infer mappings from brands or similar names.
22
25
 
23
26
  ## Stage Release Notes
24
27
 
@@ -19,6 +19,9 @@ agent-infra-internal platform-release-notes context \
19
19
  - 只有 `resolution` 为 `platform-user` 或 `platform-noreply` 且 `login` 非空的身份可以渲染为 `@login`。
20
20
  - `resolution: unresolved` 的身份不得进入发布说明的贡献者列表;不得从 Name、邮箱、域名、品牌或同名平台账号推断 login,也不得替换成推测的个人或组织账号。
21
21
  - 不得把未解析身份的邮箱或身份确认 TODO 写入可发布的 Release notes。需要调查时仅在发布流程外记录,不得产生平台 mention。
22
+ - Release notes 中的 mention 使用纯文本 `@login`,不要用 Markdown 链接包装 mention。
23
+ - **Dependabot 专用规范化**:typed context 可能将同一 Dependabot 自动化账号返回为 `app/dependabot` 或 `dependabot[bot]`。对于 `resolution` 已解析的这些身份,发布说明条目和 Contributors 统一使用纯文本 `@dependabot`;按规范化后的 `@dependabot` 合并计数。不要输出 `@app/dependabot` 或 `@dependabot[bot]`,也不要把 `@dependabot` 改成 Markdown 链接。
24
+ - 该 Dependabot 映射是本项目发布说明的明确例外;其他身份继续使用 typed `login`,不得按品牌或相似名称类推。
22
25
 
23
26
  ## Stage Release notes
24
27
 
@@ -86,8 +86,6 @@ Other skills continue past deferrable writes according to their local delivery g
86
86
 
87
87
  **Human counts** (`ai task log`): review step rows fold two human counts into the NOTE verdict text, comma-separated, right after `blockers/major/minor`, with fixed English labels `Manual-validation: {e}, Human-decision: {h}`. `Human-decision` (`{h}`) maps canonical step prefixes (`Review Analysis` / `Review Plan` / `Review Code`) to `analysis` / `plan` / `code`, then counts current pending rows in `## Review Disagreement Ledger` / `## 审查分歧账本` for that stage with `status = needs-human-decision`, excluding rows already marked `human-decided`. `Manual-validation` (`{e}`) parses the `Manual-validation: {n}` source field from the review done note (normalized to the same field when displayed), defaulting to `0`. Non-review rows carry no human counts.
88
88
 
89
- **Gate** (`checkActivityLog`): when computing the "latest action / freshness" it skips `[started]` lines (ascending-order and format checks still cover every line), so a started marker never satisfies a skill's `expected_action_pattern`.
90
-
91
89
  **Skills that write started**: every workflow skill that **appends entries to a task's `## Activity Log`** writes started, so the STARTED column stays uniformly complete across the whole `ai task log` table. Two forms, depending on whether task.md already exists:
92
90
 
93
91
  - **Standard form (task.md already exists)** — append the started line when that round's real work begins (after prerequisites, before the first artifact action) and the done line on completion:
@@ -89,8 +89,6 @@
89
89
 
90
90
  **人工计数**(`ai task log`):审查步骤行把两项人工计数并入 NOTE 的 verdict 文本,逗号分隔、紧随 `blockers/major/minor`,固定英文标签 `Manual-validation: {e}, Human-decision: {h}`。`Human-decision`(`{h}`)按 canonical 步骤名前缀(`Review Analysis` / `Review Plan` / `Review Code`)映射到 `analysis` / `plan` / `code`,统计 `## 审查分歧账本` 中对应阶段 `status = needs-human-decision` 的当前待裁决数量,不包含已 `human-decided` 的行;`Manual-validation`(`{e}`)解析 review done note 中的 `Manual-validation: {n}` 源字段(展示时归一化为同一字段),缺失为 `0`。非审查步骤不附加人工计数。
91
91
 
92
- **gate**(`checkActivityLog`):计算「最新 action / freshness」时跳过 `[started]` 行(升序与格式校验仍覆盖全部行),故 started 标记不会污染各 SKILL 的 `expected_action_pattern`。
93
-
94
92
  **写 started 的 SKILL**:所有**会向某个任务的 `## 活动日志` 追加条目**的工作流 SKILL 都写 started,保证 `ai task log` 整张表的 STARTED 列一致完整。两种写法按技能是否已有 task.md 区分:
95
93
 
96
94
  - **常规写法(task.md 已存在)**——在「该轮实质工作开始时」(前置条件确认后、第一个产出动作前)追加 started 行,完成时写 done 行:
@@ -87,9 +87,9 @@ fi
87
87
  ## Storage
88
88
 
89
89
  Short ids are pure local state, persisted only in the registry
90
- `.agents/workspace/active/.short-ids.json`; task.md does not hold the short id:
90
+ `<task-workspace>/active/.short-ids.json`; task.md does not hold the short id:
91
91
 
92
- - Path: `<repo-root>/.agents/workspace/active/.short-ids.json`
92
+ - Path: `<task-workspace>/active/.short-ids.json`
93
93
  - Schema: `{ "version": 1, "ids": { "01": "TASK-20260609-192644", "02": "TASK-…" } }`
94
94
  - Keys are zero-padded decimal strings of `task.shortIdLength` digits; values are
95
95
  full `TASK-…` task ids.
@@ -75,9 +75,9 @@ fi
75
75
 
76
76
  ## 存储位置
77
77
 
78
- 短号是纯本地状态,唯一持久化在注册表 `.agents/workspace/active/.short-ids.json`,task.md 不持有短号:
78
+ 短号是纯本地状态,唯一持久化在注册表 `<task-workspace>/active/.short-ids.json`,task.md 不持有短号:
79
79
 
80
- - 路径:`<repo-root>/.agents/workspace/active/.short-ids.json`
80
+ - 路径:`<task-workspace>/active/.short-ids.json`
81
81
  - Schema:`{ "version": 1, "ids": { "01": "TASK-20260609-192644", "02": "TASK-…" } }`
82
82
  - key 是零填充到 `task.shortIdLength` 位的字符串,value 是完整 `TASK-…` task id
83
83
  - 自动 git ignore(active 工作区整体 ignore;无需新增 ignore 条目)
@@ -57,22 +57,16 @@ if (args.includes("--help") || args.includes("-h")) {
57
57
  }
58
58
  const repoRoot = findRepoRoot(process.cwd());
59
59
  const forwarded = [...args];
60
- if (!forwarded.includes("--active-dir")) {
61
- if (!repoRoot) {
62
- fs.writeSync(2, "Error: cannot determine active task directory\n");
63
- process.exit(1);
64
- }
65
- forwarded.push("--active-dir", path.join(repoRoot, ".agents", "workspace", "active"));
66
- }
67
60
  if (!forwarded.includes("--short-id-length")) {
68
61
  forwarded.push("--short-id-length", String(configuredWidth(repoRoot)));
69
62
  }
70
63
  const sourceCli = findSourceCli();
71
64
  const installedCli = resolveCommand("agent-infra-internal");
72
65
  const child = sourceCli
73
- ? spawnSync(process.execPath, ["--experimental-strip-types", sourceCli, "task-short-id", ...forwarded], { encoding: "utf8" })
66
+ ? spawnSync(process.execPath, ["--experimental-strip-types", sourceCli, "task-short-id", ...forwarded], { cwd: repoRoot || process.cwd(), encoding: "utf8" })
74
67
  : spawnSync(installedCli, ["task-short-id", ...forwarded], {
75
68
  encoding: "utf8",
69
+ cwd: repoRoot || process.cwd(),
76
70
  shell: process.platform === "win32" && /\.(?:bat|cmd)$/i.test(installedCli)
77
71
  });
78
72
  if (child.error) {
@@ -57,7 +57,7 @@ After resolving the artifact context and before this round's first artifact acti
57
57
  ### 1. Verify Prerequisites
58
58
 
59
59
  Check required files:
60
- - `.agents/workspace/active/{task-id}/task.md` - Task file
60
+ - `<task-workspace>/active/{task-id}/task.md` - Task file
61
61
 
62
62
  Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
63
63
 
@@ -119,7 +119,7 @@ Runs after Step 0 state check and Step 3 (questioning is an external-state actio
119
119
  - otherwise (no pending question) → pick the single highest-value question (acceptance criteria > scope > ambiguity) and write `## Brainstorming`: `status: asking`, `pending_question: <question>`, `question_count += 1`.
120
120
  2. If `start_date` is empty, write today (`date +%F`), then run `agent-infra-internal task-event {task-id} analyze.awaiting-input --agent {standard-agent-token} --question {question_count}` so the core updates base metadata and Activity Log.
121
121
  3. Issue sync (when a valid `platform_issue_identity` exists, skip on any failure): run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` to update only the **task comment**; keep the `status` label at `pending-design-work`; do **not** publish an analysis artifact comment.
122
- 4. Verification (replaces the step 8 artifact gate): `agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text` (the early-exit set `current_step: requirement-analysis` and wrote `start_date`, so it should pass); also keep `rg -n 'Analyze Task \(Brainstorming\)' .agents/workspace/active/{task-id}/task.md` and the task-comment sync evidence. Do **not** run the artifact gate, nor `check activity-log` / `check platform-sync` (both bind to the analysis artifact path).
122
+ 4. Verification (replaces the step 8 artifact gate): `agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text` (the early-exit set `current_step: requirement-analysis` and wrote `start_date`, so it should pass); also keep `rg -n 'Analyze Task \(Brainstorming\)' <task-workspace>/active/{task-id}/task.md` and the task-comment sync evidence. Do **not** run the artifact gate, nor `check activity-log` / `check platform-sync` (both bind to the analysis artifact path).
123
123
  5. User output: show only the current **single question** plus how to answer/continue (re-trigger `analyze-task {task-ref}` with the answer).
124
124
  6. **STOP** and wait for the answer. The next trigger returns to this step.
125
125
 
@@ -148,7 +148,7 @@ The skeleton contains identity metadata, stable section markers, and required he
148
148
 
149
149
  > Steps 6–9 are the **Scenario A (normal output)** path. **Scenario B (ask and early-exit)** already finished its state update, task-comment sync, and verification inside step 4 and STOPped, so it does not enter these steps.
150
150
 
151
- Create `.agents/workspace/active/{task-id}/{analysis-artifact}`.
151
+ Create `<task-workspace>/active/{task-id}/{analysis-artifact}`.
152
152
 
153
153
  ## Output Template
154
154
 
@@ -221,7 +221,7 @@ Create `.agents/workspace/active/{task-id}/{analysis-artifact}`.
221
221
 
222
222
  ### 7. Update Task Status
223
223
 
224
- Update `.agents/workspace/active/{task-id}/task.md`:
224
+ Update `<task-workspace>/active/{task-id}/task.md`:
225
225
  - Record the analysis artifact for this round: `{analysis-artifact}` (Round `{analysis-round}`)
226
226
  - If the task template contains a `## Analysis` section, update it to link to `{analysis-artifact}`
227
227
  - Mark requirement-analysis as complete in workflow progress and include the actual round when the task template supports it
@@ -290,7 +290,7 @@ Summary:
290
290
  - Risk level: {assessment}
291
291
 
292
292
  Output file:
293
- - Analysis report: .agents/workspace/active/{task-id}/{analysis-artifact}
293
+ - Analysis report: <task-workspace>/active/{task-id}/{analysis-artifact}
294
294
 
295
295
  Next step - continue on the selected path:
296
296
  {next-step-commands}
@@ -299,7 +299,7 @@ Next step - continue on the selected path:
299
299
  ## Completion Checklist
300
300
 
301
301
  - [ ] Read and understood the task file and source information
302
- - [ ] Created analysis document `.agents/workspace/active/{task-id}/{analysis-artifact}`
302
+ - [ ] Created analysis document `<task-workspace>/active/{task-id}/{analysis-artifact}`
303
303
  - [ ] Updated `current_step` to requirement-analysis in task.md
304
304
  - [ ] Updated `updated_at` to the current time in task.md
305
305
  - [ ] Updated `assigned_to` in task.md
@@ -60,7 +60,7 @@ agent-infra-internal task-event {task-id} analyze.started --agent {standard-agen
60
60
  ### 1. 验证前置条件
61
61
 
62
62
  检查必要文件:
63
- - `.agents/workspace/active/{task-id}/task.md` - 任务文件
63
+ - `<task-workspace>/active/{task-id}/task.md` - 任务文件
64
64
 
65
65
  注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
66
66
 
@@ -122,7 +122,7 @@ agent-infra-internal task-event {task-id} analyze.started --agent {standard-agen
122
122
  - 否则(无待答问题)→ 选最高价值的一个问题(验收标准 > 范围 > 歧义),写入 `## Brainstorming`:`status: asking`、`pending_question: <问题>`、`question_count += 1`。
123
123
  2. 若 `start_date` 为空,写入当日日期(`date +%F`);随后执行 `agent-infra-internal task-event {task-id} analyze.awaiting-input --agent {standard-agent-token} --question {question_count}`,由核心统一更新基础 frontmatter 和 Activity Log。
124
124
  3. Issue 同步(存在有效 `platform_issue_identity` 时,任一失败跳过):调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` 更新 **task 评论**;`status` label 维持 `pending-design-work`;**不**发布分析产物评论。
125
- 4. 校验(替代步骤 8 的 artifact gate):`agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text`(早退已置 `current_step: requirement-analysis` 且已写入 `start_date`,预期通过);并保留 `rg -n 'Analyze Task \(Brainstorming\)' .agents/workspace/active/{task-id}/task.md` 与 task 评论同步证据。**不**跑 artifact gate,也不跑 `check activity-log` / `check platform-sync`(二者绑定分析产物路径)。
125
+ 4. 校验(替代步骤 8 的 artifact gate):`agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text`(早退已置 `current_step: requirement-analysis` 且已写入 `start_date`,预期通过);并保留 `rg -n 'Analyze Task \(Brainstorming\)' <task-workspace>/active/{task-id}/task.md` 与 task 评论同步证据。**不**跑 artifact gate,也不跑 `check activity-log` / `check platform-sync`(二者绑定分析产物路径)。
126
126
  5. 用户输出:只展示当前**单个问题** + 如何回答/继续(再次触发 `analyze-task {task-ref}` 并附答案)。
127
127
  6. **STOP**,等待回答。下一次触发回到本步骤。
128
128
 
@@ -151,7 +151,7 @@ agent-infra-internal task-artifact {task-id} init --family analysis --artifact {
151
151
 
152
152
  > 步骤 6–9 属**场景 A(正常产出)**路径。**场景 B(提问早退)**已在步骤 4 内完成状态更新、task 评论同步与校验并 STOP,不进入这些步骤。
153
153
 
154
- 创建 `.agents/workspace/active/{task-id}/{analysis-artifact}`。
154
+ 创建 `<task-workspace>/active/{task-id}/{analysis-artifact}`。
155
155
 
156
156
  ## 输出模板
157
157
 
@@ -228,7 +228,7 @@ agent-infra-internal task-artifact {task-id} init --family analysis --artifact {
228
228
 
229
229
  ### 7. 更新任务状态
230
230
 
231
- 更新 `.agents/workspace/active/{task-id}/task.md`:
231
+ 更新 `<task-workspace>/active/{task-id}/task.md`:
232
232
  - 仅更新优先级、Brainstorming、审查响应等本技能拥有的业务内容;产物链接、阶段与完成日志由 completed 事件统一登记
233
233
  - 在追加工作流 Activity Log 条目之前,基于分析结果(业务影响、风险、依赖、阻塞条件)重估 `priority`。若重估值与 `task.md` 当前值不一致:
234
234
  - 用新值覆盖 frontmatter 的 `priority` 字段
@@ -288,7 +288,7 @@ agent-infra-internal task-verify {task-id} analyze.completed --artifact {analysi
288
288
  - 风险等级:{评估}
289
289
 
290
290
  产出文件:
291
- - 分析报告:.agents/workspace/active/{task-id}/{analysis-artifact}
291
+ - 分析报告:<task-workspace>/active/{task-id}/{analysis-artifact}
292
292
 
293
293
  下一步 - 按所选路径继续:
294
294
  {next-step-commands}
@@ -297,7 +297,7 @@ agent-infra-internal task-verify {task-id} analyze.completed --artifact {analysi
297
297
  ## 完成检查清单
298
298
 
299
299
  - [ ] 阅读并理解了任务文件和来源信息
300
- - [ ] 创建了分析文档 `.agents/workspace/active/{task-id}/{analysis-artifact}`
300
+ - [ ] 创建了分析文档 `<task-workspace>/active/{task-id}/{analysis-artifact}`
301
301
  - [ ] 更新了 task.md 中的 `current_step` 为 requirement-analysis
302
302
  - [ ] 更新了 task.md 中的 `updated_at` 为当前时间
303
303
  - [ ] 更新了 task.md 中的 `assigned_to`
@@ -21,7 +21,6 @@
21
21
  "schema": "analysis"
22
22
  },
23
23
  "activity-log": {
24
- "expected_action_pattern": "(Analyze Task|Requirement Analysis) \\(Round \\d+\\)"
25
24
  },
26
25
  "platform-sync": {
27
26
  "when": "platform_issue_identity_exists"
@@ -21,7 +21,6 @@
21
21
  "schema": "analysis"
22
22
  },
23
23
  "activity-log": {
24
- "expected_action_pattern": "(Analyze Task|Requirement Analysis) \\(Round \\d+\\)"
25
24
  },
26
25
  "platform-sync": {
27
26
  "when": "platform_issue_identity_exists"
@@ -7,16 +7,16 @@ description: >
7
7
 
8
8
  # Archive Completed Tasks
9
9
 
10
- Archive completed tasks from `.agents/workspace/completed/` into `.agents/workspace/archive/YYYY/MM/DD/TASK-xxx/local/` and rebuild a three-level archive index. Local task materials live in `local/` with a path-sorted `contents.sha256`; the TASK root contains no ordinary files.
11
- - root manifest: `.agents/workspace/archive/manifest.md`
12
- - yearly manifest: `.agents/workspace/archive/YYYY/manifest.md`
13
- - monthly manifest: `.agents/workspace/archive/YYYY/MM/manifest.md`
10
+ Archive completed tasks from `<task-workspace>/completed/` into `<task-workspace>/archive/YYYY/MM/DD/TASK-xxx/local/` and rebuild a three-level archive index. Local task materials live in `local/` with a path-sorted `contents.sha256`; the TASK root contains no ordinary files.
11
+ - root manifest: `<task-workspace>/archive/manifest.md`
12
+ - yearly manifest: `<task-workspace>/archive/YYYY/manifest.md`
13
+ - monthly manifest: `<task-workspace>/archive/YYYY/MM/manifest.md`
14
14
 
15
15
  ## Execution Flow
16
16
 
17
17
  ### 1. Verify the environment
18
18
 
19
- Confirm that `.agents/workspace/completed/` exists, then choose one of these four invocation modes:
19
+ Confirm that `<task-workspace>/completed/` exists, then choose one of these four invocation modes:
20
20
  - no arguments: archive every completed task
21
21
  - `--days N`: keep the most recent `N` days and archive older tasks
22
22
  - `--before YYYY-MM-DD`: archive only tasks completed before the given date