opencode-agent-orchestration-kit 1.1.1 → 1.2.0

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 CHANGED
@@ -425,7 +425,7 @@ After a tagged release is published, you can install the same CLI directly
425
425
  from GitHub without keeping a checkout:
426
426
 
427
427
  ```bash
428
- npm install --global "git+https://github.com/jcarlosrodicio/opencode-agent-orchestration-kit.git#v1.1.1"
428
+ npm install --global "git+https://github.com/jcarlosrodicio/opencode-agent-orchestration-kit.git#v1.2.0"
429
429
  oc-switch
430
430
  ```
431
431
 
@@ -842,7 +842,7 @@ Validate only the canonical identity and current release note with:
842
842
 
843
843
  ```bash
844
844
  npm run check:version
845
- node scripts/version.mjs --check-tag v1.1.1
845
+ node scripts/version.mjs --check-tag v1.2.0
846
846
  ```
847
847
 
848
848
  Tag validation compares an explicitly supplied tag with the package identity.
package/docs/models.md CHANGED
@@ -34,7 +34,7 @@ oc-switch
34
34
  Once a release tag exists, a checkout is optional:
35
35
 
36
36
  ```bash
37
- npm install --global "git+https://github.com/jcarlosrodicio/opencode-agent-orchestration-kit.git#v1.1.1"
37
+ npm install --global "git+https://github.com/jcarlosrodicio/opencode-agent-orchestration-kit.git#v1.2.0"
38
38
  oc-switch
39
39
  ```
40
40
 
@@ -0,0 +1,79 @@
1
+ # v1.2.0 - Safe lifecycle and canonical release identity
2
+
3
+ This minor release ports three process changes from norma, OAK's sibling
4
+ harness, and clears the production dependency audit. The final review now
5
+ works in bounded rounds and treats a bar lowered to get to green as a
6
+ defect, developers get a policy for which tests to write, and nine
7
+ transitive advisories in the shipped OpenCode tool dependencies are fixed
8
+ with exact overrides.
9
+
10
+ ## Highlights
11
+
12
+ - **A weakened bar is a review finding.** `oak-adversarial-review` has
13
+ eleven dimensions. Dimension 10 covers a test made easier, a checker
14
+ silenced, a threshold moved or unfinished work: each one blocks unless the
15
+ task artifacts name it and quote the requirement behind it. Dimension 11
16
+ reports a test that only re-proves an existing one as should fix.
17
+ - **Review rounds.** A later round reads the previous report first, closes
18
+ each of its findings as resolved, still open or dismissed, and does not
19
+ raise them again. A finding names its class and every instance. A third
20
+ round that still blocks ends as `blocked`, and `/autonomous` treats it as
21
+ stop reason 6. The state-sync step appends each round to the review report
22
+ instead of overwriting it.
23
+ - **Pre-existing findings are reported apart** and never block or count as
24
+ blocking or unresolved. The `review` run event carries `round=` and
25
+ `pre_existing=`.
26
+ - **Which Tests to Write.** `test-driven-development` gains a test policy:
27
+ search before writing, one test per rule at the cheapest layer, one
28
+ representative case plus the edges that differ, a list of what not to
29
+ test, at most one regression test per bug, and the guarantees that are
30
+ always kept. A project's own policy in `AGENTS.md` wins. The developer's
31
+ Strict TDD rule points at it.
32
+ - **Clean dependency audit.** `npm audit --omit=dev` on `opencode/` reported
33
+ nine advisories (four critical, five high). Exact overrides fix them
34
+ without moving the pinned `@opencode-ai/plugin` 1.14.41, `@opentui/solid`
35
+ 0.2.5 or `solid-js` 1.9.12: `brace-expansion` 5.0.12, `seroval` and
36
+ `seroval-plugins` 1.6.8, `toml` 5.0.1 and `zod` 4.6.7. The supply-chain
37
+ contract and `docs/supply-chain.md` carry the new pins.
38
+ - The OpenCode 2 type workspace pins `@babel/core` 7.29.7, the same version
39
+ the shipped `opencode/package.json` already overrides.
40
+
41
+ ## Installation or upgrade
42
+
43
+ Install or upgrade the published CLI package:
44
+
45
+ ```bash
46
+ npm install --global opencode-agent-orchestration-kit@1.2.0
47
+ oak version
48
+ oak upgrade --dry-run
49
+ oak upgrade
50
+ ```
51
+
52
+ The npm installation exposes the CLIs but does not mutate OpenCode
53
+ configuration. `oak install` and `oak upgrade` remain separate, explicit
54
+ operations.
55
+
56
+ ## Migration
57
+
58
+ No migration is required. Existing harness configuration remains compatible.
59
+ `oak upgrade` refreshes the agent, command and skill files that changed. A
60
+ preserved target `opencode/package.json` or `package-lock.json` keeps its own
61
+ resolutions: merge the new overrides into it to get the audit fixes.
62
+
63
+ ## Validation performed
64
+
65
+ The public contract check, unit and script suite, typechecks for OpenCode 1
66
+ and OpenCode 2, compatibility and supply-chain checks, the production and
67
+ signature dependency audits, installation smoke and package smoke passed.
68
+ GitHub Actions Check and the OpenCode 1 and OpenCode 2 compatibility smokes
69
+ were green on the merged pull request before the release tag.
70
+
71
+ ## Public safety boundary
72
+
73
+ The public release excludes private OpenCode and Pi configuration, local
74
+ providers and MCP wiring, credentials, authentication files, provider URLs,
75
+ raw transcripts, private evidence, absolute machine-local paths, and runtime
76
+ state.
77
+
78
+ Boundary statement: no private config, no credentials, no provider URLs, no
79
+ raw transcripts, no machine-local paths.
@@ -15,8 +15,12 @@ the immutable identifier consumed by the repository.
15
15
  | pnpm | 10.33.2 | exact version |
16
16
  | opencode-ai | 1.14.31 | exact version |
17
17
  | @babel/core override | 7.29.7 | exact version |
18
- | brace-expansion override | 5.0.9 | exact version |
18
+ | brace-expansion override | 5.0.12 | exact version |
19
+ | seroval override | 1.6.8 | exact version |
20
+ | seroval-plugins override | 1.6.8 | exact version |
21
+ | toml override | 5.0.1 | exact version |
19
22
  | uuid override | 14.0.0 | exact version |
23
+ | zod override | 4.6.7 | exact version |
20
24
  <!-- supply-chain-pins:end -->
21
25
 
22
26
  ## npm install and review contract
@@ -30,9 +34,15 @@ focused test. There is currently no exception.
30
34
 
31
35
  The exact overrides exist for reviewable reasons: `@babel/core` 7.29.7 removes
32
36
  the audited low-severity findings without an incompatible downgrade,
33
- `brace-expansion` 5.0.9 fixes GHSA-mh99-v99m-4gvg and GHSA-rgw5-rvv9-x895 in the transitive
37
+ `brace-expansion` 5.0.12 fixes GHSA-mh99-v99m-4gvg, GHSA-rgw5-rvv9-x895,
38
+ GHSA-6j4f-fj2g-mc7p, GHSA-qhr7-859c-m2p7 and GHSA-q2hr-2g5m-vwhr in the transitive
34
39
  OpenTUI/Babel resolution, and `uuid` 14.0.0 preserves the already tested
35
- lockfile resolution. Change an override and regenerate the lockfile in the same
40
+ lockfile resolution. `seroval` and `seroval-plugins` 1.6.8 fix
41
+ GHSA-p6vx-979v-rg4c and GHSA-jp82-f5mq-hwhp under `solid-js`, which stays at
42
+ 1.9.12 because `@opentui/solid` 0.2.5 requires exactly that version; 1.6.8 is
43
+ the line `solid-js` 1.9.17 itself depends on. `toml` 5.0.1 fixes
44
+ GHSA-4qx8-w7c3-pj3p, GHSA-9j65-hcg3-gc64 and GHSA-9qmh-m7c6-f92p, and `zod` 4.6.7
45
+ fixes GHSA-mrhx-c7xc-m3w5, both under the pinned `@opencode-ai/plugin`. Change an override and regenerate the lockfile in the same
36
46
  reviewed diff. Review every changed version, `resolved` URL, integrity value,
37
47
  lifecycle script, and Git or non-registry dependency.
38
48
 
@@ -82,6 +92,9 @@ For each surface, also record:
82
92
  audit, signature audit, import, and full package smoke evidence.
83
93
  - `uuid` override: compatibility rationale, manifest/lockfile diff, signature
84
94
  audit, import, and typecheck evidence.
95
+ - `seroval`, `seroval-plugins`, `toml` and `zod` overrides: advisory rationale,
96
+ manifest/lockfile diff, low audit, signature audit, import, and OpenCode
97
+ compatibility smoke evidence.
85
98
 
86
99
  Run installation, core/default, and package smokes wherever a changed surface
87
100
  can affect them.
package/docs/workflows.md CHANGED
@@ -44,7 +44,9 @@ One explicit invocation runs the whole task without human gates:
44
44
  4. The cycle repeats within a one-to-six iteration budget: a focused change,
45
45
  deterministic validation, `oak-runtime-verification` when there is a runtime
46
46
  surface, `oak-update-docs`, and a fresh `reviewer` subagent applying
47
- `oak-adversarial-review`.
47
+ `oak-adversarial-review`. Each later review round closes the previous
48
+ round's findings instead of starting over, and a third round that still
49
+ blocks stops the run.
48
50
  5. After approval, `oak state attest-review`, `oak state record --status
49
51
  completed`, and `oak run close` write the attestation and the run summary.
50
52
  6. `developer` commits with `oak-commit` and runs `oak deliver pr`.
@@ -170,7 +170,8 @@ it as the working rule for behavior or testable logic changes:
170
170
  - write the test that reproduces or protects the behavior first when viable;
171
171
  - make it pass with the minimum change;
172
172
  - refactor only after green;
173
- - cover relevant edge cases for the changed logic;
173
+ - cover relevant edge cases for the changed logic, with the fewest tests that
174
+ pin it, following "Which Tests to Write" in `test-driven-development`;
174
175
  - report commands and results in the `Verification Envelope`.
175
176
 
176
177
  If TDD does not apply (docs, copy, config without a viable runner, or behavior
@@ -64,7 +64,7 @@ task, applicable repository instructions, ADR, specification, or architecture
64
64
  documentation explicitly declares them. Directory layout alone is not enough.
65
65
 
66
66
  For every `review_stage: final`, also load `oak-adversarial-review` and apply its
67
- four stages before writing findings. Its coverage line opens the output, its
67
+ five stages before writing findings. Its coverage line opens the output, its
68
68
  findings keep the canonical fields above, and its verdict maps to the canonical
69
69
  verdict as that skill defines. Do not read the developer's summary, the run
70
70
  events or an autonomy log before forming your own view; read them last.
@@ -67,7 +67,7 @@ oak state resume --root . --slug <slug> --contract .opencode/loops/<slug>.md --s
67
67
  oak run event --root . --type runtime_verification surface=<none|command|endpoint|store|screen> verdict=<verdict> evidence_count=<n>
68
68
  oak state record --root . --slug <slug> --session-id <RUN> --action-id iteration-<n> --iteration <n> --completed-step <step> --blocking-cause null
69
69
  # after each review, with the counts the reviewer returned:
70
- oak run event --root . --type review review=adversarial files_in_change=<n> files_reviewed=<n> files_skipped=<n> blocking=<n> should_fix=<n> nit=<n> verdict=<safe_to_commit|not_safe_to_commit>
70
+ oak run event --root . --type review review=adversarial round=<n> files_in_change=<n> files_reviewed=<n> files_skipped=<n> blocking=<n> should_fix=<n> nit=<n> pre_existing=<n> verdict=<safe_to_commit|not_safe_to_commit>
71
71
  # after the final reviewer approval:
72
72
  oak state attest-review --root . --slug <slug> --reviewer-session-id <reviewer child session id> --reviewer-agent reviewer --reviewer-verdict APPROVE
73
73
  oak state record --root . --slug <slug> --session-id <RUN> --action-id completed --iteration <n> --completed-step reviewer_approved --blocking-cause null --status completed
@@ -132,9 +132,11 @@ review, `developer` runs `oak-update-docs`, so the reviewer sees the docs too.
132
132
  `lead` invokes `reviewer` only as a
133
133
  subagent with `task reviewer`; never run `opencode run --agent reviewer`. The
134
134
  reviewer applies `oak-adversarial-review` and stays read-only: it returns the
135
- report and its counts, and the state-sync `developer` copies the report
136
- verbatim to `docs/ai/runs/<date>-<slug>/oak-adversarial-review.md` and records the
137
- `review` run event. The reviewer must not read the autonomy log; a correction
135
+ report and its counts, and the state-sync `developer` appends the report
136
+ verbatim to `docs/ai/runs/<date>-<slug>/oak-adversarial-review.md` under a
137
+ `## Round <n>` heading, never overwriting an earlier round, and records the
138
+ `review` run event. `lead` tells each later reviewer its round number and that
139
+ file's path. The reviewer must not read the autonomy log; a correction
138
140
  pass reads it first.
139
141
 
140
142
  Only that child session's final `pass` or `pass_with_observations` may complete
@@ -178,7 +180,9 @@ This list is closed. Stop only when:
178
180
  public interface, or rewriting pushed history; production, migrations,
179
181
  Terraform and Kubernetes land here;
180
182
  5. the harness itself blocks;
181
- 6. two attempts at the same failure both failed; attach the output;
183
+ 6. two attempts at the same failure both failed; attach the output. A third
184
+ review round that still blocks lands here too: the fixes are not
185
+ converging, so attach the review report with its three rounds;
182
186
  7. the task looks wrong or already done.
183
187
 
184
188
  "I would prefer to confirm" is not a stop reason. Provider rate limits and
@@ -794,9 +794,9 @@
794
794
  }
795
795
  },
796
796
  "node_modules/brace-expansion": {
797
- "version": "5.0.9",
798
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
799
- "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
797
+ "version": "5.0.12",
798
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz",
799
+ "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==",
800
800
  "license": "MIT",
801
801
  "dependencies": {
802
802
  "balanced-match": "^4.0.2"
@@ -1494,18 +1494,18 @@
1494
1494
  }
1495
1495
  },
1496
1496
  "node_modules/seroval": {
1497
- "version": "1.5.4",
1498
- "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.5.4.tgz",
1499
- "integrity": "sha512-46uFvgrXTVxZcUorgSSRZ4y+ieqLLQRMlG4bnCZKW3qI6BZm7Rg4ntMW4p1mILEEBZWrFlcpp0AyIIlM6jD9iw==",
1497
+ "version": "1.6.8",
1498
+ "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.6.8.tgz",
1499
+ "integrity": "sha512-HlSgSAkTk4EqHcje1ptJjfZi1YDv5KbhVJ/d3P7T/nAXua2VmDu+AKDX5VTdFfZf48nDkWB2TKYt0DrCSa+3wg==",
1500
1500
  "license": "MIT",
1501
1501
  "engines": {
1502
1502
  "node": ">=10"
1503
1503
  }
1504
1504
  },
1505
1505
  "node_modules/seroval-plugins": {
1506
- "version": "1.5.4",
1507
- "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.5.4.tgz",
1508
- "integrity": "sha512-S0xQPhUTefAhNvNWFg0c1J8qJArHt5KdtJ/cFAofo06KD1MVSeFWyl4iiu+ApDIuw0WhjpOfCdgConOfAnLgkw==",
1506
+ "version": "1.6.8",
1507
+ "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.6.8.tgz",
1508
+ "integrity": "sha512-N7mWAMydj89EnYTHtRpS3LBrAz3J9O6oVrqpuXuvlAHfAUG8WEKqtbAd7SBiJNY5NfCAFhSdyAh7wI4Shjqy4g==",
1509
1509
  "license": "MIT",
1510
1510
  "engines": {
1511
1511
  "node": ">=10"
@@ -1591,9 +1591,9 @@
1591
1591
  }
1592
1592
  },
1593
1593
  "node_modules/toml": {
1594
- "version": "4.3.0",
1595
- "resolved": "https://registry.npmjs.org/toml/-/toml-4.3.0.tgz",
1596
- "integrity": "sha512-lVb8X9BsPVuH0M4BKeS91tXAmJvCjQ5UIyAbQFaxkKGyUFK2RPkhwaFSQH8vbpl1d23eu/IBH+dwVMHWaq9A5A==",
1594
+ "version": "5.0.1",
1595
+ "resolved": "https://registry.npmjs.org/toml/-/toml-5.0.1.tgz",
1596
+ "integrity": "sha512-EqYNA/YvUNndrA2B3O2ojzLQoTQrBxeZ9UIjQwk8t10oe6n7dwclBwd9IdZQTOKwe6vWX+AXtl6IntXRbepdxQ==",
1597
1597
  "license": "MIT",
1598
1598
  "engines": {
1599
1599
  "node": ">=20"
@@ -1714,9 +1714,9 @@
1714
1714
  "license": "MIT"
1715
1715
  },
1716
1716
  "node_modules/zod": {
1717
- "version": "4.1.8",
1718
- "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.8.tgz",
1719
- "integrity": "sha512-5R1P+WwQqmmMIEACyzSvo4JXHY5WiAFHRMg+zBZKgKS+Q1viRa0C1hmUKtHltoIFKtIdki3pRxkmpP74jnNYHQ==",
1717
+ "version": "4.6.7",
1718
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz",
1719
+ "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==",
1720
1720
  "license": "MIT",
1721
1721
  "funding": {
1722
1722
  "url": "https://github.com/sponsors/colinhacks"
@@ -10,7 +10,11 @@
10
10
  },
11
11
  "overrides": {
12
12
  "@babel/core": "7.29.7",
13
- "brace-expansion": "5.0.9",
14
- "uuid": "14.0.0"
13
+ "brace-expansion": "5.0.12",
14
+ "seroval": "1.6.8",
15
+ "seroval-plugins": "1.6.8",
16
+ "toml": "5.0.1",
17
+ "uuid": "14.0.0",
18
+ "zod": "4.6.7"
15
19
  }
16
20
  }
@@ -62,7 +62,7 @@ have no reason to suspect.
62
62
 
63
63
  ## Stage 3 Dimensions
64
64
 
65
- Attack each reviewed file along these nine dimensions:
65
+ Attack each reviewed file along these eleven dimensions:
66
66
 
67
67
  1. **Assumptions.** Does the code assume a value exists, is non-empty, is
68
68
  unique, is ordered or arrives only once?
@@ -78,6 +78,33 @@ Attack each reviewed file along these nine dimensions:
78
78
  8. **Conventions.** Consistency with the conventions the repository documents.
79
79
  9. **Architecture.** Conformance with the project's own declared rules only,
80
80
  never with rules you would prefer.
81
+ 10. **A weakened bar.** Faced with a red check, the cheapest road to green
82
+ ends with the check passing and nothing fixed. Read the removed lines as
83
+ carefully as the added ones; that is where these show:
84
+ - **A test got easier.** A skip or focus marker added, a test file
85
+ deleted, an assertion removed or loosened in a test that stayed, an
86
+ expected value rewritten to match what the code now returns.
87
+ - **A checker got silenced.** A new suppression comment (`@ts-ignore`,
88
+ `eslint-disable`, `# noqa`, `# type: ignore`, `#[allow]`,
89
+ `@SuppressWarnings`) or one that drops code from coverage.
90
+ - **A threshold moved.** A coverage or performance budget lowered, a lint
91
+ rule turned off or down a severity, a step removed from the project's
92
+ validation gate or CI.
93
+ - **Work is unfinished.** A stub that throws "not implemented", an empty
94
+ `catch` that turns a failure into silence, a `TODO` where the
95
+ implementation should be.
96
+
97
+ None of these is wrong by itself: a test may change when the spec did.
98
+ Each one is a defect of at least medium severity that breaks safe
99
+ operation, so under the review policy it is **blocking** unless the task artifacts or the Verification
100
+ Envelope name it and quote the requirement behind it. Tightening the bar
101
+ needs no justification; loosening it always does.
102
+ 11. **Tests that prove nothing new.** A new test that re-proves what an
103
+ existing one asserts, the same rule tested again at a slower layer, a
104
+ table of near-identical cases, or anything "Which Tests to Write" in
105
+ `test-driven-development` says not to test. Name the existing test it
106
+ duplicates or the rule it breaks. It is **Should fix**: it does not make
107
+ the change wrong, it makes every later task slower.
81
108
 
82
109
  A finding that spans files is filed against a changed file.
83
110
 
@@ -96,15 +123,48 @@ parameter that is accepted but unused.
96
123
  Disagreeing with the fix, being unable to confirm the finding, or a wrong line
97
124
  number are not grounds to drop it. Correct the citation instead.
98
125
 
126
+ ## Stage 5 Rounds
127
+
128
+ A review that ends `not_safe_to_commit` sends the change back for a fix, and
129
+ then it is reviewed again. Each pass is a **round**.
130
+
131
+ - **Round 1 reviews the whole change.** Record the commit it reviewed
132
+ (`git log -1 --format=%H`) and whether the tree had uncommitted changes.
133
+ - **Every later round reads the previous report first.** It is a review, not
134
+ the author's reasoning, so the context boundary does not apply to it. Close
135
+ each of its findings as **resolved**, **still open** or **dismissed with a
136
+ reason**. A finding the fix did not resolve is still open, not new; one
137
+ dismissed with a reason stays dismissed unless the diff contradicts the
138
+ reason.
139
+ - **Then review only what changed since that round**: `git diff` against the
140
+ commit it recorded, plus any file that did not exist then. If that round
141
+ reviewed uncommitted changes, there is no commit to diff against: review the
142
+ whole change again, and do not raise again what the previous report raised.
143
+ - **Name the class, not only the instance.** When a finding is one case of a
144
+ pattern (a missing bound, an unchecked error, the same assumption in three
145
+ callers), name the pattern and list every instance, so one round fixes all
146
+ of them.
147
+ - **Three rounds is the cap.** If the third round still has a Blocking
148
+ finding, stop reviewing: the verdict is `not_safe_to_commit`, and the report
149
+ says the approach needs reconsidering. That decision is the human's.
150
+ - **An approval ends the series.** A correction reviewed after it, such as a
151
+ CI fix, starts a new series at round 1 on that correction's diff.
152
+
99
153
  ## Output
100
154
 
101
155
  1. The coverage line comes first:
102
- `coverage: files_in_change=<n> reviewed=<n> skipped=<n>`, followed by each
103
- skipped file and its reason.
104
- 2. Findings grouped as **Blocking**, **Should fix** and **Nit**. Each has
105
- `file:line`, what breaks, the exact trigger and why the existing tests miss
106
- it. Findings keep the canonical fields of the reviewer policy.
107
- 3. A verdict: `safe_to_commit` or `not_safe_to_commit`.
156
+ `coverage: round=<n> files_in_change=<n> reviewed=<n> skipped=<n>`,
157
+ followed by each skipped file and its reason. From round 2, the files are
158
+ the ones that round reviewed.
159
+ 2. From round 2, the previous report's findings with their closure.
160
+ 3. Findings grouped as **Blocking**, **Should fix** and **Nit**, and
161
+ **Pre-existing** apart from them. Each has `file:line`, what breaks, the
162
+ exact trigger and why the existing tests miss it. Findings keep the
163
+ canonical fields of the reviewer policy. A pre-existing finding is a defect
164
+ the change did not write, modify or make newly reachable: it never blocks
165
+ and is never counted as blocking or unresolved. If the change makes it
166
+ worse, it is the change's, at its real severity.
167
+ 4. A verdict: `safe_to_commit` or `not_safe_to_commit`.
108
168
 
109
169
  Never invent findings to look thorough. An empty Blocking group is a valid
110
170
  result.
@@ -112,7 +172,8 @@ result.
112
172
  Return the full report in the review output under the heading
113
173
  `Adversarial coverage`. The reviewer is read-only, so the workflow's state-sync
114
174
  step copies it verbatim to `docs/ai/runs/<YYYY-MM-DD>-<slug>/oak-adversarial-review.md`
115
- when a run folder exists. Never leave the report only in the session.
175
+ when a run folder exists, appending each round under a `## Round <n>` heading so
176
+ the file keeps every round. Never leave the report only in the session.
116
177
 
117
178
  ## Mapping to OAK verdicts
118
179
 
@@ -122,6 +183,7 @@ when a run folder exists. Never leave the report only in the session.
122
183
  | `safe_to_commit`, with Should fix or Nit | `pass_with_observations` |
123
184
  | `not_safe_to_commit` | `needs_changes` |
124
185
  | `not_safe_to_commit` because evidence is missing | `blocked` |
186
+ | `not_safe_to_commit` after the third round | `blocked` |
125
187
 
126
188
  The canonical verdict is the one the reviewer returns.
127
189
 
@@ -131,8 +193,8 @@ When a run is open, end the report with these counts. The state-sync step, not
131
193
  the reviewer, records them:
132
194
 
133
195
  ```bash
134
- oak run event --type review review=adversarial files_in_change=<n> files_reviewed=<n> files_skipped=<n> blocking=<n> should_fix=<n> nit=<n> verdict=<safe_to_commit|not_safe_to_commit>
196
+ oak run event --type review review=adversarial round=<n> files_in_change=<n> files_reviewed=<n> files_skipped=<n> blocking=<n> should_fix=<n> nit=<n> pre_existing=<n> verdict=<safe_to_commit|not_safe_to_commit>
135
197
  ```
136
198
 
137
- After a correction pass, emit it again with `unresolved=<n>`. The last event is
138
- authoritative.
199
+ From round 2, add `unresolved=<n>`: the previous findings still open. The last
200
+ event is authoritative.
@@ -100,7 +100,7 @@ Run tests after every refactor step to confirm nothing broke.
100
100
 
101
101
  ## The Prove-It Pattern (Bug Fixes)
102
102
 
103
- When a bug is reported, **do not start by trying to fix it.** Start by writing a test that reproduces it.
103
+ When a bug is reported, **do not start by trying to fix it.** Start by writing a test that reproduces it. Prefer tightening an existing test that should have caught it; add a new one only when none can (see [Which Tests to Write](#which-tests-to-write)).
104
104
 
105
105
  ```
106
106
  Bug report arrives
@@ -190,6 +190,21 @@ Is it a critical user flow that must work end-to-end?
190
190
  → E2E test (large) — limit these to critical paths
191
191
  ```
192
192
 
193
+ ## Which Tests to Write
194
+
195
+ Every test is paid for on every task: the validation gate runs it, CI runs it, and a suite that grows "just in case" becomes the slowest stage of the loop. The question for every new test is **what real bug would reach users that no existing test catches?** If the answer is none, or a cosmetic one, do not write it.
196
+
197
+ - **Search before you write.** Find the test that already covers the behavior (search for the function, the error code, the message) and extend it. A new test is for what nothing asserts yet.
198
+ - **One test per rule, at the cheapest layer that proves it**, usually a unit test in the module that owns the behavior. Do not prove the same rule again at another layer. A slower test covers the wiring once per path, and only when the details are already unit-tested.
199
+ - **One representative case plus the edges that genuinely differ**: a boundary, an error path. No table of near-identical inputs, and no variant per button, per wording or per runtime when the code path is shared.
200
+ - **Do not test** constructors, getters, equality, copies or one-line delegation; that a constant, a type or an export exists; what the type system or a static check already enforces; the language, a library or the framework; copy, colors, layout or the shape of a view tree; the contents of documentation; or the implementation mirrored line by line. Never write a test that asserts other test files exist.
201
+ - **Tests live with the module they test.** A task, a phase or a bug does not get its own test file. Prefer extending an existing file: many runners pay a per-file cost that can dominate the run.
202
+ - **A bug fix adds at most one regression test**, and only when no existing test can be tightened to catch it.
203
+ - **Slow tests are the exception.** Real processes, real network and real timers only when nothing faster can prove the behavior. Never a fixed sleep: fake the clock, or poll with a timeout.
204
+ - **Always kept:** security, secrets, credentials, permissions, refusals, money, data-transforming migrations and data loss each need a test at their enforcement point. Remove a test there only when the change names the test that still proves the same thing.
205
+
206
+ The project's own test policy in its `AGENTS.md`, where it has one, wins over this list.
207
+
193
208
  ## Writing Good Tests
194
209
 
195
210
  ### Test State, Not Interactions
@@ -396,7 +411,7 @@ For detailed testing patterns, examples, and anti-patterns across frameworks, se
396
411
 
397
412
  After completing any implementation:
398
413
 
399
- - [ ] Every new behavior has a corresponding test
414
+ - [ ] Every new behavior that [Which Tests to Write](#which-tests-to-write) calls for has a corresponding test
400
415
  - [ ] All tests pass: `npm test`
401
416
  - [ ] Bug fixes include a reproduction test that failed before the fix
402
417
  - [ ] Test names describe the behavior being verified
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-agent-orchestration-kit",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "private": false,
5
5
  "description": "Open-source multi-agent orchestration harness for OpenCode with specialized agents, durable workflows, review gates, and reproducible software-engineering processes.",
6
6
  "keywords": [
@@ -143,7 +143,7 @@ async function benchmarkFixture(fixture, iterations, temporaryRoot) {
143
143
  const result = await createInstallationManager({
144
144
  sourceRoot: fixture.sourceRoot,
145
145
  repositoryRoot: fixture.root,
146
- versionProvider: () => "1.1.1",
146
+ versionProvider: () => "1.2.0",
147
147
  }).run("install", { targetRoot });
148
148
  if (result.exitCode !== 0) throw invalid(`installation benchmark failed for ${fixture.id}`);
149
149
  } finally {
@@ -22,7 +22,7 @@ const EXACT_KEYS = {
22
22
  commit: ["commit"],
23
23
  image: ["tag", "digest"],
24
24
  version: ["version"],
25
- overrides: ["@babel/core", "brace-expansion", "uuid"],
25
+ overrides: ["@babel/core", "brace-expansion", "seroval", "seroval-plugins", "toml", "uuid", "zod"],
26
26
  };
27
27
 
28
28
  const COMMIT = /^[0-9a-f]{40}$/;
@@ -106,7 +106,11 @@ export function validateSupplyChainData(data) {
106
106
  data.npm_overrides["brace-expansion"],
107
107
  "npm_overrides.brace-expansion",
108
108
  );
109
+ assertStableVersion(data.npm_overrides.seroval, "npm_overrides.seroval");
110
+ assertStableVersion(data.npm_overrides["seroval-plugins"], "npm_overrides.seroval-plugins");
111
+ assertStableVersion(data.npm_overrides.toml, "npm_overrides.toml");
109
112
  assertStableVersion(data.npm_overrides.uuid, "npm_overrides.uuid");
113
+ assertStableVersion(data.npm_overrides.zod, "npm_overrides.zod");
110
114
  return data;
111
115
  }
112
116
 
@@ -497,7 +501,11 @@ function canonicalDocumentationPinBlock(data) {
497
501
  | opencode-ai | ${data.external_refs.opencode_ai.version} | exact version |
498
502
  | @babel/core override | ${data.npm_overrides["@babel/core"]} | exact version |
499
503
  | brace-expansion override | ${data.npm_overrides["brace-expansion"]} | exact version |
504
+ | seroval override | ${data.npm_overrides.seroval} | exact version |
505
+ | seroval-plugins override | ${data.npm_overrides["seroval-plugins"]} | exact version |
506
+ | toml override | ${data.npm_overrides.toml} | exact version |
500
507
  | uuid override | ${data.npm_overrides.uuid} | exact version |
508
+ | zod override | ${data.npm_overrides.zod} | exact version |
501
509
  <!-- supply-chain-pins:end -->`;
502
510
  }
503
511
 
@@ -524,7 +532,11 @@ function validateDocumentation(root, data, fsOps) {
524
532
  "| opencode-ai |",
525
533
  "| @babel/core override |",
526
534
  "| brace-expansion override |",
535
+ "| seroval override |",
536
+ "| seroval-plugins override |",
537
+ "| toml override |",
527
538
  "| uuid override |",
539
+ "| zod override |",
528
540
  ].map((row) => actualBlock.indexOf(row));
529
541
  const rowsAreOrdered = rowPositions.every(
530
542
  (position, index) => position >= 0 && (index === 0 || position > rowPositions[index - 1]),
@@ -43,8 +43,12 @@ const VALID = {
43
43
  },
44
44
  npm_overrides: {
45
45
  "@babel/core": "7.29.7",
46
- "brace-expansion": "5.0.9",
46
+ "brace-expansion": "5.0.12",
47
+ seroval: "1.6.8",
48
+ "seroval-plugins": "1.6.8",
49
+ toml: "5.0.1",
47
50
  uuid: "14.0.0",
51
+ zod: "4.6.7",
48
52
  },
49
53
  };
50
54
 
@@ -88,7 +92,11 @@ function canonicalPolicy() {
88
92
  | opencode-ai | ${VALID.external_refs.opencode_ai.version} | exact version |
89
93
  | @babel/core override | ${VALID.npm_overrides["@babel/core"]} | exact version |
90
94
  | brace-expansion override | ${VALID.npm_overrides["brace-expansion"]} | exact version |
95
+ | seroval override | ${VALID.npm_overrides.seroval} | exact version |
96
+ | seroval-plugins override | ${VALID.npm_overrides["seroval-plugins"]} | exact version |
97
+ | toml override | ${VALID.npm_overrides.toml} | exact version |
91
98
  | uuid override | ${VALID.npm_overrides.uuid} | exact version |
99
+ | zod override | ${VALID.npm_overrides.zod} | exact version |
92
100
  <!-- supply-chain-pins:end -->
93
101
 
94
102
  Automated installs with intact shipped manifests use \`npm ci --ignore-scripts\`.
@@ -193,14 +201,34 @@ function withSurfaceFixture(callback) {
193
201
  },
194
202
  "node_modules/brace-expansion": {
195
203
  version: VALID.npm_overrides["brace-expansion"],
196
- resolved: "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
204
+ resolved: "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz",
197
205
  integrity: "sha512-braceexpansion",
198
206
  },
207
+ "node_modules/seroval": {
208
+ version: VALID.npm_overrides.seroval,
209
+ resolved: "https://registry.npmjs.org/seroval/-/seroval-1.6.8.tgz",
210
+ integrity: "sha512-seroval",
211
+ },
212
+ "node_modules/seroval-plugins": {
213
+ version: VALID.npm_overrides["seroval-plugins"],
214
+ resolved: "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.6.8.tgz",
215
+ integrity: "sha512-serovalplugins",
216
+ },
217
+ "node_modules/toml": {
218
+ version: VALID.npm_overrides.toml,
219
+ resolved: "https://registry.npmjs.org/toml/-/toml-5.0.1.tgz",
220
+ integrity: "sha512-toml",
221
+ },
199
222
  "node_modules/uuid": {
200
223
  version: VALID.npm_overrides.uuid,
201
224
  resolved: "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz",
202
225
  integrity: "sha512-uuid",
203
226
  },
227
+ "node_modules/zod": {
228
+ version: VALID.npm_overrides.zod,
229
+ resolved: "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz",
230
+ integrity: "sha512-zod",
231
+ },
204
232
  "node_modules/example": {
205
233
  version: "1.2.3",
206
234
  resolved: "https://registry.npmjs.org/example/-/example-1.2.3.tgz",
@@ -720,7 +748,7 @@ test("surface validation rejects a lockfile not regenerated to the brace-expansi
720
748
  fs.writeFileSync(path.join(root, relative), `${JSON.stringify(lock)}\n`);
721
749
  assert.throws(
722
750
  () => checkSupplyChain(root),
723
- /package-lock\.json brace-expansion must resolve to 5\.0\.9/,
751
+ /package-lock\.json brace-expansion must resolve to 5\.0\.12/,
724
752
  );
725
753
  });
726
754
  });
package/scripts/check.sh CHANGED
@@ -268,8 +268,8 @@ if (opencodePackage.dependencies?.['@opentui/solid'] !== '0.2.5') {
268
268
  if (opencodePackage.dependencies?.['solid-js'] !== '1.9.12') {
269
269
  throw new Error('opencode/package.json must pin solid-js to 1.9.12')
270
270
  }
271
- if (opencodePackage.overrides?.['brace-expansion'] !== '5.0.9') {
272
- throw new Error('opencode/package.json must override brace-expansion to 5.0.9')
271
+ if (opencodePackage.overrides?.['brace-expansion'] !== '5.0.12') {
272
+ throw new Error('opencode/package.json must override brace-expansion to 5.0.12')
273
273
  }
274
274
  NODE
275
275
 
@@ -18,7 +18,7 @@ import {
18
18
 
19
19
  const ROOT = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
20
20
  const HASH = "a".repeat(64);
21
- const BASENAME = "opencode-agent-orchestration-kit-1.1.1.tgz";
21
+ const BASENAME = "opencode-agent-orchestration-kit-1.2.0.tgz";
22
22
  const REQUIRED = [
23
23
  "package/package.json",
24
24
  "package/supply-chain.json",
@@ -228,7 +228,7 @@ test("smokeTarball checks the tracked set before extraction", async () => {
228
228
  await assert.rejects(
229
229
  smokeTarball({
230
230
  repositoryRoot: ROOT,
231
- tarball: "/public/opencode-agent-orchestration-kit-1.1.1.tgz",
231
+ tarball: "/public/opencode-agent-orchestration-kit-1.2.0.tgz",
232
232
  captureTarball(_source, destination) {
233
233
  fs.writeFileSync(destination, "fixture");
234
234
  return { size: 1 };
@@ -253,7 +253,7 @@ test("smokeTarball validates both archive listings before extraction", async ()
253
253
  await assert.rejects(
254
254
  smokeTarball({
255
255
  repositoryRoot: ROOT,
256
- tarball: "/public/opencode-agent-orchestration-kit-1.1.1.tgz",
256
+ tarball: "/public/opencode-agent-orchestration-kit-1.2.0.tgz",
257
257
  captureTarball(_source, destination) {
258
258
  fs.writeFileSync(destination, "fixture");
259
259
  return { size: 1 };
@@ -109,7 +109,7 @@ test("[V004] direct version entrypoints are exact and mutation-free", (t) => {
109
109
  for (const args of [["scripts/version.mjs"], ["scripts/manage-installation.mjs", "--version"]]) {
110
110
  const result = run(process.execPath, args, { HOME: home });
111
111
  assert.equal(result.status, 0, result.stderr);
112
- assert.equal(result.stdout, "opencode-agent-orchestration-kit 1.1.1\n");
112
+ assert.equal(result.stdout, "opencode-agent-orchestration-kit 1.2.0\n");
113
113
  assert.equal(fs.existsSync(target), false);
114
114
  }
115
115
  });
@@ -118,7 +118,7 @@ test("[V005] all lifecycle wrappers expose the canonical version", () => {
118
118
  for (const wrapper of ["install.sh", "upgrade.sh", "doctor.sh", "uninstall.sh", "rollback.sh"]) {
119
119
  const result = run(path.join(REPOSITORY_ROOT, wrapper), ["--version"]);
120
120
  assert.equal(result.status, 0, `${wrapper}: ${result.stderr}`);
121
- assert.equal(result.stdout, "opencode-agent-orchestration-kit 1.1.1\n", wrapper);
121
+ assert.equal(result.stdout, "opencode-agent-orchestration-kit 1.2.0\n", wrapper);
122
122
  }
123
123
  });
124
124
 
package/supply-chain.json CHANGED
@@ -25,7 +25,11 @@
25
25
  },
26
26
  "npm_overrides": {
27
27
  "@babel/core": "7.29.7",
28
- "brace-expansion": "5.0.9",
29
- "uuid": "14.0.0"
28
+ "brace-expansion": "5.0.12",
29
+ "seroval": "1.6.8",
30
+ "seroval-plugins": "1.6.8",
31
+ "toml": "5.0.1",
32
+ "uuid": "14.0.0",
33
+ "zod": "4.6.7"
30
34
  }
31
35
  }