@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
@@ -18,8 +18,7 @@ description: >
18
18
 
19
19
  生成收尾报告或同步内容时,先读取 `.agents/rules/evidence-reporting.md`。成功检查记录命令、范围、状态/结构化结果、实际结果和未覆盖部分;失败、阻塞或争议保留复现入口、准确位置和决定性摘录。
20
20
 
21
- - 本命令更新任务元数据并物理移动任务目录
22
- - 除非强制执行,不要转移有未完成工作流步骤的任务
21
+ - 本命令由宿主更新任务元数据并原子移动任务目录
23
22
  - 入口接受可选 `--external-pr <N>`;仅用于外部交付候选歧义时的显式选择,不绕过身份或平台门禁
24
23
 
25
24
  版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
@@ -49,7 +48,7 @@ agent-infra-internal task-snapshot {task-id} --format text
49
48
  ## 执行步骤
50
49
  ### 1. 验证任务存在
51
50
 
52
- 检查任务是否存在于 `.agents/workspace/active/{task-id}/`。
51
+ 检查任务是否存在于 `<task-workspace>/active/{task-id}/`。
53
52
 
54
53
  注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
55
54
 
@@ -101,7 +100,7 @@ agent-infra-internal platform-pr resolve-external {task-id} --agent {standard-ag
101
100
  ```
102
101
 
103
102
  生命周期前只验证硬门禁:
104
- - [ ] task 身份、active 状态、并发锁和本地原子生命周期操作可用
103
+ - [ ] task 身份、active 状态校验和本地原子生命周期操作可用
105
104
  - [ ] `prFlow=required` 时已满足 required-PR delivery
106
105
  - [ ] 其余业务证据(工作流、审查、提交、测试、分歧账本、人工校验和平台同步)已记录或可在生命周期后校验;人工验证只能由 committed transaction、receipt、当前 artifact 摘要和带 identity 的通过日志满足
107
106
 
@@ -125,7 +124,7 @@ Please satisfy the hard prerequisite first, then retry complete-task.
125
124
 
126
125
  ### 3. 完成业务内容更新
127
126
 
128
- 在 `.agents/workspace/active/{task-id}/task.md` 中只更新生命周期核心不负责的业务内容:
127
+ 在 `<task-workspace>/active/{task-id}/task.md` 中只更新生命周期核心不负责的业务内容:
129
128
  - 新增或更新 `## 状态核对` 段,记录第 0 步审计命令、任务/产物范围、关键结果和未覆盖部分;正常成功不复制完整目录清单或 `task.md` 尾部,失败、阻塞、身份不一致或争议时附决定性原文行,放在 `## 活动日志` 之前
130
129
  - 标记所有工作流步骤为已完成
131
130
  - 逐项验证并勾选 `## 完成检查清单` 中的所有条目(将 `- [ ]` 改为 `- [x]`)
@@ -141,9 +140,9 @@ Please satisfy the hard prerequisite first, then retry complete-task.
141
140
  如果存在有效的 `platform_issue_identity`,严格按以下顺序执行:
142
141
 
143
142
  1. 调用 `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --requirements --fields`。
144
- 2. 把业务摘要写入临时文件,并调用 `agent-infra-internal platform-comment stage-summary {task-id} --body-file {path}`。该命令把正文和 SHA-256 写入 task 目录的 durable staging record;本步骤不得直接发布 summary 评论。
143
+ 2. 把完成摘要字段写成 JSON 临时文件,并调用 `agent-infra-internal platform-comment stage-summary {task-id} --body-file {path}`。字段为 `taskId`、`title`、`summary`、`artifacts`、`verification:{state,detail}`;`taskId` 必须是当前完整任务 ID,`title` 来自 task.md,`artifacts` 来自当前 artifact registry(无产物用 `[]`)。验证尚未执行时写 `state:"not-run"` 和非空说明,不等待之后的终态事件或最终验证。命令把规范 payload 与摘要写入 durable staging record;本步骤不得直接发布 summary 评论。
145
144
 
146
- 摘要正文只记录当前任务证据能够支持的交付结果、关联 PR 与实际合入事实、验证命令及其范围/结果/未覆盖部分,以及已知待办;需要说明验证范围时可注明对应提交。没有证据支持的事实不推断,未完成事项写入待办。这是 Issue 收尾摘要,不是 PR 留言。
145
+ `summary` 字段只记录当前任务证据能够支持的交付结果、关联 PR 与实际合入事实、验证命令及其范围/结果/未覆盖部分,以及已知待办;需要说明验证范围时可注明对应提交。没有证据支持的事实不推断,未完成事项写入待办。这是 Issue 收尾摘要,不是 PR 留言。
147
146
 
148
147
  摘要默认使用当前技能的语言:中文技能生成中文摘要,英文技能生成英文摘要。中英文摘要保持相同字段结构。
149
148
 
@@ -173,11 +172,11 @@ agent-infra-internal task-verify {task-id} complete-task.preflight --format text
173
172
 
174
173
  按 `.agents/rules/validation-output.md` 展示当次校验摘要;失败、阻塞和软警告保留必要诊断。
175
174
 
176
- 该事件只执行 required-PR delivery hard preflight;身份、并发和本地原子性仍由宿主 finalization 强制执行。外围 review/manual/platform 检查在 lifecycle 后由 `complete-task.completed` 处理,并投影为 warning/pending steps。硬门禁退出码非 0(fail/blocked)时,任务继续留在 active,记录稳定 code/target 后停止。
175
+ 该事件只执行 required-PR delivery hard preflight;身份校验和本地原子性仍由宿主 finalization 强制执行。外围 review/manual/platform 检查在 lifecycle 后由 `complete-task.completed` 处理,并投影为 warning/pending steps。硬门禁退出码非 0(fail/blocked)时,任务继续留在 active,记录稳定 code/target 后停止。
177
176
 
178
177
  若需要在摘要中镜像 `post-review-commit` 的 human-decided exemption,在步骤 4 尽力同步原始 failure code/message、PRC id/evidence 和裁决信息;同步失败只记录 `SUMMARY_SYNC_FAILED` warning,仍继续生命周期。最终是否完成由生命周期后的 terminal verification 决定。
179
178
 
180
- `--force` 不能解除身份、并发、本地原子性或 required-PR hard gate;这些能力失败时必须停止。其余审查、人工校验和平台证据由 terminal verification 记录为 warning/pending,并通过后续重试恢复。
179
+ `--force` 不能解除身份校验、本地原子性或 required-PR hard gate;这些能力失败时必须停止。其余审查、人工校验和平台证据由 terminal verification 记录为 warning/pending,并通过后续重试恢复。
181
180
 
182
181
  ### 6. 执行宿主 finalization 入口
183
182
 
@@ -208,7 +207,7 @@ complete 保留短号映射。它只会在受管 sandbox 清理确认容器已
208
207
  任务信息:
209
208
  - 标题:{title}
210
209
  - 完成时间:{timestamp}
211
- - 目标路径:.agents/workspace/completed/{task-id}/
210
+ - 目标路径:<task-workspace>/completed/{task-id}/
212
211
 
213
212
  交付物:
214
213
  - {关键产出列表:修改的文件、添加的测试等}
@@ -224,32 +223,18 @@ ai sandbox rm {task-id} # 或使用本任务仍保留的短号
224
223
 
225
224
  ## 完成检查清单
226
225
 
227
- - [ ] 验证了所有工作流步骤已完成
228
- - [ ] 更新了 task.md 的完成状态和时间戳
229
- - [ ] 将任务目录移动到 `.agents/workspace/completed/`
230
- - [ ] 验证了转移成功
231
- - [ ] 告知了用户完成情况
226
+ - [ ] 满足了硬性前置条件并通过预完成门禁
227
+ - [ ] 宿主 finalization 返回 `result=completed` 或 `result=completed_with_warnings`
228
+ - [ ] 完成校验通过
229
+ - [ ] 已向用户报告结构化完成结果和适用的警告
232
230
 
233
231
  ## 注意事项
234
232
 
235
- 1. **过早完成**:不要转移有未完成步骤的任务。未完成的情况示例:
236
- - 代码已编写但未提交
237
- - 代码已提交但未审查
238
- - 审查发现阻塞项但未修复
239
- - PR 已创建但未合并
240
- - 人工校验项未完成
241
-
242
- 2. **回滚**:如果任务被错误转移:
243
- ```bash
244
- mv .agents/workspace/completed/{task-id} .agents/workspace/active/{task-id}
245
- ```
246
- 然后将 task.md 中的状态改回 `active`。
247
-
248
- 3. **多贡献者**:如果多个 AI 代理参与了任务,确保所有贡献都已提交后再完成。
233
+ - 如果多个 AI 代理参与任务,确保所有贡献都包含在本地 checkpoint 中。
249
234
 
250
235
  ## 错误处理
251
236
 
252
237
  - 任务未找到:提示 "Task {task-id} not found in active directory"
253
- - 已完成:提示 "Task {task-id} is already in completed directory"
254
- - 任务被阻塞:提示 "Task {task-id} is blocked. Unblock it first by moving to active/"
255
- - 移动失败:提示错误并建议手动移动
238
+ - 已完成:仅当存在匹配的 Complete Task Activity Log 时进入 `finalization-retry`;否则说明终态身份不完整并停止
239
+ - 任务被阻塞:满足记录的解除条件后,通过 `task-lifecycle activate` 恢复任务,再重试
240
+ - finalization 失败或阻塞:保留源数据和 receipt,根据结构化错误通过同一 finalization 入口恢复;不要手工改写终态或移动任务目录
@@ -18,7 +18,6 @@
18
18
  "require_completed_at": true
19
19
  },
20
20
  "activity-log": {
21
- "expected_action_pattern": "(Complete Task|Completed)"
22
21
  },
23
22
  "completion-checklist": {
24
23
  "require_all_checked": true
@@ -18,7 +18,6 @@
18
18
  "require_completed_at": true
19
19
  },
20
20
  "activity-log": {
21
- "expected_action_pattern": "(Complete Task|Completed)"
22
21
  },
23
22
  "completion-checklist": {
24
23
  "require_all_checked": true
@@ -47,7 +47,7 @@ No Pull Request is required; run instead:
47
47
 
48
48
  Parse the task scope first: an optional `--task <ref>` or `-t <ref>` selects `{task-id}`; a positional task ref is not interpreted. The remaining positional argument, when present, is `{target-branch}`.
49
49
 
50
- If `{task-id}` is provided, read `.agents/workspace/active/{task-id}/task.md` to load task metadata such as `platform_issue_identity` and `type`.
50
+ If `{task-id}` is provided, read `<task-workspace>/active/{task-id}/task.md` to load task metadata such as `platform_issue_identity` and `type`.
51
51
  If `{task-id}` is omitted, try to resolve it from the current session context; if it still cannot be determined, skip task-association logic in later steps.
52
52
 
53
53
  ### 2. Determine the Target Branch
@@ -68,7 +68,7 @@ Run `agent-infra-internal task-delivery {task-id} deliver --agent {standard-agen
68
68
 
69
69
  ### 5. Create or Recover the PR
70
70
 
71
- Read `.agents/rules/issue-pr-commands.md`, write the title and body to temporary files, then invoke its `platform-pr create` intent. Under the task lock, core uses remote branch and exact head/base/PR identity facts: one existing PR is reused and bound, zero creates, and multiple matches fail deterministically. Review artifacts and task sync records are not create-pr prerequisites, and replays must not create duplicate PRs.
71
+ Read `.agents/rules/issue-pr-commands.md`, write the title and body to temporary files, then invoke its `platform-pr create` intent. Core uses remote branch and exact head/base/PR identity facts: one existing PR is reused and bound, zero creates, and multiple matches fail deterministically. Review artifacts and task sync records are not create-pr prerequisites, and replays must not create duplicate PRs.
72
72
 
73
73
  If `{task-id}` is available and the related task provides `platform_issue_identity`, keep `Closes #{issue-number}` or the provider-equivalent closing keyword in the PR body when supported.
74
74
 
@@ -86,7 +86,7 @@ The core renderer owns the report section. It is part of the reviewer summary be
86
86
 
87
87
  Read the latest context artifacts when they exist: `plan.md` / `plan-r{N}.md`, `review-plan.md` / `review-plan-r{N}.md`, `code.md` / `code-r{N}.md`, and `review-code.md` / `review-code-r{N}.md`.
88
88
 
89
- Aggregate a reviewer-facing summary from those artifacts with exactly one `<!-- canonical-pr-change-report -->` placeholder, and maintain a single idempotent summary comment via the hidden marker. Pass `--change-report-file .agents/workspace/active/{task-id}/pr-change-report.json` and the same `--result {primary-result}` to `summary-sync`; a sync substep must not infer whether the PR was created or reused.
89
+ Assemble a structured reviewer summary JSON from those artifacts with overview, tests, review, manual validation, open decisions, and risks. Report valid not-started states honestly; do not include later validation or event results in advance. Maintain one idempotent summary comment via the hidden marker; the core renderer generates the fixed summary sections and change report. Pass the summary JSON, `--change-report-file <task-workspace>/active/{task-id}/pr-change-report.json`, and the same `--result {primary-result}` to `summary-sync`; a sync substep must not infer whether the PR was created or reused.
90
90
 
91
91
  > Canonical context, aggregation, and the `summary-sync` call live in `reference/comment-publish.md`, which points to `.agents/rules/pr-sync.md`. Read that reference before publishing.
92
92
 
@@ -47,7 +47,7 @@ description: >
47
47
 
48
48
  先解析 task scope:可选的 `--task <ref>` 或 `-t <ref>` 绑定 `{task-id}`;位置 task ref 不再解释。剩余的可选位置参数绑定为 `{target-branch}`。
49
49
 
50
- 如果提供了 `{task-id}`,读取 `.agents/workspace/active/{task-id}/task.md` 获取任务信息(例如 `platform_issue_identity`、`type` 等)。
50
+ 如果提供了 `{task-id}`,读取 `<task-workspace>/active/{task-id}/task.md` 获取任务信息(例如 `platform_issue_identity`、`type` 等)。
51
51
  如果未提供,可从当前 session 上下文获取;仍无法确定 `{task-id}` 时,后续步骤中的任务关联逻辑跳过。
52
52
 
53
53
  ### 2. 确定目标分支
@@ -68,7 +68,7 @@ description: >
68
68
 
69
69
  ### 5. 创建或恢复 PR
70
70
 
71
- 执行前先读取 `.agents/rules/issue-pr-commands.md`,把标题和正文写入临时文件,并调用其中的 `platform-pr create` intent。core 在任务锁内按 remote branch、head/base 和 PR 身份事实执行:唯一既有 PR 会复用并绑定,零个才创建,多个稳定失败;review 或 task sync 记录不作为创建 PR 的前置门禁,重放不得产生重复 PR。
71
+ 执行前先读取 `.agents/rules/issue-pr-commands.md`,把标题和正文写入临时文件,并调用其中的 `platform-pr create` intent。core 按 remote branch、head/base 和 PR 身份事实执行:唯一既有 PR 会复用并绑定,零个才创建,多个稳定失败;review 或 task sync 记录不作为创建 PR 的前置门禁,重放不得产生重复 PR。
72
72
 
73
73
  如果获取到 `{task-id}` 且对应任务提供了 `platform_issue_identity`,在 provider 支持 numeric closing reference 时必须在 PR 正文中保留 `Closes #{issue-number}` 或 provider 等价关闭关键字。
74
74
 
@@ -86,7 +86,7 @@ description: >
86
86
 
87
87
  读取最新的上下文产物:`plan.md` / `plan-r{N}.md`、`review-plan.md` / `review-plan-r{N}.md`、`code.md` / `code-r{N}.md`、`review-code.md` / `review-code-r{N}.md`(存在时)。
88
88
 
89
- 基于这些产物聚合 reviewer 摘要,正文只放一次 `<!-- canonical-pr-change-report -->` 占位符,再使用隐藏标记维护唯一且幂等的摘要评论。调用 `summary-sync` 时传入 `--change-report-file .agents/workspace/active/{task-id}/pr-change-report.json`,并继续传递同一个 `--result {primary-result}`;不得根据同步子步骤猜测 PR 是创建还是复用。
89
+ 基于这些产物组装结构化 reviewer 摘要 JSON,包含概览、测试、Review、人工校验、待决事项和风险;将合法未启动状态如实传入,不提前写入后续验证或事件结果。使用隐藏标记维护唯一且幂等的摘要评论;核心 renderer 负责生成固定摘要段落和 change report。调用 `summary-sync` 时传入摘要 JSON 与 `--change-report-file <task-workspace>/active/{task-id}/pr-change-report.json`,并继续传递同一个 `--result {primary-result}`;不得根据同步子步骤猜测 PR 是创建还是复用。
90
90
 
91
91
  > canonical context、摘要聚合和 `summary-sync` 调用见 `reference/comment-publish.md`(其引用 `.agents/rules/pr-sync.md`)。发布摘要前先读取该 reference。
92
92
 
@@ -15,7 +15,6 @@
15
15
  ]
16
16
  },
17
17
  "activity-log": {
18
- "expected_action_pattern": "(Create PR|PR Created)"
19
18
  },
20
19
  "platform-sync": {
21
20
  "when": "platform_issue_identity_exists"
@@ -24,9 +24,16 @@ agent-infra-internal platform-pr change-report {task-id} \
24
24
 
25
25
  The core validates the task-intent digest, PR identity, complete patch SHA, totals, and the ordered checks `target-alignment`, `change-composition`, `compatibility-policy`, `legacy-path-cleanup`, `redundancy`, and `scope-discipline`. A `needs-review` check routes to `review-code`; `formalReview` remains `false`.
26
26
 
27
- When generating the candidate, use the six existing `rationale` fields and `Evidence[]` as readable analysis for each logical change group; do not add group fields. For each group, explain its goal and acceptance-criteria alignment, added and removed behavior, necessity, redundancy or duplicate implementation, scope, related tests, and whether the tests are sufficient. Cite paths, line ranges, and concise evidence for the conclusions. Each check must still state its actual finding: `target-alignment` explains the goal relationship, `change-composition` summarizes responsibilities and behavior changes, `compatibility-policy` states the compatibility result, `legacy-path-cleanup` states how legacy paths were handled, `redundancy` states the redundancy result, and `scope-discipline` states the scope judgment. Do not reuse generic boilerplate; mark unsupported conclusions as unconfirmed. Use the deployed skill's language. Chinese skill deployments must use Chinese. The canonical renderer displays every item in each `Evidence[]`.
27
+ Before generating the candidate, list functional change groups from the task goal and complete diff; file responsibilities or category totals are not functional groups. Represent each group as a typed object in the existing `change-composition.groups[]` with `id`, `target`, `behaviorChange`, `necessity`, `files[]`, and `tests:{coverage,cost}`. `rationale` and `Evidence[]` may support the judgment and locations but cannot replace group objects.
28
28
 
29
- Explain applicable production-code, test, and documentation changes for each group. Keep source line changes, execution/call-count changes, and workflow unification distinct. Diff line counts support text changes only; they do not prove fewer executions or a unified workflow. Execution behavior and test adequacy need their own direct evidence. State gaps where evidence is missing. Green CI does not prove necessity or absence of redundancy.
29
+ - `files[]` must reference canonical paths (`oldPath ?? newPath`) from the complete formal diff. A rename remains one mechanical file record with both old and new paths. Assign every formal diff file to exactly one group; do not omit, duplicate, or invent paths.
30
+ - Do not enter group line counts in the candidate. Core derives each group's additions, deletions, and net from the bound formal diff's per-file counts and reconciles group totals with the complete diff. A `null` count stays uncountable; the file still belongs to one group and must not be represented as zero.
31
+ - `Evidence[].detail` may cite relevant code, test, or documentation changes. Use `tests.coverage` and `tests.cost` for existing/new test coverage and fixture/test cost. If no test changed, state why existing coverage is sufficient.
32
+ - List and reconcile complete-PR changes separately from the current head-to-head increment. Do not infer increment values when the previous head is unconfirmed.
33
+
34
+ `target-alignment` passes only when every group maps to a task goal or acceptance criterion. Typed structure, file membership, and derived counts are structural checks; the existing semantic review still decides whether groups, behavior added/removed, necessity, test coverage/cost, and evidence are adequately explained. Missing, contradictory, or unverifiable structure or explanation remains `needs-review`; state the gap so the core routes to `review-code`. Complete structure or green CI does not establish sufficient explanation.
35
+
36
+ State the actual finding for each of the other four checks. Use the deployed skill's language for evidence; Chinese deployments must use Chinese. The canonical renderer displays every rationale and evidence item. Source line counts describe text additions/deletions only; they do not prove execution counts or workflow unification.
30
37
 
31
38
  ## Complete PR and Per-Round Increment
32
39
 
@@ -65,4 +72,4 @@ Briefly explain:
65
72
  - whether any change cannot be traced directly to the PR goal and may be unnecessary; if none, state the evidence; every check must cite file and line evidence;
66
73
  - when a test fixture is much larger than production changes, what risk it covers instead of judging it only by size.
67
74
 
68
- Do not write the `### PR Code Changes` section in the caller. Put exactly one `<!-- canonical-pr-change-report -->` placeholder in the plain body and let `summary-sync --change-report-file .agents/workspace/active/{task-id}/pr-change-report.json --result {primary-result}` replace it through the core renderer. Do not create a second PR comment for this report.
75
+ Do not write the `### PR Code Changes` section in the caller. Put exactly one `<!-- canonical-pr-change-report -->` placeholder in the plain body and let `summary-sync --change-report-file <task-workspace>/active/{task-id}/pr-change-report.json --result {primary-result}` replace it through the core renderer. Do not create a second PR comment for this report.
@@ -24,9 +24,16 @@ agent-infra-internal platform-pr change-report {task-id} \
24
24
 
25
25
  core 校验任务意图 digest、PR identity、完整 patch SHA、统计合计和固定顺序的 `target-alignment`、`change-composition`、`compatibility-policy`、`legacy-path-cleanup`、`redundancy`、`scope-discipline`。任一项为 `needs-review` 时路由到 `review-code`,`formalReview` 仍为 `false`。
26
26
 
27
- 生成 candidate 时,按逻辑变化组用六项 `rationale` 和 `Evidence[]` 给出可读分析,不新增组级字段。每组说明其目标/验收对应、行为增加与减少、必要性、冗余或重复实现、范围、对应测试及测试是否充分;列出支撑结论的路径、行号和简短证据。六项检查各自仍须写实际结论:`target-alignment` 说明目标对应关系,`change-composition` 概括职责和行为变化,`compatibility-policy` 说明兼容策略,`legacy-path-cleanup` 说明旧路径处理,`redundancy` 说明重复/冗余结果,`scope-discipline` 说明范围判断。不得复用泛化套话;证据不足的维度明确标记未确认,不推断结论。证据详情遵循当前已部署技能的语言,中文技能必须使用中文。canonical renderer 会完整展示每项 `Evidence[]`。
27
+ 生成 candidate 前,先根据任务目标和完整 diff 列出功能变化组;不得把文件职责概述或类别总数当作功能组。每个功能组作为现有 `change-composition` 检查中的 typed `groups[]` 对象,包含 `id`、`target`、`behaviorChange`、`necessity`、`files[]` 和 `tests:{coverage,cost}`。`rationale`/`Evidence[]` 仅补充判断和定位,不能替代组对象。
28
28
 
29
- 每组解释覆盖生产代码、测试和文档中适用的变化,并区分源码行数变化、执行/调用次数变化和流程统一。diff 行数仅支持代码文本增减;不能据此推断执行次数减少或流程统一。执行次数、流程行为和测试充分性须有各自直接证据;没有证据时明确说明缺口。CI 全绿不能代替必要性或冗余判断。
29
+ - `files[]` 只能引用完整正式 diff 中的 canonical 文件路径(机械报告的 `oldPath ?? newPath`);rename 仍作为一条机械记录保留 old/new 两端。正式 diff 中每个文件必须恰好归入一个组,不得遗漏、重复或引用 diff 外文件。
30
+ - 不要在 candidate 中填写组级行数。core 从绑定的正式 diff 逐文件 additions/deletions 聚合各组的新增、删除和净增,并将各组加总与正式 diff totals 对账。`null` 行数保持不可计数,文件仍需归组且不能改写为零。
31
+ - 每条 `Evidence[].detail` 可引用具体代码、测试或文档变更;`tests.coverage` 与 `tests.cost` 分别说明覆盖风险/已有覆盖依据,以及本次新增 fixture / 测试的成本。没有测试变更时说明现有覆盖依据。
32
+ - 完整 PR 与本轮 head-to-head 增量分别列示和对账;上一 head 未确认时不得推算增量数值。
33
+
34
+ `target-alignment` 只有在每个功能组都能对应任务目标或验收标准时才能判为 `pass`。`change-composition` 的 typed 结构、文件集合和机械计数通过结构校验后,仍须按现有语义判断组别、行为增减、必要性、测试覆盖/成本和证据是否充分;结构或解释缺项、矛盾、无法核实时保持 `needs-review` 并说明缺口,使 core 路由到 `review-code`。不得因结构完整或 CI 通过而自动判定内容充分。
35
+
36
+ 其他四项检查仍分别给出实际结论;证据详情遵循当前已部署技能的语言,中文技能必须使用中文。canonical renderer 会展示全部 rationale 和 evidence。源码行数只说明文本增删;不能据此推断执行次数或流程统一。
30
37
 
31
38
  ## 完整 PR 与本轮增量
32
39
 
@@ -65,4 +72,4 @@ canonical 汇总中的固定分类把 `docs/`、Markdown/MDX/reStructuredText
65
72
  - 是否存在与 PR 目标无法直接对应、疑似不必要的变化;若没有,明确说明判断依据;每项结论必须给出文件和行号证据;
66
73
  - 若某个测试 fixture 明显大于生产改动,解释它覆盖的风险,而不是仅以行数评价。
67
74
 
68
- 调用方不要自行写入 `### PR 代码增减`。把恰好包含一次 `<!-- canonical-pr-change-report -->` 的普通摘要正文交给 `summary-sync --change-report-file .agents/workspace/active/{task-id}/pr-change-report.json --result {primary-result}`,由 core renderer 替换并发布。报告不另建第二条 PR 评论。
75
+ 调用方不要自行写入 `### PR 代码增减`。把恰好包含一次 `<!-- canonical-pr-change-report -->` 的普通摘要正文交给 `summary-sync --change-report-file <task-workspace>/active/{task-id}/pr-change-report.json --result {primary-result}`,由 core renderer 替换并发布。报告不另建第二条 PR 评论。
@@ -2,13 +2,13 @@
2
2
 
3
3
  After PR creation, run `agent-infra-internal platform-pr summary-context {task-id}` and aggregate the reviewer summary only from its canonical artifacts according to `.agents/rules/pr-sync.md`.
4
4
 
5
- Write the plain summary body, containing exactly one `<!-- canonical-pr-change-report -->` placeholder and no report heading/JSON, marker, or HEAD metadata, to a temporary file, then run:
5
+ Write the PR summary JSON fields from `.agents/rules/pr-sync.md` to a temporary file, then run. The core renderer adds the feature change section from the canonical report:
6
6
 
7
7
  ```bash
8
8
  agent-infra-internal platform-pr summary-sync {task-id} \
9
9
  --agent {standard-agent-token} --body-file {summary-body-file} \
10
- --change-report-file .agents/workspace/active/{task-id}/pr-change-report.json \
10
+ --change-report-file <task-workspace>/active/{task-id}/pr-change-report.json \
11
11
  --result {primary-result}
12
12
  ```
13
13
 
14
- The caller does not add markers, HEAD metadata, report sections, or comment API parameters. The typed core rechecks the task-bound sidecar against the authoritative PR snapshot and renders the report. `--result` is required and must be passed unchanged from `platform-pr create`; `no_op` maps to `no_op_with_warnings` if summary synchronization degrades. Missing/stale/invalid sidecars or body bypasses do not publish, and summary failures do not roll back a created or reused PR.
14
+ The caller does not add markers, HEAD metadata, report sections, or comment API parameters. The typed core validates fields, renders fixed sections, rechecks the task-bound sidecar against the authoritative PR snapshot, then reads back and compares the remote body. `--result` is required and passed unchanged from `platform-pr create`; incomplete structure does not publish, and summary failures do not roll back a created or reused PR.
@@ -2,13 +2,13 @@
2
2
 
3
3
  创建 PR 后先调用 `agent-infra-internal platform-pr summary-context {task-id}`,只根据返回的 canonical 产物按 `.agents/rules/pr-sync.md` 聚合 reviewer 摘要。
4
4
 
5
- 把恰好包含一次 `<!-- canonical-pr-change-report -->` 且不含报告标题/JSON、marker 或 HEAD 元数据的纯摘要正文写入临时文件,再调用:
5
+ 按 `.agents/rules/pr-sync.md` 填写 PR 摘要 JSON 字段(overview、tests、review、manualValidation、humanDecisions、risks),写入临时文件,再调用。功能增减章节由 core renderer 从 canonical report 生成:
6
6
 
7
7
  ```bash
8
8
  agent-infra-internal platform-pr summary-sync {task-id} \
9
9
  --agent {standard-agent-token} --body-file {summary-body-file} \
10
- --change-report-file .agents/workspace/active/{task-id}/pr-change-report.json \
10
+ --change-report-file <task-workspace>/active/{task-id}/pr-change-report.json \
11
11
  --result {primary-result}
12
12
  ```
13
13
 
14
- 调用方不添加 marker、HEAD、报告段或评论 API 参数。typed core 会重新校验任务绑定 sidecar 与权威 PR snapshot 并渲染报告。`--result` 是必填的,必须把 `platform-pr create` 的 `result` 原样传入;sidecar 缺失/过期/非法或正文旁路时不发布,摘要失败沿用该 primary result 映射 warning(`no_op` 对应 `no_op_with_warnings`),不回滚已创建或复用的 PR。结果映射沿用 `.agents/rules/pr-sync.md`。
14
+ 调用方不添加 marker、HEAD、报告段或评论 API 参数。typed core 会校验字段结构、渲染固定章节、重新校验任务绑定 sidecar 与权威 PR snapshot,并在发布后回读比较远端正文。`--result` 是必填的,必须把 `platform-pr create` 的 `result` 原样传入;sidecar 缺失/过期/非法或结构不完整时不发布,摘要失败沿用该 primary result 映射 warning(`no_op` 对应 `no_op_with_warnings`),不回滚已创建或复用的 PR。结果映射沿用 `.agents/rules/pr-sync.md`。
@@ -118,10 +118,10 @@ If no historical release notes exist, use the following default Markdown format:
118
118
  - Issue reporters from typed `closingIssues[].author`
119
119
  - **Contribution count**: `PR count + co-authored commit count` for the same identity, merged across both sources
120
120
  - **`@login` mapping**: follow the identity safety boundary in `.agents/rules/release-commands.md`
121
- - For `platform-user` or `platform-noreply` with a non-empty `login`, use the lowercased `login`
121
+ - For `platform-user` or `platform-noreply` with a non-empty `login`, follow the mention mapping in `.agents/rules/release-commands.md`
122
122
  - Exclude `unresolved` identities from the contributor list; never infer a login from a name, email address, domain, brand, or same-named platform account
123
123
  - Merge all Name variants carrying the same typed login before counting and sorting
124
- - Preserve bot identities as-is, for example `dependabot[bot]`
124
+ - Use plain-text `@login` mentions in Release notes, without Markdown links; map Dependabot typed logins to `@dependabot` according to the rule
125
125
  - Do not add unresolved identity emails, placeholder mentions, or identity-verification TODOs to publishable notes
126
126
  - **Sorting**: descending by contribution count, then lexicographically by login for ties
127
127
  - **Deduplication**: use the final mapped `@login` as the key
@@ -118,10 +118,10 @@ agent-infra-internal platform-release-notes context \
118
118
  - Issue reporters:来自步骤 3 typed context 的 `closingIssues[].author`
119
119
  - **贡献数定义**:`该人的 PR 数 + 该人作为 co-author 的 commit 数`(同一身份跨来源合并计数)
120
120
  - **`@login` 映射**:遵循 `.agents/rules/release-commands.md` 的身份安全边界
121
- - `resolution` 为 `platform-user` 或 `platform-noreply` 且 `login` 非空时,采用小写 `login`
121
+ - `resolution` 为 `platform-user` 或 `platform-noreply` 且 `login` 非空时,遵循 `.agents/rules/release-commands.md` 的 mention 映射
122
122
  - `resolution` 为 `unresolved` 时从贡献者列表中排除;不得从 Name、邮箱、域名、品牌或同名平台账号推断 login
123
123
  - 同一 typed login 的所有 Name 变体必须归并后再计数与排序
124
- - Bot 身份保留原样(如 `dependabot[bot]`)
124
+ - Release notes 的 `@login` 一律使用纯文本,不用 Markdown 链接包装;Dependabot typed login 按规则映射为 `@dependabot`
125
125
  - 不得在可发布 notes 中加入未解析身份的邮箱、占位 mention 或身份确认 TODO
126
126
  - **排序**:按贡献数降序;贡献数相同时按 login 字典序
127
127
  - **去重**:以最终映射后的 `@login` 为键
@@ -93,24 +93,6 @@ agent-infra-internal task-create --input "$candidate_file"
93
93
 
94
94
  The host owns TASK-id/timestamps/version, workflow and branch derivation, template rendering, atomic persistence, short ids, Issue sync, and warnings. The skill must not create task directories, copy templates, allocate short ids, or call platform subcommands directly.
95
95
 
96
- Task metadata (`task.md` YAML front matter):
97
- ```yaml
98
- id: TASK-{yyyyMMdd-HHmmss}
99
- type: feature|bugfix|refactor|docs|chore
100
- branch: <project>-<type>-<slug>
101
- workflow: feature-development|bug-fix|refactoring
102
- status: active
103
- created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
104
- updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
105
- agent_infra_version: {agent_infra_version}
106
- priority: # required; inferred by the AI from the title/description; Urgent | High | Medium | Low
107
- effort: # required; inferred by the AI from the title/description; High | Medium | Low
108
- start_date: # optional; YYYY-MM-DD
109
- target_date: # optional; YYYY-MM-DD
110
- current_step: requirement-analysis
111
- assigned_to: {current AI agent}
112
- ```
113
-
114
96
  priority / effort are required: the AI infers them from the task title and description (candidates in `.agents/rules/issue-fields.md`; normalize localized input). Leave start_date / target_date empty at creation: `start_date` is written by the analyze stage and `target_date` by the complete stage; do not invent dates.
115
97
 
116
98
  ### 3. Handle the Structured Result
@@ -180,7 +162,7 @@ Task information:
180
162
  - Issue: #{issue-number} {issue_url}
181
163
 
182
164
  Output file:
183
- - Task file: .agents/workspace/active/{task-id}/task.md
165
+ - Task file: <task-workspace>/active/{task-id}/task.md
184
166
 
185
167
  Next step - run requirements analysis:
186
168
  {next-step-commands}
@@ -199,7 +181,7 @@ Task information:
199
181
  - Workflow: {workflow}
200
182
 
201
183
  Output file:
202
- - Task file: .agents/workspace/active/{task-id}/task.md
184
+ - Task file: <task-workspace>/active/{task-id}/task.md
203
185
 
204
186
  Next step - run requirements analysis:
205
187
  {next-step-commands}
@@ -223,7 +205,7 @@ Issue creation failed:
223
205
  - Local task.md was kept and not rolled back
224
206
 
225
207
  Output file:
226
- - Task file: .agents/workspace/active/{task-id}/task.md
208
+ - Task file: <task-workspace>/active/{task-id}/task.md
227
209
 
228
210
  Next step - run requirements analysis:
229
211
  {next-step-commands}
@@ -239,7 +221,7 @@ For later platform sync: after fixing auth / network / template issues, manually
239
221
  ## Completion Checklist
240
222
 
241
223
  - [ ] Wrote one candidate and invoked `agent-infra-internal task-create`
242
- - [ ] The host created `.agents/workspace/active/{task-id}/task.md`
224
+ - [ ] The host created `<task-workspace>/active/{task-id}/task.md`
243
225
  - [ ] Wrote and checked `## Task Input` source and state semantics according to `reference/context-capture.md`
244
226
  - [ ] The returned task id and short id passed completion verification
245
227
  - [ ] Tried cascading Issue creation through `.agents/rules/create-issue.md`; if it failed, kept task.md and recorded the reason
@@ -92,24 +92,6 @@ agent-infra-internal task-create --input "$candidate_file"
92
92
 
93
93
  宿主负责 TASK-id/时间戳/版本戳、workflow/branch 派生、模板渲染、原子持久化、短号、Issue 与 warning。技能不得自行 `mkdir`、复制任务模板、分配短号或直接调用平台子命令。
94
94
 
95
- 任务元数据(task.md YAML front matter):
96
- ```yaml
97
- id: TASK-{yyyyMMdd-HHmmss}
98
- type: feature|bugfix|refactor|docs|chore
99
- branch: <project>-<type>-<slug>
100
- workflow: feature-development|bug-fix|refactoring
101
- status: active
102
- created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
103
- updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
104
- agent_infra_version: {agent_infra_version}
105
- priority: # 必填;由 AI 从标题/描述推断;Urgent | High | Medium | Low
106
- effort: # 必填;由 AI 从标题/描述推断;High | Medium | Low
107
- start_date: # 可选;YYYY-MM-DD
108
- target_date: # 可选;YYYY-MM-DD
109
- current_step: requirement-analysis
110
- assigned_to: {当前 AI 代理}
111
- ```
112
-
113
95
  priority / effort 必填:由 AI 从任务标题与描述推断后填入(候选值见 `.agents/rules/issue-fields.md`;中文输入按本地化映射规范化)。start_date / target_date 创建时保持留空:`start_date` 由 analyze 阶段写入、`target_date` 由 complete 阶段写入;不要臆测日期。
114
96
 
115
97
  ### 3. 处理结构化结果
@@ -177,7 +159,7 @@ agent-infra-internal task-verify {task-id} create-task.completed --format text
177
159
  - Issue:#{issue-number} {issue_url}
178
160
 
179
161
  产出文件:
180
- - 任务文件:.agents/workspace/active/{task-id}/task.md
162
+ - 任务文件:<task-workspace>/active/{task-id}/task.md
181
163
 
182
164
  下一步 - 执行需求分析:
183
165
  {next-step-commands}
@@ -196,7 +178,7 @@ agent-infra-internal task-verify {task-id} create-task.completed --format text
196
178
  - 工作流:{workflow}
197
179
 
198
180
  产出文件:
199
- - 任务文件:.agents/workspace/active/{task-id}/task.md
181
+ - 任务文件:<task-workspace>/active/{task-id}/task.md
200
182
 
201
183
  下一步 - 执行需求分析:
202
184
  {next-step-commands}
@@ -220,7 +202,7 @@ Issue 创建失败:
220
202
  - 本地 task.md 已保留,未回滚
221
203
 
222
204
  产出文件:
223
- - 任务文件:.agents/workspace/active/{task-id}/task.md
205
+ - 任务文件:<task-workspace>/active/{task-id}/task.md
224
206
 
225
207
  下一步 - 执行需求分析:
226
208
  {next-step-commands}
@@ -236,7 +218,7 @@ Issue 创建失败:
236
218
  ## 完成检查清单
237
219
 
238
220
  - [ ] 只生成一次结构化 candidate 并调用 `agent-infra-internal task-create`
239
- - [ ] 宿主创建了任务文件 `.agents/workspace/active/{task-id}/task.md`
221
+ - [ ] 宿主创建了任务文件 `<task-workspace>/active/{task-id}/task.md`
240
222
  - [ ] 已按 `reference/context-capture.md` 写入并复核 `## 任务输入` 的来源与状态语义
241
223
  - [ ] 响应中的任务 ID 和短号已通过完成校验
242
224
  - [ ] 已按 `.agents/rules/create-issue.md` 尝试级联创建 Issue;失败时保留 task.md 并记录原因
@@ -18,7 +18,6 @@
18
18
  "expected_status": "active"
19
19
  },
20
20
  "activity-log": {
21
- "expected_action_pattern": "(Create Task|Task Created)"
22
21
  },
23
22
  "platform-sync": {
24
23
  "when": "platform_issue_identity_exists",
@@ -48,7 +48,7 @@ Extract key information:
48
48
 
49
49
  Check whether a task for this alert already exists. If not, create one:
50
50
 
51
- Directory: `.agents/workspace/active/TASK-{yyyyMMdd-HHmmss}/`
51
+ Directory: `<task-workspace>/active/TASK-{yyyyMMdd-HHmmss}/`
52
52
 
53
53
  Task metadata:
54
54
  ```yaml
@@ -48,7 +48,7 @@ description: >
48
48
 
49
49
  检查是否已存在该告警的任务。如果不存在,创建:
50
50
 
51
- 目录:`.agents/workspace/active/TASK-{yyyyMMdd-HHmmss}/`
51
+ 目录:`<task-workspace>/active/TASK-{yyyyMMdd-HHmmss}/`
52
52
 
53
53
  任务元数据:
54
54
  ```yaml
@@ -17,7 +17,6 @@
17
17
  "expected_status": "active"
18
18
  },
19
19
  "activity-log": {
20
- "expected_action_pattern": "(Import Codescan|Import Code Scanning Alert)"
21
20
  },
22
21
  "platform-sync": null
23
22
  }
@@ -45,11 +45,11 @@ Extract key information:
45
45
 
46
46
  ### 2. Create the Task Directory and File
47
47
 
48
- Check whether `.agents/workspace/active/` already has a task for this alert.
48
+ Check whether `<task-workspace>/active/` already has a task for this alert.
49
49
  - If found, **reuse the existing task by default**; do not ask the user. State clearly in the final notice: "Reused existing task `{task-id}`; not re-imported." If the user wants to re-import, they must first archive or delete the existing task
50
50
  - If not found, create a new task
51
51
 
52
- Create directory: `.agents/workspace/active/TASK-{yyyyMMdd-HHmmss}/`
52
+ Create directory: `<task-workspace>/active/TASK-{yyyyMMdd-HHmmss}/`
53
53
 
54
54
  Task metadata must include:
55
55
  ```yaml
@@ -118,7 +118,7 @@ Task information:
118
118
  - Task ID: {task-id} (short id {task-ref})
119
119
 
120
120
  Output file:
121
- - Task file: .agents/workspace/active/{task-id}/task.md
121
+ - Task file: <task-workspace>/active/{task-id}/task.md
122
122
 
123
123
  Next step:
124
124
  {next-step-commands}
@@ -45,11 +45,11 @@ description: >
45
45
 
46
46
  ### 2. 创建任务目录和文件
47
47
 
48
- 检查 `.agents/workspace/active/` 中是否已存在该告警的任务。
48
+ 检查 `<task-workspace>/active/` 中是否已存在该告警的任务。
49
49
  - 如果找到,**默认复用现有任务**,不询问用户;在最终告知中明确「已复用现有任务 `{task-id}`,未重新导入」。如需重新导入,需先归档/删除已有任务
50
50
  - 如果未找到,创建新任务
51
51
 
52
- 创建目录:`.agents/workspace/active/TASK-{yyyyMMdd-HHmmss}/`
52
+ 创建目录:`<task-workspace>/active/TASK-{yyyyMMdd-HHmmss}/`
53
53
 
54
54
  任务元数据需包含:
55
55
  ```yaml
@@ -116,7 +116,7 @@ agent-infra-internal task-verify {task-id} import-dependabot.completed --format
116
116
  - 任务 ID:{task-id}(短号 {task-ref})
117
117
 
118
118
  产出文件:
119
- - 任务文件:.agents/workspace/active/{task-id}/task.md
119
+ - 任务文件:<task-workspace>/active/{task-id}/task.md
120
120
 
121
121
  下一步:
122
122
  {next-step-commands}
@@ -17,7 +17,6 @@
17
17
  "expected_status": "active"
18
18
  },
19
19
  "activity-log": {
20
- "expected_action_pattern": "(Import Dependabot|Import Dependabot Alert)"
21
20
  },
22
21
  "platform-sync": null
23
22
  }
@@ -63,7 +63,7 @@ Strip only the first layer, and only when the leading token is a `prefix-types`
63
63
 
64
64
  ### 2. Check for an Existing Task
65
65
 
66
- 2.1 Search `.agents/workspace/active/` for an existing task linked to this Issue.
66
+ 2.1 Search `<task-workspace>/active/` for an existing task linked to this Issue.
67
67
  - If found, **reuse the existing task by default** (Scenario A); do not ask the user. State clearly in the final notice: "Reused existing task `{task-id}`; not re-imported." If the user wants to re-import, they must first archive or delete the existing task and run this skill again
68
68
  - If not found, continue to 2.2
69
69
 
@@ -93,7 +93,7 @@ date +%Y%m%d-%H%M%S
93
93
 
94
94
  3.2 Write the task directory and `task.md`.
95
95
 
96
- - Create the directory: `.agents/workspace/active/{task-id}/`
96
+ - Create the directory: `<task-workspace>/active/{task-id}/`
97
97
  - Use the `.agents/templates/task.md` template to create `task.md`
98
98
  - For Scenario C, prefer `type`, `workflow`, `branch`, and `milestone` from the remote frontmatter; infer missing or damaged fields from Issue labels and current rules
99
99
  - Always write `current_step` as `requirement-analysis`; do not restore the remote original `current_step`
@@ -132,7 +132,7 @@ Get the current time:
132
132
  date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
133
133
  ```
134
134
 
135
- Update `.agents/workspace/active/{task-id}/task.md`:
135
+ Update `<task-workspace>/active/{task-id}/task.md`:
136
136
  - `current_step`: requirement-analysis
137
137
  - `assigned_to`: {current AI agent}
138
138
  - `updated_at`: {current time}
@@ -193,7 +193,7 @@ Task information:
193
193
  - Workflow: {workflow}
194
194
 
195
195
  Output file:
196
- - Task file: .agents/workspace/active/{task-id}/task.md
196
+ - Task file: <task-workspace>/active/{task-id}/task.md
197
197
 
198
198
  Next step - run requirements analysis:
199
199
  {next-step-commands}
@@ -203,7 +203,7 @@ Next step - run requirements analysis:
203
203
 
204
204
  ## Completion Checklist
205
205
 
206
- - [ ] Created the task file `.agents/workspace/active/{task-id}/task.md`
206
+ - [ ] Created the task file `<task-workspace>/active/{task-id}/task.md`
207
207
  - [ ] Provider wrote the Issue identity to `platform_issue_identity` in task.md
208
208
  - [ ] Updated `current_step` to requirement-analysis
209
209
  - [ ] Updated `updated_at` to the current time