@fitlab-ai/agent-infra 0.11.3 → 0.11.4
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/README.md +17 -8
- package/README.zh-CN.md +17 -8
- package/dist/bin/internal-cli.js +1 -1
- package/dist/lib/internal/cli-route-inventory.js +1 -1
- package/dist/lib/internal/task-artifact.js +1 -1
- package/dist/lib/internal/task-finalization.js +41 -1
- package/dist/lib/internal/task-ledger.js +13 -5
- package/dist/lib/internal/task-operation-registry.js +1 -0
- package/dist/lib/platform/completion-backfill.js +63 -17
- package/dist/lib/sandbox/control/server.js +26 -143
- package/dist/lib/sandbox/task-cleanup.js +13 -20
- package/dist/lib/task/artifact-command.js +11 -4
- package/dist/lib/task/artifact-lifecycle.js +217 -85
- package/dist/lib/task/artifact-operations.js +1 -26
- package/dist/lib/task/artifact-receipts.js +4 -1
- package/dist/lib/task/artifact-schema.js +1 -0
- package/dist/lib/task/artifact-selection.js +25 -0
- package/dist/lib/task/capabilities.js +158 -39
- package/dist/lib/task/commands/status.js +9 -2
- package/dist/lib/task/control-authority.js +3 -2
- package/dist/lib/task/decision-intents.js +12 -0
- package/dist/lib/task/delivery.js +1 -43
- package/dist/lib/task/events.js +80 -64
- package/dist/lib/task/finalization.js +301 -143
- package/dist/lib/task/ledger-intents.js +157 -15
- package/dist/lib/task/lifecycle-path.js +75 -0
- package/dist/lib/task/lifecycle.js +10 -0
- package/dist/lib/task/local-artifact-finalization.js +1 -20
- package/dist/lib/task/orchestration.js +17 -7
- package/dist/lib/task/review-finalization.js +3 -16
- package/dist/lib/task/rework-intent.js +70 -4
- package/dist/lib/task/verification-engine.js +20 -30
- package/dist/lib/task/verification.js +1 -0
- package/dist/lib/task/workflow-warning-intents.js +21 -6
- package/dist/lib/task/workspace-snapshot.js +7 -2
- package/dist/lifecycle-build-manifest.json +3 -3
- package/lib/internal/cli-route-inventory.ts +1 -1
- package/lib/internal/task-artifact.ts +1 -1
- package/lib/internal/task-finalization.ts +40 -1
- package/lib/internal/task-ledger.ts +12 -5
- package/lib/internal/task-operation-registry.ts +1 -0
- package/lib/platform/completion-backfill.ts +78 -16
- package/lib/sandbox/control/server.ts +21 -146
- package/lib/sandbox/task-cleanup.ts +12 -20
- package/lib/task/artifact-command.ts +14 -4
- package/lib/task/artifact-lifecycle.ts +236 -85
- package/lib/task/artifact-operations.ts +1 -26
- package/lib/task/artifact-receipts.ts +4 -1
- package/lib/task/artifact-schema.ts +1 -0
- package/lib/task/artifact-selection.ts +53 -0
- package/lib/task/capabilities.ts +154 -40
- package/lib/task/commands/status.ts +11 -2
- package/lib/task/control-authority.ts +3 -1
- package/lib/task/decision-intents.ts +9 -0
- package/lib/task/delivery.ts +1 -40
- package/lib/task/events.ts +82 -64
- package/lib/task/finalization.ts +269 -111
- package/lib/task/ledger-intents.ts +155 -15
- package/lib/task/lifecycle-path.ts +98 -0
- package/lib/task/lifecycle.ts +13 -0
- package/lib/task/local-artifact-finalization.ts +2 -25
- package/lib/task/orchestration.ts +26 -8
- package/lib/task/review-finalization.ts +3 -16
- package/lib/task/rework-intent.ts +75 -5
- package/lib/task/verification-engine.ts +19 -30
- package/lib/task/verification.ts +2 -1
- package/lib/task/workflow-warning-intents.ts +18 -6
- package/lib/task/workspace-snapshot.ts +3 -2
- package/package.json +1 -1
- package/templates/.agents/rules/review-handshake.en.md +4 -4
- package/templates/.agents/rules/review-handshake.zh-CN.md +4 -4
- package/templates/.agents/skills/analyze-task/SKILL.en.md +11 -4
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +11 -4
- package/templates/.agents/skills/code-task/SKILL.en.md +14 -8
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +18 -13
- package/templates/.agents/skills/code-task/reference/code-rules.en.md +2 -2
- package/templates/.agents/skills/code-task/reference/code-rules.zh-CN.md +2 -2
- package/templates/.agents/skills/code-task/reference/dual-mode.en.md +4 -4
- package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +4 -4
- package/templates/.agents/skills/code-task/reference/report-template.en.md +1 -1
- package/templates/.agents/skills/code-task/reference/report-template.zh-CN.md +1 -1
- package/templates/.agents/skills/complete-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/plan-task/SKILL.en.md +13 -10
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +13 -10
- package/templates/.agents/skills/review-analysis/SKILL.en.md +5 -1
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +5 -1
- package/templates/.agents/skills/review-code/SKILL.en.md +5 -1
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +5 -1
- package/templates/.agents/skills/review-plan/SKILL.en.md +5 -1
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +5 -1
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +18 -2
- package/templates/.agents/templates/task.en.md +2 -2
- package/templates/.agents/templates/task.zh-CN.md +2 -2
- package/templates/.agents/workflows/bug-fix.en.yaml +11 -6
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +11 -6
- package/templates/.agents/workflows/feature-development.en.yaml +11 -6
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +11 -6
- package/templates/.agents/workflows/refactoring.en.yaml +11 -6
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +11 -6
- package/dist/lib/sandbox/control/finalization-response.js +0 -33
- package/lib/sandbox/control/finalization-response.ts +0 -35
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-task
|
|
3
3
|
description: >
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
根据生命周期输入编码任务并输出报告。
|
|
5
|
+
当分析或技术方案已按所选路径准备完成,或代码审查发现问题需要修复时使用。
|
|
6
6
|
仅当对话包含可解析的任务引用时才可自动调用本技能。
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -11,16 +11,20 @@ description: >
|
|
|
11
11
|
|
|
12
12
|
若入口业务操作数包含 `--orchestrated`,绑定 `{execution-flag}` = `--orchestrated` 并原样转发给 completed 事件;否则绑定为空。不得从 `orchestration.json`、环境变量或历史产物推断该标记。生命周期事件还必须携带显式触发信息:编排调用使用 `{trigger-initiator}=orchestrator`,否则使用 `model`;`{request-id}` 是本任务与本轮产物的稳定单行标识,`{reason-code}` 初次实现使用 `user-request`,修复或裁决使用 `review-finding`;started 与 completed 使用同一组值。
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
根据所选生命周期路径的实现输入编码任务,并产出 `code.md` 或 `code-r{N}.md`。本技能支持初次实现、基于 `review-code` 反馈的修复,以及人工裁决驱动实现三种模式。
|
|
15
15
|
|
|
16
16
|
## 行为边界 / 关键规则
|
|
17
17
|
|
|
18
|
+
### 路径与返工
|
|
19
|
+
|
|
20
|
+
本阶段只消费核心从最新有效分析产物解析出的规范路径事实;未被所选路径包含的阶段不得创建产物。同阶段完成一次修订—复审后再次收到 Changes Requested 时,必须在下一执行产物前提交绑定 finding、来源 SHA 和稳定任务事实摘要的返工分类;轮次或文件名变化不是新证据。
|
|
21
|
+
|
|
18
22
|
### 持久化报告证据
|
|
19
23
|
|
|
20
24
|
生成实现报告时,先读取 `.agents/rules/evidence-reporting.md`。成功测试记录命令、目标范围、状态/结构化结果、实际结果和未覆盖部分;失败、阻塞或争议保留复现入口、准确位置和决定性摘录,不默认粘贴完整成功 stdout。
|
|
21
25
|
|
|
22
26
|
- 涉及候选资格或 `HD-N` 判断时,先读取 `.agents/rules/decision-qualification.md`,基于 task.md 规范化约束/候选完成资格审计,并在实现报告记录五张资格审计表;不得把来源不明或未确认约束自动升级为排除条件
|
|
23
|
-
-
|
|
27
|
+
- 严格遵循核心选择的最新生命周期输入:精简路径为 `analysis.md` / `analysis-r{N}.md`,标准或完整路径为 `plan.md` / `plan-r{N}.md`
|
|
24
28
|
- 生成会同步到 Issue 的任务或生命周期 Markdown 前,先读取 `.agents/rules/sync-content-generation.md` 并遵循其中的生成端约束;同步端不解析或改写正文
|
|
25
29
|
- 实现前读取 `.agents/rules/compatibility-policy.md`;只实现方案明确批准的兼容预算,不以“稳妥”为由保留旧分支、旧结果契约或迁移 shim
|
|
26
30
|
- 修复模式逐条核实最新 `review-code` 的发现:成立则修复,判定为不成立/幻觉则在报告中反驳并记入 unresolved;不擅自扩大到审查未列出的问题;manual-validation 项不在修复范围
|
|
@@ -40,7 +44,7 @@ description: >
|
|
|
40
44
|
|------|------|
|
|
41
45
|
| 「代码太简单,不需要测试」 | 简单代码也会回归;没有"失败→通过"的用例就没有完成标志,先写验证业务行为的测试。 |
|
|
42
46
|
| 「先写代码再补测试更高效」 | 后补测试常沦为对实现的镜像;目标驱动应先定义可验证用例再让它通过。 |
|
|
43
|
-
|
|
|
47
|
+
| 「输入这里不合理,顺手改更好」 | 偏离 `{lifecycle-input-artifact}` 必须在报告中记录原因;有异议按任务规则处理,不擅自改方向。 |
|
|
44
48
|
| 「测试过了,顺便推送一下」 | 本技能只创建本地 checkpoint;远端推送是 `create-pr` 的唯一边界。 |
|
|
45
49
|
| 「审查既然写了,照着改就行」 | 审查可能基于错误 `file:line` 或幻觉;动手前先 Read/Grep 核实,成立才修,不成立就反驳并记入 unresolved,不盲从。 |
|
|
46
50
|
| 「保留旧入口更稳妥,反正只多一个分支」 | 未获批准的兼容是范围扩张和长期债务;没有对象、必要性、期限和退出条件就只实现当前契约。 |
|
|
@@ -72,9 +76,8 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
72
76
|
|
|
73
77
|
先检查:
|
|
74
78
|
- `.agents/workspace/active/{task-id}/task.md`
|
|
75
|
-
- 至少一个技术方案产物:`plan.md` 或 `plan-r{N}.md`
|
|
76
79
|
|
|
77
|
-
|
|
80
|
+
如果缺少任务文件,立即停止。生命周期输入由步骤 4 的核心查询按已选路径验证;技能不得预先固定要求方案产物。
|
|
78
81
|
|
|
79
82
|
### 2. 确保任务分支
|
|
80
83
|
|
|
@@ -105,6 +108,8 @@ status=$?
|
|
|
105
108
|
echo "$result"
|
|
106
109
|
```
|
|
107
110
|
|
|
111
|
+
若 `selection.disposition` 为 `reuse`,复用 `selection.artifact`,不得执行 started、init、代码修改或写入新产物,并直接进入完成校验与下一步提示。其他状态继续按下表处理。
|
|
112
|
+
|
|
108
113
|
按 `$status` 与 `result.mode` 分流;二者不一致时按 `$status` 为准并报告异常:
|
|
109
114
|
|
|
110
115
|
| `$status` | `result.mode` | 行动 |
|
|
@@ -118,13 +123,13 @@ echo "$result"
|
|
|
118
123
|
|
|
119
124
|
> 双模式判定规则见 `reference/dual-mode.md`。执行此步骤前先读取 `reference/dual-mode.md`。
|
|
120
125
|
|
|
121
|
-
### 5.
|
|
126
|
+
### 5. 确定生命周期输入
|
|
122
127
|
|
|
123
|
-
只使用步骤 4 的结构化结果:从 `inputs`
|
|
128
|
+
只使用步骤 4 的结构化结果:从 `inputs` 取得核心选择的 `{lifecycle-input-artifact}`(精简路径为 analysis,其他路径为 plan),从 `next_round` / `next_artifact` 取得 `{code-round}` / `{code-artifact}`;修复模式从 `review_artifact` 取得 `{review-artifact}`;裁决模式从 `implementation_input`、`decision_id`、`decision_evidence` 取得统一输入身份。不得自行扫描轮次或拼装文件名。
|
|
124
129
|
|
|
125
|
-
### 6.
|
|
130
|
+
### 6. 阅读生命周期输入
|
|
126
131
|
|
|
127
|
-
仔细阅读 `{
|
|
132
|
+
仔细阅读 `{lifecycle-input-artifact}`,提取:
|
|
128
133
|
- 实施步骤
|
|
129
134
|
- 需要创建或修改的文件
|
|
130
135
|
- 测试策略
|
|
@@ -237,11 +242,11 @@ agent-infra-internal task-verify {task-id} code.completed --artifact {code-artif
|
|
|
237
242
|
## 注意事项
|
|
238
243
|
|
|
239
244
|
- 首轮实现使用 `code.md`,后续轮次使用 `code-r{N}.md`
|
|
240
|
-
- 如偏离 `{
|
|
245
|
+
- 如偏离 `{lifecycle-input-artifact}`,必须在报告中记录原因
|
|
241
246
|
- 新测试必须验证有意义的业务行为,而不是机械透传
|
|
242
247
|
|
|
243
248
|
## 错误处理
|
|
244
249
|
|
|
245
250
|
- 任务未找到:`Task {task-id} not found`
|
|
246
|
-
-
|
|
251
|
+
- 缺少生命周期输入:透传步骤 4 返回的 `ARTIFACT_INPUT_MISSING`,按所选路径补充 analysis 或 plan
|
|
247
252
|
- 本地修复后仍无法通过测试:说明外部阻塞并停止,且不要创建实现产物
|
|
@@ -14,7 +14,7 @@ Follow the `code` step in `.agents/workflows/feature-development.yaml`.
|
|
|
14
14
|
- [ ] follow project coding standards
|
|
15
15
|
|
|
16
16
|
**Implementation principles**:
|
|
17
|
-
1. **Follow the
|
|
17
|
+
1. **Follow the input strictly**: do not deviate from the analysis or plan lifecycle input selected by core
|
|
18
18
|
2. **Work step by step**: execute the planned sequence
|
|
19
19
|
3. **Keep testing continuously**: run the **fast smoke subset** continuously as work progresses (see the `test` skill)
|
|
20
20
|
4. **Keep it simple**: do not add unplanned features
|
|
@@ -46,7 +46,7 @@ Two-way failure handling:
|
|
|
46
46
|
|
|
47
47
|
## Notes
|
|
48
48
|
|
|
49
|
-
1. **Prerequisite**: the
|
|
49
|
+
1. **Prerequisite**: the analysis or plan lifecycle input selected by core must exist
|
|
50
50
|
2. **No auto-commit**: do not run `git commit` or `git add`
|
|
51
51
|
3. **Test quality**: new tests must validate meaningful business logic
|
|
52
52
|
4. **Code quality**: follow project coding conventions
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
- [ ] 遵守项目编码规范
|
|
15
15
|
|
|
16
16
|
**实现原则**:
|
|
17
|
-
1.
|
|
17
|
+
1. **严格遵循输入**:不要偏离核心选择的 analysis 或 plan 生命周期输入
|
|
18
18
|
2. **按步骤推进**:按计划顺序执行
|
|
19
19
|
3. **持续测试**:实现过程中持续运行 **fast smoke 子集**(参见 `test` skill)
|
|
20
20
|
4. **保持简单**:不要加入未计划的功能
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
## 注意事项
|
|
48
48
|
|
|
49
|
-
1.
|
|
49
|
+
1. **前置条件**:必须存在核心按所选路径返回的 analysis 或 plan 生命周期输入
|
|
50
50
|
2. **禁止自动提交**:不要执行 `git commit` 或 `git add`
|
|
51
51
|
3. **测试质量**:新增测试必须验证有意义的业务逻辑
|
|
52
52
|
4. **代码质量**:遵循项目编码规范
|
|
@@ -8,9 +8,9 @@ This file documents the core artifact lifecycle's code-mode decision. The `task-
|
|
|
8
8
|
agent-infra-internal task-artifact {task-id} inspect --family code
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
The core
|
|
11
|
+
The core reads the path decision from the latest analysis and selects the lifecycle input: analysis for streamlined, plan for standard or full. The full path also validates review-plan before scanning code and review-code artifacts.
|
|
12
12
|
|
|
13
|
-
`code.started` persists the
|
|
13
|
+
`code.started` persists the lifecycle input identity and SHA-256 for the round in task.md frontmatter. `code.completed` verifies the current latest input against that context; changed input fails closed. The implementation report field is reader-facing traceability only.
|
|
14
14
|
|
|
15
15
|
## Eight Branches
|
|
16
16
|
|
|
@@ -18,8 +18,8 @@ The core scans `plan.md` / `plan-r{N}.md`, `review-plan.md` / `review-plan-r{N}.
|
|
|
18
18
|
|
|
19
19
|
| Condition | mode | exit | Behavior |
|
|
20
20
|
|---|---|---:|---|
|
|
21
|
-
| no code artifact
|
|
22
|
-
| latest
|
|
21
|
+
| no code artifact and the selected lifecycle input is valid; full also requires an exactly `Approved` review-plan bound to the latest plan | `init` | 0 | initial implementation, output `code.md` |
|
|
22
|
+
| the latest analysis or plan lifecycle input is not bound by the latest code completion receipt | `init` | 0 | enter a new implementation round; missing or invalid receipts fail closed |
|
|
23
23
|
| the latest review-code completion receipt does not bind the latest code identity/SHA | `error` | 2 | latest code is unreviewed; run `review-code`; code and review-code family rounds may advance independently |
|
|
24
24
|
| latest review-code is Approved and a pending implementation input was decided after that review completed | `decision` | 0 | select the earliest `II-N` and enter decision-driven implementation; false/not-required and consumed inputs do not trigger |
|
|
25
25
|
| latest review-code is Approved with 0/0/0 | `refused` | 1 | already approved; do not run `code-task` again |
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
agent-infra-internal task-artifact {task-id} inspect --family code
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
核心读取最新 analysis 的路径裁定,并选择生命周期输入:精简路径使用 analysis,标准或完整路径使用 plan;完整路径还校验对应 review-plan。随后扫描 code 与 review-code 产物。
|
|
12
12
|
|
|
13
|
-
`code.started` 会在 task.md frontmatter
|
|
13
|
+
`code.started` 会在 task.md frontmatter 中绑定本轮生命周期输入及其 SHA-256。`code.completed` 使用该开始上下文并校验当前最新输入;内容变化失败关闭。实现报告的“生命周期输入”仅供读者追溯,不参与生命周期身份校验。
|
|
14
14
|
|
|
15
15
|
## 8 个分支
|
|
16
16
|
|
|
@@ -18,8 +18,8 @@ agent-infra-internal task-artifact {task-id} inspect --family code
|
|
|
18
18
|
|
|
19
19
|
| 条件 | mode | exit | 行为 |
|
|
20
20
|
|---|---|---:|---|
|
|
21
|
-
| 无 code
|
|
22
|
-
| 最新
|
|
21
|
+
| 无 code 产物,且所选生命周期输入有效;完整路径的最新 review-plan 还必须精确为 `Approved` 并引用最新 plan | `init` | 0 | 初次实现,产物为 `code.md` |
|
|
22
|
+
| 最新 analysis 或 plan 生命周期输入未被最新 code 完成 receipt 绑定 | `init` | 0 | 输入在上轮 code 后发生有效变化,进入新一轮实现;缺失或无效 receipt 失败关闭 |
|
|
23
23
|
| 最新 review-code 的完成收据未绑定最新 code identity/SHA | `error` | 2 | 最新代码未审查,先运行 `review-code`;code 与 review-code 的 family 轮次可独立增长 |
|
|
24
24
|
| 最新 review-code 为 Approved 且存在审查完成后产生的 pending 实现输入 | `decision` | 0 | 选择最早 `II-N`,进入裁决驱动实现;false/not-required 与 consumed 输入不触发 |
|
|
25
25
|
| 最新 review-code 为 Approved 且 0/0/0 | `refused` | 1 | 已通过,无需再次运行 `code-task` |
|
|
@@ -17,7 +17,7 @@ Use this structure when creating `code.md` or `code-r{N}.md`.
|
|
|
17
17
|
## Implementation Input
|
|
18
18
|
|
|
19
19
|
- **Mode**: {init / fix / decision}
|
|
20
|
-
- **
|
|
20
|
+
- **Lifecycle Input**: `{lifecycle-input-artifact}`
|
|
21
21
|
- **Review Input**: `{review-artifact or N/A}`
|
|
22
22
|
- **Decision Input**: `{implementation-input or N/A}`
|
|
23
23
|
- **Ledger ID**: `{decision-id or N/A}`
|
|
@@ -9,7 +9,7 @@ description: >
|
|
|
9
9
|
# Complete Task
|
|
10
10
|
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
|
-
Host finalization uses receipt
|
|
12
|
+
Host finalization uses receipt v4 with an immutable `receiptId`, monotonic `revision`, staged summary input, and canonical warnings. Lifecycle/identity/required-PR hard failures return `result: failed|blocked`; after lifecycle succeeds, it retries only receipt-pending peripheral steps or open backfill warnings. Per-check verification warnings transition by observed target: a later observation resolves the prior code while retaining its history, and unobserved targets remain unchanged.
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
## Boundary / Critical Rules
|
|
@@ -176,7 +176,7 @@ If a summary must mirror a human-decided `post-review-commit` exemption, make a
|
|
|
176
176
|
agent-infra-internal task-finalization {task-id} complete --agent {standard-agent-token}
|
|
177
177
|
```
|
|
178
178
|
|
|
179
|
-
Finalization runs allowed artifact backfill -> lifecycle -> terminal task comment -> core verification -> warning task-comment update -> summary seal in a fixed order. Every backfill must reach a successful terminal result before lifecycle starts. Summary seal always reads the durable staging record retained in the task directory; the platform entry point validates marker, owner, and digest, performs any required delete/recreate, and reads back final remote order.
|
|
179
|
+
Finalization runs allowed artifact backfill -> lifecycle -> terminal task comment -> core verification -> warning task-comment update -> summary seal in a fixed order. Every backfill that actually runs must reach a successful terminal result before lifecycle starts; an ordinary replay with a complete receipt and no recovery fact does not rerun backfill, comments, verification, or summary. A completed recovery that may write a managed comment first persists a done summary as pending, then seals it only at the end. Summary seal always reads the durable staging record retained in the task directory; the platform entry point validates marker, owner, and digest, performs any required delete/recreate, and reads back final remote order. `result=completed` means the host safely completed the task from structured results and the receipt; if peripheral warnings or pending steps remain, return `result=completed_with_warnings`, warnings, and pending steps. Use `result=failed` or `result=blocked` only for hard or receipt/capability failures, then fix the cause and retry through the same entry point; do not claim completion or hand-repair partial state. A sandbox must not run `ls completed` or a local terminal verification against its historical mount to re-decide this result.
|
|
180
180
|
|
|
181
181
|
### 7. Handle Finalization Retries and Results
|
|
182
182
|
|
|
@@ -9,7 +9,7 @@ description: >
|
|
|
9
9
|
# 完成任务
|
|
10
10
|
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
11
11
|
|
|
12
|
-
宿主 finalization 使用 receipt
|
|
12
|
+
宿主 finalization 使用 receipt v4(不可变 `receiptId`、单调 `revision`、摘要暂存和 canonical warnings)。生命周期/身份/required PR 等硬失败返回 `result: failed|blocked`;生命周期完成后,只重试 receipt 指出的 pending 外围步骤或 open backfill warning。逐检查 verification warning 以 observed target 为单位转换:新观察替代旧 code 时保留旧行 resolved 历史,未观察的 target 不变。
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
## 行为边界 / 关键规则
|
|
@@ -175,7 +175,7 @@ agent-infra-internal task-verify {task-id} complete-task.preflight --format text
|
|
|
175
175
|
agent-infra-internal task-finalization {task-id} complete --agent {standard-agent-token}
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
finalization 按允许的 artifact backfill → lifecycle → task 评论 → core verification → warning task 评论更新 → summary seal
|
|
178
|
+
finalization 按允许的 artifact backfill → lifecycle → task 评论 → core verification → warning task 评论更新 → summary seal 的固定顺序执行。每项实际运行的 backfill 必须取得成功终态,否则不得进入 lifecycle;完整 receipt 且无恢复事实的普通重入不执行 backfill、评论、验证或 summary。任何可能写入 managed comment 的 completed 恢复会先把 done summary 持久化为 pending,恢复末尾才重新 seal。summary seal 始终读取任务目录中保留的 durable staging record;平台入口负责校验 marker、owner 和 digest,必要时删除并重建摘要,再复读最终远端顺序。`result=completed` 即表示宿主已依据结构化结果和 receipt 安全完成;若还有外围 warning 或 pending step,返回 `result=completed_with_warnings`、warnings 和 pending steps。`result=failed` 或 `result=blocked` 仅用于硬失败或 receipt/capability 失败,修复原因后以同一入口重试,不得宣称完成或手工补写局部状态。沙箱不得从旧挂载执行 `ls completed` 或本地终态校验来重新裁决该结果。
|
|
179
179
|
|
|
180
180
|
### 7. 处理 finalization 重试与结果
|
|
181
181
|
|
|
@@ -13,13 +13,17 @@ If the entry operands contain `--orchestrated`, bind `{execution-flag}` to `--or
|
|
|
13
13
|
|
|
14
14
|
## Boundary / Critical Rules
|
|
15
15
|
|
|
16
|
+
### Path and rework
|
|
17
|
+
|
|
18
|
+
This stage consumes only the canonical path fact parsed by core from the latest valid analysis artifact; a stage omitted by that path must not create an artifact. When another Changes Requested verdict follows one completed revision-review cycle in the same stage, classify the rework before the next executor artifact and bind it to the finding, source SHA, and stable task-fact digest. A round or filename change is not new evidence.
|
|
19
|
+
|
|
16
20
|
### Persisted Report Evidence
|
|
17
21
|
|
|
18
22
|
Before generating the plan report, read `.agents/rules/evidence-reporting.md`. Record the command, target scope, status or structured result, actual result, and uncovered parts for state checks and verification; include decisive raw excerpts only for failures, blocking conditions, or disputes.
|
|
19
23
|
|
|
20
24
|
- When evaluating candidate qualification or `HD-N`, read `.agents/rules/decision-qualification.md`, audit normalized task constraints/candidates, and record the five qualification-audit tables in the plan artifact; unknown or unconfirmed constraints must not automatically exclude a candidate
|
|
21
25
|
- This skill only outputs a technical plan document (`plan.md` or `plan-r{N}.md`) and does not modify any business code
|
|
22
|
-
-
|
|
26
|
+
- The full path proceeds to plan review; the standard path may proceed directly to implementation
|
|
23
27
|
- Before generating task or lifecycle Markdown that will be synchronized to an Issue, read `.agents/rules/sync-content-generation.md` and apply its producer-side constraints; the sync path does not parse or rewrite the body
|
|
24
28
|
- When the plan touches compatibility, migration, old formats, or old entry points, read `.agents/rules/compatibility-policy.md` first. Do not design adapters, shims, dual writes, or parallel state machines without passing its admission gate
|
|
25
29
|
- After executing this skill, you **must** immediately update task status in task.md
|
|
@@ -62,7 +66,7 @@ If any required file is missing, prompt the user to complete the prerequisite st
|
|
|
62
66
|
|
|
63
67
|
### 2. Resolve the Artifact Context
|
|
64
68
|
|
|
65
|
-
Run `agent-infra-internal task-artifact {task-id} inspect --family plan`. Continue only for `ready
|
|
69
|
+
Run `agent-infra-internal task-artifact {task-id} inspect --family plan`. Continue only for `ready`. When `selection.disposition` is `reuse`, reuse `selection.artifact`, do not run started/init or write a new artifact, and continue directly to completion verification and next-step guidance. Otherwise take the latest `{analysis-artifact}` from `inputs` and `{plan-round}` / `{plan-artifact}` from `next.round` / `next.name`. Do not scan rounds or construct names in the skill. Then run the started event and verify the returned identity.
|
|
66
70
|
|
|
67
71
|
### 3. Read Requirements Analysis
|
|
68
72
|
|
|
@@ -169,7 +173,9 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
169
173
|
> Before rendering next steps, read `.agents/rules/next-step-output.md`, invoke the shared helper only for the selected scenario, and insert its stdout at `{next-step-commands}`.
|
|
170
174
|
|
|
171
175
|
Output format:
|
|
172
|
-
|
|
176
|
+
Select one command from the canonical path to populate `{next-step-commands}`:
|
|
177
|
+
- Standard: `agent-infra-internal agent-client next-steps --skill code-task --task-ref {task-ref}`
|
|
178
|
+
- Full: `agent-infra-internal agent-client next-steps --skill review-plan --task-ref {task-ref}`
|
|
173
179
|
|
|
174
180
|
```
|
|
175
181
|
Technical plan complete for task {task-id}.
|
|
@@ -184,10 +190,7 @@ Plan summary:
|
|
|
184
190
|
Output file:
|
|
185
191
|
- Technical plan: .agents/workspace/active/{task-id}/{plan-artifact}
|
|
186
192
|
|
|
187
|
-
|
|
188
|
-
Please review the technical plan before continuing to implementation.
|
|
189
|
-
|
|
190
|
-
Next step - review the technical plan:
|
|
193
|
+
Next step - continue on the selected path:
|
|
191
194
|
{next-step-commands}
|
|
192
195
|
```
|
|
193
196
|
|
|
@@ -201,18 +204,18 @@ Next step - review the technical plan:
|
|
|
201
204
|
- [ ] Recorded `{plan-artifact}` as a completed artifact in task.md
|
|
202
205
|
- [ ] Marked technical-design as complete in workflow progress
|
|
203
206
|
- [ ] Appended an Activity Log entry to task.md
|
|
204
|
-
- [ ]
|
|
207
|
+
- [ ] Selected code implementation or plan review from the canonical path
|
|
205
208
|
- [ ] Rendered the selected next-step commands through the shared helper
|
|
206
209
|
|
|
207
210
|
## STOP
|
|
208
211
|
|
|
209
212
|
After completing the checklist, **stop immediately**.
|
|
210
|
-
|
|
213
|
+
The full path proceeds to plan review here; the standard path proceeds directly to code implementation.
|
|
211
214
|
|
|
212
215
|
## Notes
|
|
213
216
|
|
|
214
217
|
1. **Prerequisite**: at least one round of requirements analysis must already be complete (`analysis.md` or `analysis-r{N}.md` exists)
|
|
215
|
-
2. **
|
|
218
|
+
2. **Next stage**: standard proceeds to code implementation; full proceeds to plan review
|
|
216
219
|
3. **Plan quality**: the plan should be detailed enough that another AI agent can implement it without extra context
|
|
217
220
|
4. **Versioning rule**: the first plan uses `plan.md`; later revisions use `plan-r{N}.md`
|
|
218
221
|
|
|
@@ -13,6 +13,10 @@ description: >
|
|
|
13
13
|
|
|
14
14
|
## 行为边界 / 关键规则
|
|
15
15
|
|
|
16
|
+
### 路径与返工
|
|
17
|
+
|
|
18
|
+
本阶段只消费核心从最新有效分析产物解析出的规范路径事实;未被所选路径包含的阶段不得创建产物。同阶段完成一次修订—复审后再次收到 Changes Requested 时,必须在下一执行产物前提交绑定 finding、来源 SHA 和稳定任务事实摘要的返工分类;轮次或文件名变化不是新证据。
|
|
19
|
+
|
|
16
20
|
### 持久化报告证据
|
|
17
21
|
|
|
18
22
|
生成方案报告时,先读取 `.agents/rules/evidence-reporting.md`。状态核对和验证记录命令、目标范围、状态/结构化结果、实际结果和未覆盖部分;失败、阻塞或争议才附决定性原文摘录。
|
|
@@ -20,7 +24,7 @@ description: >
|
|
|
20
24
|
- 涉及候选资格或 `HD-N` 判断时,先读取 `.agents/rules/decision-qualification.md`,基于 task.md 规范化约束/候选完成资格审计,并在方案产物记录五张资格审计表;不得把来源不明或未确认约束自动升级为排除条件
|
|
21
25
|
- 本技能仅产出技术方案文档(`plan.md` 或 `plan-r{N}.md`)—— 不修改任何业务代码
|
|
22
26
|
- 生成会同步到 Issue 的任务或生命周期 Markdown 前,先读取 `.agents/rules/sync-content-generation.md` 并遵循其中的生成端约束;同步端不解析或改写正文
|
|
23
|
-
-
|
|
27
|
+
- 完整路径进入方案审查;标准路径完成方案后可直接进入实现阶段
|
|
24
28
|
- 方案涉及兼容、迁移、旧格式或旧入口时,先读取 `.agents/rules/compatibility-policy.md`;未通过准入门槛时不得设计 adapter、shim、双写或并行状态机
|
|
25
29
|
- 执行本技能后,你**必须**立即更新 task.md 中的任务状态
|
|
26
30
|
|
|
@@ -65,7 +69,7 @@ agent-infra-internal task-event {task-id} plan.started --agent {standard-agent-t
|
|
|
65
69
|
|
|
66
70
|
### 2. 解析方案上下文
|
|
67
71
|
|
|
68
|
-
运行 `agent-infra-internal task-artifact {task-id} inspect --family plan`。仅当结果为 `ready`
|
|
72
|
+
运行 `agent-infra-internal task-artifact {task-id} inspect --family plan`。仅当结果为 `ready` 时继续。若 `selection.disposition` 为 `reuse`,复用 `selection.artifact`,不得执行 started、init 或写入新产物,并直接进入完成校验与下一步提示。其他状态从 `inputs` 取得最新 `{analysis-artifact}`,从 `next.round` / `next.name` 取得 `{plan-round}` / `{plan-artifact}`;不得自行扫描轮次或拼装文件名。随后执行 started 事件并复核返回身份。
|
|
69
73
|
|
|
70
74
|
### 3. 阅读需求分析
|
|
71
75
|
|
|
@@ -165,7 +169,9 @@ agent-infra-internal task-verify {task-id} plan.completed --artifact {plan-artif
|
|
|
165
169
|
> 渲染下一步前先读取 `.agents/rules/next-step-output.md`,仅为已选场景调用统一 helper,并将 stdout 填入 `{next-step-commands}`。
|
|
166
170
|
|
|
167
171
|
输出格式:
|
|
168
|
-
|
|
172
|
+
按分析中的规范路径选择一条命令生成 `{next-step-commands}`:
|
|
173
|
+
- 标准路径:`agent-infra-internal agent-client next-steps --skill code-task --task-ref {task-ref}`
|
|
174
|
+
- 完整路径:`agent-infra-internal agent-client next-steps --skill review-plan --task-ref {task-ref}`
|
|
169
175
|
|
|
170
176
|
```
|
|
171
177
|
任务 {task-id} 技术方案完成。
|
|
@@ -180,10 +186,7 @@ agent-infra-internal task-verify {task-id} plan.completed --artifact {plan-artif
|
|
|
180
186
|
产出文件:
|
|
181
187
|
- 技术方案:.agents/workspace/active/{task-id}/{plan-artifact}
|
|
182
188
|
|
|
183
|
-
|
|
184
|
-
请在继续实现之前审查技术方案。
|
|
185
|
-
|
|
186
|
-
下一步 - 审查技术方案:
|
|
189
|
+
下一步 - 按所选路径继续:
|
|
187
190
|
{next-step-commands}
|
|
188
191
|
```
|
|
189
192
|
|
|
@@ -197,18 +200,18 @@ agent-infra-internal task-verify {task-id} plan.completed --artifact {plan-artif
|
|
|
197
200
|
- [ ] 在 task.md 中记录了 `{plan-artifact}` 为已完成产物
|
|
198
201
|
- [ ] 在工作流进度中标记了 technical-design 为已完成
|
|
199
202
|
- [ ] 追加了 Activity Log 条目到 task.md
|
|
200
|
-
- [ ]
|
|
203
|
+
- [ ] 已按所选路径选择代码实现或方案审查
|
|
201
204
|
- [ ] 已通过统一 helper 渲染已选场景的下一步命令
|
|
202
205
|
|
|
203
206
|
## 停止
|
|
204
207
|
|
|
205
208
|
完成检查清单后,**立即停止**。
|
|
206
|
-
|
|
209
|
+
完整路径在此进入方案审查;标准路径直接进入代码实现。
|
|
207
210
|
|
|
208
211
|
## 注意事项
|
|
209
212
|
|
|
210
213
|
1. **前置条件**:必须已完成至少一轮需求分析(`analysis.md` 或 `analysis-r{N}.md` 存在)
|
|
211
|
-
2.
|
|
214
|
+
2. **后续阶段**:标准路径进入代码实现,完整路径进入方案审查
|
|
212
215
|
3. **计划质量**:计划应足够具体,使另一个 AI 代理无需额外上下文即可实现
|
|
213
216
|
4. **版本化规则**:首轮方案使用 `plan.md`;后续修订使用 `plan-r{N}.md`
|
|
214
217
|
|
|
@@ -15,6 +15,10 @@ Review the latest analysis artifact and produce `review-analysis.md` or `review-
|
|
|
15
15
|
|
|
16
16
|
## Boundary / Critical Rules
|
|
17
17
|
|
|
18
|
+
### Path and rework
|
|
19
|
+
|
|
20
|
+
This stage consumes only the canonical path fact parsed by core from the latest valid analysis artifact; a stage omitted by that path must not create an artifact. When another Changes Requested verdict follows one completed revision-review cycle in the same stage, classify the rework before the next executor artifact and bind it to the finding, source SHA, and stable task-fact digest. A round or filename change is not new evidence.
|
|
21
|
+
|
|
18
22
|
### Persisted Report Evidence
|
|
19
23
|
|
|
20
24
|
Before generating the review report, read `.agents/rules/evidence-reporting.md`. Normal inspection records the command, scope, structured result, actual conclusion, and uncovered parts; findings, blocking conditions, or disputes retain reproducible locations and decisive excerpts, while identity fields remain exact.
|
|
@@ -54,7 +58,7 @@ Require `task.md` and at least one analysis artifact: `analysis.md` or `analysis
|
|
|
54
58
|
|
|
55
59
|
### 2. Resolve Review Context
|
|
56
60
|
|
|
57
|
-
Run `agent-infra-internal task-artifact {task-id} inspect --family review-analysis`. Continue only for `ready
|
|
61
|
+
Run `agent-infra-internal task-artifact {task-id} inspect --family review-analysis`. Continue only for `ready`. When `selection.disposition` is `reuse`, reuse `selection.artifact`, do not run started/init or write a new artifact, and continue directly to completion verification and next-step guidance. Otherwise take `{analysis-artifact}` from `inputs` and `{review-round}` / `{review-artifact}` from `next.round` / `next.name`. Do not scan rounds or construct names in the skill.
|
|
58
62
|
|
|
59
63
|
### 3. Read Analysis Context
|
|
60
64
|
|
|
@@ -15,6 +15,10 @@ description: >
|
|
|
15
15
|
|
|
16
16
|
## 行为边界 / 关键规则
|
|
17
17
|
|
|
18
|
+
### 路径与返工
|
|
19
|
+
|
|
20
|
+
本阶段只消费核心从最新有效分析产物解析出的规范路径事实;未被所选路径包含的阶段不得创建产物。同阶段完成一次修订—复审后再次收到 Changes Requested 时,必须在下一执行产物前提交绑定 finding、来源 SHA 和稳定任务事实摘要的返工分类;轮次或文件名变化不是新证据。
|
|
21
|
+
|
|
18
22
|
### 持久化报告证据
|
|
19
23
|
|
|
20
24
|
生成审查报告时,先读取 `.agents/rules/evidence-reporting.md`。正常检视记录命令、范围、结构化结果、实际结论和未覆盖部分;finding、阻塞或争议保留可复现位置与决定性摘录,身份字段必须精确保留。
|
|
@@ -57,7 +61,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
57
61
|
|
|
58
62
|
### 2. 解析审查上下文
|
|
59
63
|
|
|
60
|
-
运行 `agent-infra-internal task-artifact {task-id} inspect --family review-analysis`。仅当结果为 `ready`
|
|
64
|
+
运行 `agent-infra-internal task-artifact {task-id} inspect --family review-analysis`。仅当结果为 `ready` 时继续。若 `selection.disposition` 为 `reuse`,复用 `selection.artifact`,不得执行 started、init 或写入新产物,并直接进入完成校验与下一步提示。其他状态从 `inputs` 取得 `{analysis-artifact}`,从 `next.round` / `next.name` 取得 `{review-round}` / `{review-artifact}`;不得自行扫描轮次或拼装文件名。随后执行 started 事件并复核返回身份。
|
|
61
65
|
|
|
62
66
|
### 3. 阅读分析上下文
|
|
63
67
|
|
|
@@ -15,6 +15,10 @@ Review the latest code round and produce `review-code.md` or `review-code-r{N}.m
|
|
|
15
15
|
|
|
16
16
|
## Boundary / Critical Rules
|
|
17
17
|
|
|
18
|
+
### Path and rework
|
|
19
|
+
|
|
20
|
+
This stage consumes only the canonical path fact parsed by core from the latest valid analysis artifact; a stage omitted by that path must not create an artifact. When another Changes Requested verdict follows one completed revision-review cycle in the same stage, classify the rework before the next executor artifact and bind it to the finding, source SHA, and stable task-fact digest. A round or filename change is not new evidence.
|
|
21
|
+
|
|
18
22
|
### Persisted Report Evidence
|
|
19
23
|
|
|
20
24
|
Before generating the review report, read `.agents/rules/evidence-reporting.md`. Normal inspection records the command, scope, structured result, actual conclusion, and uncovered parts; findings, blocking conditions, or disputes retain reproducible locations and decisive excerpts, while identity fields remain exact.
|
|
@@ -67,7 +71,7 @@ Require:
|
|
|
67
71
|
|
|
68
72
|
### 2. Resolve the Artifact Context
|
|
69
73
|
|
|
70
|
-
Run `agent-infra-internal task-artifact {task-id} inspect --family review-code`. Continue only for `ready
|
|
74
|
+
Run `agent-infra-internal task-artifact {task-id} inspect --family review-code`. Continue only for `ready`. When `selection.disposition` is `reuse`, reuse `selection.artifact`, do not run started/init or write a new artifact, and continue directly to completion verification and next-step guidance. Otherwise take the latest `{code-artifact}` from `inputs` and `{review-round}` / `{review-artifact}` from `next.round` / `next.name`. Do not scan rounds or construct names in the skill. Then run the started event and verify the returned identity.
|
|
71
75
|
|
|
72
76
|
### 3. Read Implementation and Refinement Context
|
|
73
77
|
|
|
@@ -15,6 +15,10 @@ description: >
|
|
|
15
15
|
|
|
16
16
|
## 行为边界 / 关键规则
|
|
17
17
|
|
|
18
|
+
### 路径与返工
|
|
19
|
+
|
|
20
|
+
本阶段只消费核心从最新有效分析产物解析出的规范路径事实;未被所选路径包含的阶段不得创建产物。同阶段完成一次修订—复审后再次收到 Changes Requested 时,必须在下一执行产物前提交绑定 finding、来源 SHA 和稳定任务事实摘要的返工分类;轮次或文件名变化不是新证据。
|
|
21
|
+
|
|
18
22
|
### 持久化报告证据
|
|
19
23
|
|
|
20
24
|
生成审查报告时,先读取 `.agents/rules/evidence-reporting.md`。正常检视记录命令、范围、结构化结果、实际结论和未覆盖部分;finding、阻塞或争议保留可复现位置与决定性摘录,身份字段必须精确保留。
|
|
@@ -66,7 +70,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
66
70
|
|
|
67
71
|
### 2. 解析审查上下文
|
|
68
72
|
|
|
69
|
-
运行 `agent-infra-internal task-artifact {task-id} inspect --family review-code`。仅当结果为 `ready`
|
|
73
|
+
运行 `agent-infra-internal task-artifact {task-id} inspect --family review-code`。仅当结果为 `ready` 时继续。若 `selection.disposition` 为 `reuse`,复用 `selection.artifact`,不得执行 started、init 或写入新产物,并直接进入完成校验与下一步提示。其他状态从 `inputs` 取得最新 `{code-artifact}`,从 `next.round` / `next.name` 取得 `{review-round}` / `{review-artifact}`;不得自行扫描轮次或拼装文件名。随后执行 started 事件并复核返回身份。
|
|
70
74
|
|
|
71
75
|
### 3. 阅读实现与修复上下文
|
|
72
76
|
|
|
@@ -15,6 +15,10 @@ Review the latest plan artifact and produce `review-plan.md` or `review-plan-r{N
|
|
|
15
15
|
|
|
16
16
|
## Boundary / Critical Rules
|
|
17
17
|
|
|
18
|
+
### Path and rework
|
|
19
|
+
|
|
20
|
+
This stage consumes only the canonical path fact parsed by core from the latest valid analysis artifact; a stage omitted by that path must not create an artifact. When another Changes Requested verdict follows one completed revision-review cycle in the same stage, classify the rework before the next executor artifact and bind it to the finding, source SHA, and stable task-fact digest. A round or filename change is not new evidence.
|
|
21
|
+
|
|
18
22
|
### Persisted Report Evidence
|
|
19
23
|
|
|
20
24
|
Before generating the review report, read `.agents/rules/evidence-reporting.md`. Normal inspection records the command, scope, structured result, actual conclusion, and uncovered parts; findings, blocking conditions, or disputes retain reproducible locations and decisive excerpts, while identity fields remain exact.
|
|
@@ -54,7 +58,7 @@ Require `task.md` and at least one plan artifact: `plan.md` or `plan-r{N}.md`.
|
|
|
54
58
|
|
|
55
59
|
### 2. Resolve the Artifact Context
|
|
56
60
|
|
|
57
|
-
Run `agent-infra-internal task-artifact {task-id} inspect --family review-plan`. Continue only for `ready
|
|
61
|
+
Run `agent-infra-internal task-artifact {task-id} inspect --family review-plan`. Continue only for `ready`. When `selection.disposition` is `reuse`, reuse `selection.artifact`, do not run started/init or write a new artifact, and continue directly to completion verification and next-step guidance. Otherwise take `{plan-artifact}` from `inputs` and `{review-round}` / `{review-artifact}` from `next.round` / `next.name`. Do not scan rounds or construct names in the skill. Then run the started event and verify the returned identity.
|
|
58
62
|
|
|
59
63
|
### 3. Read Plan Context
|
|
60
64
|
|
|
@@ -15,6 +15,10 @@ description: >
|
|
|
15
15
|
|
|
16
16
|
## 行为边界 / 关键规则
|
|
17
17
|
|
|
18
|
+
### 路径与返工
|
|
19
|
+
|
|
20
|
+
本阶段只消费核心从最新有效分析产物解析出的规范路径事实;未被所选路径包含的阶段不得创建产物。同阶段完成一次修订—复审后再次收到 Changes Requested 时,必须在下一执行产物前提交绑定 finding、来源 SHA 和稳定任务事实摘要的返工分类;轮次或文件名变化不是新证据。
|
|
21
|
+
|
|
18
22
|
### 持久化报告证据
|
|
19
23
|
|
|
20
24
|
生成审查报告时,先读取 `.agents/rules/evidence-reporting.md`。正常检视记录命令、范围、结构化结果、实际结论和未覆盖部分;finding、阻塞或争议保留可复现位置与决定性摘录,身份字段必须精确保留。
|
|
@@ -57,7 +61,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
57
61
|
|
|
58
62
|
### 2. 解析审查上下文
|
|
59
63
|
|
|
60
|
-
运行 `agent-infra-internal task-artifact {task-id} inspect --family review-plan`。仅当结果为 `ready`
|
|
64
|
+
运行 `agent-infra-internal task-artifact {task-id} inspect --family review-plan`。仅当结果为 `ready` 时继续。若 `selection.disposition` 为 `reuse`,复用 `selection.artifact`,不得执行 started、init 或写入新产物,并直接进入完成校验与下一步提示。其他状态从 `inputs` 取得 `{plan-artifact}`,从 `next.round` / `next.name` 取得 `{review-round}` / `{review-artifact}`;不得自行扫描轮次或拼装文件名。随后执行 started 事件并复核返回身份。
|
|
61
65
|
|
|
62
66
|
### 3. 阅读方案上下文
|
|
63
67
|
|
|
@@ -363,6 +363,13 @@ function assetMatches(entry, target) {
|
|
|
363
363
|
: normalizedTarget === normalizedEntry;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
+
function isOwnedByDisabledAgentClient(target, enabledSet) {
|
|
367
|
+
return AGENT_CLIENT_MANIFEST.some((adapter) =>
|
|
368
|
+
!enabledSet.has(adapter.id)
|
|
369
|
+
&& adapter.ownedPathPrefixes.some((prefix) => assetMatches(prefix, target))
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
|
|
366
373
|
function adapterAssets(adapters, category) {
|
|
367
374
|
return adapters.flatMap((adapter) => adapter[category]);
|
|
368
375
|
}
|
|
@@ -1914,6 +1921,15 @@ function syncTemplates(projectRoot, templateRootOverride) {
|
|
|
1914
1921
|
}
|
|
1915
1922
|
|
|
1916
1923
|
const mergedMap = new Map();
|
|
1924
|
+
const addMergedTarget = (target, source) => {
|
|
1925
|
+
if (
|
|
1926
|
+
isOwnedByDisabledAgentClient(target, enabledTUIs)
|
|
1927
|
+
&& !isCustomProtected(target, protectedCustomSkills, customCommandTargets)
|
|
1928
|
+
) {
|
|
1929
|
+
return;
|
|
1930
|
+
}
|
|
1931
|
+
if (!mergedMap.has(target)) mergedMap.set(target, source);
|
|
1932
|
+
};
|
|
1917
1933
|
for (const entry of merged) {
|
|
1918
1934
|
if (isPathOwnedByOtherPlatform(entry, platformType)) {
|
|
1919
1935
|
report.managed.skippedPlatform.push(entry);
|
|
@@ -1925,13 +1941,13 @@ function syncTemplates(projectRoot, templateRootOverride) {
|
|
|
1925
1941
|
return globMatch(entry, t);
|
|
1926
1942
|
});
|
|
1927
1943
|
for (const [t, s] of platformSelect(langSelect(hits, lang, allSet, project), platformType, project)) {
|
|
1928
|
-
|
|
1944
|
+
addMergedTarget(t, s);
|
|
1929
1945
|
}
|
|
1930
1946
|
} else {
|
|
1931
1947
|
const rels = entryVariantRels(entry, allSet, platformType);
|
|
1932
1948
|
const selected = platformSelect(langSelect(rels, lang, allSet, project), platformType, project);
|
|
1933
1949
|
for (const [t, s] of selected) {
|
|
1934
|
-
|
|
1950
|
+
addMergedTarget(t, s);
|
|
1935
1951
|
}
|
|
1936
1952
|
}
|
|
1937
1953
|
}
|
|
@@ -106,8 +106,8 @@ delivery_remote_head: # Most recent successfully delivered task branch
|
|
|
106
106
|
|
|
107
107
|
## Rework Intent
|
|
108
108
|
|
|
109
|
-
| intent_id | finding_id | source_artifact | source_sha256 | target | status | declared_at | consumed_at |
|
|
110
|
-
|
|
109
|
+
| intent_id | finding_id | source_artifact | source_sha256 | target | classification | evidence_digest | task_fact_digest | status | declared_at | consumed_at |
|
|
110
|
+
|-----------|------------|----------------|---------------|--------|----------------|-----------------|------------------|--------|-------------|-------------|
|
|
111
111
|
|
|
112
112
|
## Artifact Invalidation
|
|
113
113
|
|
|
@@ -106,8 +106,8 @@ delivery_remote_head: # 最近一次成功交付到 remote 的任务分
|
|
|
106
106
|
|
|
107
107
|
## 返工意图
|
|
108
108
|
|
|
109
|
-
| intent_id | finding_id | source_artifact | source_sha256 | target | status | declared_at | consumed_at |
|
|
110
|
-
|
|
109
|
+
| intent_id | finding_id | source_artifact | source_sha256 | target | classification | evidence_digest | task_fact_digest | status | declared_at | consumed_at |
|
|
110
|
+
|-----------|------------|----------------|---------------|--------|----------------|-----------------|------------------|--------|-------------|-------------|
|
|
111
111
|
|
|
112
112
|
## 产物失效记录
|
|
113
113
|
|