@kylecheng3146/agent-ops 0.2.2 → 0.2.3

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.
@@ -24,18 +24,18 @@ English source version: 2026-07-23. Revalidate: when the English specification c
24
24
 
25
25
  ## REVIEW-HARNESS-001
26
26
 
27
- 即使 installation 支援多個 harness,一次 review invocation MUST 解析成恰好一個 concrete review target。
27
+ 完整 review MUST 使用 configured independent-review target selection;review
28
+ 指令 MUST NOT 接受單次 harness override。
28
29
 
29
- - Trigger: 使用 harness selection 執行 `review`。
30
- - Action: 從 `codex`、`agy` 或 `claude` 中選一個;multi-harness installation 與 review execution 分開處理。
31
- - Evidence: argument parsing 會拒絕 review 使用 `all`、`both` 或逗號分隔的多 harness 值。
32
- - Positive: `review --harness claude` 解析成一個 target。
33
- - Negative: `讓一次 review invocation 隱式跑過所有已安裝 harness。`
30
+ - Trigger: 執行 `review`。
31
+ - Action: 解析設定的 targets,規劃恰好兩個全新 session。
32
+ - Evidence: argument parsing 拒絕 `--harness`;`init --review-target` 仍是設定入口。
33
+ - Positive: `review --task <id> --yes` 回報設定的 `plannedTargets`。
34
+ - Negative: `review --task <id> --yes --harness claude` 改變 reviewer 集合。
34
35
 
35
- 明確指定的 target MUST 已存在於 configured independent-review role。它只會將
36
- configured chain 縮窄為單一 target,並保留 model、effort 與 timeout policy。
37
- 未提供 `--harness` 時,完整 configured chain 仍套用 host-aware ordering;每個
38
- 結果都以 `plannedTargets` 保存這個實際順序。
36
+ 設定三個 target 時,`AGENT_OPS_HOST` MUST 指出目前 host;該 target 會被排除,
37
+ 若可用則 agy 為 primary。設定兩個時依順序執行,即使其中一個是 host;設定一個
38
+ 時,在全新 session 執行兩次。
39
39
 
40
40
  ## REVIEW-READONLY-001
41
41
 
@@ -48,9 +48,8 @@ review target MUST 以其自身的唯讀機制啟動;沒有唯讀機制的 tar
48
48
  - Negative: `信任 prompt 能阻止審查者修改檔案。`
49
49
 
50
50
  每次 review 都 MUST 使用全新 session(`sessionIsolation: "fresh"`)並在
51
- disposable repository clone 中執行。review chain 優先選擇不同於 hosting CLI 的
52
- target;沒有其他可用 target 時,才允許同 CLI 的 fresh review,但輸出 MUST 明確
53
- 標示 `DEGRADED: isolated self-review`。不得 resume 開發 session 作為獨立審查。
51
+ disposable repository clone 中執行。同 target pair 仍因 session 與 clone 全新而
52
+ 具獨立性。不得 resume 開發 session 作為獨立審查。
54
53
 
55
54
  Capability 與模型啟動進度即使在 JSON 模式也寫到 stderr;reviewer 原始輸出仍
56
55
  維持 bounded capture,不直接串流。SIGINT 或 SIGTERM 會中止 active process
@@ -59,24 +58,53 @@ tree,不 fallback、不寫 attestation;timeout 保留獨立 NOT_RUN reason
59
58
 
60
59
  ## REVIEW-CHAIN-001
61
60
 
62
- 已設定的 targets 組成有序後備鏈,MUST 僅在「沒有審到」時換下一家,且 MUST NOT 在取得判定後繼續往下試。
61
+ 兩個規劃的 session MUST 依序為必要 reviewer 與 adversarial 複審。第一個
62
+ session 遇到 FAIL 或 NOT_RUN MUST 立即停止;不會在該結果後 fallback。
63
63
 
64
- - Trigger: 某個已設定的 target 不存在、spawn 失敗或逾時。
65
- - Action: 無法解析輸出時試下一個 target;遇到第一個 PASS 或 FAIL 即停止並回報。
66
- - Evidence: spawn 次數等於判定之前的失敗次數。
67
- - Positive: `codex 的 FAIL 是終局;不會再問任何 target 第二意見。`
68
- - Negative: `FAIL 之後改試其他 target,直到有人回報 PASS。`
64
+ - Trigger: 第一個 target 不存在、未登入、不可用或回傳 malformed report。
65
+ - Action: 回傳含第一個 attempt 診斷的 NOT_RUN,不啟動第二個 session。
66
+ - Evidence: `attempts` 有第一個 diagnostic 且沒有第二個 attempt。
67
+ - Positive: `primary NOT_RUN` 是終局 NOT_RUN。
68
+ - Negative: `必要 reviewer 沒跑成後仍啟動第二個 target`。
69
69
 
70
70
  ## REVIEW-ADVERSARIAL-001
71
71
 
72
- PASS MUST 交給另一個合格 target 嘗試反駁,且反駁成立時 MUST 使整體判定為 FAIL。
72
+ PASS MUST 交給第二個規劃的 target 嘗試反駁,且反駁成立時 MUST 使整體判定為 FAIL。
73
73
 
74
- - Trigger: primary target 回報 PASS,且尚有未走過的合格 target。host target 永不擔任挑戰者。
74
+ - Trigger: primary target 回報 PASS。
75
75
  - Action: 將前一份 report 以不可信資料交給該 target 並要求它反駁;反駁成立即回報 FAIL,且無論結果都記錄為 `adversarial`。
76
76
  - Evidence: `adversarial` 記載挑戰者與是否反駁成立;未能產出 report 的挑戰者則記錄在 attempt 清單。
77
77
  - Positive: `codex 判 PASS,claude 找到 blocking 缺陷,整體判定 FAIL。`
78
78
  - Negative: `為了讓複查看起來有效而編造反駁。`
79
- - Note: 只有一個可用 target 時,primary 判定不受挑戰即成立。FAIL 已是終局,不再複查。
79
+ - Note: 只有一個設定 target 時,會在全新 session 再呼叫同一 target。FAIL 已是終局,不再複查。
80
+
81
+ ## REVIEW-HOST-001
82
+
83
+ Host 缺少 network 或 loopback 能力時,MUST 在任何 reviewer invocation 前
84
+ fail closed。
85
+
86
+ - Trigger: host 宣告 network disabled 或 loopback probe 失敗。
87
+ - Action: 回傳 `REVIEW_NOT_RUN / host-required` 與 host restriction。
88
+ - Evidence: `attempts` 為空,沒有 target preflight 或 reviewer process 執行。
89
+ - Positive: 可信任的外部 host runner 可在具兩項能力的主機重跑同一指令一次。
90
+ - Negative: 把 child login error 當作 authenticated reviewer 不可用的證明。
91
+
92
+ repository 不提供 permission bypass。外部 host runner 不可用時,結果 MUST 保持
93
+ NOT_RUN,不得製造 PASS。
94
+
95
+ ## REVIEW-EVIDENCE-001
96
+
97
+ 完整 PASS MUST 在寫入 attestation 前具備 primary report、adversarial report、
98
+ 兩個帶 fresh session ID 的 PASS attempt、穩定 source fingerprint,以及私密且
99
+ 有大小上限的 report artifact。artifact 或 attestation 寫入失敗 MUST 回傳 NOT_RUN。
100
+
101
+ - Trigger: reviewer chain 得到 PASS verdict。
102
+ - Action: 寫入 attestation 前驗證兩份 report、兩個 fresh attempt、source
103
+ fingerprint 與私密且有大小上限的 artifact。
104
+ - Evidence: attestation 與 artifact 的 task、host、targets、session IDs、report
105
+ digests 及 source fingerprint 完全一致。
106
+ - Positive: 完整 pair 寫入 artifact 與相符的 PASS attestation。
107
+ - Negative: 不完整 PASS 或 evidence 寫入失敗會降為 NOT_RUN。
80
108
 
81
109
  ## REVIEW-CONTRACT-001
82
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kylecheng3146/agent-ops",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Evidence-driven development loops for agy, Codex, Claude Code, and opencode",
5
5
  "type": "module",
6
6
  "license": "MIT",