@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.
- package/bin/cli.ts +1 -1
- package/dist/bin/cli.js +1 -1
- package/dist/bin/internal-cli.js +6 -1
- package/dist/lib/agent-clients/adapters/codex-lifecycle/recovery.js +6 -6
- package/dist/lib/agent-clients/adapters/codex-lifecycle/store.js +8 -18
- package/dist/lib/agent-clients/adapters/codex-orchestration.js +1 -1
- package/dist/lib/decide.js +2 -7
- package/dist/lib/internal/cli-route-inventory.js +3 -0
- package/dist/lib/internal/manual-validation.js +19 -33
- package/dist/lib/internal/platform-comment.js +59 -9
- package/dist/lib/internal/task-activity.js +1 -12
- package/dist/lib/internal/task-event.js +1 -12
- package/dist/lib/internal/task-ledger.js +1 -12
- package/dist/lib/internal/task-operation-registry.js +2 -1
- package/dist/lib/internal/task-qualification.js +6 -15
- package/dist/lib/internal/task-review.js +3 -16
- package/dist/lib/internal/task-short-id.js +2 -1
- package/dist/lib/internal/task-verify.js +1 -11
- package/dist/lib/internal/task-warning.js +1 -12
- package/dist/lib/internal/task-workspace.js +43 -0
- package/dist/lib/merge.js +4 -3
- package/dist/lib/platform/issue-comments.js +373 -267
- package/dist/lib/platform/issue-summary-content.js +112 -0
- package/dist/lib/platform/pr-change-report.js +175 -26
- package/dist/lib/platform/pr-summary-content.js +54 -0
- package/dist/lib/platform/pr-summary.js +321 -296
- package/dist/lib/platform/pull-requests.js +3 -15
- package/dist/lib/platform/summary-content-pipeline.js +18 -0
- package/dist/lib/pr-review/evidence-grading.js +3 -2
- package/dist/lib/process-data/index.js +5 -4
- package/dist/lib/process-data/sources.js +6 -0
- package/dist/lib/run/index.js +3 -2
- package/dist/lib/sandbox/commands/create.js +5 -1
- package/dist/lib/sandbox/commands/enter.js +1 -1
- package/dist/lib/sandbox/commands/list-running.js +2 -1
- package/dist/lib/sandbox/control/client.js +8 -13
- package/dist/lib/sandbox/control/completed-reentry.js +2 -1
- package/dist/lib/sandbox/control/task-view.js +4 -2
- package/dist/lib/sandbox/mounts.js +4 -4
- package/dist/lib/sandbox/recovery.js +26 -16
- package/dist/lib/sandbox/removal.js +62 -12
- package/dist/lib/sandbox/task-resolver.js +9 -6
- package/dist/lib/sandbox/workspace-identity.js +6 -5
- package/dist/lib/sandbox/workspace-view.js +29 -22
- package/dist/lib/task/activity-intent.js +2 -12
- package/dist/lib/task/artifact-lifecycle.js +17 -11
- package/dist/lib/task/artifact-operations.js +41 -49
- package/dist/lib/task/capabilities.js +2 -2
- package/dist/lib/task/commands/ls.js +4 -3
- package/dist/lib/task/commands/status.js +1 -1
- package/dist/lib/task/commit-operation.js +6 -6
- package/dist/lib/task/control-authority.js +32 -32
- package/dist/lib/task/create-service.js +2 -4
- package/dist/lib/task/create.js +12 -65
- package/dist/lib/task/delegation-receipts.js +1 -1
- package/dist/lib/task/delivery.js +2 -8
- package/dist/lib/task/events.js +5 -31
- package/dist/lib/task/finalization.js +33 -29
- package/dist/lib/task/lifecycle.js +9 -48
- package/dist/lib/task/local-artifact-finalization.js +1 -2
- package/dist/lib/task/orchestration.js +24 -57
- package/dist/lib/task/platform-operation-recovery.js +87 -88
- package/dist/lib/task/resolve-ref.js +17 -12
- package/dist/lib/task/review-finalization.js +2 -35
- package/dist/lib/task/review-identity.js +3 -1
- package/dist/lib/task/short-id.js +10 -8
- package/dist/lib/task/verification-engine.js +19 -58
- package/dist/lib/task/workspace-root.js +59 -0
- package/dist/lib/task/workspace-snapshot.js +4 -3
- package/dist/lifecycle-build-manifest.json +3 -3
- package/lib/agent-clients/adapters/codex-lifecycle/recovery.ts +6 -6
- package/lib/agent-clients/adapters/codex-lifecycle/store.ts +8 -34
- package/lib/agent-clients/adapters/codex-orchestration.ts +1 -1
- package/lib/decide.ts +2 -7
- package/lib/internal/cli-route-inventory.ts +2 -0
- package/lib/internal/manual-validation.ts +20 -37
- package/lib/internal/platform-comment.ts +49 -6
- package/lib/internal/task-activity.ts +1 -10
- package/lib/internal/task-event.ts +1 -10
- package/lib/internal/task-ledger.ts +1 -10
- package/lib/internal/task-operation-registry.ts +2 -1
- package/lib/internal/task-qualification.ts +5 -11
- package/lib/internal/task-review.ts +3 -14
- package/lib/internal/task-short-id.ts +2 -1
- package/lib/internal/task-verify.ts +1 -9
- package/lib/internal/task-warning.ts +1 -10
- package/lib/internal/task-workspace.ts +39 -0
- package/lib/merge.ts +4 -3
- package/lib/platform/issue-comments.ts +478 -280
- package/lib/platform/issue-summary-content.ts +132 -0
- package/lib/platform/pr-change-report.ts +165 -20
- package/lib/platform/pr-summary-content.ts +60 -0
- package/lib/platform/pr-summary.ts +367 -269
- package/lib/platform/pull-requests.ts +3 -24
- package/lib/platform/summary-content-pipeline.ts +23 -0
- package/lib/pr-review/evidence-grading.ts +3 -2
- package/lib/process-data/index.ts +4 -3
- package/lib/process-data/sources.ts +6 -0
- package/lib/run/index.ts +3 -2
- package/lib/sandbox/commands/create.ts +5 -1
- package/lib/sandbox/commands/enter.ts +1 -1
- package/lib/sandbox/commands/list-running.ts +2 -1
- package/lib/sandbox/control/client.ts +7 -12
- package/lib/sandbox/control/completed-reentry.ts +2 -1
- package/lib/sandbox/control/task-view.ts +4 -2
- package/lib/sandbox/mounts.ts +4 -4
- package/lib/sandbox/recovery.ts +26 -18
- package/lib/sandbox/removal.ts +60 -27
- package/lib/sandbox/task-resolver.ts +9 -6
- package/lib/sandbox/workspace-identity.ts +6 -5
- package/lib/sandbox/workspace-view.ts +28 -20
- package/lib/task/activity-intent.ts +3 -17
- package/lib/task/artifact-lifecycle.ts +39 -11
- package/lib/task/artifact-operations.ts +28 -35
- package/lib/task/capabilities.ts +2 -2
- package/lib/task/commands/ls.ts +4 -3
- package/lib/task/commands/status.ts +1 -1
- package/lib/task/commit-operation.ts +5 -6
- package/lib/task/control-authority.ts +29 -35
- package/lib/task/create-service.ts +2 -4
- package/lib/task/create.ts +10 -51
- package/lib/task/delegation-receipts.ts +1 -1
- package/lib/task/delivery.ts +2 -10
- package/lib/task/events.ts +5 -32
- package/lib/task/finalization.ts +27 -30
- package/lib/task/lifecycle.ts +9 -50
- package/lib/task/local-artifact-finalization.ts +1 -4
- package/lib/task/orchestration.ts +31 -80
- package/lib/task/platform-operation-recovery.ts +70 -82
- package/lib/task/resolve-ref.ts +18 -12
- package/lib/task/review-finalization.ts +2 -52
- package/lib/task/review-identity.ts +3 -1
- package/lib/task/short-id.ts +10 -8
- package/lib/task/verification-engine.ts +20 -62
- package/lib/task/workspace-root.ts +78 -0
- package/lib/task/workspace-snapshot.ts +4 -3
- package/package.json +1 -1
- package/templates/.agents/QUICKSTART.en.md +19 -8
- package/templates/.agents/QUICKSTART.zh-CN.md +19 -8
- package/templates/.agents/README.en.md +10 -15
- package/templates/.agents/README.zh-CN.md +9 -13
- package/templates/.agents/rules/issue-sync.en.md +1 -1
- package/templates/.agents/rules/issue-sync.zh-CN.md +1 -1
- package/templates/.agents/rules/lifecycle-orchestration.en.md +1 -1
- package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +1 -1
- package/templates/.agents/rules/next-step-output.en.md +2 -2
- package/templates/.agents/rules/next-step-output.zh-CN.md +2 -2
- package/templates/.agents/rules/pr-sync.en.md +5 -3
- package/templates/.agents/rules/pr-sync.zh-CN.md +7 -10
- package/templates/.agents/rules/release-commands.en.md +3 -0
- package/templates/.agents/rules/release-commands.zh-CN.md +3 -0
- package/templates/.agents/rules/task-management.en.md +0 -2
- package/templates/.agents/rules/task-management.zh-CN.md +0 -2
- package/templates/.agents/rules/task-short-id.en.md +2 -2
- package/templates/.agents/rules/task-short-id.zh-CN.md +2 -2
- package/templates/.agents/scripts/task-short-id.js +2 -8
- package/templates/.agents/skills/analyze-task/SKILL.en.md +6 -6
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/analyze-task/config/verify.en.json +0 -1
- package/templates/.agents/skills/analyze-task/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/archive-tasks/SKILL.en.md +5 -5
- package/templates/.agents/skills/archive-tasks/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/archive-tasks/scripts/archive-tasks.sh +10 -2
- package/templates/.agents/skills/block-task/SKILL.en.md +4 -4
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/block-task/config/verify.json +0 -1
- package/templates/.agents/skills/cancel-task/SKILL.en.md +7 -7
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +7 -7
- package/templates/.agents/skills/cancel-task/config/verify.json +0 -1
- package/templates/.agents/skills/code-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/code-task/config/verify.en.json +0 -1
- package/templates/.agents/skills/code-task/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/code-task/reference/output-template.en.md +1 -1
- package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/SKILL.en.md +1 -1
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/config/verify.json +0 -1
- package/templates/.agents/skills/commit/reference/commit-orchestration.en.md +2 -2
- package/templates/.agents/skills/commit/reference/commit-orchestration.zh-CN.md +2 -2
- package/templates/.agents/skills/commit/reference/pr-summary-sync.en.md +2 -2
- package/templates/.agents/skills/commit/reference/pr-summary-sync.zh-CN.md +2 -2
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +2 -2
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/complete-manual-validation/config/verify.en.json +0 -1
- package/templates/.agents/skills/complete-manual-validation/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +3 -3
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +3 -3
- package/templates/.agents/skills/complete-task/SKILL.en.md +15 -30
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +17 -32
- package/templates/.agents/skills/complete-task/config/verify.en.json +0 -1
- package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/create-pr/SKILL.en.md +3 -3
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/create-pr/config/verify.json +0 -1
- package/templates/.agents/skills/create-pr/reference/change-report.en.md +10 -3
- package/templates/.agents/skills/create-pr/reference/change-report.zh-CN.md +10 -3
- package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +3 -3
- package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +3 -3
- package/templates/.agents/skills/create-release-note/SKILL.en.md +2 -2
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/create-task/SKILL.en.md +4 -22
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +4 -22
- package/templates/.agents/skills/create-task/config/verify.json +0 -1
- package/templates/.agents/skills/import-codescan/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-codescan/config/verify.json +0 -1
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +3 -3
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/import-dependabot/config/verify.json +0 -1
- package/templates/.agents/skills/import-issue/SKILL.en.md +5 -5
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/import-issue/config/verify.json +0 -1
- package/templates/.agents/skills/plan-task/SKILL.en.md +5 -5
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/plan-task/config/verify.en.json +0 -1
- package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/restore-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/restore-task/config/verify.json +0 -1
- package/templates/.agents/skills/review-analysis/SKILL.en.md +1 -1
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/review-analysis/config/verify.en.json +0 -1
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +5 -5
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +5 -5
- package/templates/.agents/skills/review-code/SKILL.en.md +2 -2
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +4 -4
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +4 -4
- package/templates/.agents/skills/review-plan/SKILL.en.md +1 -1
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/review-plan/config/verify.en.json +0 -1
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +5 -5
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +5 -5
- package/templates/.agents/skills/review-pr/SKILL.en.md +2 -2
- package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/review-pr/config/verify.en.json +0 -1
- package/templates/.agents/skills/review-pr/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/review-pr/reference/output-guidance.en.md +1 -1
- package/templates/.agents/skills/review-pr/reference/output-guidance.zh-CN.md +1 -1
- package/templates/.agents/skills/run-manual-validation/config/verify.en.json +0 -1
- package/templates/.agents/skills/run-manual-validation/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/run-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/test/SKILL.en.md +0 -3
- package/templates/.agents/skills/test/SKILL.zh-CN.md +0 -3
- package/templates/.agents/skills/test-integration/SKILL.en.md +0 -3
- package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +0 -3
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +13 -6
- package/templates/.agents/skills/upgrade-dependency/SKILL.en.md +0 -3
- package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +0 -3
- package/templates/.agents/skills/watch-pr/SKILL.en.md +4 -4
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/watch-pr/config/verify.json +0 -1
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.en.md +3 -3
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.zh-CN.md +3 -3
- package/templates/.agents/templates/handoff.en.md +1 -1
- package/templates/.agents/templates/handoff.zh-CN.md +1 -1
- package/templates/.agents/workflows/bug-fix.en.yaml +1 -1
- package/templates/.agents/workflows/feature-development.en.yaml +1 -1
- package/templates/.agents/workflows/refactoring.en.yaml +1 -1
- package/dist/lib/task/task-execution-lock.js +0 -250
- 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
|
-
检查任务是否存在于
|
|
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
|
-
在
|
|
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.
|
|
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
|
-
|
|
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
|
|
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`
|
|
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
|
-
-
|
|
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
|
-
- [ ]
|
|
229
|
-
- [ ]
|
|
230
|
-
- [ ]
|
|
231
|
-
- [ ] 告知了用户完成情况
|
|
226
|
+
- [ ] 满足了硬性前置条件并通过预完成门禁
|
|
227
|
+
- [ ] 宿主 finalization 返回 `result=completed` 或 `result=completed_with_warnings`
|
|
228
|
+
- [ ] 完成校验通过
|
|
229
|
+
- [ ] 已向用户报告结构化完成结果和适用的警告
|
|
232
230
|
|
|
233
231
|
## 注意事项
|
|
234
232
|
|
|
235
|
-
|
|
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
|
-
-
|
|
254
|
-
-
|
|
255
|
-
-
|
|
238
|
+
- 已完成:仅当存在匹配的 Complete Task Activity Log 时进入 `finalization-retry`;否则说明终态身份不完整并停止
|
|
239
|
+
- 任务被阻塞:满足记录的解除条件后,通过 `task-lifecycle activate` 恢复任务,再重试
|
|
240
|
+
- finalization 失败或阻塞:保留源数据和 receipt,根据结构化错误通过同一 finalization 入口恢复;不要手工改写终态或移动任务目录
|
|
@@ -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
|
|
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.
|
|
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
|
-
|
|
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}`,读取
|
|
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
|
|
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
|
-
|
|
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
|
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
27
|
+
生成 candidate 前,先根据任务目标和完整 diff 列出功能变化组;不得把文件职责概述或类别总数当作功能组。每个功能组作为现有 `change-composition` 检查中的 typed `groups[]` 对象,包含 `id`、`target`、`behaviorChange`、`necessity`、`files[]` 和 `tests:{coverage,cost}`。`rationale`/`Evidence[]` 仅补充判断和定位,不能替代组对象。
|
|
28
28
|
|
|
29
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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`,
|
|
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
|
-
-
|
|
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`
|
|
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
|
-
-
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
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
|
-
-
|
|
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
|
-
-
|
|
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
|
-
-
|
|
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
|
-
- [ ] 宿主创建了任务文件
|
|
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 并记录原因
|
|
@@ -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:
|
|
51
|
+
Directory: `<task-workspace>/active/TASK-{yyyyMMdd-HHmmss}/`
|
|
52
52
|
|
|
53
53
|
Task metadata:
|
|
54
54
|
```yaml
|
|
@@ -45,11 +45,11 @@ Extract key information:
|
|
|
45
45
|
|
|
46
46
|
### 2. Create the Task Directory and File
|
|
47
47
|
|
|
48
|
-
Check whether
|
|
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:
|
|
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:
|
|
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
|
-
检查
|
|
48
|
+
检查 `<task-workspace>/active/` 中是否已存在该告警的任务。
|
|
49
49
|
- 如果找到,**默认复用现有任务**,不询问用户;在最终告知中明确「已复用现有任务 `{task-id}`,未重新导入」。如需重新导入,需先归档/删除已有任务
|
|
50
50
|
- 如果未找到,创建新任务
|
|
51
51
|
|
|
52
|
-
|
|
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
|
-
-
|
|
119
|
+
- 任务文件:<task-workspace>/active/{task-id}/task.md
|
|
120
120
|
|
|
121
121
|
下一步:
|
|
122
122
|
{next-step-commands}
|
|
@@ -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
|
|
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:
|
|
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
|
|
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:
|
|
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
|
|
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
|