@fitlab-ai/agent-infra 0.11.0 → 0.11.2
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/dist/lib/internal/cli-route-inventory.js +1 -1
- package/dist/lib/internal/manual-validation.js +6 -2
- package/dist/lib/internal/platform-comment.js +59 -0
- package/dist/lib/internal/sandbox-control.js +4 -131
- package/dist/lib/internal/task-artifact.js +1 -1
- package/dist/lib/internal/task-operation-registry.js +1 -0
- package/dist/lib/internal/task-review.js +5 -5
- package/dist/lib/internal/task-validate.js +0 -6
- package/dist/lib/platform/comment-safety.js +7 -1
- package/dist/lib/platform/github-provider.js +13 -3
- package/dist/lib/platform/issue-comments.js +120 -13
- package/dist/lib/platform/issues.js +3 -4
- package/dist/lib/platform/provider-contract.d.ts +2 -0
- package/dist/lib/platform/provider-validation.js +7 -2
- package/dist/lib/platform/verification-sync.js +161 -156
- package/dist/lib/sandbox/control/executor.js +0 -38
- package/dist/lib/sandbox/control/finalization-response.js +10 -2
- package/dist/lib/sandbox/control/task-view.js +3 -1
- package/dist/lib/sandbox/control/workflow-executor.js +32 -41
- package/dist/lib/task/artifact-command.js +6 -6
- package/dist/lib/task/artifact-lifecycle.js +15 -52
- package/dist/lib/task/artifact-operations.js +27 -1
- package/dist/lib/task/capabilities.js +0 -2
- package/dist/lib/task/codex-orchestration.js +10 -208
- package/dist/lib/task/commit-operation.js +3 -18
- package/dist/lib/task/control-authority.js +1 -8
- package/dist/lib/task/delegation-receipts.js +14 -76
- package/dist/lib/task/events.js +147 -278
- package/dist/lib/task/finalization-state.js +2 -1
- package/dist/lib/task/finalization.js +273 -49
- package/dist/lib/task/gate-policy.js +94 -0
- package/dist/lib/task/lifecycle-execution.js +2 -11
- package/dist/lib/task/local-artifact-finalization.js +31 -245
- package/dist/lib/task/orchestration.js +8 -24
- package/dist/lib/task/review-artifacts.js +12 -6
- package/dist/lib/task/review-command.js +0 -1
- package/dist/lib/task/review-finalization.js +47 -218
- package/dist/lib/task/verification-engine.js +28 -17
- package/dist/lib/task/verification.js +25 -9
- package/dist/lib/task/workflow-command.js +4 -1
- package/dist/lib/task/workflow-dispatch.js +55 -3
- package/dist/lifecycle-build-manifest.json +3 -3
- package/lib/internal/cli-route-inventory.ts +1 -1
- package/lib/internal/manual-validation.ts +6 -2
- package/lib/internal/platform-comment.ts +38 -0
- package/lib/internal/sandbox-control.ts +3 -145
- package/lib/internal/task-artifact.ts +1 -1
- package/lib/internal/task-operation-registry.ts +1 -0
- package/lib/internal/task-review.ts +5 -5
- package/lib/internal/task-validate.ts +0 -5
- package/lib/platform/comment-safety.ts +8 -0
- package/lib/platform/github-provider.ts +11 -2
- package/lib/platform/issue-comments.ts +132 -13
- package/lib/platform/issues.ts +3 -4
- package/lib/platform/provider-contract.ts +2 -0
- package/lib/platform/provider-validation.ts +6 -2
- package/lib/platform/verification-sync.ts +178 -179
- package/lib/sandbox/control/executor.ts +0 -44
- package/lib/sandbox/control/finalization-response.ts +10 -2
- package/lib/sandbox/control/task-view.ts +3 -1
- package/lib/sandbox/control/workflow-executor.ts +31 -48
- package/lib/task/artifact-command.ts +6 -7
- package/lib/task/artifact-lifecycle.ts +12 -49
- package/lib/task/artifact-operations.ts +27 -1
- package/lib/task/capabilities.ts +0 -1
- package/lib/task/codex-orchestration.ts +8 -241
- package/lib/task/commit-operation.ts +3 -23
- package/lib/task/control-authority.ts +1 -8
- package/lib/task/delegation-receipts.ts +12 -79
- package/lib/task/events.ts +155 -287
- package/lib/task/finalization-state.ts +2 -1
- package/lib/task/finalization.ts +277 -57
- package/lib/task/gate-policy.ts +133 -0
- package/lib/task/lifecycle-execution.ts +10 -21
- package/lib/task/local-artifact-finalization.ts +29 -285
- package/lib/task/orchestration.ts +12 -41
- package/lib/task/review-artifacts.ts +8 -2
- package/lib/task/review-command.ts +0 -1
- package/lib/task/review-finalization.ts +46 -200
- package/lib/task/verification-engine.ts +24 -14
- package/lib/task/verification-types.ts +7 -0
- package/lib/task/verification.ts +25 -9
- package/lib/task/workflow-command.ts +4 -1
- package/lib/task/workflow-dispatch.ts +46 -3
- package/package.json +2 -2
- package/templates/.agents/rules/issue-sync.en.md +2 -0
- package/templates/.agents/rules/issue-sync.zh-CN.md +5 -8
- package/templates/.agents/rules/lifecycle-orchestration.en.md +7 -7
- package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +7 -7
- package/templates/.agents/rules/local-artifact-repair.en.md +14 -52
- package/templates/.agents/rules/local-artifact-repair.zh-CN.md +13 -52
- package/templates/.agents/skills/analyze-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/analyze-task/config/verify.en.json +1 -10
- package/templates/.agents/skills/analyze-task/config/verify.zh-CN.json +1 -10
- package/templates/.agents/skills/block-task/config/verify.json +1 -3
- package/templates/.agents/skills/cancel-task/config/verify.json +1 -4
- package/templates/.agents/skills/code-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/code-task/config/verify.en.json +1 -12
- package/templates/.agents/skills/code-task/config/verify.zh-CN.json +1 -12
- package/templates/.agents/skills/code-task/reference/dual-mode.en.md +1 -1
- package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +1 -1
- package/templates/.agents/skills/code-task/reference/report-template.en.md +11 -0
- package/templates/.agents/skills/code-task/reference/report-template.zh-CN.md +11 -0
- package/templates/.agents/skills/commit/config/verify.json +1 -5
- package/templates/.agents/skills/complete-manual-validation/config/verify.en.json +6 -6
- package/templates/.agents/skills/complete-manual-validation/config/verify.zh-CN.json +6 -6
- package/templates/.agents/skills/complete-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/complete-task/config/verify.en.json +3 -14
- package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +3 -14
- package/templates/.agents/skills/create-pr/config/verify.json +1 -10
- package/templates/.agents/skills/create-task/config/verify.json +1 -4
- package/templates/.agents/skills/import-issue/config/verify.json +1 -2
- package/templates/.agents/skills/plan-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/plan-task/config/verify.en.json +1 -10
- package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +1 -10
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/review-analysis/SKILL.en.md +2 -2
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/review-analysis/config/verify.en.json +1 -10
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +1 -10
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +2 -0
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +2 -0
- package/templates/.agents/skills/review-code/SKILL.en.md +3 -3
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/review-code/config/verify.en.json +1 -10
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +1 -10
- package/templates/.agents/skills/review-code/reference/report-template.en.md +2 -0
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +2 -0
- package/templates/.agents/skills/review-plan/SKILL.en.md +2 -2
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/review-plan/config/verify.en.json +1 -10
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +1 -10
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +2 -0
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +2 -0
- package/templates/.agents/skills/review-pr/config/verify.en.json +1 -8
- package/templates/.agents/skills/review-pr/config/verify.zh-CN.json +1 -8
- package/templates/.agents/skills/run-manual-validation/config/verify.en.json +38 -13
- package/templates/.agents/skills/run-manual-validation/config/verify.zh-CN.json +38 -13
- package/templates/.agents/skills/run-task/SKILL.en.md +6 -6
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/run-task/reference/host-validation.en.md +2 -2
- package/templates/.agents/skills/run-task/reference/host-validation.zh-CN.md +2 -2
|
@@ -39,6 +39,8 @@ PR event `in:` synchronization uses `agent-infra-internal platform-pr sync-in-la
|
|
|
39
39
|
|
|
40
40
|
`planned|applied|no-op|degraded` exit 0; `failed` exits 1; `blocked` exits 2.
|
|
41
41
|
|
|
42
|
+
Lifecycle verification treats Issue Type, milestones, labels, requirement anchors, and noncritical comments as platform audits. Each audit retains its check id, raw status, reason, and action; missing structure, unavailable optional capability, or a value mismatch does not block a gate. Identity ambiguity, protocol conflicts, actual write failures, and unknown post-write state remain hard failures.
|
|
43
|
+
|
|
42
44
|
Map material degraded/failed/blocked results to workflow warnings through the structured intent; callers must not edit warning rows directly:
|
|
43
45
|
|
|
44
46
|
```bash
|
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
| `artifactChunk` | `<!-- sync-issue:{task-id}:{artifact-stem}:{part}/{total} -->` |
|
|
14
14
|
| `summary` | `<!-- sync-issue:{task-id}:summary -->` |
|
|
15
15
|
| `cancel` | `<!-- sync-issue:{task-id}:cancel -->` |
|
|
16
|
-
| `recoveryAction` | `<!-- sync-issue:{task-id}:recovery-action:{action-id} -->` |
|
|
17
|
-
| `recoveryPrepare` | `<!-- sync-issue:{task-id}:recovery-prepare:{commit-id} -->` |
|
|
18
|
-
| `recoveryCommit` | `<!-- sync-issue:{task-id}:recovery-commit:{commit-id} -->` |
|
|
19
16
|
|
|
20
17
|
`prSummary` 属于 `.agents/rules/pr-sync.md`,本规则不实现 PR 聚合。
|
|
21
18
|
|
|
@@ -32,15 +29,15 @@ agent-infra-internal platform-comment recover --issue <issue-token> --task-id <T
|
|
|
32
29
|
--output <.agents/workspace/.restore-staging-*/task.md> [--cwd <path>]
|
|
33
30
|
agent-infra-internal platform-comment owner <task-ref>
|
|
34
31
|
agent-infra-internal platform-comment sync <task-ref> \
|
|
35
|
-
--kind task|artifact|summary|cancel
|
|
32
|
+
--kind task|artifact|summary|cancel --agent {standard-agent-token} \
|
|
36
33
|
[--artifact <canonical.md>] [--body-file <path|->] [--backfill]
|
|
37
34
|
```
|
|
38
35
|
|
|
39
36
|
- `applied|no-op|degraded` → exit 0;`failed` → exit 1;`blocked` → exit 2。
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
- 生命周期验证把 Issue Type、milestone、labels、需求锚点和非关键评论作为平台审计。每条审计保留 check id、原始状态、reason 和 action;缺失、权限不足或值不一致不会阻塞 gate。身份歧义、协议冲突、实际写入失败和写后状态未知仍为硬失败。
|
|
38
|
+
- task 评论保持 `<details>` frontmatter 可逆格式,只同步确定性的当前任务投影,并折叠保留创建任务、人工决策等关联动作。artifact 评论在正文前折叠显示该产物动作及其提交记录;交付摘要保留创建 PR 与完成任务记录。每条评论的元数据可包含多条日志。恢复核心从这些元数据重建活动日志,绝不把完整 `task.md` 作为评论载荷保存。artifact 原文内联并在超过 profile 上限时使用 `artifactChunk`。
|
|
39
|
+
- 长度预检与 platform verification 使用同一最终渲染正文的 UTF-8 字节数。正文超限时失败关闭;本地 `task.md` 不会被截断。
|
|
40
|
+
- 恢复元数据包含动作关联的日志条目和校验摘要。restore 只接受与 task 评论同作者、任务身份匹配且校验通过的元数据;缺失或损坏的记录不得推测。
|
|
44
41
|
- 相同 intent 重放必须收敛为 `no-op`;重复 marker 返回 `COMMENT_MARKER_CONFLICT` 且不写入。
|
|
45
42
|
- 外部贡献者锁定统一使用 `platform-comment owner`;不同作者且无 triage 时返回 `COMMENT_OWNER_CONFLICT`。
|
|
46
43
|
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
- The orchestrator only routes and delegates. Stage skills remain the single source of truth for behavior and artifacts.
|
|
6
6
|
- Every stage and rework round uses a fresh executor. Every review uses a fresh reviewer; follow-up reuse is forbidden.
|
|
7
7
|
- A reviewer may only write its review artifact and core-generated task metadata. Business-code, HEAD, or index changes invalidate the receipt.
|
|
8
|
-
- An active run has one pending delegation.
|
|
8
|
+
- An active run has one pending delegation. Keep the stage associated with the observed child and report actual start and terminal failures.
|
|
9
9
|
- The first release ends after one existing safely gated `commit`; it does not create a PR, monitor checks, or complete the task.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Current Execution Records
|
|
12
12
|
|
|
13
|
-
`orchestration.json`
|
|
13
|
+
`orchestration.json` records stages, model policy, child identity, and actual outcomes. Records use the current structure; trusted local operators may correct them and rerun validation. Existing task write locks and atomic writes protect updates.
|
|
14
14
|
|
|
15
|
-
## Codex Host
|
|
15
|
+
## Codex Host
|
|
16
16
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
17
|
+
- Use native spawn, wait, and App Server results from the current host; forward task operations through the existing broker.
|
|
18
|
+
- Prepare validates the current task, model policy, and host preflight. Start and terminal records associate observed parent/child identity; failure must not be recorded as success.
|
|
19
|
+
- Local execution does not require capability, controller attestation, or one-use consumption authority. Do not add automatic child discovery, spawn under a new lock protocol, orphan recovery, or a dedicated recovery protocol.
|
|
20
20
|
|
|
21
21
|
## Model Policy
|
|
22
22
|
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
- 总控只路由和委派;阶段技能仍是业务规则与产物格式的单一事实源。
|
|
6
6
|
- 每个阶段和每轮返工都创建 fresh executor;每轮审查创建 fresh reviewer,禁止 follow-up 复用。
|
|
7
7
|
- reviewer 只能写当前审查产物和核心生成的任务元数据。业务代码、HEAD 或暂存区变化会使 receipt 失效。
|
|
8
|
-
- active run 中只有一个 pending delegation
|
|
8
|
+
- active run 中只有一个 pending delegation;阶段与实际 child 身份保持一致,启动和终态失败如实记录。
|
|
9
9
|
- 首版成功终点是一次通过既有安全门禁的 `commit`;不创建 PR、不监控 checks、不执行 `complete-task`。
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## 当前执行记录
|
|
12
12
|
|
|
13
|
-
`orchestration.json`
|
|
13
|
+
`orchestration.json` 记录阶段、模型策略、child 身份及实际执行结果。记录必须符合当前结构;本地操作者可直接修正后重新校验。已有任务写锁与原子写入继续保护写操作。
|
|
14
14
|
|
|
15
|
-
## Codex
|
|
15
|
+
## Codex 宿主
|
|
16
16
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
17
|
+
- 使用当前宿主的原生 spawn、wait 与 App Server 结果;任务操作通过现有 broker 转发。
|
|
18
|
+
- prepare 校验当前任务、模型策略与宿主 preflight。启动和完成记录关联实际 parent/child 身份,失败不得写成成功。
|
|
19
|
+
- 不要求 capability、controller attestation 或一次性消费授权本地实现;不新增 child 自动发现、锁内启动交接、孤立 child 恢复或专用恢复协议。
|
|
20
20
|
|
|
21
21
|
## 模型策略
|
|
22
22
|
|
|
@@ -1,65 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Shared Rule - Current Local Artifact Revalidation
|
|
2
2
|
|
|
3
|
-
This rule
|
|
3
|
+
This rule applies to lifecycle artifact validation. Finalizers read the canonical artifact directly and do not create recovery candidates, generations, baselines, journals, or recovery identities.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Current validation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- Preflight stable-reads and validates candidate `S`, then seals immutable digest-addressed generation `R`; candidate SHA is an observation rather than an edit guard.
|
|
11
|
-
- Preflight publishes active `R` through `preflight-ready → preflight-commit-started → preflight-passed`; the business finalizer publishes `F` through `full-finalizer-ready → commit-started → passed` and reuses `R` when `F=R`.
|
|
12
|
-
- Candidate-only is a protocol authorization boundary, not OS isolation: a same-UID process with arbitrary host filesystem write access may tamper with recovery internals. Identity, fingerprint, and state checks detect such anomalies and fail closed, but the protocol does not claim an independent security principal or cross-platform isolation.
|
|
7
|
+
1. Run the applicable finalizer before a completed event and use its returned `artifactSha256` and `semanticDigest`.
|
|
8
|
+
2. On failure, read diagnostics, make one minimal repair to the canonical artifact, and rerun with the same task, family/stage, and artifact.
|
|
9
|
+
3. Every rerun validates structure, qualification, upstream relations, ledger state, and current digests. Stop without publishing completed when there is no progress or repair is unsafe.
|
|
13
10
|
|
|
14
|
-
##
|
|
11
|
+
## Editing boundary
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
- The model may edit only the one ordinary artifact declared by the current skill. It must not edit `task.md`, ledgers, receipts, source code, other reports, or remote resources.
|
|
18
|
-
- `changed=false`, an error code, or a format shape is diagnostic evidence, not edit authorization. Stop on unproven human-decision semantics, concurrency, permission, I/O, identity, provenance, or unknown state.
|
|
13
|
+
Agents may edit only the artifact declared by the current skill.
|
|
19
14
|
|
|
20
|
-
##
|
|
15
|
+
## Completed events
|
|
21
16
|
|
|
22
|
-
|
|
17
|
+
Completed events still validate current digests, rounds, inputs, and external facts.
|
|
23
18
|
|
|
24
|
-
|
|
25
|
-
2. task, family/stage, round, artifact, request/authority, and baseline fingerprints still match;
|
|
26
|
-
3. `candidatePath` is the ordinary file generated by the recovery core and the formal target has not changed externally;
|
|
27
|
-
4. the edit does not change human-decision semantics, detail or ledger identity, and introduces no other side effect.
|
|
28
|
-
|
|
29
|
-
If any condition fails, stop without editing or publishing a completed event.
|
|
30
|
-
|
|
31
|
-
## Durable recovery states
|
|
32
|
-
|
|
33
|
-
| State | Formal artifact | Allowed action |
|
|
34
|
-
| --- | --- | --- |
|
|
35
|
-
| `awaiting-preflight-recovery` | baseline `B` | Edit `S`; stable-read, validate, and create `R` |
|
|
36
|
-
| `preflight-ready` / `preflight-commit-started` | `B` or `R` | Reconcile/publish only active immutable `R` |
|
|
37
|
-
| `preflight-passed` | `R` | Run the business finalizer for `F` |
|
|
38
|
-
| `full-finalizer-ready` / `commit-started` | `R` or `F` | Reconcile/publish only pending immutable `F` |
|
|
39
|
-
| `passed` | `F` | Completed event validates the final digest and consumes the intent |
|
|
40
|
-
| `consumed` | `F` | Cleanup may reclaim the controlled staging and backup |
|
|
41
|
-
| `aborted` | verified restored `B` | Preserve diagnostics; never fabricate success |
|
|
42
|
-
|
|
43
|
-
The intent is current-only schema version 4. Legacy schemas fail closed; do not add migration, adapters, or dual writes. Candidate, baseline, generation, and intent files live in controlled repo-local directories and use canonical recovery IDs, regular-file checks, stable reads, the task lock, and expected-value CAS. No cross-file atomicity is claimed; unknown combinations remain indeterminate and retain their evidence.
|
|
44
|
-
|
|
45
|
-
## Dynamic convergence loop
|
|
46
|
-
|
|
47
|
-
1. Run the finalizer with the fixed invocation.
|
|
48
|
-
2. If it fails and the gates pass, read the structured diagnostic and `candidatePath`, then make one minimal, explainable candidate edit.
|
|
49
|
-
3. Confirm byte-level progress and rerun every finalizer check with the same `--recovery-id`.
|
|
50
|
-
4. Stop on repeated diagnostics or fingerprints, no byte progress, unknown recovery state, or the eight-edit limit for the current invocation. Do not publish a completed event or generate a cross-stage next step.
|
|
51
|
-
|
|
52
|
-
## Shared entry points
|
|
53
|
-
|
|
54
|
-
The current entry points are `task-artifact ... inspect|init|finalize-local` and `task-review ... finalize-summary`. Recovery retries use the `recoveryId` returned by the finalizer, for example:
|
|
19
|
+
## Shared entry point
|
|
55
20
|
|
|
56
21
|
```text
|
|
57
|
-
agent-infra-internal task-artifact {task-id} finalize-local --family code --artifact {code-artifact}
|
|
58
|
-
agent-infra-internal task-review {task-id} finalize-summary --stage code --artifact {review-artifact} --recovery-id {recovery-id}
|
|
22
|
+
agent-infra-internal task-artifact {task-id} finalize-local --family code --artifact {code-artifact}
|
|
59
23
|
```
|
|
60
24
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
## Lifecycle isolation
|
|
25
|
+
## Stop conditions
|
|
64
26
|
|
|
65
|
-
|
|
27
|
+
Stop when repair is unsafe or makes no progress.
|
|
@@ -1,66 +1,27 @@
|
|
|
1
|
-
# 通用规则 -
|
|
1
|
+
# 通用规则 - 当前本地产物重验
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
本规则适用于生命周期产物的当前校验。finalizer 直接读取正式 artifact,不创建 recovery candidate、generation、baseline、journal 或 recovery identity。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 当前校验
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- 只有在机械安全门通过后,模型才可编辑返回的 `candidatePath`;每次实际字节变化后,用同一 task、stage/family、artifact 和 `--recovery-id` 完整重跑 finalizer。不得直接编辑正式 artifact 后假设它属于候选。
|
|
11
|
-
- preflight 按 `preflight-ready → preflight-commit-started → preflight-passed` 发布 immutable `R`;业务 finalizer 再按 `full-finalizer-ready → commit-started → passed` 将 `F` 发布。`F=R` 复用 active generation。
|
|
12
|
-
- preflight-ready 后 publish 只读取 active/pending generation,绝不再读取可编辑 candidate。
|
|
13
|
-
- candidate-only 是协议授权边界,不是操作系统隔离:拥有同一 UID 且可任意写入宿主文件系统的进程可能篡改 recovery 内部文件;协议会通过身份、指纹和状态校验发现异常并失败关闭,但不承诺独立权限主体或跨平台隔离。
|
|
7
|
+
1. completed event 前运行对应 finalizer,并使用该次返回的 `artifactSha256` 和 `semanticDigest`。
|
|
8
|
+
2. 失败时读取诊断,对正式 artifact 作一次最小修正,再以相同 task、family/stage 和 artifact 重跑。
|
|
9
|
+
3. 每次重跑重新校验结构、资格、上游关系、账本和当前摘要;没有进展或无法安全修正时停止,不发布 completed。
|
|
14
10
|
|
|
15
|
-
##
|
|
11
|
+
## 编辑边界
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
- 模型只能修改当前 skill 声明的一个普通 artifact。不得修改 task.md、账本、receipt、源码、其他报告或远端资源。
|
|
19
|
-
- `changed=false`、错误码和格式形状只是诊断事实,不是编辑授权。人工裁决、并发、权限、I/O、身份、provenance 或未知状态无法证明安全时,立即停止。
|
|
13
|
+
模型只能修改当前 skill 声明的 artifact。
|
|
20
14
|
|
|
21
|
-
##
|
|
15
|
+
## 完成事件
|
|
22
16
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
1. finalizer 返回失败并提供同一 recovery context,且没有正式提交;
|
|
26
|
-
2. task、family/stage、round、artifact、request/authority 和 baseline 指纹仍匹配;
|
|
27
|
-
3. `candidatePath` 是 recovery core 生成的受控普通文件,formal target 没有外部变化;
|
|
28
|
-
4. 修改不改变人工裁决语义、详情或账本身份,也不引入其他副作用。
|
|
29
|
-
|
|
30
|
-
任一条件不满足,停止,不编辑、不发布 completed。
|
|
31
|
-
|
|
32
|
-
## Durable recovery 状态
|
|
33
|
-
|
|
34
|
-
| 状态 | formal artifact | 允许动作 |
|
|
35
|
-
| --- | --- | --- |
|
|
36
|
-
| `awaiting-preflight-recovery` | baseline `B` | 只编辑 candidate `S`,稳定读取、验证并生成 `R` |
|
|
37
|
-
| `preflight-ready` / `preflight-commit-started` | `B` 或 `R` | 只可从 active immutable `R` reconcile/publish |
|
|
38
|
-
| `preflight-passed` | `R` | 执行业务 finalizer,生成或复用 `F` |
|
|
39
|
-
| `full-finalizer-ready` / `commit-started` | `R` 或 `F` | 只可从 pending immutable `F` reconcile/publish |
|
|
40
|
-
| `passed` | `F` | completed event 校验 final digest 后消费 |
|
|
41
|
-
| `consumed` | `F` | 可由中间产物清理流程回收受控 staging/backup |
|
|
42
|
-
| `aborted` | 已确认恢复的 `B` | 只保留诊断,不得伪造成功 |
|
|
43
|
-
|
|
44
|
-
intent 使用 current-only schema version 4。旧 schema 直接失败关闭;不添加迁移、adapter 或双写。candidate、baseline、generation 和 intent 位于 repo-local 受控目录,使用 canonical recovery ID、普通文件检查、stable read、task lock 和 expected-value CAS。跨文件不宣称原子性;未知组合返回 indeterminate 并保留现场。
|
|
45
|
-
|
|
46
|
-
## 动态收敛循环
|
|
47
|
-
|
|
48
|
-
1. 用固定 invocation 运行 finalizer。
|
|
49
|
-
2. 失败且安全门通过时,读取结构化诊断和 `candidatePath`,只作一次最小、可解释的候选编辑。
|
|
50
|
-
3. 确认字节变化后,使用同一 `--recovery-id` 完整重跑全部 finalizer 校验。
|
|
51
|
-
4. 诊断或指纹重复、无字节进展、恢复状态未知或达到当前 invocation 的 8 次编辑上限时停止;不发布 completed,不生成跨阶段 next-step。
|
|
17
|
+
completed event 仍校验当前 digest、round、输入和外部事实。
|
|
52
18
|
|
|
53
19
|
## 共享入口
|
|
54
20
|
|
|
55
|
-
`task-artifact ... inspect|init|preflight|finalize-local` 和 `task-review ... finalize-summary` 是当前入口。preflight 不发布 task metadata、ledger、formal provenance、completed event 或平台状态;恢复重试使用 finalizer 返回的 `recoveryId`,例如:
|
|
56
|
-
|
|
57
21
|
```text
|
|
58
|
-
agent-infra-internal task-artifact {task-id} finalize-local --family code --artifact {code-artifact}
|
|
59
|
-
agent-infra-internal task-review {task-id} finalize-summary --stage code --artifact {review-artifact} --recovery-id {recovery-id}
|
|
22
|
+
agent-infra-internal task-artifact {task-id} finalize-local --family code --artifact {code-artifact}
|
|
60
23
|
```
|
|
61
24
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
## 生命周期隔离
|
|
25
|
+
## 停止条件
|
|
65
26
|
|
|
66
|
-
|
|
27
|
+
无法安全修正或没有进展时停止。
|
|
@@ -140,7 +140,7 @@ Before writing this round's `{analysis-artifact}`, create the controlled report
|
|
|
140
140
|
agent-infra-internal task-artifact {task-id} init --family analysis --artifact {analysis-artifact} --locale en
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
The skeleton contains identity metadata, stable section markers, and required headings only; real analysis content is required before the completion gate can pass.
|
|
143
|
+
The skeleton contains identity metadata, stable section markers, and required headings only; real analysis content is required before the completion gate can pass. On a structural error, correct the formal artifact directly and rerun `task-artifact {task-id} finalize-local --family analysis --artifact {analysis-artifact}`; current structure, qualification, and summary facts are the only gate.
|
|
144
144
|
|
|
145
145
|
> 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.
|
|
146
146
|
|
|
@@ -223,8 +223,8 @@ agent-infra-internal task-artifact {task-id} finalize-local --family analysis --
|
|
|
223
223
|
```
|
|
224
224
|
|
|
225
225
|
- On `status=passed`, save that result's `artifactSha256` and `semanticDigest`; the finalizer has recorded the matching one-shot local provenance intent.
|
|
226
|
-
- On `status=failed
|
|
227
|
-
-
|
|
226
|
+
- On `status=failed`, correct the formal artifact directly and rerun the finalizer completely; if the current diagnostic remains unresolved, continue to the next attempt.
|
|
227
|
+
- On an external formal-artifact change, an unsafe repair, repeated diagnostics or fingerprints, no progress, or the shared edit limit, stop without publishing a completed event.
|
|
228
228
|
|
|
229
229
|
Use the digests from that same `status=passed` result in `agent-infra-internal task-event {task-id} analyze.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {analysis-artifact} --artifact-sha256 {artifact-sha256} --semantic-digest {semantic-digest} {execution-flag}` so the core records the link, stage, agent, metadata, and Activity Log atomically.
|
|
230
230
|
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Analyze Task (Round {N})** by {agent} — Analysis completed → {analysis-artifact}
|
|
@@ -143,7 +143,7 @@ agent-infra-internal task-event {task-id} analyze.started --agent {standard-agen
|
|
|
143
143
|
agent-infra-internal task-artifact {task-id} init --family analysis --artifact {analysis-artifact}
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
-
骨架只包含身份元数据、稳定 section marker 和必需标题;必须填入真实分析内容后才能通过完成门禁。finalizer
|
|
146
|
+
骨架只包含身份元数据、稳定 section marker 和必需标题;必须填入真实分析内容后才能通过完成门禁。finalizer 返回结构错误时,直接修正正式产物后重跑 `task-artifact {task-id} finalize-local --family analysis --artifact {analysis-artifact}`;当前结构、资格和摘要事实是唯一门禁。
|
|
147
147
|
|
|
148
148
|
> 步骤 6–9 属**场景 A(正常产出)**路径。**场景 B(提问早退)**已在步骤 4 内完成状态更新、task 评论同步与校验并 STOP,不进入这些步骤。
|
|
149
149
|
|
|
@@ -226,8 +226,8 @@ agent-infra-internal task-artifact {task-id} init --family analysis --artifact {
|
|
|
226
226
|
agent-infra-internal task-artifact {task-id} finalize-local --family analysis --artifact {analysis-artifact}
|
|
227
227
|
```
|
|
228
228
|
- `status=passed`:保存本次返回的 `artifactSha256` 和 `semanticDigest`;finalizer 已记录对应的一次性本地 provenance intent。
|
|
229
|
-
- `status=failed
|
|
230
|
-
-
|
|
229
|
+
- `status=failed`:直接修正正式产物并完整重跑 finalizer;若仍失败且诊断未解决,继续下一轮。
|
|
230
|
+
- 当前正式产物发生外部变化、无法安全修复、诊断或指纹重复、无进展,或达到共享规则的编辑上限时停止,不发布 completed 事件。
|
|
231
231
|
- 使用同一次 `status=passed` 返回的摘要执行 `agent-infra-internal task-event {task-id} analyze.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {analysis-artifact} --artifact-sha256 {artifact-sha256} --semantic-digest {semantic-digest} {execution-flag}`,由核心登记链接、阶段、代理、时间、版本和 Activity Log。
|
|
232
232
|
|
|
233
233
|
如果 task.md 中存在有效的 `platform_issue_identity`,执行以下同步操作(任一失败则跳过并继续):
|
|
@@ -24,16 +24,7 @@
|
|
|
24
24
|
"expected_action_pattern": "(Analyze Task|Requirement Analysis) \\(Round \\d+\\)"
|
|
25
25
|
},
|
|
26
26
|
"platform-sync": {
|
|
27
|
-
"when": "platform_issue_identity_exists"
|
|
28
|
-
"expected_status_label": "status: pending-design-work",
|
|
29
|
-
"expected_comment_marker": "<!-- sync-issue:{task-id}:{artifact-stem} -->",
|
|
30
|
-
"verify_comment_content": true,
|
|
31
|
-
"verify_task_comment_content": true,
|
|
32
|
-
"verify_issue_type": true,
|
|
33
|
-
"verify_issue_fields": false,
|
|
34
|
-
"verify_milestone": true,
|
|
35
|
-
"expected_status_label_key": "pendingDesignWork",
|
|
36
|
-
"expected_comment_marker_key": "artifact"
|
|
27
|
+
"when": "platform_issue_identity_exists"
|
|
37
28
|
}
|
|
38
29
|
}
|
|
39
30
|
}
|
|
@@ -24,16 +24,7 @@
|
|
|
24
24
|
"expected_action_pattern": "(Analyze Task|Requirement Analysis) \\(Round \\d+\\)"
|
|
25
25
|
},
|
|
26
26
|
"platform-sync": {
|
|
27
|
-
"when": "platform_issue_identity_exists"
|
|
28
|
-
"expected_status_label": "status: pending-design-work",
|
|
29
|
-
"expected_comment_marker": "<!-- sync-issue:{task-id}:{artifact-stem} -->",
|
|
30
|
-
"verify_comment_content": true,
|
|
31
|
-
"verify_task_comment_content": true,
|
|
32
|
-
"verify_issue_type": true,
|
|
33
|
-
"verify_issue_fields": false,
|
|
34
|
-
"verify_milestone": true,
|
|
35
|
-
"expected_status_label_key": "pendingDesignWork",
|
|
36
|
-
"expected_comment_marker_key": "artifact"
|
|
27
|
+
"when": "platform_issue_identity_exists"
|
|
37
28
|
}
|
|
38
29
|
}
|
|
39
30
|
}
|
|
@@ -21,9 +21,7 @@
|
|
|
21
21
|
"expected_action_pattern": "(Block Task|Blocked)"
|
|
22
22
|
},
|
|
23
23
|
"platform-sync": {
|
|
24
|
-
"when": "platform_issue_identity_exists"
|
|
25
|
-
"expected_status_label": "status: blocked",
|
|
26
|
-
"expected_status_label_key": "blocked"
|
|
24
|
+
"when": "platform_issue_identity_exists"
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
27
|
}
|
|
@@ -22,10 +22,7 @@
|
|
|
22
22
|
"expected_action_pattern": "(Cancel Task|Cancelled)"
|
|
23
23
|
},
|
|
24
24
|
"platform-sync": {
|
|
25
|
-
"when": "platform_issue_identity_exists"
|
|
26
|
-
"expected_comment_marker": "<!-- sync-issue:{task-id}:cancel -->",
|
|
27
|
-
"verify_task_comment_content": true,
|
|
28
|
-
"expected_comment_marker_key": "cancel"
|
|
25
|
+
"when": "platform_issue_identity_exists"
|
|
29
26
|
}
|
|
30
27
|
}
|
|
31
28
|
}
|
|
@@ -122,7 +122,7 @@ Before writing this round's `{code-artifact}`, create the controlled report skel
|
|
|
122
122
|
agent-infra-internal task-artifact {task-id} init --family code --artifact {code-artifact} --locale en
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
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.
|
|
125
|
+
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.
|
|
126
126
|
|
|
127
127
|
Create `.agents/workspace/active/{task-id}/{code-artifact}`.
|
|
128
128
|
|
|
@@ -139,8 +139,8 @@ echo "$finalizer"
|
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
- `status=0` with `finalizer.status="passed"`: bind `{artifact-sha256}` and `{semantic-digest}` from this result.
|
|
142
|
-
- `status=1
|
|
143
|
-
- For any other failure, external formal-artifact change, lack of progress, or
|
|
142
|
+
- `status=1`: correct the formal artifact directly and rerun the entry point completely; a failed preflight reruns preflight and a failed finalizer reruns that finalizer. If the current diagnostic remains unresolved, continue to the next attempt.
|
|
143
|
+
- For any other failure, external formal-artifact change, an unsafe repair, repeated diagnostics or fingerprints, lack of progress, or the shared edit limit, stop without publishing `code.completed`.
|
|
144
144
|
|
|
145
145
|
Do not rescan or manually write digest data; the completion event must include `--artifact-sha256 {artifact-sha256} --semantic-digest {semantic-digest}` from the successful finalizer result.
|
|
146
146
|
|
|
@@ -162,7 +162,7 @@ checkpoint 成功后,若任务存在 `platform_issue_identity`,调用 `agent
|
|
|
162
162
|
agent-infra-internal task-artifact {task-id} init --family code --artifact {code-artifact}
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
骨架只包含身份元数据、稳定 section marker 和必需标题;必须填入真实实现与验证内容后才能通过完成门禁。
|
|
165
|
+
骨架只包含身份元数据、稳定 section marker 和必需标题;必须填入真实实现与验证内容后才能通过完成门禁。preflight 或 finalizer 返回结构错误时,按 `.agents/rules/local-artifact-repair.md` 直接修正正式产物并重跑原入口;当前结构、资格和摘要事实是唯一门禁。
|
|
166
166
|
|
|
167
167
|
创建 `.agents/workspace/active/{task-id}/{code-artifact}`。
|
|
168
168
|
|
|
@@ -179,8 +179,8 @@ echo "$finalizer"
|
|
|
179
179
|
```
|
|
180
180
|
|
|
181
181
|
- `status=0` 且 `finalizer.status="passed"`:绑定这一次返回的 `{artifact-sha256}` 和 `{semantic-digest}`。
|
|
182
|
-
- `status=1
|
|
183
|
-
- 其他失败、formal artifact
|
|
182
|
+
- `status=1`:直接修正正式产物后重跑同一入口;preflight 失败必须重跑 preflight,finalizer 失败必须重跑 finalizer。若仍失败且当前诊断未解决,继续下一轮。
|
|
183
|
+
- 其他失败、formal artifact 外部变化、无法安全修复、诊断或指纹重复、无进展或达到共享规则的编辑上限:停止,不发布 `code.completed`。
|
|
184
184
|
|
|
185
185
|
不得重新扫描或手工补写摘要;完成事件必须携带本次 `passed` 结果的 `--artifact-sha256 {artifact-sha256} --semantic-digest {semantic-digest}`。
|
|
186
186
|
|
|
@@ -30,18 +30,7 @@
|
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"platform-sync": {
|
|
33
|
-
"when": "platform_issue_identity_exists"
|
|
34
|
-
"expected_status_label": "status: in-progress",
|
|
35
|
-
"expected_comment_marker": "<!-- sync-issue:{task-id}:{artifact-stem} -->",
|
|
36
|
-
"verify_comment_content": true,
|
|
37
|
-
"verify_task_comment_content": true,
|
|
38
|
-
"verify_issue_type": true,
|
|
39
|
-
"verify_issue_fields": false,
|
|
40
|
-
"verify_in_labels_computed": true,
|
|
41
|
-
"verify_milestone": true,
|
|
42
|
-
"verify_milestone_specific": true,
|
|
43
|
-
"expected_status_label_key": "inProgress",
|
|
44
|
-
"expected_comment_marker_key": "artifact"
|
|
33
|
+
"when": "platform_issue_identity_exists"
|
|
45
34
|
}
|
|
46
35
|
}
|
|
47
36
|
}
|
|
@@ -30,18 +30,7 @@
|
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"platform-sync": {
|
|
33
|
-
"when": "platform_issue_identity_exists"
|
|
34
|
-
"expected_status_label": "status: in-progress",
|
|
35
|
-
"expected_comment_marker": "<!-- sync-issue:{task-id}:{artifact-stem} -->",
|
|
36
|
-
"verify_comment_content": true,
|
|
37
|
-
"verify_task_comment_content": true,
|
|
38
|
-
"verify_issue_type": true,
|
|
39
|
-
"verify_issue_fields": false,
|
|
40
|
-
"verify_in_labels_computed": true,
|
|
41
|
-
"verify_milestone": true,
|
|
42
|
-
"verify_milestone_specific": true,
|
|
43
|
-
"expected_status_label_key": "inProgress",
|
|
44
|
-
"expected_comment_marker_key": "artifact"
|
|
33
|
+
"when": "platform_issue_identity_exists"
|
|
45
34
|
}
|
|
46
35
|
}
|
|
47
36
|
}
|
|
@@ -10,7 +10,7 @@ agent-infra-internal task-artifact {task-id} inspect --family code
|
|
|
10
10
|
|
|
11
11
|
The core scans `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` in the task directory.
|
|
12
12
|
|
|
13
|
-
`code.started` persists the plan identity and SHA-256 for the round in task.md frontmatter. `code.completed`
|
|
13
|
+
`code.started` persists the plan identity and SHA-256 for the round in task.md frontmatter. `code.completed` uses that start context and verifies the current latest plan; changed input fails closed. The implementation report's `Plan Input` field is reader-facing traceability, not lifecycle identity validation.
|
|
14
14
|
|
|
15
15
|
## Eight Branches
|
|
16
16
|
|
|
@@ -10,7 +10,7 @@ agent-infra-internal task-artifact {task-id} inspect --family code
|
|
|
10
10
|
|
|
11
11
|
核心扫描任务目录中的 `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`。
|
|
12
12
|
|
|
13
|
-
`code.started` 会在 task.md frontmatter 中绑定本轮方案文件及其 SHA-256。`code.completed`
|
|
13
|
+
`code.started` 会在 task.md frontmatter 中绑定本轮方案文件及其 SHA-256。`code.completed` 使用该开始上下文并校验当前最新 plan;内容变化失败关闭。实现报告的“方案输入”/“Plan Input”仅供读者追溯,不参与生命周期身份校验。
|
|
14
14
|
|
|
15
15
|
## 8 个分支
|
|
16
16
|
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Use this structure when creating `code.md` or `code-r{N}.md`.
|
|
6
6
|
|
|
7
|
+
> Implementation-input fields provide reader-facing traceability. Lifecycle identity uses the input frozen by `code.started` and the completion receipt; it is not parsed from this report body.
|
|
8
|
+
|
|
7
9
|
## Output Template
|
|
8
10
|
|
|
9
11
|
```markdown
|
|
@@ -103,6 +105,15 @@ Use this structure when creating `code.md` or `code-r{N}.md`.
|
|
|
103
105
|
> Record the state-check command, task/artifact scope, key result, and uncovered parts; each command starts with `$ `.
|
|
104
106
|
> Follow `.agents/rules/evidence-reporting.md`: record task/artifact scope, key result, and uncovered parts; do not paste complete successful stdout.
|
|
105
107
|
|
|
108
|
+
Record at least one actually executed `$ ` command and its result summary; prose-only status is insufficient. An implementation-stage report normally includes:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
$ agent-infra-internal task-snapshot {task-id} --format text
|
|
112
|
+
{task state, implementation-artifact scope, and uncovered-area summary}
|
|
113
|
+
$ agent-infra-internal task-artifact {task-id} inspect --family code
|
|
114
|
+
{code artifact, upstream input, and next-step summary}
|
|
115
|
+
```
|
|
116
|
+
|
|
106
117
|
## Raw Evidence
|
|
107
118
|
|
|
108
119
|
> Follow `.agents/rules/evidence-reporting.md`: pair each claim with a `$ ` command and proportionate result summary; include a decisive raw excerpt only for failures, blocking conditions, or disputes.
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
创建 `code.md` 或 `code-r{N}.md` 时,使用以下结构。
|
|
6
6
|
|
|
7
|
+
> “实现输入”字段用于读者追溯。生命周期身份以 `code.started` 冻结的输入和完成 receipt 为准,不从本报告正文解析。
|
|
8
|
+
|
|
7
9
|
## 输出模板
|
|
8
10
|
|
|
9
11
|
```markdown
|
|
@@ -103,6 +105,15 @@
|
|
|
103
105
|
> 记录状态核对命令、任务/产物范围、关键结果和未覆盖部分;每条命令以 `$ ` 开头。
|
|
104
106
|
> 按 `.agents/rules/evidence-reporting.md` 同时记录任务/产物范围、关键结果和未覆盖部分;正常成功不粘贴完整 stdout。
|
|
105
107
|
|
|
108
|
+
必须记录至少一条实际执行的 `$ ` 命令及其结果摘要,不能只写自然语言状态。实现阶段通常包括:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
$ agent-infra-internal task-snapshot {task-id} --format text
|
|
112
|
+
{任务状态、实现产物范围和未覆盖项摘要}
|
|
113
|
+
$ agent-infra-internal task-artifact {task-id} inspect --family code
|
|
114
|
+
{code artifact、上游输入和下一步摘要}
|
|
115
|
+
```
|
|
116
|
+
|
|
106
117
|
## 证据原文
|
|
107
118
|
|
|
108
119
|
> 遵循 `.agents/rules/evidence-reporting.md`:每条断言配对 `$ ` 命令和相称结果摘要;仅为失败、阻塞或争议附决定性原文摘录。
|
|
@@ -18,11 +18,7 @@
|
|
|
18
18
|
"expected_action_pattern": "Commit"
|
|
19
19
|
},
|
|
20
20
|
"platform-sync": {
|
|
21
|
-
"when": "pr_fact_bound"
|
|
22
|
-
"expected_pr_comment_marker": "<!-- sync-pr:{task-id}:summary -->",
|
|
23
|
-
"verify_in_labels_computed": true,
|
|
24
|
-
"verify_pr_comment_last_commit_matches_head": true,
|
|
25
|
-
"expected_pr_comment_marker_key": "prSummary"
|
|
21
|
+
"when": "pr_fact_bound"
|
|
26
22
|
}
|
|
27
23
|
}
|
|
28
24
|
}
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
"expected_action_pattern": "Complete Manual Validation"
|
|
32
32
|
},
|
|
33
33
|
"review-ledger": {
|
|
34
|
-
"stage_scope": [
|
|
34
|
+
"stage_scope": [
|
|
35
|
+
"analysis",
|
|
36
|
+
"plan",
|
|
37
|
+
"code"
|
|
38
|
+
]
|
|
35
39
|
},
|
|
36
40
|
"platform-sync": {
|
|
37
41
|
"when": "pr_fact_bound",
|
|
38
|
-
"expected_pr_comment_marker_key": "prSummary",
|
|
39
42
|
"expected_pr_comment_required_patterns": [
|
|
40
43
|
"^### ✅ (?:人工验证已通过|Manual Validation Passed)$"
|
|
41
|
-
]
|
|
42
|
-
"verify_task_comment_content": true,
|
|
43
|
-
"verify_issue_type": true,
|
|
44
|
-
"verify_issue_fields": false
|
|
44
|
+
]
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|