@kylecheng3146/agent-ops 0.10.2 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/packages/cli/src/args.js +18 -44
- package/dist/packages/cli/src/bin.js +37 -29
- package/dist/packages/cli/src/cli.js +16 -14
- package/dist/packages/cli/src/codex-loop-process.js +0 -6
- package/dist/packages/cli/src/commands/review.js +5 -10
- package/dist/packages/cli/src/commands/run.js +3 -1
- package/dist/packages/cli/src/commands/task.js +27 -54
- package/dist/packages/cli/src/commands/verify.js +7 -3
- package/dist/packages/cli/src/criteria-review.js +63 -0
- package/dist/packages/cli/src/default-base.js +26 -0
- package/dist/packages/cli/src/hook-process.js +19 -83
- package/dist/packages/cli/src/owned-run-step.js +1 -1
- package/dist/packages/cli/src/run-entry.js +203 -115
- package/dist/runtime/src/adapters/agy/config.js +2 -3
- package/dist/runtime/src/adapters/claude/config.js +2 -2
- package/dist/runtime/src/adapters/codex/config.js +2 -5
- package/dist/runtime/src/hooks/completion-gate.js +0 -15
- package/dist/runtime/src/install/harness.js +4 -4
- package/dist/runtime/src/install/plan.js +3 -3
- package/dist/runtime/src/install/profiles.js +0 -2
- package/dist/runtime/src/logging/local-log.js +12 -0
- package/dist/runtime/src/office/snapshot.js +4 -1
- package/dist/runtime/src/parallel/manage.js +0 -3
- package/dist/runtime/src/review/criteria.js +252 -0
- package/dist/runtime/src/review/execute.js +68 -4
- package/dist/runtime/src/review/invocation.js +3 -3
- package/dist/runtime/src/run/verification.js +2 -2
- package/dist/runtime/src/schema/validate.js +10 -5
- package/dist/runtime/src/task/completion.js +4 -42
- package/dist/runtime/src/task/contract.js +11 -0
- package/dist/runtime/src/task/service.js +34 -57
- package/dist/runtime/src/task/store.js +3 -7
- package/dist/runtime/src/verify/acceptance-coverage.js +2 -3
- package/dist/runtime/src/verify/acceptance-protocol.js +4 -3
- package/dist/runtime/src/verify/acceptance-replay.js +4 -7
- package/dist/runtime/src/verify/service.js +6 -23
- package/dist/runtime/src/verify/source-fingerprint.js +17 -4
- package/dist/runtime/src/verify/spawn.js +3 -2
- package/docs/en/guides/task-debug.md +39 -133
- package/docs/en/spec/acceptance-and-evidence.md +31 -23
- package/docs/en/spec/harness-adapters.md +9 -11
- package/docs/en/spec/loop-engineering.md +11 -5
- package/docs/en/spec/review.md +16 -0
- package/docs/zh-TW/guides/task-debug.md +27 -73
- package/docs/zh-TW/spec/acceptance-and-evidence.md +18 -18
- package/docs/zh-TW/spec/harness-adapters.md +7 -8
- package/docs/zh-TW/spec/loop-engineering.md +9 -4
- package/docs/zh-TW/spec/review.md +17 -1
- package/package.json +1 -1
- package/schemas/config.schema.json +1 -21
- package/dist/packages/cli/src/debug-intake.js +0 -245
- package/dist/runtime/src/task/debug-intake.js +0 -15
- package/dist/runtime/src/task/debug-state.js +0 -135
- package/dist/runtime/src/task/debug-user-event.js +0 -160
- package/dist/runtime/src/task/debug.js +0 -632
|
@@ -18,10 +18,11 @@ Executable acceptance MUST bind the current contract to immutable replay evidenc
|
|
|
18
18
|
build and test build. Tasks provide stable check IDs and explicit committed
|
|
19
19
|
test/fixture/helper materials. Each checkout installs and builds its own version
|
|
20
20
|
before candidate materials are overlaid. Tasks cannot override runner commands.
|
|
21
|
-
- A generic runner must emit
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
- A generic runner must emit every `checkId` requested by criteria sharing its
|
|
22
|
+
runner, baseline and materials, each exactly once; missing or duplicate rows are
|
|
23
|
+
UNKNOWN. Other rows are ignored, so a binding may list only its red checks. A
|
|
24
|
+
failing unrequested row still disagrees with a PASS aggregate through the
|
|
25
|
+
runner's exit code, which makes the candidate UNKNOWN, never green.
|
|
25
26
|
- Fixture, collection, build, timeout, cancellation, truncated output, missing or
|
|
26
27
|
duplicate IDs, retries and skips MUST NOT establish red or green. Complete raw
|
|
27
28
|
execution artifacts are digest-bound to the contract, materials and commits.
|
|
@@ -34,9 +35,15 @@ Executable acceptance MUST bind the current contract to immutable replay evidenc
|
|
|
34
35
|
counters and cannot supply mechanical proof by itself. Pytest requires one
|
|
35
36
|
ordered setup/call/teardown lifecycle per nodeid; the Rust protocol requires
|
|
36
37
|
explicit attempts. Missing metadata MUST NOT default to a successful attempt.
|
|
37
|
-
- Baselines are
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
- Baselines are creation commits, or failed candidates for finding pins.
|
|
39
|
+
`task revise --baseline <ref>` moves every typed criterion's baseline (and the
|
|
40
|
+
task's creation commit) at once to a commit that is an ancestor of HEAD, for example after a task was opened on the
|
|
41
|
+
wrong branch, and voids its verification. Revise/replan preserve the original
|
|
42
|
+
goal, every mapped requirement and previous contracts/evidence.
|
|
43
|
+
- Verification evidence binds an execution hash of the criteria only. A revise
|
|
44
|
+
that changes the surface or origin keeps it; a criteria or configuration change
|
|
45
|
+
voids it. Evidence from before 0.11 bound the full contract hash and still
|
|
46
|
+
matches an unchanged contract. Every new contract needs both fresh reviews.
|
|
40
47
|
- `task pin-finding` validates saved report digest/index provenance. Recurrence
|
|
41
48
|
explicitly names an existing pin. A sixth criterion returns a replan obligation
|
|
42
49
|
without changing state; the mapped replan must retain the pin and all requirements.
|
|
@@ -76,7 +83,7 @@ Each child worktree MUST record its modification intent before editing.
|
|
|
76
83
|
|
|
77
84
|
Every new task MUST record a surface audit of where else its change lands before writing criteria, and review MUST NOT run while discovery finds an unclassified place.
|
|
78
85
|
|
|
79
|
-
- Trigger: Creating a task (`task create`,
|
|
86
|
+
- Trigger: Creating a task (`task create`, including `--debug`, or a run plan), revising its surface, or reviewing it.
|
|
80
87
|
- Action: Search four axes with recorded fixed-string queries or `n/a: reason`, classify every hit as included, excluded (glob + reason) or UNKNOWN, give every surface row an observable `behavior`, and declare each shared contract compatible or breaking. Pass it with `task create|revise --surface-file <json>`.
|
|
81
88
|
- Evidence: The surface is stored on the task, bound into its contract hash with revision history, replayed by `git grep -F` before review, and handed to both reviewers under the `surface-coverage` criterion.
|
|
82
89
|
- Positive: `A diff token hits three copy-pasted sibling pages; the audit includes them with their behavior before review runs.`
|
|
@@ -118,8 +125,11 @@ Every new task MUST record a surface audit of where else its change lands before
|
|
|
118
125
|
dismissals. Reviewers see each dismissal with its hit count, flagged when it
|
|
119
126
|
hid a file an earlier `SURFACE_UNCLASSIFIED` block named.
|
|
120
127
|
Results are cached by HEAD, base, diff, query set and config hash.
|
|
128
|
+
- `verify` runs the same gate after verification and prints its result as
|
|
129
|
+
advisory lines (`Surface: PASS`, or the code and unclassified paths), so the
|
|
130
|
+
surface is fixed before review; only review enforces it.
|
|
121
131
|
- Review returns NOT_RUN with: `SURFACE_MISSING` (no or unparseable surface;
|
|
122
|
-
also refused at create
|
|
132
|
+
also refused at create), `SURFACE_UNCLASSIFIED`,
|
|
123
133
|
`SURFACE_QUERY_TOO_BROAD` (one recorded query over 200 files),
|
|
124
134
|
`SURFACE_EXCLUSION_TOO_BROAD` (one glob over 10 files, or any file in the
|
|
125
135
|
diff), `SURFACE_DISMISSAL_TOO_BROAD` (over 128 dismissals),
|
|
@@ -137,17 +147,15 @@ Every new task MUST record a surface audit of where else its change lands before
|
|
|
137
147
|
|
|
138
148
|
## EVIDENCE-ESCAPE-001
|
|
139
149
|
|
|
140
|
-
|
|
150
|
+
A bug fix SHOULD declare where its bug came from when known, and a declared escape MUST be linked, labelled and recorded mechanically. The declaration is advisory: it never blocks finish.
|
|
141
151
|
|
|
142
|
-
- Trigger: A DEBUG
|
|
143
|
-
- Action: Declare `origin` with `task
|
|
144
|
-
- Evidence: `origin` is bound into the task contract hash;
|
|
145
|
-
- Positive: `
|
|
146
|
-
- Negative: `
|
|
152
|
+
- Trigger: A DEBUG task (`task create --debug`) or any task fixes a bug that passed earlier gates and its origin is known.
|
|
153
|
+
- Action: Declare `origin` with `task create|revise --escape-of <commit> --escape-label <label> [--escape-receipt <id>]`, the same for DEBUG and normal tasks. `pre-existing` and `external` origins (with a `reason`) recorded by 0.10 `task debug` still load; an undeclared origin is counted as such. Commit the `.agent-ops-escapes/<task-id>.json` record with the fix.
|
|
154
|
+
- Evidence: `origin` is bound into the task contract hash; both reviewers receive the link state, labels, facts and residual risks under the `escape-label` criterion. A task without an origin still finishes; 0.10 tasks marked `originRequired` are no longer refused (`ESCAPE_ORIGIN_MISSING` was removed in 0.11.0).
|
|
155
|
+
- Positive: `Regression red at the baseline, green on the fix; origin escape-of 864dbbe2 label surface; replay marks the missed page surface-unseen; the record is committed with the fix.`
|
|
156
|
+
- Negative: `Relabel a surface-excluded miss as review because the reviewer "should have noticed".`
|
|
147
157
|
|
|
148
|
-
- The declaration
|
|
149
|
-
otherwise), inside the DEBUG budget. It is a contract revision: re-verify,
|
|
150
|
-
re-record the confirmed hypothesis with the new evidence, then review.
|
|
158
|
+
- The declaration is a contract revision: re-verify, then review.
|
|
151
159
|
Re-declaring replaces the record. The output lists `git blame` hint commits
|
|
152
160
|
for lines the fix changed or removed; blame is a hint only, because an
|
|
153
161
|
omission bug lives in lines nobody wrote.
|
|
@@ -181,13 +189,13 @@ Every DEBUG fix MUST declare where its bug came from before review, and a declar
|
|
|
181
189
|
|
|
182
190
|
## EVIDENCE-ESCAPE-002
|
|
183
191
|
|
|
184
|
-
A surface escape
|
|
192
|
+
A surface escape SHOULD become a proven, tracked rule, and learned rules MUST only tighten the surface gate. The proof is advisory: it never blocks finish.
|
|
185
193
|
|
|
186
194
|
- Trigger: A declared escape-of origin (EVIDENCE-ESCAPE-001), or a past escape backfilled with `task create --escape-of <commit> --escape-label <label> --escape-fix <fix-commit>`.
|
|
187
|
-
- Action: For a `surface`, `surface-unseen` or `surface-excluded` label, commit a rule `.agent-ops-escapes/rules/<rule-id>.json` shaped `{"id", "escape", "label", "trigger": {"paths", "tokens"}, "expand": {"paths", "queries"}, "noExclude"}` and re-declare the origin. For `criteria` or `verify`, name the fixing task's red-to-green check with `--escape-promote <runnerId:checkId>` (
|
|
188
|
-
- Evidence:
|
|
195
|
+
- Action: For a `surface`, `surface-unseen` or `surface-excluded` label, commit a rule `.agent-ops-escapes/rules/<rule-id>.json` shaped `{"id", "escape", "label", "trigger": {"paths", "tokens"}, "expand": {"paths", "queries"}, "noExclude"}` and re-declare the origin. For `criteria` or `verify`, name the fixing task's red-to-green check with `--escape-promote <runnerId:checkId>` (origin field `"promote"`). Other labels record a lesson.
|
|
196
|
+
- Evidence: Declaring the origin runs the proof and prints `ESCAPE_RULE_UNPROVEN`, `ESCAPE_RULE_TOO_BROAD` or `SURFACE_BUDGET_EXCEEDED` when it fails; since 0.11.0 finish no longer refuses them. The ledger record stores the proving rule, its content hash and its backtest fires, commits and rate.
|
|
189
197
|
- Positive: `Escape surface-unseen; rule image-size-siblings fires on the escaped commit, its query hits both missed sibling pages there, and fires on 2 of the last 200 commits.`
|
|
190
|
-
- Negative: `
|
|
198
|
+
- Negative: `Report a surface escape as proven when its rule never fires on the escaped commit, or add a rule field that excludes paths.`
|
|
191
199
|
|
|
192
200
|
- Rules are data only and need no trust: triggers and expands become argv
|
|
193
201
|
`git grep -F` queries and path globs, never shell or regex. The strict schema
|
|
@@ -257,7 +265,7 @@ New verification evidence uses schema 3. Schema 2 remains readable and its exit-
|
|
|
257
265
|
|
|
258
266
|
Existing task files remain readable without migration. Legacy tasks without a config baseline, arbitrary evidence references, or unfinished archived children must be recreated and verified/reviewed before completion. Repeating completion also revalidates the evidence; an old completed status alone is insufficient. Runtime callers must supply `TaskServiceOptions.completion`; omitting this repository context fails closed for completion while leaving read-only task operations available.
|
|
259
267
|
|
|
260
|
-
Before committing, use the default worktree scope for verify, review and completion. After committing, use the same `--base <git-ref>` on all three commands to produce fresh proof for that committed range; `TaskServiceOptions.completion.base` selects it for runtime callers. Base mode requires a clean worktree. Without a worktree change surface or an explicit base, completion returns `TASK_COMPLETION_SCOPE_REQUIRED`. The agy Stop gate still checks worktree-scoped proof: complete and stop before committing, or use its user-approved one-time permit after inspecting a completed base-scoped task.
|
|
268
|
+
Before committing, use the default worktree scope for verify, review and completion. After committing, use the same `--base <git-ref>` on all three commands to produce fresh proof for that committed range. When `--base` is absent and the tree is clean, verify and review choose it: a session worktree uses its merge-base with the target branch (which follows a finish rebase), elsewhere the task's creation commit when it is an ancestor of HEAD. Base-mode source fingerprints ignore escape-ledger task records (`.agent-ops-escapes/task-*.json`; rules stay fingerprinted), so committing the ledger keeps verification and review current; fingerprints from 0.10 differ, so re-verify once after upgrading; `TaskServiceOptions.completion.base` selects it for runtime callers. Base mode requires a clean worktree. Without a worktree change surface or an explicit base, completion returns `TASK_COMPLETION_SCOPE_REQUIRED`. The agy Stop gate still checks worktree-scoped proof: complete and stop before committing, or use its user-approved one-time permit after inspecting a completed base-scoped task.
|
|
261
269
|
|
|
262
270
|
This enforces the toolkit's completion command, not a host's natural-language completion claim. It does not prevent a process with the same filesystem authority from editing task/evidence files directly, and it does not lock Git or external source writers.
|
|
263
271
|
|
|
@@ -118,17 +118,12 @@ installed configuration; the managed OpenCode `tool.execute.before` plugin can
|
|
|
118
118
|
throw its documented denial or unavailable-runtime error for its supported Bash
|
|
119
119
|
surface. Codex remains `unknown` and never emits a denial. Fixture tests assert
|
|
120
120
|
these wire and plugin shapes only; they do not prove that a host honors a
|
|
121
|
-
denial. `SessionStart` and
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
`decision: "block"` with `reason` schedules a continuation; `continue: false`
|
|
128
|
-
halts it. `stop_hook_active` identifies a prior continuation and cannot waive
|
|
129
|
-
the DEBUG check. Native `Interrupt` pauses with a three-second timeout and
|
|
130
|
-
never blocks or restarts the human interruption. This DEBUG-specific policy
|
|
131
|
-
does not enable Codex's generic completion gate or optional Stop verifier.
|
|
121
|
+
denial. `SessionStart` and `Stop` failures remain fail-open.
|
|
122
|
+
|
|
123
|
+
Since 0.11.0 no hook is DEBUG-specific: prompts never open DEBUG tasks, Stop
|
|
124
|
+
never holds a session for one, and Codex `Interrupt` is no longer registered
|
|
125
|
+
(a stale registration from an older install is a no-op until `update`). Codex
|
|
126
|
+
still has no generic completion gate or optional Stop verifier.
|
|
132
127
|
Codex separately trusts each exact native hook definition. After managed hook
|
|
133
128
|
updates, review new or changed definitions in `/hooks`; agent-ops repository
|
|
134
129
|
trust alone does not make an unreviewed native hook active.
|
|
@@ -197,6 +192,9 @@ removes only `run` and keeps `loop`.
|
|
|
197
192
|
resumability and concrete remediation. An unchanged cleanup failure retains its
|
|
198
193
|
original cause. Trust, native identity, generation and denial failures remain
|
|
199
194
|
fail-closed; a sealed proof never erases a native or organization denial.
|
|
195
|
+
The JSON `state` of `run status` and `run logs` omits the event history and goal
|
|
196
|
+
text, keeping `eventCount` and `goalHash`, so repeated polling stays small;
|
|
197
|
+
`run logs` returns the events themselves.
|
|
200
198
|
|
|
201
199
|
Manual resume of a receipt-bound integration validates the exact sealed proof,
|
|
202
200
|
receipt digest and transaction, owner/generation, candidate/target ancestry and
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
still measure setup, proof, review and integration. Legacy finite runs upgrade
|
|
19
19
|
only on manual resume, retaining the old limit, intervals, elapsed time, usage
|
|
20
20
|
epochs and blocker history. Reads and installation never upgrade or awaken runs.
|
|
21
|
-
Command/review timeouts, provider quotas
|
|
21
|
+
Command/review timeouts, provider quotas and no-progress/stop
|
|
22
22
|
controls remain independent and effective. Explicit --time-budget is rejected.
|
|
23
23
|
Missing counters remain UNKNOWN; partial usage is not a complete cost estimate.
|
|
24
24
|
- Questions pause work and require an explicit answer. Repair preserves the goal
|
|
@@ -72,10 +72,16 @@
|
|
|
72
72
|
- Convergence compares actual per-check statuses and outstanding finding pins.
|
|
73
73
|
Source fingerprints, timing and diagnostics alone cannot establish progress.
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
For any `jobs` value, the coordinator MUST yield only through an explicit
|
|
76
|
+
`action=wait` request sent after it has planned its children; the supervisor
|
|
77
|
+
never stops a coordinator that is still planning. A wait confirms coordinator
|
|
78
|
+
process death, frees its slot and drops its native thread, so the coordinator does
|
|
79
|
+
not poll `run status` while children work. Recovery leaves a waiting coordinator
|
|
80
|
+
stopped; once every child is delivered, complete or blocked, it restarts under a
|
|
81
|
+
new generation in a fresh native session whose instructions list each child's
|
|
82
|
+
status and delivered commit. With `jobs=1`, child execution MUST wait for that
|
|
83
|
+
confirmed death. Native registration, recovery and start MUST enforce at most
|
|
84
|
+
`jobs` active agents; changing task slot accounting alone is insufficient.
|
|
79
85
|
|
|
80
86
|
This module defines the bounded loop used to plan, implement, verify, and hand off work.
|
|
81
87
|
|
package/docs/en/spec/review.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Review
|
|
2
2
|
|
|
3
|
+
## REVIEW-CRITERIA-001
|
|
4
|
+
|
|
5
|
+
- Trigger: Production task criteria become ready before implementation.
|
|
6
|
+
- Action: Await one scoped advisory and let the writer record adoption/rejection reasons.
|
|
7
|
+
- Evidence: Private snapshot report plus safe local status/usage log; no completion attestation.
|
|
8
|
+
- Positive: `A revised task shows historical advice and only an explicit rerun spends another round.`
|
|
9
|
+
- Negative: `Automatically re-review every revise or treat advice as final PASS proof.`
|
|
10
|
+
|
|
11
|
+
Every production task creation (including DEBUG, replan children and native run root/child tasks) MUST wait for one independent criteria advisory before implementation. A fresh session uses one configured independent-review target, preferring a different target from the host. It receives only the original goal, assigned intent/covers, criteria and surface audit in an empty disposable workspace. It MUST NOT inspect repository files or run tests. Missing goals are insufficient information; child completeness is scoped to its assignment. Verification materials/import validity remain deferred until implementation; reasoned review-only acceptance is valid.
|
|
12
|
+
|
|
13
|
+
The advisory has no agent-ops execution deadline, stall cutoff or token budget. Provider limitations, genuine launch/auth/output errors and explicit cancellation remain effective. Errors produce NOT_RUN and permit work; cancellation preserves the task and MUST stop implementation. Native review processes remain registered and stoppable. Normal verification and final two-round review retain their existing deadlines and gates.
|
|
14
|
+
|
|
15
|
+
Task creation shows advice and a private report reference. The writer decides which recommendations to adopt and records acceptance/rejection reasons through task revise (a same-criteria revision may record rejected advice). Requirements that are ambiguous or expand scope require user clarification. Reports bind the original task/goal/criteria/surface snapshot; task status and revise show historical reports as stale when those inputs change. A revision MUST NOT automatically re-review. Repeated initial requests reuse the first attempt, including NOT_RUN; only explicit `agent-ops review --criteria --task <id> --rerun --yes` starts another fresh single round. Without --rerun the same command reads/waits for the current attempt.
|
|
16
|
+
|
|
17
|
+
Detailed redacted reports remain private in `.agent-ops/reviews/criteria-<task-id>*.json`; the local log contains only status, duration, counts, reported usage and report reference. CLI invocation counts are distinct from provider model calls, which may be unreported. Report/log failures MUST NOT roll back a task or fabricate evidence. These advisory artifacts MUST NOT satisfy verify, final review or finish.
|
|
18
|
+
|
|
3
19
|
## REVIEW-INDEPENDENT-001
|
|
4
20
|
|
|
5
21
|
An independent reviewer MUST receive a minimal packet containing the request, criteria, artifact references, and evidence requirements.
|
|
@@ -1,83 +1,37 @@
|
|
|
1
1
|
# Task DEBUG 調查
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
DEBUG task 就是一般 task,只是驗收條件要證明原始回歸:一條 behavioral criterion,
|
|
4
|
+
其 `redCheckIds` 在 baseline commit 以 assertion 失敗、在 candidate 通過。除此之外沒有任何特殊流程。
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
```sh
|
|
7
|
+
agent-ops task create --debug --title "修購物車無法捲動" \
|
|
8
|
+
--goal '<原始問題,逐字>' \
|
|
9
|
+
--surface-file surface.json \
|
|
10
|
+
--criterion-file regression.json --criterion-file related.json
|
|
11
|
+
```
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
- `--debug` 需要 `--goal`,且至少一條帶 `redCheckIds` 的 behavioral criterion;
|
|
14
|
+
否則建立失敗並回 `TASK_DEBUG_RED_CHECK_REQUIRED`。surface audit 與一般 task 一樣必填。
|
|
15
|
+
- baseline 是建立 task 時的 commit;`task revise --baseline <ref>` 可移動它
|
|
16
|
+
(例如開錯分支時),並使先前證據失效。
|
|
17
|
+
- 之後修復、commit、`verify`、兩輪 `review`、`worktree finish`,與一般 task 完全相同。
|
|
18
|
+
setup 失敗、skip、timeout 與 UNKNOWN 都不算重現;red check 必須在 baseline 以 assertion 失敗。
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
再透過既有 worktree finish 完成。基線 assertion red、候選 green、相關檢查與
|
|
21
|
-
當前 proof digest 都必須有效;setup / skip / timeout / UNKNOWN 不算重現。
|
|
22
|
-
DEBUG 預設自動走完修復閉環。乾淨 HEAD 自動固定為基線,不要為此再問許可,
|
|
23
|
-
也不要主動降為只診斷。單次未重現不構成停止理由;在原預算內繼續做鑑別檢查。
|
|
20
|
+
## 逃逸來源(建議性質)
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
若知道 bug 從哪裡來,與一般 task 一樣記錄:
|
|
23
|
+
`task revise --escape-of <commit> --escape-label <label>`。它會寫入 `.agent-ops-escapes/<task-id>.json`,並印出
|
|
24
|
+
連結狀態、`git blame` 提示與規則證明(如 `ESCAPE_RULE_UNPROVEN`)。這些都不會阻擋
|
|
25
|
+
finish;見 `EVIDENCE-ESCAPE-001` 與 `EVIDENCE-ESCAPE-002`。
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
訊息及注入指令都不能授權。Codex 支援目前 `response_item` 的 `user.text` 與
|
|
29
|
-
原生非同步回答,也保留舊 `event_msg` 格式。
|
|
27
|
+
## 0.11.0 移除項目
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- `繼續` / `continue`:接回同一 task 及原範圍;耗盡時間仍需既有原生時間授權,其他阻礙不解除。
|
|
36
|
-
- `繼續修復` / `resume repair`:在原 task 恢復完整修復閉環。
|
|
29
|
+
`task debug`(假設、策略切換、investigate、checkpoint、resume、extend、origin)、
|
|
30
|
+
60 分鐘預算與 5 輪上限、原生控制詞(只診斷、暫停、繼續、繼續修復、取消時間限制)、
|
|
31
|
+
prompt hook 自動建立 DEBUG、DEBUG 專用 Stop 阻擋,以及 Codex `Interrupt` hook
|
|
32
|
+
都已移除。`task debug` 現在回傳 `TASK_DEBUG_REMOVED`。
|
|
37
33
|
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
舊狀態仍可讀取:task 保留 `debug` 標記,已存的預算與假設狀態會被忽略,
|
|
35
|
+
`originRequired` 不再阻擋 finish,config 的 `features.debug` 仍被接受並在下次 `update` 時移除。
|
|
40
36
|
|
|
41
|
-
|
|
42
|
-
受控調查、驗證與取得 slot 後的 review 計時;review 排隊不計時。
|
|
43
|
-
Claude、Codex 與 agy 都使用可信 native session lifecycle,在 `UserPromptSubmit`
|
|
44
|
-
或原生 session 開始前景時鐘,並在 idle `Stop` 結束。因此該輪的 Agent 推理、
|
|
45
|
-
工具與修改都計入,停止回合之間的使用者等待不計入。Codex 被拒絕的 Stop 仍繼續
|
|
46
|
-
計時,重複 Stop 的 `stop_hook_active: true` 不會繞過 DEBUG gate。opencode 沒有支援
|
|
47
|
-
的前景 lifecycle,不可宣稱完整的 active-time 預算。
|
|
48
|
-
中斷且沒有封存結果的操作,必須等持久化 process identity 證實程序已死亡後,
|
|
49
|
-
才封存 UNKNOWN environment receipt;這段經過時間仍會保留,不會退還不明時間。
|
|
50
|
-
測試材料修改不算修復輪;兩輪停滯需要一次實質策略切換,再兩輪停滯停止。
|
|
51
|
-
範圍改版會讓現有證據失效、而驗證在登記策略切換前仍停止,因此策略切換可引用同一原始任務已封存的歷史回歸證據;假設確認與最終交付仍需新版契約的新證據。
|
|
52
|
-
達到回合上限後,未變更的候選仍可審查;上次驗證通過時也可重新驗證(例如只更新 escape ledger),不計為新回合。驗證失敗或產品內容變更的候選仍維持停止。
|
|
53
|
-
|
|
54
|
-
假設確認後以 `origin --payload-file <json>` 宣告 bug 來源:`{"kind": "escape-of",
|
|
55
|
-
"commit": "<commit>", "label": "<最早關卡>"}`(可選 `"receipt"`),或 `{"kind":
|
|
56
|
-
"pre-existing" | "external", "reason": "..."}`。它會修訂 contract,因此 review 前要重新
|
|
57
|
-
verify 並重新記錄已確認的假設;沒有它時 finish 以 `ESCAPE_ORIGIN_MISSING` 拒絕。
|
|
58
|
-
`escape-of` 會印出連結狀態與 `git blame` 提示,並寫入 `.agent-ops-escapes/<task-id>.json`,
|
|
59
|
-
與修復一起 commit(見 `EVIDENCE-ESCAPE-001`)。surface 標記還需要一條在被逃逸 commit
|
|
60
|
-
重放成立、受追蹤的 `.agent-ops-escapes/rules/<rule-id>.json` 規則;criteria/verify 標記需要
|
|
61
|
-
`"promote": "<runnerId:checkId>"`;否則 finish 以 `ESCAPE_RULE_UNPROVEN` 拒絕(見
|
|
62
|
-
`EVIDENCE-ESCAPE-002`)。
|
|
63
|
-
|
|
64
|
-
checkpoint 保存 task/session/source/contract/config/cause;resume 只接受同一
|
|
65
|
-
擁有者 worktree 的匹配 checkpoint,保留 dirty 內容及預算。失配需要人類確認。
|
|
66
|
-
時間耗盡後明確「繼續」或「繼續修復」可透過 `extend --event-id latest` 讀取原生人類事件,
|
|
67
|
-
從該事件取得完整 20 分鐘,並以 grant 快照保留既有消耗與超時;沒有可信事件來源則回報 unsupported,其他阻礙不被解除。
|
|
68
|
-
|
|
69
|
-
Claude / agy / 原生 Codex 的 Stop 都會檢查無 Git 差異的 active DEBUG task,不論是否安裝 completion gate。
|
|
70
|
-
DEBUG gate 故障先針對 task/config 重新載入一次;仍失敗則明確回報 `UNKNOWN/未完成`
|
|
71
|
-
與 `agent-ops doctor` 恢復方法,允許非成功停止並保留 task、證據及預算,不無限重試。
|
|
72
|
-
有效停止 checkpoint 只允許非成功停止,task 仍 active;allow-stop 不能繞過。
|
|
73
|
-
Codex 的一般 completion gate 仍 unsupported;DEBUG 專用 Stop 以原生
|
|
74
|
-
`decision: "block"` 與 reason 續跑,不能使用會停止 harness 的 `continue: false`。
|
|
75
|
-
已接受的 Stop 結束前景時鐘;opencode Stop unsupported。
|
|
76
|
-
只承諾前景對話與持久化進度,不承諾對話關閉後繼續,也不宣稱抵擋同檔案權限攻擊。
|
|
77
|
-
|
|
78
|
-
完整命令及細節見英文 [Task DEBUG](../../en/guides/task-debug.md)。
|
|
79
|
-
|
|
80
|
-
原生人類明確要求「取消時間限制」或 `no time limit` 時,可透過同一個
|
|
81
|
-
`extend --event-id latest` 原生授權入口取消原任務總時限。grant 記錄
|
|
82
|
-
`grantedMs: null` 與已用時間快照;原預算、消耗、舊 grant、回合限制及
|
|
83
|
-
驗證與 review 關卡均保留。個別命令與 review 的防卡死逾時仍有效。
|
|
37
|
+
完整說明見英文 [Task DEBUG](../../en/guides/task-debug.md)。
|
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
|
|
13
13
|
- `behavioral`:指定 red checks 在 baseline 都因斷言失敗,candidate 的必要 checks 全部通過。`invariant`:candidate 的必要 checks 通過,baseline 原本 PASS 有效。`review-only`:兩輪 fresh review 對照原始目標驗收,不宣稱機械證明。
|
|
14
14
|
- repo 授權的 `verification.acceptanceRunners` 定義 argv、setup、產品與 test build。task 提供穩定 check IDs 與明列且已 commit 的 test/fixture/helper;兩側各自安裝並 build 其版本,再覆蓋 candidate 材料。task 不能改 runner 命令。
|
|
15
|
-
- generic runner
|
|
15
|
+
- generic runner 必須輸出共用相同 runner、baseline 與材料之 criteria 所要求的每個 `checkId`,且各恰好一次;缺少或重複為 UNKNOWN。其他列會被忽略,因此 binding 可以只列 red checks。未要求的列若失敗,runner 的 exit code 仍與 PASS 彙總矛盾,candidate 會成為 UNKNOWN,絕不會 green。
|
|
16
16
|
- fixture、collection、build、timeout、取消、輸出截斷、缺少或重複 ID、retry、skip MUST NOT 算 red 或 green。完整 execution artifacts 以摘要綁定契約、材料與 commits。
|
|
17
17
|
- 原生 Jest JSON 與 Vitest task errors 無法完整區分 test-call 斷言與 hook/fixture cleanup。除非已 review 的 repo collector 提供明確斷言分類,失敗列 MUST 保持 UNKNOWN;AssertionError 名稱、matcher 資料與 pass 的 hook 狀態都不足。green 需要明確的單次 attempt 證據:attempts、Jest invocations,或 Vitest retryCount 與 repeatCount 兩者。原生 Vitest JSON 省略這些 counters,不能單獨提供機械證明。pytest 每個 nodeid 必須有一組依序的 setup/call/teardown;Rust protocol 必須提供 attempts。缺 metadata MUST NOT 預設為一次成功。
|
|
18
|
-
- baseline
|
|
18
|
+
- baseline 為建立 commit;finding pin 使用被 FAIL 的 candidate。`task revise --baseline <ref>` 會一次把所有 typed criterion 的 baseline(以及 task 的建立 commit)移到 HEAD 的某個祖先 commit,例如 task 開在錯的分支時,並使其驗證失效。revise/replan 保留原始目標、全部映射要求與先前契約/證據。
|
|
19
|
+
- verification evidence 只綁定 criteria 的 execution hash。只改 surface 或 origin 的 revise 會保留它;改 criteria 或設定則使其失效。0.11 之前的證據綁定完整 contract hash,契約未變時仍相符。每個新契約都需要兩輪 fresh review。
|
|
19
20
|
- `task pin-finding` 驗證已保存 report 的 digest/index 來源。recurrence 明確引用既有 pin。第六條回傳 replan 義務且不修改狀態;映射後必須保留 pin 與全部要求。
|
|
20
21
|
- reviewer packet 包含原始目標、修訂歷史、coverage 與 verifier 材料,審查斷言本身與明確的 fallback 理由。機械 green 不會省略必要 policy commands 或任一 fresh review。
|
|
21
22
|
|
|
@@ -47,7 +48,7 @@ English source version: 2026-10-20. Revalidate: when the English specification c
|
|
|
47
48
|
|
|
48
49
|
每個新 task MUST 在寫驗收條件前記錄變更還會影響哪些位置(surface audit);discovery 找到未分類位置時,review MUST NOT 執行。
|
|
49
50
|
|
|
50
|
-
- Trigger: 建立 task(`task create
|
|
51
|
+
- Trigger: 建立 task(`task create`,含 `--debug`,或 run plan)、修訂 surface,或審查 task。
|
|
51
52
|
- Action: 以記錄下來的固定字串查詢或 `n/a: 理由` 搜尋四個軸向,把每個命中分類為 included、excluded(glob + 理由)或 UNKNOWN,每列 surface 都寫出可觀察的 `behavior`,並宣告每個共享契約為 compatible 或 breaking。以 `task create|revise --surface-file <json>` 提交。
|
|
52
53
|
- Evidence: surface 存在 task 上、綁進 contract hash 並保留修訂歷史,review 前以 `git grep -F` 重放,並以 `surface-coverage` 條件交給兩位 reviewer。
|
|
53
54
|
- Positive: `diff token 命中三個複製貼上的同類頁面;review 前 audit 已把它們連同行為列入 included。`
|
|
@@ -83,7 +84,8 @@ English source version: 2026-10-20. Revalidate: when the English specification c
|
|
|
83
84
|
至多 128 筆。Reviewer 會看到每筆排除與其命中數,若它隱藏了先前
|
|
84
85
|
`SURFACE_UNCLASSIFIED` 阻擋所列的檔案則會標示出來。
|
|
85
86
|
結果以 HEAD、base、diff、查詢集合與 config hash 快取。
|
|
86
|
-
-
|
|
87
|
+
- `verify` 在驗證後執行同一個 gate,並以建議性質的輸出列印結果(`Surface: PASS`,或錯誤碼與未分類路徑),讓 surface 在 review 前修好;只有 review 會強制。
|
|
88
|
+
- Review 以 NOT_RUN 回報:`SURFACE_MISSING`(沒有或無法解析的 surface;
|
|
87
89
|
task 建立時也會拒絕)、`SURFACE_UNCLASSIFIED`、`SURFACE_QUERY_TOO_BROAD`(單一
|
|
88
90
|
記錄查詢超過 200 個檔案)、`SURFACE_EXCLUSION_TOO_BROAD`(單一 glob 超過 10 個
|
|
89
91
|
檔案,或包含 diff 內的檔案)、`SURFACE_DISMISSAL_TOO_BROAD`(超過 128 筆排除)、
|
|
@@ -100,17 +102,15 @@ English source version: 2026-10-20. Revalidate: when the English specification c
|
|
|
100
102
|
|
|
101
103
|
## EVIDENCE-ESCAPE-001
|
|
102
104
|
|
|
103
|
-
|
|
105
|
+
bug 修復在已知來源時 SHOULD 宣告 bug 的來源;宣告的逃逸 MUST 以機械方式連結、標記並記錄。此宣告屬建議性質(advisory),絕不阻擋 finish。
|
|
104
106
|
|
|
105
|
-
- Trigger: DEBUG
|
|
106
|
-
- Action: 以 `task
|
|
107
|
-
- Evidence: `origin` 綁進 task contract hash
|
|
108
|
-
- Positive:
|
|
109
|
-
- Negative:
|
|
107
|
+
- Trigger: DEBUG task(`task create --debug`)或任何 task 修復一個通過了先前關卡的 bug,且已知其來源。
|
|
108
|
+
- Action: 以 `task create|revise --escape-of <commit> --escape-label <label> [--escape-receipt <id>]` 宣告 `origin`,DEBUG 與一般 task 相同。0.10 `task debug` 記錄的 `pre-existing` 與 `external` origin(附 `reason`)仍可讀取;未宣告的 origin 另行計數。把 `.agent-ops-escapes/<task-id>.json` 記錄與修復一起 commit。
|
|
109
|
+
- Evidence: `origin` 綁進 task contract hash;兩位 reviewer 在 `escape-label` 條件下收到連結狀態、標記、事實與 residual risks。沒有 origin 的 task 仍可 finish;0.10 標記 `originRequired` 的 task 不再被拒絕(`ESCAPE_ORIGIN_MISSING` 已於 0.11.0 移除)。
|
|
110
|
+
- Positive: `回歸在 baseline 為紅、修復後為綠;origin escape-of 864dbbe2 label surface;重放把漏掉的頁面標為 surface-unseen;記錄與修復一起 commit。`
|
|
111
|
+
- Negative: `把 surface-excluded 的漏網改標成 review,理由是 reviewer「應該注意到」。`
|
|
110
112
|
|
|
111
|
-
-
|
|
112
|
-
contract revision:重新 verify、以新證據重新記錄已確認的假設,然後 review。重新宣告會
|
|
113
|
-
取代記錄。輸出會列出修復所改或刪行的 `git blame` 提示 commit;blame 只是提示,因為遺漏
|
|
113
|
+
- 宣告是一次 contract revision:重新 verify,然後 review。重新宣告會取代記錄。輸出會列出修復所改或刪行的 `git blame` 提示 commit;blame 只是提示,因為遺漏
|
|
114
114
|
型 bug 存在於沒人寫過的行。
|
|
115
115
|
- finish receipt 留在本機 Git common directory。Schema 2 記錄 target..candidate 的每個
|
|
116
116
|
commit 與逐檔 diff fingerprint(去掉 blob id 與 hunk 位置,squash merge 後仍相同);
|
|
@@ -134,13 +134,13 @@ English source version: 2026-10-20. Revalidate: when the English specification c
|
|
|
134
134
|
|
|
135
135
|
## EVIDENCE-ESCAPE-002
|
|
136
136
|
|
|
137
|
-
surface 逃逸
|
|
137
|
+
surface 逃逸 SHOULD 變成已證明、受追蹤的規則;學到的規則 MUST 只能收緊 surface gate。此證明屬建議性質,絕不阻擋 finish。
|
|
138
138
|
|
|
139
139
|
- Trigger: 已宣告的 escape-of origin(EVIDENCE-ESCAPE-001),或以 `task create --escape-of <commit> --escape-label <label> --escape-fix <fix-commit>` 回填的過去逃逸。
|
|
140
|
-
- Action: 標記為 `surface`、`surface-unseen` 或 `surface-excluded` 時,commit 一條規則 `.agent-ops-escapes/rules/<rule-id>.json`,形狀為 `{"id", "escape", "label", "trigger": {"paths", "tokens"}, "expand": {"paths", "queries"}, "noExclude"}`,並重新宣告 origin。`criteria` 或 `verify` 以 `--escape-promote <runnerId:checkId>`(
|
|
141
|
-
- Evidence:
|
|
140
|
+
- Action: 標記為 `surface`、`surface-unseen` 或 `surface-excluded` 時,commit 一條規則 `.agent-ops-escapes/rules/<rule-id>.json`,形狀為 `{"id", "escape", "label", "trigger": {"paths", "tokens"}, "expand": {"paths", "queries"}, "noExclude"}`,並重新宣告 origin。`criteria` 或 `verify` 以 `--escape-promote <runnerId:checkId>`(origin 欄位 `"promote"`)指名修復 task 由紅轉綠的 check。其他標記記錄為 lesson。
|
|
141
|
+
- Evidence: 宣告 origin 時執行證明,失敗時印出 `ESCAPE_RULE_UNPROVEN`、`ESCAPE_RULE_TOO_BROAD` 或 `SURFACE_BUDGET_EXCEEDED`;自 0.11.0 起 finish 不再因此拒絕。ledger 記錄保存證明用規則、其內容 hash 與回測的 fires、commits 與比率。
|
|
142
142
|
- Positive: `逃逸 surface-unseen;規則 image-size-siblings 在被逃逸 commit 上觸發,其查詢在該 commit 命中兩個漏掉的兄弟頁面,且在最近 200 個 commit 中只觸發 2 次。`
|
|
143
|
-
- Negative: `規則從未在被逃逸 commit
|
|
143
|
+
- Negative: `規則從未在被逃逸 commit 上觸發卻把 surface 逃逸報為已證明,或新增可排除路徑的規則欄位。`
|
|
144
144
|
|
|
145
145
|
- 規則只含資料且不需要 trust:trigger 與 expand 變成 argv `git grep -F` 查詢與路徑
|
|
146
146
|
glob,絕不經過 shell 或 regex。嚴格 schema 沒有任何能移除查詢、新增排除或放寬關卡的
|
|
@@ -203,7 +203,7 @@ surface 逃逸 MUST 在修復 finish 前變成已證明、受追蹤的規則;
|
|
|
203
203
|
|
|
204
204
|
既有 task 檔案仍可直接讀取,不需資料格式遷移。缺少 config baseline、使用任意文字證據,或含有未完成但已封存子任務的舊任務,必須重建並完成驗證與審查。重複執行 complete 也會重新驗證證據;舊的 completed 狀態本身不夠。Runtime 呼叫端必須提供 `TaskServiceOptions.completion`;缺少此 repository context 時,complete 會拒絕執行,但仍可讀取任務。
|
|
205
205
|
|
|
206
|
-
Commit 前,verify、review、complete 使用預設 worktree scope。Commit 後,三個命令都使用相同的 `--base <git-ref
|
|
206
|
+
Commit 前,verify、review、complete 使用預設 worktree scope。Commit 後,三個命令都使用相同的 `--base <git-ref>`,為已提交範圍重新產生證據。未指定 `--base` 且 worktree 乾淨時,verify 與 review 自動選擇:session worktree 使用與目標分支的 merge-base(finish rebase 後會跟著移動),其他情況使用 task 的建立 commit(須為 HEAD 的祖先)。Base 模式的 source fingerprint 忽略 escape ledger 的 task 記錄(`.agent-ops-escapes/task-*.json`;rules 仍納入 fingerprint),因此 commit ledger 不會使驗證與 review 失效;0.10 計算的 fingerprint 不同,升級後需重新 verify 一次;runtime 呼叫端使用 `TaskServiceOptions.completion.base`。Base 模式要求 worktree 乾淨。沒有 worktree 變更又未指定 base 時,complete 會回傳 `TASK_COMPLETION_SCOPE_REQUIRED`。agy Stop gate 仍檢查 worktree scope 的證據:請在 commit 前完成並停止,或由使用者檢查已完成的 base-scope 任務後,核准一次性的 Stop permit。
|
|
207
207
|
|
|
208
208
|
這項機制強制的是 toolkit 的完成命令,無法阻止 host 直接用自然語言宣稱完成,也無法阻止具有相同檔案權限的 process 直接改寫 task/evidence 檔案;它不會鎖住 Git 或其他來源檔案寫入者。
|
|
209
209
|
|
|
@@ -101,14 +101,11 @@ Runtime-failure 處理中,只有 `command-policy` 為 fail-closed。當已安
|
|
|
101
101
|
OpenCode `tool.execute.before` plugin 可在其支援的 Bash surface 上 throw 文件化的
|
|
102
102
|
denial 或 unavailable-runtime error。Codex 維持 `unknown` 且絕不輸出 denial。
|
|
103
103
|
Fixture test 只斷言這些 wire 與 plugin shape;它們不證明 host 會實際遵守 denial。
|
|
104
|
-
`SessionStart`
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
Codex
|
|
108
|
-
|
|
109
|
-
會停止。`stop_hook_active` 表示已經續跑過,不能繞過 DEBUG 檢查。
|
|
110
|
-
原生 `Interrupt` 暫停採三秒 timeout,不得阻擋或重啟人類中斷。
|
|
111
|
-
此 DEBUG 專用政策不會啟用 Codex 的一般 completion gate 或 optional Stop verifier。
|
|
104
|
+
`SessionStart` 與 `Stop` failure 維持 fail-open。
|
|
105
|
+
|
|
106
|
+
自 0.11.0 起沒有 DEBUG 專用 hook:prompt 不會開 DEBUG task,Stop 不會因 DEBUG 擋住
|
|
107
|
+
session,Codex `Interrupt` 不再註冊(舊安裝殘留的註冊在 `update` 前為 no-op)。Codex
|
|
108
|
+
仍沒有一般 completion gate 或 optional Stop verifier。
|
|
112
109
|
Codex 另以每個原生 hook 的精確定義保存信任。更新受管理 hook 後,必須在 `/hooks`
|
|
113
110
|
審核新增或變更的定義;agent-ops repository trust 不會啟用尚未審核的原生 hook。
|
|
114
111
|
|
|
@@ -169,6 +166,8 @@ unknown)、有界且遮蔽敏感資料的原始診斷、sealed proof(`record
|
|
|
169
166
|
僅表示紀錄存在,不代表驗證通過)、cleanup 狀態、能否 resume 與具體修復方式。
|
|
170
167
|
相同 cleanup blocker 保留原始 cause。Trust、native identity、generation 與 denial
|
|
171
168
|
仍 fail-closed;sealed proof 不得抹除 native 或組織的明確拒絕。
|
|
169
|
+
`run status` 與 `run logs` 的 JSON `state` 省略 event 歷史與 goal 全文,保留
|
|
170
|
+
`eventCount` 與 `goalHash`,讓重複輪詢維持精簡;event 本身由 `run logs` 回傳。
|
|
172
171
|
|
|
173
172
|
人工 resume 已寫入 receipt 的 integration,必須先驗證原 sealed proof、receipt
|
|
174
173
|
digest 與 transaction、owner/generation、candidate/target ancestry 及 Git note。
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
- Negative: 只因 native goal completion 就把 run 標為 complete。
|
|
12
12
|
|
|
13
13
|
- macOS supervisor 在啟動 goal 前保存 Claude/Codex native 身份。同 host writers 使用獨立 worktrees 與目前 generation lease;coordinator 計入最多兩個 writer。依賴以固定交付提供,child baseline 在依賴 commits 進入 checkout 後建立。
|
|
14
|
-
- 新 run 不設總時間上限(`budget.limitMs: null`),仍以 active intervals 聯集記錄 setup、verify、review、整合的消耗。舊有限 run 僅在下次人工 resume 升級,保留舊上限、intervals、消耗、usage epochs 與 blocker 歷史;讀取或安裝不會升級或喚醒舊 run。單次命令/review timeout、provider quota
|
|
14
|
+
- 新 run 不設總時間上限(`budget.limitMs: null`),仍以 active intervals 聯集記錄 setup、verify、review、整合的消耗。舊有限 run 僅在下次人工 resume 升級,保留舊上限、intervals、消耗、usage epochs 與 blocker 歷史;讀取或安裝不會升級或喚醒舊 run。單次命令/review timeout、provider quota、無進度與 pause/stop 控制保持獨立有效。明確指定 --time-budget 會被拒絕。缺少計數維持 UNKNOWN,partial usage 不算完整成本。
|
|
15
15
|
- 實質疑問暫停並要求明確回答。修復保留目標與失敗紀錄;連續兩次相同失敗且無進展停止該 worker 及其依賴,獨立 task 仍可執行。review findings 在下次 final gate 前必須有回歸 pin 或記錄 review-only fallback。
|
|
16
16
|
- native completion 僅是觀察。完成必須有必要驗證、兩輪 fresh review、完成的 task state、綁定 target 的 receipt。整合在移動 target 前封存 candidate,記錄 task、receipt、note、cleanup 進度;恢復驗證封存證據,不重做成功的 target mutation。不一致的 target 維持 blocked。
|
|
17
17
|
- Stop 先保存禁止續跑,再確認受管 process group 死亡。crash recovery 不得取代仍存活或身份不明的 writer。dirty checkout、版本漂移、restart storm 保留現場。重開機/login 改變必須明確 resume;不修改全域 host policy。
|
|
@@ -24,9 +24,14 @@
|
|
|
24
24
|
- 當次人工 resume 的初始恢復 MAY 忽略啟用前收到、且 native 更新秒數嚴格早於該次 resume 的本執行緒 Codex 額度快照。自動重啟、未知/同秒/未來時間、時鐘倒退,以及啟用開始後收到的所有額度事件仍有效。Native 啟用 MUST 確認 goal 為 active,才能啟動或轉向 turn。人工 resume 可解除衍生的 `RUN_POLICY_DISABLED` task 阻擋,但保留 ID、耗用、歷史及其他產品失敗。
|
|
25
25
|
- 收斂判斷比較實際 per-check 狀態及未解除的 finding pins;source fingerprint、時間或診斷文字本身不能算進展。
|
|
26
26
|
|
|
27
|
-
`jobs
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
不論 `jobs` 為何,coordinator MUST 只在規劃完 child 後送出明確的 `action=wait`
|
|
28
|
+
request 才讓出;supervisor 不會停止仍在規劃的 coordinator。wait 會確認 coordinator
|
|
29
|
+
程序死亡、釋出其 slot 並捨棄其 native thread,使 coordinator 在 child 工作期間
|
|
30
|
+
不再輪詢 `run status`。恢復流程讓等待中的 coordinator 保持停止;所有 child 皆為
|
|
31
|
+
delivered、complete 或 blocked 後,才以新 generation 在全新 native session 中接續,
|
|
32
|
+
instructions 會列出每個 child 的狀態與交付 commit。`jobs=1` 時,child MUST 等該
|
|
33
|
+
程序確認死亡後才執行。native 註冊、恢復與啟動 MUST 都限制最多 `jobs` 個 active
|
|
34
|
+
agent;僅扣除 task slot 不足以符合。
|
|
30
35
|
|
|
31
36
|
English source version: 2026-07-23. Revalidate: when the English specification changes.
|
|
32
37
|
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
# 審查
|
|
2
2
|
|
|
3
|
-
English source version: 2026-
|
|
3
|
+
English source version: 2026-10-23. Revalidate: when the English specification changes.
|
|
4
|
+
|
|
5
|
+
## REVIEW-CRITERIA-001
|
|
6
|
+
|
|
7
|
+
- Trigger: 正式 task 的 criteria 就緒、尚未開始實作。
|
|
8
|
+
- Action: 等待一輪限定範圍的 advisory,由 writer 記錄採納或拒絕理由。
|
|
9
|
+
- Evidence: 私人快照報告與安全 local 狀態/用量 log;不產生完成證明。
|
|
10
|
+
- Positive: `修訂後顯示歷史建議;只有明確 rerun 才再花一輪。`
|
|
11
|
+
- Negative: `每次 revise 都自動重審,或把建議當正式 PASS 證明。`
|
|
12
|
+
|
|
13
|
+
每個正式 task 建立入口(含 DEBUG、replan 新子任務及 native run root/child)MUST 在首次實作前等待一輪獨立 criteria advisory。使用設定的 independent-review target 與全新 session,優先選擇不同於 host 的 target;只提供原始 goal、指派 intent/covers、criteria 與 surface audit,並在空白暫存工作區執行。MUST NOT 掃描 repository 或跑測試。缺 goal 須明示資訊不足;子任務只對指派範圍判完整性。材料是否存在、是否載入產品程式留待實作驗證;有理由的 review-only 條件合法。
|
|
14
|
+
|
|
15
|
+
advisory 不設 agent-ops 執行 deadline、stall cutoff 或 token budget。provider 限制、真正啟動/認證/輸出錯誤與人工取消仍有效。錯誤回報 NOT_RUN 後可繼續;人工取消保留 task 並 MUST 停止實作。native 審查程序仍受註冊與停止機制管理。一般 verify 與正式雙輪 review 的既有時間限制及 gate 保持有效。
|
|
16
|
+
|
|
17
|
+
task 建立回應呈現建議與私人報告位置。writer 自行判斷採納,透過 task revise 記錄採納及拒絕理由(可用相同 criteria 修訂記錄拒絕建議)。需求歧義或擴大範圍才向使用者澄清。報告綁定 task/goal/criteria/surface 快照;輸入改變後 status 與 revise 顯示歷史報告已過期。修訂 MUST NOT 自動重審。重複初審請求重用第一次嘗試,包含 NOT_RUN;只有明確執行 `agent-ops review --criteria --task <id> --rerun --yes` 才開始新的一輪。省略 --rerun 時讀取/等待目前嘗試。
|
|
18
|
+
|
|
19
|
+
詳細報告經遮蔽後私存於 `.agent-ops/reviews/criteria-<task-id>*.json`;local log 只記狀態、耗時、數量、可得用量及報告參照。CLI 呼叫數與 provider 模型呼叫數分開,後者可能未回報。報告/log 故障 MUST NOT 回滾 task 或偽造證據。advisory 產物 MUST NOT 滿足 verify、正式 review 或 finish。
|
|
4
20
|
|
|
5
21
|
## REVIEW-INDEPENDENT-001
|
|
6
22
|
|
package/package.json
CHANGED
|
@@ -282,27 +282,7 @@
|
|
|
282
282
|
},
|
|
283
283
|
"debug": {
|
|
284
284
|
"type": "object",
|
|
285
|
-
"
|
|
286
|
-
"required": [
|
|
287
|
-
"enabled",
|
|
288
|
-
"budgetMs",
|
|
289
|
-
"maxRounds"
|
|
290
|
-
],
|
|
291
|
-
"properties": {
|
|
292
|
-
"enabled": {
|
|
293
|
-
"type": "boolean"
|
|
294
|
-
},
|
|
295
|
-
"budgetMs": {
|
|
296
|
-
"type": "integer",
|
|
297
|
-
"minimum": 1,
|
|
298
|
-
"maximum": 86400000
|
|
299
|
-
},
|
|
300
|
-
"maxRounds": {
|
|
301
|
-
"type": "integer",
|
|
302
|
-
"minimum": 1,
|
|
303
|
-
"maximum": 100
|
|
304
|
-
}
|
|
305
|
-
}
|
|
285
|
+
"description": "Pre-0.11 DEBUG budget settings; accepted, ignored and dropped by update."
|
|
306
286
|
}
|
|
307
287
|
}
|
|
308
288
|
},
|