@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
|
@@ -19,6 +19,9 @@ The result contains `history`, `pullRequests`, `closingIssues`, and commit `auth
|
|
|
19
19
|
- Render an identity as `@login` only when `resolution` is `platform-user` or `platform-noreply` and `login` is non-empty.
|
|
20
20
|
- Exclude `resolution: unresolved` identities from the release-note contributor list. Never infer a login from a name, email address, domain, brand, or same-named platform account, and never substitute a guessed personal or organization account.
|
|
21
21
|
- Do not publish unresolved identity emails or identity-verification TODOs in Release notes. Record any required investigation outside the release workflow without creating a platform mention.
|
|
22
|
+
- Use plain-text `@login` mentions in Release notes; do not wrap mentions in Markdown links.
|
|
23
|
+
- **Dependabot-specific normalization**: Typed context may return the same Dependabot automation account as `app/dependabot` or `dependabot[bot]`. For these resolved identities, render release-note items and Contributors as plain-text `@dependabot`, and merge counts under the normalized `@dependabot`. Do not output `@app/dependabot` or `@dependabot[bot]`, and do not turn `@dependabot` into a Markdown link.
|
|
24
|
+
- This Dependabot mapping is an explicit exception for this project's Release notes. Use the typed `login` for all other identities; do not infer mappings from brands or similar names.
|
|
22
25
|
|
|
23
26
|
## Stage Release Notes
|
|
24
27
|
|
|
@@ -19,6 +19,9 @@ agent-infra-internal platform-release-notes context \
|
|
|
19
19
|
- 只有 `resolution` 为 `platform-user` 或 `platform-noreply` 且 `login` 非空的身份可以渲染为 `@login`。
|
|
20
20
|
- `resolution: unresolved` 的身份不得进入发布说明的贡献者列表;不得从 Name、邮箱、域名、品牌或同名平台账号推断 login,也不得替换成推测的个人或组织账号。
|
|
21
21
|
- 不得把未解析身份的邮箱或身份确认 TODO 写入可发布的 Release notes。需要调查时仅在发布流程外记录,不得产生平台 mention。
|
|
22
|
+
- Release notes 中的 mention 使用纯文本 `@login`,不要用 Markdown 链接包装 mention。
|
|
23
|
+
- **Dependabot 专用规范化**:typed context 可能将同一 Dependabot 自动化账号返回为 `app/dependabot` 或 `dependabot[bot]`。对于 `resolution` 已解析的这些身份,发布说明条目和 Contributors 统一使用纯文本 `@dependabot`;按规范化后的 `@dependabot` 合并计数。不要输出 `@app/dependabot` 或 `@dependabot[bot]`,也不要把 `@dependabot` 改成 Markdown 链接。
|
|
24
|
+
- 该 Dependabot 映射是本项目发布说明的明确例外;其他身份继续使用 typed `login`,不得按品牌或相似名称类推。
|
|
22
25
|
|
|
23
26
|
## Stage Release notes
|
|
24
27
|
|
|
@@ -86,8 +86,6 @@ Other skills continue past deferrable writes according to their local delivery g
|
|
|
86
86
|
|
|
87
87
|
**Human counts** (`ai task log`): review step rows fold two human counts into the NOTE verdict text, comma-separated, right after `blockers/major/minor`, with fixed English labels `Manual-validation: {e}, Human-decision: {h}`. `Human-decision` (`{h}`) maps canonical step prefixes (`Review Analysis` / `Review Plan` / `Review Code`) to `analysis` / `plan` / `code`, then counts current pending rows in `## Review Disagreement Ledger` / `## 审查分歧账本` for that stage with `status = needs-human-decision`, excluding rows already marked `human-decided`. `Manual-validation` (`{e}`) parses the `Manual-validation: {n}` source field from the review done note (normalized to the same field when displayed), defaulting to `0`. Non-review rows carry no human counts.
|
|
88
88
|
|
|
89
|
-
**Gate** (`checkActivityLog`): when computing the "latest action / freshness" it skips `[started]` lines (ascending-order and format checks still cover every line), so a started marker never satisfies a skill's `expected_action_pattern`.
|
|
90
|
-
|
|
91
89
|
**Skills that write started**: every workflow skill that **appends entries to a task's `## Activity Log`** writes started, so the STARTED column stays uniformly complete across the whole `ai task log` table. Two forms, depending on whether task.md already exists:
|
|
92
90
|
|
|
93
91
|
- **Standard form (task.md already exists)** — append the started line when that round's real work begins (after prerequisites, before the first artifact action) and the done line on completion:
|
|
@@ -89,8 +89,6 @@
|
|
|
89
89
|
|
|
90
90
|
**人工计数**(`ai task log`):审查步骤行把两项人工计数并入 NOTE 的 verdict 文本,逗号分隔、紧随 `blockers/major/minor`,固定英文标签 `Manual-validation: {e}, Human-decision: {h}`。`Human-decision`(`{h}`)按 canonical 步骤名前缀(`Review Analysis` / `Review Plan` / `Review Code`)映射到 `analysis` / `plan` / `code`,统计 `## 审查分歧账本` 中对应阶段 `status = needs-human-decision` 的当前待裁决数量,不包含已 `human-decided` 的行;`Manual-validation`(`{e}`)解析 review done note 中的 `Manual-validation: {n}` 源字段(展示时归一化为同一字段),缺失为 `0`。非审查步骤不附加人工计数。
|
|
91
91
|
|
|
92
|
-
**gate**(`checkActivityLog`):计算「最新 action / freshness」时跳过 `[started]` 行(升序与格式校验仍覆盖全部行),故 started 标记不会污染各 SKILL 的 `expected_action_pattern`。
|
|
93
|
-
|
|
94
92
|
**写 started 的 SKILL**:所有**会向某个任务的 `## 活动日志` 追加条目**的工作流 SKILL 都写 started,保证 `ai task log` 整张表的 STARTED 列一致完整。两种写法按技能是否已有 task.md 区分:
|
|
95
93
|
|
|
96
94
|
- **常规写法(task.md 已存在)**——在「该轮实质工作开始时」(前置条件确认后、第一个产出动作前)追加 started 行,完成时写 done 行:
|
|
@@ -87,9 +87,9 @@ fi
|
|
|
87
87
|
## Storage
|
|
88
88
|
|
|
89
89
|
Short ids are pure local state, persisted only in the registry
|
|
90
|
-
|
|
90
|
+
`<task-workspace>/active/.short-ids.json`; task.md does not hold the short id:
|
|
91
91
|
|
|
92
|
-
- Path: `<
|
|
92
|
+
- Path: `<task-workspace>/active/.short-ids.json`
|
|
93
93
|
- Schema: `{ "version": 1, "ids": { "01": "TASK-20260609-192644", "02": "TASK-…" } }`
|
|
94
94
|
- Keys are zero-padded decimal strings of `task.shortIdLength` digits; values are
|
|
95
95
|
full `TASK-…` task ids.
|
|
@@ -75,9 +75,9 @@ fi
|
|
|
75
75
|
|
|
76
76
|
## 存储位置
|
|
77
77
|
|
|
78
|
-
短号是纯本地状态,唯一持久化在注册表
|
|
78
|
+
短号是纯本地状态,唯一持久化在注册表 `<task-workspace>/active/.short-ids.json`,task.md 不持有短号:
|
|
79
79
|
|
|
80
|
-
- 路径:`<
|
|
80
|
+
- 路径:`<task-workspace>/active/.short-ids.json`
|
|
81
81
|
- Schema:`{ "version": 1, "ids": { "01": "TASK-20260609-192644", "02": "TASK-…" } }`
|
|
82
82
|
- key 是零填充到 `task.shortIdLength` 位的字符串,value 是完整 `TASK-…` task id
|
|
83
83
|
- 自动 git ignore(active 工作区整体 ignore;无需新增 ignore 条目)
|
|
@@ -57,22 +57,16 @@ if (args.includes("--help") || args.includes("-h")) {
|
|
|
57
57
|
}
|
|
58
58
|
const repoRoot = findRepoRoot(process.cwd());
|
|
59
59
|
const forwarded = [...args];
|
|
60
|
-
if (!forwarded.includes("--active-dir")) {
|
|
61
|
-
if (!repoRoot) {
|
|
62
|
-
fs.writeSync(2, "Error: cannot determine active task directory\n");
|
|
63
|
-
process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
forwarded.push("--active-dir", path.join(repoRoot, ".agents", "workspace", "active"));
|
|
66
|
-
}
|
|
67
60
|
if (!forwarded.includes("--short-id-length")) {
|
|
68
61
|
forwarded.push("--short-id-length", String(configuredWidth(repoRoot)));
|
|
69
62
|
}
|
|
70
63
|
const sourceCli = findSourceCli();
|
|
71
64
|
const installedCli = resolveCommand("agent-infra-internal");
|
|
72
65
|
const child = sourceCli
|
|
73
|
-
? spawnSync(process.execPath, ["--experimental-strip-types", sourceCli, "task-short-id", ...forwarded], { encoding: "utf8" })
|
|
66
|
+
? spawnSync(process.execPath, ["--experimental-strip-types", sourceCli, "task-short-id", ...forwarded], { cwd: repoRoot || process.cwd(), encoding: "utf8" })
|
|
74
67
|
: spawnSync(installedCli, ["task-short-id", ...forwarded], {
|
|
75
68
|
encoding: "utf8",
|
|
69
|
+
cwd: repoRoot || process.cwd(),
|
|
76
70
|
shell: process.platform === "win32" && /\.(?:bat|cmd)$/i.test(installedCli)
|
|
77
71
|
});
|
|
78
72
|
if (child.error) {
|
|
@@ -57,7 +57,7 @@ After resolving the artifact context and before this round's first artifact acti
|
|
|
57
57
|
### 1. Verify Prerequisites
|
|
58
58
|
|
|
59
59
|
Check required files:
|
|
60
|
-
-
|
|
60
|
+
- `<task-workspace>/active/{task-id}/task.md` - Task file
|
|
61
61
|
|
|
62
62
|
Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
|
|
63
63
|
|
|
@@ -119,7 +119,7 @@ Runs after Step 0 state check and Step 3 (questioning is an external-state actio
|
|
|
119
119
|
- otherwise (no pending question) → pick the single highest-value question (acceptance criteria > scope > ambiguity) and write `## Brainstorming`: `status: asking`, `pending_question: <question>`, `question_count += 1`.
|
|
120
120
|
2. If `start_date` is empty, write today (`date +%F`), then run `agent-infra-internal task-event {task-id} analyze.awaiting-input --agent {standard-agent-token} --question {question_count}` so the core updates base metadata and Activity Log.
|
|
121
121
|
3. Issue sync (when a valid `platform_issue_identity` exists, skip on any failure): run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` to update only the **task comment**; keep the `status` label at `pending-design-work`; do **not** publish an analysis artifact comment.
|
|
122
|
-
4. Verification (replaces the step 8 artifact gate): `agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text` (the early-exit set `current_step: requirement-analysis` and wrote `start_date`, so it should pass); also keep `rg -n 'Analyze Task \(Brainstorming\)'
|
|
122
|
+
4. Verification (replaces the step 8 artifact gate): `agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text` (the early-exit set `current_step: requirement-analysis` and wrote `start_date`, so it should pass); also keep `rg -n 'Analyze Task \(Brainstorming\)' <task-workspace>/active/{task-id}/task.md` and the task-comment sync evidence. Do **not** run the artifact gate, nor `check activity-log` / `check platform-sync` (both bind to the analysis artifact path).
|
|
123
123
|
5. User output: show only the current **single question** plus how to answer/continue (re-trigger `analyze-task {task-ref}` with the answer).
|
|
124
124
|
6. **STOP** and wait for the answer. The next trigger returns to this step.
|
|
125
125
|
|
|
@@ -148,7 +148,7 @@ The skeleton contains identity metadata, stable section markers, and required he
|
|
|
148
148
|
|
|
149
149
|
> Steps 6–9 are the **Scenario A (normal output)** path. **Scenario B (ask and early-exit)** already finished its state update, task-comment sync, and verification inside step 4 and STOPped, so it does not enter these steps.
|
|
150
150
|
|
|
151
|
-
Create
|
|
151
|
+
Create `<task-workspace>/active/{task-id}/{analysis-artifact}`.
|
|
152
152
|
|
|
153
153
|
## Output Template
|
|
154
154
|
|
|
@@ -221,7 +221,7 @@ Create `.agents/workspace/active/{task-id}/{analysis-artifact}`.
|
|
|
221
221
|
|
|
222
222
|
### 7. Update Task Status
|
|
223
223
|
|
|
224
|
-
Update
|
|
224
|
+
Update `<task-workspace>/active/{task-id}/task.md`:
|
|
225
225
|
- Record the analysis artifact for this round: `{analysis-artifact}` (Round `{analysis-round}`)
|
|
226
226
|
- If the task template contains a `## Analysis` section, update it to link to `{analysis-artifact}`
|
|
227
227
|
- Mark requirement-analysis as complete in workflow progress and include the actual round when the task template supports it
|
|
@@ -290,7 +290,7 @@ Summary:
|
|
|
290
290
|
- Risk level: {assessment}
|
|
291
291
|
|
|
292
292
|
Output file:
|
|
293
|
-
- Analysis report:
|
|
293
|
+
- Analysis report: <task-workspace>/active/{task-id}/{analysis-artifact}
|
|
294
294
|
|
|
295
295
|
Next step - continue on the selected path:
|
|
296
296
|
{next-step-commands}
|
|
@@ -299,7 +299,7 @@ Next step - continue on the selected path:
|
|
|
299
299
|
## Completion Checklist
|
|
300
300
|
|
|
301
301
|
- [ ] Read and understood the task file and source information
|
|
302
|
-
- [ ] Created analysis document
|
|
302
|
+
- [ ] Created analysis document `<task-workspace>/active/{task-id}/{analysis-artifact}`
|
|
303
303
|
- [ ] Updated `current_step` to requirement-analysis in task.md
|
|
304
304
|
- [ ] Updated `updated_at` to the current time in task.md
|
|
305
305
|
- [ ] Updated `assigned_to` in task.md
|
|
@@ -60,7 +60,7 @@ agent-infra-internal task-event {task-id} analyze.started --agent {standard-agen
|
|
|
60
60
|
### 1. 验证前置条件
|
|
61
61
|
|
|
62
62
|
检查必要文件:
|
|
63
|
-
-
|
|
63
|
+
- `<task-workspace>/active/{task-id}/task.md` - 任务文件
|
|
64
64
|
|
|
65
65
|
注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
|
|
66
66
|
|
|
@@ -122,7 +122,7 @@ agent-infra-internal task-event {task-id} analyze.started --agent {standard-agen
|
|
|
122
122
|
- 否则(无待答问题)→ 选最高价值的一个问题(验收标准 > 范围 > 歧义),写入 `## Brainstorming`:`status: asking`、`pending_question: <问题>`、`question_count += 1`。
|
|
123
123
|
2. 若 `start_date` 为空,写入当日日期(`date +%F`);随后执行 `agent-infra-internal task-event {task-id} analyze.awaiting-input --agent {standard-agent-token} --question {question_count}`,由核心统一更新基础 frontmatter 和 Activity Log。
|
|
124
124
|
3. Issue 同步(存在有效 `platform_issue_identity` 时,任一失败跳过):调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` 更新 **task 评论**;`status` label 维持 `pending-design-work`;**不**发布分析产物评论。
|
|
125
|
-
4. 校验(替代步骤 8 的 artifact gate):`agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text`(早退已置 `current_step: requirement-analysis` 且已写入 `start_date`,预期通过);并保留 `rg -n 'Analyze Task \(Brainstorming\)'
|
|
125
|
+
4. 校验(替代步骤 8 的 artifact gate):`agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text`(早退已置 `current_step: requirement-analysis` 且已写入 `start_date`,预期通过);并保留 `rg -n 'Analyze Task \(Brainstorming\)' <task-workspace>/active/{task-id}/task.md` 与 task 评论同步证据。**不**跑 artifact gate,也不跑 `check activity-log` / `check platform-sync`(二者绑定分析产物路径)。
|
|
126
126
|
5. 用户输出:只展示当前**单个问题** + 如何回答/继续(再次触发 `analyze-task {task-ref}` 并附答案)。
|
|
127
127
|
6. **STOP**,等待回答。下一次触发回到本步骤。
|
|
128
128
|
|
|
@@ -151,7 +151,7 @@ agent-infra-internal task-artifact {task-id} init --family analysis --artifact {
|
|
|
151
151
|
|
|
152
152
|
> 步骤 6–9 属**场景 A(正常产出)**路径。**场景 B(提问早退)**已在步骤 4 内完成状态更新、task 评论同步与校验并 STOP,不进入这些步骤。
|
|
153
153
|
|
|
154
|
-
创建
|
|
154
|
+
创建 `<task-workspace>/active/{task-id}/{analysis-artifact}`。
|
|
155
155
|
|
|
156
156
|
## 输出模板
|
|
157
157
|
|
|
@@ -228,7 +228,7 @@ agent-infra-internal task-artifact {task-id} init --family analysis --artifact {
|
|
|
228
228
|
|
|
229
229
|
### 7. 更新任务状态
|
|
230
230
|
|
|
231
|
-
更新
|
|
231
|
+
更新 `<task-workspace>/active/{task-id}/task.md`:
|
|
232
232
|
- 仅更新优先级、Brainstorming、审查响应等本技能拥有的业务内容;产物链接、阶段与完成日志由 completed 事件统一登记
|
|
233
233
|
- 在追加工作流 Activity Log 条目之前,基于分析结果(业务影响、风险、依赖、阻塞条件)重估 `priority`。若重估值与 `task.md` 当前值不一致:
|
|
234
234
|
- 用新值覆盖 frontmatter 的 `priority` 字段
|
|
@@ -288,7 +288,7 @@ agent-infra-internal task-verify {task-id} analyze.completed --artifact {analysi
|
|
|
288
288
|
- 风险等级:{评估}
|
|
289
289
|
|
|
290
290
|
产出文件:
|
|
291
|
-
-
|
|
291
|
+
- 分析报告:<task-workspace>/active/{task-id}/{analysis-artifact}
|
|
292
292
|
|
|
293
293
|
下一步 - 按所选路径继续:
|
|
294
294
|
{next-step-commands}
|
|
@@ -297,7 +297,7 @@ agent-infra-internal task-verify {task-id} analyze.completed --artifact {analysi
|
|
|
297
297
|
## 完成检查清单
|
|
298
298
|
|
|
299
299
|
- [ ] 阅读并理解了任务文件和来源信息
|
|
300
|
-
- [ ] 创建了分析文档
|
|
300
|
+
- [ ] 创建了分析文档 `<task-workspace>/active/{task-id}/{analysis-artifact}`
|
|
301
301
|
- [ ] 更新了 task.md 中的 `current_step` 为 requirement-analysis
|
|
302
302
|
- [ ] 更新了 task.md 中的 `updated_at` 为当前时间
|
|
303
303
|
- [ ] 更新了 task.md 中的 `assigned_to`
|
|
@@ -7,16 +7,16 @@ description: >
|
|
|
7
7
|
|
|
8
8
|
# Archive Completed Tasks
|
|
9
9
|
|
|
10
|
-
Archive completed tasks from
|
|
11
|
-
- root manifest:
|
|
12
|
-
- yearly manifest:
|
|
13
|
-
- monthly manifest:
|
|
10
|
+
Archive completed tasks from `<task-workspace>/completed/` into `<task-workspace>/archive/YYYY/MM/DD/TASK-xxx/local/` and rebuild a three-level archive index. Local task materials live in `local/` with a path-sorted `contents.sha256`; the TASK root contains no ordinary files.
|
|
11
|
+
- root manifest: `<task-workspace>/archive/manifest.md`
|
|
12
|
+
- yearly manifest: `<task-workspace>/archive/YYYY/manifest.md`
|
|
13
|
+
- monthly manifest: `<task-workspace>/archive/YYYY/MM/manifest.md`
|
|
14
14
|
|
|
15
15
|
## Execution Flow
|
|
16
16
|
|
|
17
17
|
### 1. Verify the environment
|
|
18
18
|
|
|
19
|
-
Confirm that
|
|
19
|
+
Confirm that `<task-workspace>/completed/` exists, then choose one of these four invocation modes:
|
|
20
20
|
- no arguments: archive every completed task
|
|
21
21
|
- `--days N`: keep the most recent `N` days and archive older tasks
|
|
22
22
|
- `--before YYYY-MM-DD`: archive only tasks completed before the given date
|
|
@@ -7,16 +7,16 @@ description: >
|
|
|
7
7
|
|
|
8
8
|
# 归档已完成任务
|
|
9
9
|
|
|
10
|
-
将
|
|
11
|
-
- 根 manifest
|
|
12
|
-
- 年 manifest
|
|
13
|
-
- 月 manifest
|
|
10
|
+
将 `<task-workspace>/completed/` 中的已完成任务归档到 `<task-workspace>/archive/YYYY/MM/DD/TASK-xxx/local/`,并重建三级归档索引。TASK 本地材料位于 `local/`,含按路径排序的 `contents.sha256`;TASK 根目录不存放普通文件。
|
|
11
|
+
- 根 manifest:`<task-workspace>/archive/manifest.md`
|
|
12
|
+
- 年 manifest:`<task-workspace>/archive/YYYY/manifest.md`
|
|
13
|
+
- 月 manifest:`<task-workspace>/archive/YYYY/MM/manifest.md`
|
|
14
14
|
|
|
15
15
|
## 执行流程
|
|
16
16
|
|
|
17
17
|
### 1. 验证环境
|
|
18
18
|
|
|
19
|
-
确认
|
|
19
|
+
确认 `<task-workspace>/completed/` 存在,并根据用户输入选择以下四种调用方式之一:
|
|
20
20
|
- 无参数:归档全部已完成任务
|
|
21
21
|
- `--days N`:保留最近 `N` 天,仅归档更早的任务
|
|
22
22
|
- `--before YYYY-MM-DD`:仅归档指定日期之前的任务
|
|
@@ -4,7 +4,15 @@ set -e
|
|
|
4
4
|
|
|
5
5
|
SCRIPT_DIR=$(CDPATH= cd "$(dirname "$0")" && pwd)
|
|
6
6
|
REPO_ROOT=$(CDPATH= cd "$SCRIPT_DIR/../../../.." && pwd)
|
|
7
|
-
|
|
7
|
+
if [ -f "$REPO_ROOT/bin/internal-cli.sh" ]; then
|
|
8
|
+
WORKSPACE_RESULT=$(CDPATH= cd "$REPO_ROOT" && sh "$REPO_ROOT/bin/internal-cli.sh" task-workspace resolve --boundary host)
|
|
9
|
+
elif command -v agent-infra-internal >/dev/null 2>&1; then
|
|
10
|
+
WORKSPACE_RESULT=$(CDPATH= cd "$REPO_ROOT" && agent-infra-internal task-workspace resolve --boundary host)
|
|
11
|
+
else
|
|
12
|
+
printf 'archive-tasks: agent-infra-internal task-workspace resolver is unavailable\n' >&2
|
|
13
|
+
exit 1
|
|
14
|
+
fi
|
|
15
|
+
WORKSPACE_ROOT=$(printf '%s' "$WORKSPACE_RESULT" | node -e 'let input="";process.stdin.setEncoding("utf8");process.stdin.on("data",chunk=>input+=chunk);process.stdin.on("end",()=>{const result=JSON.parse(input);if(result.status!=="resolved"||typeof result.root!=="string")process.exit(1);process.stdout.write(result.root);});')
|
|
8
16
|
COMPLETED_DIR="$WORKSPACE_ROOT/completed"
|
|
9
17
|
ARCHIVE_DIR="$WORKSPACE_ROOT/archive"
|
|
10
18
|
MANIFEST_PATH="$ARCHIVE_DIR/manifest.md"
|
|
@@ -586,4 +594,4 @@ echo
|
|
|
586
594
|
echo "Summary:"
|
|
587
595
|
printf -- '- Archived: %s\n' "$archived_count"
|
|
588
596
|
printf -- '- Skipped: %s\n' "$skipped_count"
|
|
589
|
-
printf -- '- Manifest: %s\n' "
|
|
597
|
+
printf -- '- Manifest: %s\n' "$ARCHIVE_DIR/manifest.md"
|
|
@@ -38,7 +38,7 @@ After prerequisites pass, Step 3 declares one lifecycle intent that atomically w
|
|
|
38
38
|
|
|
39
39
|
### 1. Verify Task Exists
|
|
40
40
|
|
|
41
|
-
Check that the task exists in
|
|
41
|
+
Check that the task exists in `<task-workspace>/active/{task-id}/`.
|
|
42
42
|
|
|
43
43
|
Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, e.g. `TASK-20260306-143022`
|
|
44
44
|
|
|
@@ -68,7 +68,7 @@ Confirm `targetState=blocked`, the target path, and the committed short-id effec
|
|
|
68
68
|
### 5. Preserve Recovery Identity
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
ls
|
|
71
|
+
ls <task-workspace>/blocked/{task-id}/task.md
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
### 6. Sync to Issue (Optional)
|
|
@@ -111,7 +111,7 @@ Task {task-id} marked as blocked.
|
|
|
111
111
|
|
|
112
112
|
Blocking reason: {summary}
|
|
113
113
|
Required to unblock: {what's needed}
|
|
114
|
-
Archived to:
|
|
114
|
+
Archived to: <task-workspace>/blocked/{task-id}/
|
|
115
115
|
|
|
116
116
|
Optional: clean up this task's sandbox
|
|
117
117
|
(The task is blocked and moved to blocked/; task-bound sandboxes are protected from automatic `ai sandbox rm --unbound` cleanup. If cleanup is necessary, manually verify the container, control manifest, and worktree identity first.)
|
|
@@ -129,7 +129,7 @@ Next step - check task status after unblocking:
|
|
|
129
129
|
|
|
130
130
|
- [ ] Analyzed and documented the blocking reason
|
|
131
131
|
- [ ] Updated task.md with blocked status and blocking information
|
|
132
|
-
- [ ] Moved task directory to
|
|
132
|
+
- [ ] Moved task directory to `<task-workspace>/blocked/`
|
|
133
133
|
- [ ] Verified move succeeded
|
|
134
134
|
- [ ] Informed user how to unblock
|
|
135
135
|
|
|
@@ -37,7 +37,7 @@ description: >
|
|
|
37
37
|
## 执行步骤
|
|
38
38
|
### 1. 验证任务存在
|
|
39
39
|
|
|
40
|
-
检查任务是否存在于
|
|
40
|
+
检查任务是否存在于 `<task-workspace>/active/{task-id}/`。
|
|
41
41
|
|
|
42
42
|
注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
|
|
43
43
|
|
|
@@ -62,10 +62,10 @@ agent-infra-internal task-lifecycle {task-id} block --agent {standard-agent-toke
|
|
|
62
62
|
|
|
63
63
|
### 4. 验证本地终态
|
|
64
64
|
|
|
65
|
-
确认结构化结果的 `targetState=blocked`、目标路径为
|
|
65
|
+
确认结构化结果的 `targetState=blocked`、目标路径为 `<task-workspace>/blocked/{task-id}`、短号效果已提交,并检查:
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
ls
|
|
68
|
+
ls <task-workspace>/blocked/{task-id}/task.md
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
### 5. 保留恢复身份
|
|
@@ -110,7 +110,7 @@ agent-infra-internal task-verify {task-id} block-task.completed --format text
|
|
|
110
110
|
|
|
111
111
|
阻塞原因:{摘要}
|
|
112
112
|
解除阻塞所需:{需要什么}
|
|
113
|
-
|
|
113
|
+
归档路径:<task-workspace>/blocked/{task-id}/
|
|
114
114
|
|
|
115
115
|
可选:清理本任务的沙箱
|
|
116
116
|
(任务已阻塞并移到 blocked/,task-bound 沙箱受保护,不会被 `ai sandbox rm --unbound` 自动删除;如确需清理,请先人工核对容器、控制清单和工作树身份。)
|
|
@@ -128,7 +128,7 @@ agent-infra-internal task-verify {task-id} block-task.completed --format text
|
|
|
128
128
|
|
|
129
129
|
- [ ] 分析并记录了阻塞原因
|
|
130
130
|
- [ ] 更新了 task.md 的阻塞状态和阻塞信息
|
|
131
|
-
- [ ] 将任务目录移动到
|
|
131
|
+
- [ ] 将任务目录移动到 `<task-workspace>/blocked/`
|
|
132
132
|
- [ ] 验证了移动成功
|
|
133
133
|
- [ ] 告知了用户如何解除阻塞
|
|
134
134
|
|
|
@@ -33,9 +33,9 @@ After prerequisites pass, Step 3 declares one lifecycle intent that atomically c
|
|
|
33
33
|
### 1. Verify Task Exists
|
|
34
34
|
|
|
35
35
|
Check these directories in order:
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
36
|
+
- `<task-workspace>/active/{task-id}/`
|
|
37
|
+
- `<task-workspace>/blocked/{task-id}/`
|
|
38
|
+
- `<task-workspace>/completed/{task-id}/`
|
|
39
39
|
|
|
40
40
|
Handling rules:
|
|
41
41
|
- If found in `active/` or `blocked/`: continue
|
|
@@ -69,7 +69,7 @@ Confirm `targetState=completed`, terminal fields, and the short-id effect from t
|
|
|
69
69
|
### 5. Verify the Move
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
|
-
ls
|
|
72
|
+
ls <task-workspace>/completed/{task-id}/task.md
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
Confirm the task directory was moved successfully.
|
|
@@ -120,7 +120,7 @@ Task {task-id} cancelled; task directory moved to completed/.
|
|
|
120
120
|
|
|
121
121
|
Cancellation reason: {reason}
|
|
122
122
|
Status label: {status-label or skipped}
|
|
123
|
-
Target path:
|
|
123
|
+
Target path: <task-workspace>/completed/{task-id}/
|
|
124
124
|
|
|
125
125
|
Optional: clean up this task's sandbox
|
|
126
126
|
(The task is completed and archived; the sandbox container and per-branch config directory are not reclaimed automatically. Run this if you no longer need them:)
|
|
@@ -136,7 +136,7 @@ Next step - inspect the moved task:
|
|
|
136
136
|
## Completion Checklist
|
|
137
137
|
|
|
138
138
|
- [ ] Recorded the cancellation reason and updated task.md
|
|
139
|
-
- [ ] Moved the task directory into
|
|
139
|
+
- [ ] Moved the task directory into `<task-workspace>/completed/`
|
|
140
140
|
- [ ] Completed Issue sync when an Issue exists
|
|
141
141
|
- [ ] Ran and passed the verification gate
|
|
142
142
|
- [ ] Showed the full next-step command set to the user
|
|
@@ -32,9 +32,9 @@ description: >
|
|
|
32
32
|
### 1. 验证任务存在
|
|
33
33
|
|
|
34
34
|
依次检查以下目录:
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
35
|
+
- `<task-workspace>/active/{task-id}/`
|
|
36
|
+
- `<task-workspace>/blocked/{task-id}/`
|
|
37
|
+
- `<task-workspace>/completed/{task-id}/`
|
|
38
38
|
|
|
39
39
|
处理规则:
|
|
40
40
|
- 如果在 `active/` 或 `blocked/` 中找到:继续
|
|
@@ -68,7 +68,7 @@ agent-infra-internal task-lifecycle {task-id} cancel --agent {standard-agent-tok
|
|
|
68
68
|
### 5. 验证转移
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
ls
|
|
71
|
+
ls <task-workspace>/completed/{task-id}/task.md
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
确认任务目录已成功移动。
|
|
@@ -117,7 +117,7 @@ agent-infra-internal task-verify {task-id} cancel-task.completed --format text
|
|
|
117
117
|
|
|
118
118
|
取消原因:{reason}
|
|
119
119
|
状态标签:{status-label 或 skipped}
|
|
120
|
-
|
|
120
|
+
目标路径:<task-workspace>/completed/{task-id}/
|
|
121
121
|
|
|
122
122
|
可选:清理本任务的沙箱
|
|
123
123
|
(任务已完成并归档,沙箱容器和 per-branch 配置目录不会自动回收。如果不再需要可执行:)
|
|
@@ -133,7 +133,7 @@ ai sandbox rm {task-id}
|
|
|
133
133
|
## 完成检查清单
|
|
134
134
|
|
|
135
135
|
- [ ] 已记录取消原因并更新 task.md
|
|
136
|
-
- [ ] 已将任务目录移动到
|
|
136
|
+
- [ ] 已将任务目录移动到 `<task-workspace>/completed/`
|
|
137
137
|
- [ ] 已在存在 Issue 时完成 Issue 同步
|
|
138
138
|
- [ ] 已运行 gate 校验并通过
|
|
139
139
|
- [ ] 已通过统一 helper 渲染已选场景的下一步命令
|
|
@@ -126,7 +126,7 @@ agent-infra-internal task-artifact {task-id} init --family code --artifact {code
|
|
|
126
126
|
|
|
127
127
|
The skeleton contains identity metadata, stable section markers, and required headings only; real implementation and verification content is required before the completion gate can pass. On a preflight or finalization structural error, follow `.agents/rules/local-artifact-repair.md` to correct the formal artifact directly and rerun the same entry point; current structure, qualification, and summary facts are the only gate.
|
|
128
128
|
|
|
129
|
-
Create
|
|
129
|
+
Create `<task-workspace>/active/{task-id}/{code-artifact}`.
|
|
130
130
|
|
|
131
131
|
> Read `reference/report-template.md` before writing the report.
|
|
132
132
|
|
|
@@ -75,7 +75,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
75
75
|
### 1. 验证前置条件
|
|
76
76
|
|
|
77
77
|
先检查:
|
|
78
|
-
-
|
|
78
|
+
- `<task-workspace>/active/{task-id}/task.md`
|
|
79
79
|
|
|
80
80
|
如果缺少任务文件,立即停止。生命周期输入由步骤 4 的核心查询按已选路径验证;技能不得预先固定要求方案产物。
|
|
81
81
|
|
|
@@ -165,7 +165,7 @@ agent-infra-internal task-artifact {task-id} init --family code --artifact {code
|
|
|
165
165
|
|
|
166
166
|
骨架只包含身份元数据、稳定 section marker 和必需标题;必须填入真实实现与验证内容后才能通过完成门禁。preflight 或 finalizer 返回结构错误时,按 `.agents/rules/local-artifact-repair.md` 直接修正正式产物并重跑原入口;当前结构、资格和摘要事实是唯一门禁。
|
|
167
167
|
|
|
168
|
-
创建
|
|
168
|
+
创建 `<task-workspace>/active/{task-id}/{code-artifact}`。
|
|
169
169
|
|
|
170
170
|
> 报告结构、必填章节和完整模板见 `reference/report-template.md`。写报告前先读取 `reference/report-template.md`。
|
|
171
171
|
|
|
@@ -207,7 +207,7 @@ echo "$finalizer"
|
|
|
207
207
|
|
|
208
208
|
### 11. 更新任务状态
|
|
209
209
|
|
|
210
|
-
更新
|
|
210
|
+
更新 `<task-workspace>/active/{task-id}/task.md`:
|
|
211
211
|
- 审查 `## 需求` 段落,仅把本轮已由代码实现且有测试通过支撑的条目从 `- [ ]` 勾为 `- [x]`
|
|
212
212
|
- 产物链接、阶段与完成日志由 completed 事件统一登记
|
|
213
213
|
- 完成业务内容更新后声明完成事件:
|
|
@@ -71,7 +71,7 @@ Example:
|
|
|
71
71
|
}
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
Taskless direct mode omits `taskRef`; direct task-bound commits use push delivery.
|
|
74
|
+
Taskless direct mode omits `taskRef`; direct task-bound commits use push delivery. Both modes execute serially at the caller boundary; the core still owns path and sensitive-file checks, staged scope, HEAD/tree, branch/ref, commit, push, protected-branch policy, warnings, and idempotency.
|
|
75
75
|
|
|
76
76
|
- Create at most one local commit for explicit changes.
|
|
77
77
|
- If there are no changes but HEAD is ahead and delivery is requested, perform push-only and do not create an empty commit.
|
|
@@ -71,7 +71,7 @@ agent-infra-internal git-workflow commit --input {commit-operation.json}
|
|
|
71
71
|
}
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
taskless direct 省略 `taskRef`;direct task-bound commit 使用 push delivery
|
|
74
|
+
taskless direct 省略 `taskRef`;direct task-bound commit 使用 push delivery。两种模式都按调用方串行执行;core 仍负责路径和敏感文件、staged scope、HEAD/tree、branch/ref、commit、push、保护分支、warning 和幂等校验。
|
|
75
75
|
|
|
76
76
|
- 有明确修改时最多创建一个本地 commit。
|
|
77
77
|
- 无修改但需要交付本地领先的 HEAD 时只执行 push-only,不创建空 commit。
|
|
@@ -4,12 +4,12 @@ Commit, push, result mapping, and task finalization use one `commit-operation.ex
|
|
|
4
4
|
|
|
5
5
|
## Entry modes
|
|
6
6
|
|
|
7
|
-
- `mode=direct`: explicit user invocation is the authorization. Task-bound direct may read task facts but does not require a delegation receipt; taskless direct is allowed only for `TASK_CONTEXT_NOT_FOUND` and skips task facts, review,
|
|
7
|
+
- `mode=direct`: explicit user invocation is the authorization. Task-bound direct may read task facts but does not require a delegation receipt; taskless direct is allowed only for `TASK_CONTEXT_NOT_FOUND` and skips task facts, review, checkpoint, and task.md finalization.
|
|
8
8
|
- `mode=orchestrated` is removed: standalone commit is no longer a lifecycle delegation stage. This mode returns `ORCHESTRATED_COMMIT_REMOVED` without writing Git; the code stage closes through a local checkpoint.
|
|
9
9
|
|
|
10
10
|
## Shared order
|
|
11
11
|
|
|
12
|
-
1.
|
|
12
|
+
1. Direct commits execute serially at the caller boundary.
|
|
13
13
|
2. Validate the repository, current branch, explicit paths, sensitive paths, staged scope, expected HEAD/tree, remote, and full heads ref.
|
|
14
14
|
3. Validate direct-mode authorization.
|
|
15
15
|
4. Create at most one local commit; with no changes, allow push-only and never create an empty commit.
|
|
@@ -4,12 +4,12 @@ commit、push、结果映射和任务收尾使用同一个 `commit-operation.exe
|
|
|
4
4
|
|
|
5
5
|
## 入口模式
|
|
6
6
|
|
|
7
|
-
- `mode=direct`:用户显式调用授权。task-bound direct 可读取 task facts,但不要求 delegation receipt;taskless direct 只在 `TASK_CONTEXT_NOT_FOUND` 时允许,并跳过 task facts、review、
|
|
7
|
+
- `mode=direct`:用户显式调用授权。task-bound direct 可读取 task facts,但不要求 delegation receipt;taskless direct 只在 `TASK_CONTEXT_NOT_FOUND` 时允许,并跳过 task facts、review、checkpoint 和 task.md 收尾。
|
|
8
8
|
- `mode=orchestrated` 已移除:独立 commit 不再是生命周期 delegation stage;调用该模式返回 `ORCHESTRATED_COMMIT_REMOVED`,不写 Git。生命周期 code 阶段完成后由 local checkpoint 直接收口。
|
|
9
9
|
|
|
10
10
|
## 共享执行顺序
|
|
11
11
|
|
|
12
|
-
1.
|
|
12
|
+
1. direct commit 按调用方串行执行。
|
|
13
13
|
2. 验证 repository、当前 branch、明确 paths、敏感路径、staged scope、expected HEAD/tree、remote 和 full heads ref。
|
|
14
14
|
3. 完成 direct 模式授权校验。
|
|
15
15
|
4. 最多创建一个本地 commit;无修改时只允许 push-only,不创建空 commit。
|