@fitlab-ai/agent-infra 0.11.15 → 0.12.0
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 +8 -16
- package/dist/lib/internal/platform-comment.js +3 -2
- 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/pr-summary.js +6 -15
- package/dist/lib/platform/pull-requests.js +3 -15
- 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 +3 -10
- 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 +17 -22
- 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 +1 -2
- 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 +8 -19
- package/lib/internal/platform-comment.ts +3 -2
- 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/pr-summary.ts +7 -16
- package/lib/platform/pull-requests.ts +3 -24
- 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 +3 -26
- 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 +16 -24
- 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 +1 -2
- 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 +1 -1
- package/templates/.agents/rules/pr-sync.zh-CN.md +1 -1
- 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 +6 -6
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +6 -6
- 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 +1 -1
- package/templates/.agents/skills/commit/reference/pr-summary-sync.zh-CN.md +1 -1
- 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 +1 -1
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +1 -1
- package/templates/.agents/skills/complete-task/SKILL.en.md +7 -7
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +8 -8
- 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 +1 -1
- package/templates/.agents/skills/create-pr/reference/change-report.zh-CN.md +1 -1
- package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +1 -1
- package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +1 -1
- 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 -4
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +4 -4
- 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 +3 -3
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/watch-pr/config/verify.json +0 -1
- 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
|
@@ -4,6 +4,6 @@ Run only when `{task-id}` is valid and task.md has a `bound/verified` `pr_delive
|
|
|
4
4
|
|
|
5
5
|
1. Run `agent-infra-internal platform-pr summary-context {task-id}` to obtain canonical inputs and report status; rebuild a stale/missing sidecar through the `change-report` flow for the current head.
|
|
6
6
|
2. Generate the plain summary body per `.agents/rules/pr-sync.md`, with exactly one `<!-- canonical-pr-change-report -->` placeholder, and write it to a temporary file.
|
|
7
|
-
3. Run `agent-infra-internal platform-pr summary-sync {task-id} --agent {standard-agent-token} --body-file {summary-body-file} --change-report-file
|
|
7
|
+
3. Run `agent-infra-internal platform-pr summary-sync {task-id} --agent {standard-agent-token} --body-file {summary-body-file} --change-report-file <task-workspace>/active/{task-id}/pr-change-report.json --result no_op`. The commit path only synchronizes an existing PR summary and neither creates nor reuses a PR, so `no_op` explicitly represents the unchanged PR identity.
|
|
8
8
|
|
|
9
9
|
Failure records a warning but never blocks or rolls back the completed commit. `no-op` maps to `summary skipped (no diff)`.
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
1. 调用 `agent-infra-internal platform-pr summary-context {task-id}` 获取 canonical 聚合输入和报告状态;sidecar stale/missing 时先按 `change-report` 流程重建当前 head 报告。
|
|
6
6
|
2. 按 `.agents/rules/pr-sync.md` 生成只含一次 `<!-- canonical-pr-change-report -->` 的纯摘要正文并写入临时文件。
|
|
7
|
-
3. 调用 `agent-infra-internal platform-pr summary-sync {task-id} --agent {standard-agent-token} --body-file {summary-body-file} --change-report-file
|
|
7
|
+
3. 调用 `agent-infra-internal platform-pr summary-sync {task-id} --agent {standard-agent-token} --body-file {summary-body-file} --change-report-file <task-workspace>/active/{task-id}/pr-change-report.json --result no_op`。commit 路径只同步已有 PR 摘要,不创建或复用 PR,因此固定使用 `no_op` 表示 PR 身份未变化。
|
|
8
8
|
|
|
9
9
|
同步失败只记录 warning,不阻塞或回滚已经完成的 commit。`no-op` 回传 `summary skipped (no diff)`。
|
|
@@ -59,7 +59,7 @@ complete-manual-validation [--task <ref> | -t <ref>] [{pr-ref}] {verification-su
|
|
|
59
59
|
### 2. Verify Prerequisites
|
|
60
60
|
|
|
61
61
|
Check:
|
|
62
|
-
-
|
|
62
|
+
- `<task-workspace>/active/{task-id}/task.md`
|
|
63
63
|
- a valid PR: prefer explicit `{pr-ref}`, otherwise read verified `pr_delivery_fact.identity.number` from task.md frontmatter
|
|
64
64
|
|
|
65
65
|
Stop if the task is missing, the validation summary is missing, or no valid PR can be resolved.
|
|
@@ -96,7 +96,7 @@ Follow `reference/summary-update.md` to validate the PR binding, obtain canonica
|
|
|
96
96
|
```bash
|
|
97
97
|
agent-infra-internal manual-validation transaction {task-id} \
|
|
98
98
|
--artifact {manual-validation-artifact} \
|
|
99
|
-
--summary-file {summary-body-file} --change-report-file
|
|
99
|
+
--summary-file {summary-body-file} --change-report-file <task-workspace>/active/{task-id}/pr-change-report.json \
|
|
100
100
|
--agent {standard-agent-token} --result no_op
|
|
101
101
|
```
|
|
102
102
|
|
|
@@ -59,7 +59,7 @@ complete-manual-validation [--task <ref> | -t <ref>] [{pr-ref}] {verification-su
|
|
|
59
59
|
### 2. 验证前置条件
|
|
60
60
|
|
|
61
61
|
检查:
|
|
62
|
-
-
|
|
62
|
+
- `<task-workspace>/active/{task-id}/task.md`
|
|
63
63
|
- 有效 PR:优先使用显式 `{pr-ref}`,否则读取 task.md frontmatter 的 verified `pr_delivery_fact.identity.number`
|
|
64
64
|
|
|
65
65
|
如果任务不存在、验证说明缺失,或无法解析有效 PR,立即停止。
|
|
@@ -96,7 +96,7 @@ prepare 必须先幂等登记 `manual-validation.started`,再写入 prepared t
|
|
|
96
96
|
```bash
|
|
97
97
|
agent-infra-internal manual-validation transaction {task-id} \
|
|
98
98
|
--artifact {manual-validation-artifact} \
|
|
99
|
-
--summary-file {summary-body-file} --change-report-file
|
|
99
|
+
--summary-file {summary-body-file} --change-report-file <task-workspace>/active/{task-id}/pr-change-report.json \
|
|
100
100
|
--agent {standard-agent-token} --result no_op
|
|
101
101
|
```
|
|
102
102
|
|
|
@@ -19,7 +19,7 @@ agent-infra-internal manual-validation transaction {task-id} --prepare \
|
|
|
19
19
|
agent-infra-internal manual-validation transaction {task-id} \
|
|
20
20
|
--artifact {manual-validation-artifact} \
|
|
21
21
|
--summary-file {summary-body-file} \
|
|
22
|
-
--change-report-file
|
|
22
|
+
--change-report-file <task-workspace>/active/{task-id}/pr-change-report.json \
|
|
23
23
|
--agent {standard-agent-token} --result no_op
|
|
24
24
|
```
|
|
25
25
|
|
package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md
CHANGED
|
@@ -19,7 +19,7 @@ agent-infra-internal manual-validation transaction {task-id} --prepare \
|
|
|
19
19
|
agent-infra-internal manual-validation transaction {task-id} \
|
|
20
20
|
--artifact {manual-validation-artifact} \
|
|
21
21
|
--summary-file {summary-body-file} \
|
|
22
|
-
--change-report-file
|
|
22
|
+
--change-report-file <task-workspace>/active/{task-id}/pr-change-report.json \
|
|
23
23
|
--agent {standard-agent-token} --result no_op
|
|
24
24
|
```
|
|
25
25
|
|
|
@@ -50,7 +50,7 @@ On the normal path, complete business updates, platform sync, and the pre-comple
|
|
|
50
50
|
|
|
51
51
|
### 1. Verify Task Exists
|
|
52
52
|
|
|
53
|
-
Check that the task exists in
|
|
53
|
+
Check that the task exists in `<task-workspace>/active/{task-id}/`.
|
|
54
54
|
|
|
55
55
|
Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, e.g. `TASK-20260306-143022`
|
|
56
56
|
|
|
@@ -102,7 +102,7 @@ Run /create-pr --task {task-ref} first, then complete; --skip-pr is not accepted
|
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
Before lifecycle, verify only the hard gates:
|
|
105
|
-
- [ ] Task identity, active
|
|
105
|
+
- [ ] Task identity, active-state validation, and local atomic lifecycle operations are available
|
|
106
106
|
- [ ] Required-PR delivery is satisfied when `prFlow=required`
|
|
107
107
|
- [ ] Other business evidence (workflow, review, commit, tests, disagreement ledger, manual validation, and platform sync) is recorded or can be checked after lifecycle; manual validation requires a committed transaction, receipt, current artifact digest, and an identity-bearing completion log
|
|
108
108
|
|
|
@@ -174,11 +174,11 @@ agent-infra-internal task-verify {task-id} complete-task.preflight --format text
|
|
|
174
174
|
|
|
175
175
|
Present the verification summary per `.agents/rules/validation-output.md`, retaining necessary failure, blocked, and soft-warning diagnostics.
|
|
176
176
|
|
|
177
|
-
This event runs only the required-PR delivery hard preflight; host finalization still enforces identity
|
|
177
|
+
This event runs only the required-PR delivery hard preflight; host finalization still enforces identity validation and local atomicity before lifecycle. Peripheral review/manual/platform checks run through `complete-task.completed` after lifecycle and are projected as warning/pending steps. On a hard-gate non-zero exit (fail/blocked), keep the task active, record the stable code/target, and stop.
|
|
178
178
|
|
|
179
179
|
If a summary must mirror a human-decided `post-review-commit` exemption, make a best-effort sync in Step 4 with the original failure code/message, PRC id/evidence, and ruling details. A sync failure records `SUMMARY_SYNC_FAILED` and still allows lifecycle; terminal verification decides the final state.
|
|
180
180
|
|
|
181
|
-
`--force` cannot lift identity
|
|
181
|
+
`--force` cannot lift identity validation, local atomicity, or required-PR hard gates; failures there must stop. Other review, manual-validation, and platform evidence is recorded by terminal verification as warning/pending and can be repaired by retrying.
|
|
182
182
|
|
|
183
183
|
### 6. Run the Host Finalization Entry Point
|
|
184
184
|
|
|
@@ -209,7 +209,7 @@ Task {task-id} completed; task directory moved to completed/.
|
|
|
209
209
|
Task info:
|
|
210
210
|
- Title: {title}
|
|
211
211
|
- Completed at: {timestamp}
|
|
212
|
-
- Target path:
|
|
212
|
+
- Target path: <task-workspace>/completed/{task-id}/
|
|
213
213
|
|
|
214
214
|
Deliverables:
|
|
215
215
|
- {List of key outputs: files modified, tests added, etc.}
|
|
@@ -227,7 +227,7 @@ ai sandbox rm {task-id} # or use the task's retained short id
|
|
|
227
227
|
|
|
228
228
|
- [ ] Verified all workflow steps are complete
|
|
229
229
|
- [ ] Updated task.md with completed status and timestamp
|
|
230
|
-
- [ ] Moved task directory to
|
|
230
|
+
- [ ] Moved task directory to `<task-workspace>/completed/`
|
|
231
231
|
- [ ] Verified move succeeded
|
|
232
232
|
- [ ] Informed user of completion
|
|
233
233
|
|
|
@@ -242,7 +242,7 @@ ai sandbox rm {task-id} # or use the task's retained short id
|
|
|
242
242
|
|
|
243
243
|
2. **Rollback**: If a task was incorrectly moved:
|
|
244
244
|
```bash
|
|
245
|
-
mv
|
|
245
|
+
mv <task-workspace>/completed/{task-id} <task-workspace>/active/{task-id}
|
|
246
246
|
```
|
|
247
247
|
Then update task.md status back to `active`.
|
|
248
248
|
|
|
@@ -49,7 +49,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
49
49
|
## 执行步骤
|
|
50
50
|
### 1. 验证任务存在
|
|
51
51
|
|
|
52
|
-
检查任务是否存在于
|
|
52
|
+
检查任务是否存在于 `<task-workspace>/active/{task-id}/`。
|
|
53
53
|
|
|
54
54
|
注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
|
|
55
55
|
|
|
@@ -101,7 +101,7 @@ agent-infra-internal platform-pr resolve-external {task-id} --agent {standard-ag
|
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
生命周期前只验证硬门禁:
|
|
104
|
-
- [ ] task 身份、active
|
|
104
|
+
- [ ] task 身份、active 状态校验和本地原子生命周期操作可用
|
|
105
105
|
- [ ] `prFlow=required` 时已满足 required-PR delivery
|
|
106
106
|
- [ ] 其余业务证据(工作流、审查、提交、测试、分歧账本、人工校验和平台同步)已记录或可在生命周期后校验;人工验证只能由 committed transaction、receipt、当前 artifact 摘要和带 identity 的通过日志满足
|
|
107
107
|
|
|
@@ -125,7 +125,7 @@ Please satisfy the hard prerequisite first, then retry complete-task.
|
|
|
125
125
|
|
|
126
126
|
### 3. 完成业务内容更新
|
|
127
127
|
|
|
128
|
-
在
|
|
128
|
+
在 `<task-workspace>/active/{task-id}/task.md` 中只更新生命周期核心不负责的业务内容:
|
|
129
129
|
- 新增或更新 `## 状态核对` 段,记录第 0 步审计命令、任务/产物范围、关键结果和未覆盖部分;正常成功不复制完整目录清单或 `task.md` 尾部,失败、阻塞、身份不一致或争议时附决定性原文行,放在 `## 活动日志` 之前
|
|
130
130
|
- 标记所有工作流步骤为已完成
|
|
131
131
|
- 逐项验证并勾选 `## 完成检查清单` 中的所有条目(将 `- [ ]` 改为 `- [x]`)
|
|
@@ -173,11 +173,11 @@ agent-infra-internal task-verify {task-id} complete-task.preflight --format text
|
|
|
173
173
|
|
|
174
174
|
按 `.agents/rules/validation-output.md` 展示当次校验摘要;失败、阻塞和软警告保留必要诊断。
|
|
175
175
|
|
|
176
|
-
该事件只执行 required-PR delivery hard preflight
|
|
176
|
+
该事件只执行 required-PR delivery hard preflight;身份校验和本地原子性仍由宿主 finalization 强制执行。外围 review/manual/platform 检查在 lifecycle 后由 `complete-task.completed` 处理,并投影为 warning/pending steps。硬门禁退出码非 0(fail/blocked)时,任务继续留在 active,记录稳定 code/target 后停止。
|
|
177
177
|
|
|
178
178
|
若需要在摘要中镜像 `post-review-commit` 的 human-decided exemption,在步骤 4 尽力同步原始 failure code/message、PRC id/evidence 和裁决信息;同步失败只记录 `SUMMARY_SYNC_FAILED` warning,仍继续生命周期。最终是否完成由生命周期后的 terminal verification 决定。
|
|
179
179
|
|
|
180
|
-
`--force`
|
|
180
|
+
`--force` 不能解除身份校验、本地原子性或 required-PR hard gate;这些能力失败时必须停止。其余审查、人工校验和平台证据由 terminal verification 记录为 warning/pending,并通过后续重试恢复。
|
|
181
181
|
|
|
182
182
|
### 6. 执行宿主 finalization 入口
|
|
183
183
|
|
|
@@ -208,7 +208,7 @@ complete 保留短号映射。它只会在受管 sandbox 清理确认容器已
|
|
|
208
208
|
任务信息:
|
|
209
209
|
- 标题:{title}
|
|
210
210
|
- 完成时间:{timestamp}
|
|
211
|
-
-
|
|
211
|
+
- 目标路径:<task-workspace>/completed/{task-id}/
|
|
212
212
|
|
|
213
213
|
交付物:
|
|
214
214
|
- {关键产出列表:修改的文件、添加的测试等}
|
|
@@ -226,7 +226,7 @@ ai sandbox rm {task-id} # 或使用本任务仍保留的短号
|
|
|
226
226
|
|
|
227
227
|
- [ ] 验证了所有工作流步骤已完成
|
|
228
228
|
- [ ] 更新了 task.md 的完成状态和时间戳
|
|
229
|
-
- [ ] 将任务目录移动到
|
|
229
|
+
- [ ] 将任务目录移动到 `<task-workspace>/completed/`
|
|
230
230
|
- [ ] 验证了转移成功
|
|
231
231
|
- [ ] 告知了用户完成情况
|
|
232
232
|
|
|
@@ -241,7 +241,7 @@ ai sandbox rm {task-id} # 或使用本任务仍保留的短号
|
|
|
241
241
|
|
|
242
242
|
2. **回滚**:如果任务被错误转移:
|
|
243
243
|
```bash
|
|
244
|
-
mv
|
|
244
|
+
mv <task-workspace>/completed/{task-id} <task-workspace>/active/{task-id}
|
|
245
245
|
```
|
|
246
246
|
然后将 task.md 中的状态改回 `active`。
|
|
247
247
|
|
|
@@ -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
|
-
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
|
|
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 <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
|
-
基于这些产物聚合 reviewer 摘要,正文只放一次 `<!-- canonical-pr-change-report -->` 占位符,再使用隐藏标记维护唯一且幂等的摘要评论。调用 `summary-sync` 时传入 `--change-report-file
|
|
89
|
+
基于这些产物聚合 reviewer 摘要,正文只放一次 `<!-- canonical-pr-change-report -->` 占位符,再使用隐藏标记维护唯一且幂等的摘要评论。调用 `summary-sync` 时传入 `--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
|
|
|
@@ -65,4 +65,4 @@ Briefly explain:
|
|
|
65
65
|
- 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
66
|
- when a test fixture is much larger than production changes, what risk it covers instead of judging it only by size.
|
|
67
67
|
|
|
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
|
|
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 <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.
|
|
@@ -65,4 +65,4 @@ canonical 汇总中的固定分类把 `docs/`、Markdown/MDX/reStructuredText
|
|
|
65
65
|
- 是否存在与 PR 目标无法直接对应、疑似不必要的变化;若没有,明确说明判断依据;每项结论必须给出文件和行号证据;
|
|
66
66
|
- 若某个测试 fixture 明显大于生产改动,解释它覆盖的风险,而不是仅以行数评价。
|
|
67
67
|
|
|
68
|
-
调用方不要自行写入 `### PR 代码增减`。把恰好包含一次 `<!-- canonical-pr-change-report -->` 的普通摘要正文交给 `summary-sync --change-report-file
|
|
68
|
+
调用方不要自行写入 `### 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 评论。
|
|
@@ -7,7 +7,7 @@ Write the plain summary body, containing exactly one `<!-- canonical-pr-change-r
|
|
|
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
|
|
|
@@ -7,7 +7,7 @@
|
|
|
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
|
|
|
@@ -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` 为键
|
|
@@ -180,7 +180,7 @@ Task information:
|
|
|
180
180
|
- Issue: #{issue-number} {issue_url}
|
|
181
181
|
|
|
182
182
|
Output file:
|
|
183
|
-
- Task file:
|
|
183
|
+
- Task file: <task-workspace>/active/{task-id}/task.md
|
|
184
184
|
|
|
185
185
|
Next step - run requirements analysis:
|
|
186
186
|
{next-step-commands}
|
|
@@ -199,7 +199,7 @@ Task information:
|
|
|
199
199
|
- Workflow: {workflow}
|
|
200
200
|
|
|
201
201
|
Output file:
|
|
202
|
-
- Task file:
|
|
202
|
+
- Task file: <task-workspace>/active/{task-id}/task.md
|
|
203
203
|
|
|
204
204
|
Next step - run requirements analysis:
|
|
205
205
|
{next-step-commands}
|
|
@@ -223,7 +223,7 @@ Issue creation failed:
|
|
|
223
223
|
- Local task.md was kept and not rolled back
|
|
224
224
|
|
|
225
225
|
Output file:
|
|
226
|
-
- Task file:
|
|
226
|
+
- Task file: <task-workspace>/active/{task-id}/task.md
|
|
227
227
|
|
|
228
228
|
Next step - run requirements analysis:
|
|
229
229
|
{next-step-commands}
|
|
@@ -239,7 +239,7 @@ For later platform sync: after fixing auth / network / template issues, manually
|
|
|
239
239
|
## Completion Checklist
|
|
240
240
|
|
|
241
241
|
- [ ] Wrote one candidate and invoked `agent-infra-internal task-create`
|
|
242
|
-
- [ ] The host created
|
|
242
|
+
- [ ] The host created `<task-workspace>/active/{task-id}/task.md`
|
|
243
243
|
- [ ] Wrote and checked `## Task Input` source and state semantics according to `reference/context-capture.md`
|
|
244
244
|
- [ ] The returned task id and short id passed completion verification
|
|
245
245
|
- [ ] Tried cascading Issue creation through `.agents/rules/create-issue.md`; if it failed, kept task.md and recorded the reason
|
|
@@ -177,7 +177,7 @@ agent-infra-internal task-verify {task-id} create-task.completed --format text
|
|
|
177
177
|
- Issue:#{issue-number} {issue_url}
|
|
178
178
|
|
|
179
179
|
产出文件:
|
|
180
|
-
-
|
|
180
|
+
- 任务文件:<task-workspace>/active/{task-id}/task.md
|
|
181
181
|
|
|
182
182
|
下一步 - 执行需求分析:
|
|
183
183
|
{next-step-commands}
|
|
@@ -196,7 +196,7 @@ agent-infra-internal task-verify {task-id} create-task.completed --format text
|
|
|
196
196
|
- 工作流:{workflow}
|
|
197
197
|
|
|
198
198
|
产出文件:
|
|
199
|
-
-
|
|
199
|
+
- 任务文件:<task-workspace>/active/{task-id}/task.md
|
|
200
200
|
|
|
201
201
|
下一步 - 执行需求分析:
|
|
202
202
|
{next-step-commands}
|
|
@@ -220,7 +220,7 @@ Issue 创建失败:
|
|
|
220
220
|
- 本地 task.md 已保留,未回滚
|
|
221
221
|
|
|
222
222
|
产出文件:
|
|
223
|
-
-
|
|
223
|
+
- 任务文件:<task-workspace>/active/{task-id}/task.md
|
|
224
224
|
|
|
225
225
|
下一步 - 执行需求分析:
|
|
226
226
|
{next-step-commands}
|
|
@@ -236,7 +236,7 @@ Issue 创建失败:
|
|
|
236
236
|
## 完成检查清单
|
|
237
237
|
|
|
238
238
|
- [ ] 只生成一次结构化 candidate 并调用 `agent-infra-internal task-create`
|
|
239
|
-
- [ ] 宿主创建了任务文件
|
|
239
|
+
- [ ] 宿主创建了任务文件 `<task-workspace>/active/{task-id}/task.md`
|
|
240
240
|
- [ ] 已按 `reference/context-capture.md` 写入并复核 `## 任务输入` 的来源与状态语义
|
|
241
241
|
- [ ] 响应中的任务 ID 和短号已通过完成校验
|
|
242
242
|
- [ ] 已按 `.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
|