@kylecheng3146/agent-ops 0.1.15 → 0.1.17

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.
@@ -37,9 +37,9 @@ A review target MUST be launched with its own read-only mechanism, and a target
37
37
  without one MUST be skipped rather than run unsandboxed.
38
38
 
39
39
  - Trigger: Building a review invocation for a configured target.
40
- - Action: Pass `-s read-only` (codex), `--sandbox --mode plan` (agy), or `--permission-mode plan` (claude); treat any other target as ineligible.
40
+ - Action: Pass `-s read-only` (codex), `--sandbox --mode plan` (agy), or `--permission-mode plan` (claude); run agy against a disposable repository clone; treat any other target as ineligible.
41
41
  - Evidence: The spawned argv contains the target's read-only flags.
42
- - Positive: `opencode is not a review target: --agent plan silently falls back to a writable agent.`
42
+ - Positive: `agy receives sandboxed plan mode; opencode remains ineligible.`
43
43
  - Negative: `Trust the prompt to stop the reviewer from editing files.`
44
44
 
45
45
  ## REVIEW-CHAIN-001
@@ -48,11 +48,28 @@ Configured targets form an ordered fallback chain that MUST advance only when
48
48
  no review happened, and MUST NOT advance past a verdict.
49
49
 
50
50
  - Trigger: A configured target is missing, fails to spawn, or times out.
51
- - Action: Try the next target; on PASS, FAIL, or unparseable output, stop and report that outcome.
51
+ - Action: Try the next target after unparseable output; stop and report the first PASS or FAIL.
52
52
  - Evidence: The number of spawned attempts matches the failures that preceded the verdict.
53
- - Positive: `codex FAIL is final; agy is never asked for a second opinion.`
53
+ - Positive: `codex FAIL is final; no other target is asked for a second opinion.`
54
54
  - Negative: `Retry other targets after a FAIL until one reports PASS.`
55
55
 
56
+ ## REVIEW-ADVERSARIAL-001
57
+
58
+ A PASS MUST be offered to a different eligible target for refutation, and a
59
+ successful refutation MUST make the run FAIL.
60
+
61
+ - Trigger: The primary target returns PASS and another eligible target has not
62
+ already been walked past. The host target never serves as the challenger.
63
+ - Action: Send that target the prior report as untrusted data and ask it to
64
+ refute the verdict; report FAIL when it does, and record the challenge as
65
+ `adversarial` either way.
66
+ - Evidence: `adversarial` names the challenging target and whether it refuted;
67
+ a challenger that produced no report appears on the attempt list instead.
68
+ - Positive: `codex passed, claude found a blocking defect, the run failed.`
69
+ - Negative: `Manufacture a refutation so the challenge looks effective.`
70
+ - Note: With one usable target the primary verdict stands unchallenged. A FAIL
71
+ is already terminal and is never re-checked.
72
+
56
73
  ## REVIEW-CONTRACT-001
57
74
 
58
75
  A response that breaks the reply contract MUST be reported as NOT_RUN, not as
@@ -46,23 +46,29 @@ Claude 與 Codex lifecycle support 為 `supported`,OpenCode 從 app initializa
46
46
  `--task` 使用 task criteria,並要求必要驗證的最新 PASS evidence。完整 report
47
47
  會顯示給人看,PASS 後只持久化 source-fingerprint attestation。
48
48
 
49
- 每次嘗試都從新的暫存 cwd 與最小環境啟動。目前只有 Claude 具備完整的
50
- context-isolation 合約,能自動執行:
49
+ 每次嘗試都從新的暫存 cwd 與原生唯讀模式啟動。Claude 使用完整 safe-mode
50
+ 隔離;Codex 與 Agy 為了支援既有 OAuth 登入而保留登入環境,因此 context
51
+ 隔離較弱。Agy 會取得一次性 clone,即使 sandboxed plan mode 寫入 cwd,也無法
52
+ 修改來源 repository:
51
53
 
52
54
  | 目標 | 呼叫方式 | 唯讀 |
53
55
  | --- | --- | --- |
54
- | `codex` | `codex exec` | 保留設定;`capability-unavailable` |
55
- | `agy`(Antigravity)| `agy -p` | 保留設定;`capability-unavailable` |
56
+ | `codex` | `codex exec` | `-s read-only --ephemeral --ignore-user-config` |
57
+ | `agy` | `agy --print <prompt>` | `--sandbox --mode plan` |
56
58
  | `claude` | `claude -p` | `--permission-mode plan --safe-mode` |
57
59
 
58
60
  `opencode` **不是** review 目標,即使它是支援的 harness。它的 `--agent plan`
59
61
  會被判定為 subagent 而遭拒,並靜默退回可寫入的 agent,因此無法滿足唯讀前置
60
62
  條件。沒有唯讀旗標的目標會被跳過,不會在無沙箱狀態下執行。
61
63
 
62
- 只有在「根本沒審到」時才換下一家 —— 執行檔不存在、spawn 失敗、或逾時
63
- (每個目標預設 120 秒,可用 `timeoutMs` 覆寫)。`FAIL` 判定是**終局**:
64
- 拿到真實判定後絕不再試下一家,否則就變成自動化的 review shopping。
65
- 無法解析的輸出同樣終局,因為那代表 prompt 約定或 CLI 版本不合,該浮出來修。
64
+ Agy prompt 會直接作為 `--print` 的值;裸用 `-p` 會誤吞下一個 flag。
65
+ agent-ops 刻意不傳會繞過權限邊界的 `--dangerously-skip-permissions`,也不傳會
66
+ 使 plan mode 失效的 `--disable-slash-commands`。
67
+
68
+ 只要沒有取得有效 verdict 就換下一家,包括執行檔不存在、spawn 失敗、逾時
69
+ (每個目標預設 900 秒)、登入失敗、輸出過大或無法解析。文字與 JSON 輸出
70
+ 都會保留每次 attempt 及原因。`PASS` 或 `FAIL` 判定是**終局**,因此不會產生
71
+ 自動化的 review shopping。
66
72
 
67
73
  若 host 是 Claude Code(`CLAUDECODE` 已設定),`claude` 會被移到鏈尾。
68
74
  當它是唯一設定的目標時仍會執行,並附上 `reviewer == host` 警告。
@@ -37,9 +37,9 @@ English source version: 2026-07-23. Revalidate: when the English specification c
37
37
  review target MUST 以其自身的唯讀機制啟動;沒有唯讀機制的 target MUST 被跳過,而非在無沙箱狀態下執行。
38
38
 
39
39
  - Trigger: 為已設定的 target 組建 review invocation。
40
- - Action: 傳入 `-s read-only`(codex)、`--sandbox --mode plan`(agy)或 `--permission-mode plan`(claude);其餘 target 視為不合格。
40
+ - Action: 傳入 `-s read-only`(codex)、`--sandbox --mode plan`(agy)或 `--permission-mode plan`(claude);agy 必須在一次性 repository clone 中執行;其餘 target 視為不合格。
41
41
  - Evidence: spawn 出的 argv 含該 target 的唯讀旗標。
42
- - Positive: `opencode 不是 review target:--agent plan 會靜默退回可寫入的 agent。`
42
+ - Positive: `agy 使用 sandboxed plan mode;opencode 仍不合格。`
43
43
  - Negative: `信任 prompt 能阻止審查者修改檔案。`
44
44
 
45
45
  ## REVIEW-CHAIN-001
@@ -47,11 +47,22 @@ review target MUST 以其自身的唯讀機制啟動;沒有唯讀機制的 tar
47
47
  已設定的 targets 組成有序後備鏈,MUST 僅在「沒有審到」時換下一家,且 MUST NOT 在取得判定後繼續往下試。
48
48
 
49
49
  - Trigger: 某個已設定的 target 不存在、spawn 失敗或逾時。
50
- - Action: 試下一個 target;遇到 PASSFAIL 或無法解析的輸出即停止並回報該結果。
50
+ - Action: 無法解析輸出時試下一個 target;遇到第一個 PASSFAIL 即停止並回報。
51
51
  - Evidence: spawn 次數等於判定之前的失敗次數。
52
- - Positive: `codex 的 FAIL 是終局;不會再問 agy 第二意見。`
52
+ - Positive: `codex 的 FAIL 是終局;不會再問任何 target 第二意見。`
53
53
  - Negative: `FAIL 之後改試其他 target,直到有人回報 PASS。`
54
54
 
55
+ ## REVIEW-ADVERSARIAL-001
56
+
57
+ PASS MUST 交給另一個合格 target 嘗試反駁,且反駁成立時 MUST 使整體判定為 FAIL。
58
+
59
+ - Trigger: primary target 回報 PASS,且尚有未走過的合格 target。host target 永不擔任挑戰者。
60
+ - Action: 將前一份 report 以不可信資料交給該 target 並要求它反駁;反駁成立即回報 FAIL,且無論結果都記錄為 `adversarial`。
61
+ - Evidence: `adversarial` 記載挑戰者與是否反駁成立;未能產出 report 的挑戰者則記錄在 attempt 清單。
62
+ - Positive: `codex 判 PASS,claude 找到 blocking 缺陷,整體判定 FAIL。`
63
+ - Negative: `為了讓複查看起來有效而編造反駁。`
64
+ - Note: 只有一個可用 target 時,primary 判定不受挑戰即成立。FAIL 已是終局,不再複查。
65
+
55
66
  ## REVIEW-CONTRACT-001
56
67
 
57
68
  違反回覆約定的回應 MUST 回報為 NOT_RUN,而非 FAIL。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kylecheng3146/agent-ops",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "Evidence-driven development loops for Codex, Claude Code, and opencode",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -15,6 +15,9 @@
15
15
  "title": {
16
16
  "$ref": "#/$defs/nonEmptyString"
17
17
  },
18
+ "parentTaskId": {
19
+ "$ref": "#/$defs/id"
20
+ },
18
21
  "criteria": {
19
22
  "type": "array",
20
23
  "minItems": 2,