opencode-agent-orchestration-kit 1.0.31 → 1.0.33

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.
Files changed (78) hide show
  1. package/README.md +41 -3
  2. package/SECURITY.md +7 -0
  3. package/docker/open-design/data/app.sqlite +0 -0
  4. package/docker/open-design/data/app.sqlite-shm +0 -0
  5. package/docker/open-design/data/app.sqlite-wal +0 -0
  6. package/docker/open-design/opencode-auth/log/2026-05-02T105802.log +17 -0
  7. package/docker/open-design/opencode-auth/log/2026-05-04T102127.log +16 -0
  8. package/docker/open-design/opencode-auth/opencode.db +0 -0
  9. package/docker/open-design/opencode-auth/opencode.db-shm +0 -0
  10. package/docker/open-design/opencode-auth/opencode.db-wal +0 -0
  11. package/docs/cli.md +72 -0
  12. package/docs/installation.md +25 -5
  13. package/docs/quickstart.md +1 -1
  14. package/docs/releases/v1.0.32.md +68 -0
  15. package/docs/releases/v1.0.33.md +72 -0
  16. package/docs/security.md +4 -0
  17. package/docs/supply-chain.md +9 -5
  18. package/docs/threat-model.md +244 -0
  19. package/docs/use-cases/README.md +31 -0
  20. package/docs/use-cases/direct-label-change/README.md +76 -0
  21. package/docs/use-cases/direct-label-change/before/package.json +8 -0
  22. package/docs/use-cases/direct-label-change/before/src/settings-label.mjs +1 -0
  23. package/docs/use-cases/direct-label-change/before/test/settings-label.test.mjs +8 -0
  24. package/docs/use-cases/direct-label-change/case.json +118 -0
  25. package/docs/use-cases/direct-label-change/expected/package.json +8 -0
  26. package/docs/use-cases/direct-label-change/expected/src/settings-label.mjs +1 -0
  27. package/docs/use-cases/direct-label-change/expected/test/settings-label.test.mjs +8 -0
  28. package/docs/use-cases/feature-tag-normalizer/README.md +78 -0
  29. package/docs/use-cases/feature-tag-normalizer/before/package.json +8 -0
  30. package/docs/use-cases/feature-tag-normalizer/before/src/normalize-tags.mjs +3 -0
  31. package/docs/use-cases/feature-tag-normalizer/before/test/normalize-tags.test.mjs +13 -0
  32. package/docs/use-cases/feature-tag-normalizer/case.json +119 -0
  33. package/docs/use-cases/feature-tag-normalizer/expected/package.json +8 -0
  34. package/docs/use-cases/feature-tag-normalizer/expected/src/normalize-tags.mjs +14 -0
  35. package/docs/use-cases/feature-tag-normalizer/expected/test/normalize-tags.test.mjs +18 -0
  36. package/docs/workflows.md +6 -0
  37. package/opencode/AGENTS.md +6 -0
  38. package/opencode/agents/review_api.md +3 -1
  39. package/opencode/agents/review_coordinator.md +3 -1
  40. package/opencode/agents/review_quality.md +3 -1
  41. package/opencode/agents/review_security.md +3 -1
  42. package/opencode/agents/review_tests.md +3 -1
  43. package/opencode/agents/reviewer.md +2 -2
  44. package/opencode/commands/loop.md +53 -14
  45. package/opencode/docs/ai/evolution/README.md +28 -0
  46. package/opencode/docs/ai/evolution/benchmarks/adversarial-scenarios.jsonl +11 -0
  47. package/opencode/docs/ai/harness/README.md +2 -0
  48. package/opencode/docs/ai/harness/agents.md +30 -4
  49. package/opencode/docs/ai/harness/checks.md +27 -0
  50. package/opencode/docs/ai/harness/commands.md +21 -4
  51. package/opencode/docs/ai/harness/orchestrated-review.md +4 -0
  52. package/opencode/docs/ai/harness/orchestration-contracts.json +891 -0
  53. package/opencode/package-lock.json +14 -8
  54. package/opencode/package.json +1 -0
  55. package/opencode/scripts/adversarial-harness.test.mjs +296 -0
  56. package/opencode/scripts/check-harness.mjs +826 -11
  57. package/opencode/scripts/check-harness.test.mjs +572 -1
  58. package/opencode/scripts/loop-state.mjs +1149 -0
  59. package/opencode/scripts/loop-state.test.mjs +577 -0
  60. package/opencode/scripts/review-orchestrated-prepare.mjs +33 -9
  61. package/package.json +4 -1
  62. package/scripts/check-supply-chain.mjs +11 -1
  63. package/scripts/check-supply-chain.test.mjs +47 -0
  64. package/scripts/check-threat-model.mjs +421 -0
  65. package/scripts/check-threat-model.test.mjs +304 -0
  66. package/scripts/check-use-cases.mjs +501 -0
  67. package/scripts/check-use-cases.test.mjs +225 -0
  68. package/scripts/check.sh +51 -1
  69. package/scripts/install-smoke.sh +24 -1
  70. package/scripts/manage-installation.mjs +567 -25
  71. package/scripts/manage-installation.test.mjs +418 -0
  72. package/scripts/oak.mjs +200 -0
  73. package/scripts/oak.test.mjs +277 -0
  74. package/scripts/package-smoke.mjs +57 -0
  75. package/scripts/package-smoke.test.mjs +75 -2
  76. package/scripts/version.mjs +1 -0
  77. package/scripts/version.test.mjs +3 -2
  78. package/supply-chain.json +1 -0
package/README.md CHANGED
@@ -53,6 +53,7 @@ The goal is not to force every request through a heavy process. Small, clear, lo
53
53
  | Local skills | Practical checklists for testing, debugging, security, performance, documentation, APIs, code review, and more |
54
54
  | Safe installation | Backup-aware install and uninstall scripts, plus a project-local test mode |
55
55
  | Validation | Mechanical checks for JSON configuration, agent contracts, command contracts, and harness consistency |
56
+ | Adversarial safety | Portable fixtures for injection, unsafe paths, wrapper/network permissions, approval integrity, supply-chain pins, and corrupt events |
56
57
  | Optional design workflow | Open Design integration for editable UI workspaces and design-oriented flows |
57
58
  | Optional token visibility | TUI plugin for lead and subagent token usage when OpenCode exposes session trees |
58
59
  | Versioned documentation | Agent, command, evidence, and validation contracts stored alongside the configuration |
@@ -154,7 +155,7 @@ Use the smallest useful flow:
154
155
  - `/scope` when you need research and an MVP-oriented specification.
155
156
  - `/feature` when the work deserves full orchestration.
156
157
  - `/loop` when you want an approved, resumable implementation-review cycle with
157
- durable state and a three-iteration cap.
158
+ crash-recoverable structured state and a three-iteration cap.
158
159
 
159
160
  ## Included agents
160
161
 
@@ -216,6 +217,12 @@ Examples:
216
217
  /review
217
218
  ```
218
219
 
220
+ `/loop` stores its approved human-readable contract in Markdown and uses a
221
+ schema-versioned JSON snapshot, append-only JSONL history, and exclusive lock
222
+ for execution state. Contract hashing rejects stale approvals, action IDs make
223
+ retries idempotent, and explicit repair recovers interrupted writes without
224
+ turning the loop into unattended automation.
225
+
219
226
  A small request can also be written directly:
220
227
 
221
228
  ```text
@@ -362,6 +369,22 @@ first, then choose the install command for that user-owned dependency graph.
362
369
 
363
370
  ## Upgrade, diagnose, uninstall, and rollback
364
371
 
372
+ The package also exposes the dependency-free `oak` CLI as a thin frontend over
373
+ the same tested engines:
374
+
375
+ ```bash
376
+ oak --help
377
+ oak doctor
378
+ oak check
379
+ oak replay
380
+ ```
381
+
382
+ The shell wrappers remain supported. `oak check` validates the installed target
383
+ without executing a target-provided checker, while `oak replay` defaults to the
384
+ packaged static corpus and synthetic fixtures. See the [`oak` CLI
385
+ guide](docs/cli.md) for commands, target precedence, exit codes, and explicit
386
+ exclusions.
387
+
365
388
  Preview an ownership-safe upgrade, then apply it:
366
389
 
367
390
  ```bash
@@ -383,7 +406,20 @@ and an older source is blocked to prevent downgrade. `doctor` reports
383
406
  `same-version-different-payload`, or `invalid-version-state` without consulting
384
407
  the network.
385
408
 
386
- Doctor returns `0` for a healthy installation, `1` for safely actionable state, and `2` for invalid invocation, corrupt/unsafe state, or an unrecoverable filesystem error. To acknowledge a completed manual merge, run:
409
+ Doctor prints twelve ordered findings for OpenCode and Node compatibility,
410
+ installed dependencies, managed files and drift, required configuration,
411
+ optional plugins, permissions, executable scripts, the generated skill
412
+ registry, aggregate compatibility, and legacy residue. Each finding is
413
+ classified as `pass`, `info`, `action-required`, or `not-applicable`, followed
414
+ by a deterministic summary. It does not print configuration contents,
415
+ subprocess stderr, environment values, credentials, or rollback bytes.
416
+
417
+ Doctor returns `0` when no finding requires action, `1` for safely actionable
418
+ state, and `2` for invalid invocation, corrupt/unsafe state, or an unrecoverable
419
+ filesystem error. Suggested actions are never applied automatically, and
420
+ preserved custom configuration remains user-owned. See the
421
+ [installation lifecycle guide](docs/installation.md) for the full diagnostic
422
+ contract. To acknowledge a completed manual merge, run:
387
423
 
388
424
  ```bash
389
425
  ./doctor.sh --accept-preserved opencode.json
@@ -603,7 +639,7 @@ Validate only the canonical identity and current release note with:
603
639
 
604
640
  ```bash
605
641
  npm run check:version
606
- node scripts/version.mjs --check-tag v1.0.31
642
+ node scripts/version.mjs --check-tag v1.0.33
607
643
  ```
608
644
 
609
645
  Tag validation compares an explicitly supplied tag with the package identity.
@@ -787,6 +823,8 @@ Detailed guides are available in [`docs/`](docs/):
787
823
  - [Superpowers](docs/superpowers.md)
788
824
  - [Impeccable](docs/impeccable.md)
789
825
  - [Security](docs/security.md)
826
+ - [Threat model](docs/threat-model.md)
827
+ - [Reproducible use cases](docs/use-cases/README.md)
790
828
  - [Troubleshooting](docs/troubleshooting.md)
791
829
  - [Synology notes](docs/synology.md)
792
830
 
package/SECURITY.md CHANGED
@@ -8,6 +8,13 @@ This kit configures coding agents and an optional Open Design workbench. Treat b
8
8
  - Do not expose Open Design directly to the public Internet without authentication and network controls.
9
9
  - Keep OpenCode auth files, provider credentials, sessions, logs, and `.env` files out of git.
10
10
 
11
+ ## Threat model
12
+
13
+ The canonical [threat model](docs/threat-model.md) inventories protected
14
+ assets, trust boundaries, agent capabilities, abuse cases, controls, evidence,
15
+ and residual risks. OpenCode permissions are policy controls, not an
16
+ operating-system sandbox.
17
+
11
18
  ## Report a vulnerability
12
19
 
13
20
  Open an issue with a minimal reproduction and no secrets. If the report contains sensitive information, contact the maintainer privately before publishing details.
@@ -0,0 +1,17 @@
1
+ INFO 2026-05-02T10:58:02 +270ms service=default version=1.14.31 args=["models"] process_role=main run_id=a2a78294-b4d4-488d-99c7-9b9e1f6ba68f opencode
2
+ INFO 2026-05-02T10:58:02 +0ms service=db path=/home/opencode/.local/share/opencode/opencode.db opening database
3
+ INFO 2026-05-02T10:58:02 +5ms service=db count=14 mode=bundled applying migrations
4
+ INFO 2026-05-02T10:58:02 +11ms service=json-migration storage directory does not exist, skipping migration
5
+ INFO 2026-05-02T10:58:02 +1ms service=default directory=/app/open-design creating instance
6
+ INFO 2026-05-02T10:58:02 +3ms service=project directory=/app/open-design fromDirectory
7
+ INFO 2026-05-02T10:58:02 +56ms service=file init
8
+ INFO 2026-05-02T10:58:02 +41ms service=provider status=started state
9
+ INFO 2026-05-02T10:58:02 +8ms service=config path=/home/opencode/.config/opencode/config.json loading
10
+ INFO 2026-05-02T10:58:02 +1ms service=config path=/home/opencode/.config/opencode/opencode.json loading
11
+ INFO 2026-05-02T10:58:02 +5ms service=config path=/home/opencode/.config/opencode/opencode.jsonc loading
12
+ INFO 2026-05-02T10:58:02 +3ms service=config path=/home/opencode/.config/opencode/opencode.json loading
13
+ INFO 2026-05-02T10:58:02 +1ms service=config path=/home/opencode/.config/opencode/opencode.jsonc loading
14
+ ERROR 2026-05-02T10:58:02 +13ms service=default name=PlatformError message=Unknown: FileSystem.writeFile (/home/opencode/.config/opencode/.gitignore) cause=Error: EROFS: read-only file system, open '/home/opencode/.config/opencode/.gitignore' stack=Error
15
+ at LA (/$bunfs/root/chunk-2jj9v4nh.js:71:4213)
16
+ at <anonymous> (/$bunfs/root/chunk-jtzgjw2e.js:709:10709)
17
+ at processTicksAndRejections (native:7:39) fatal
@@ -0,0 +1,16 @@
1
+ INFO 2026-05-04T10:21:27 +675ms service=default version=1.14.31 args=["models"] process_role=main run_id=094c93b3-d70c-4527-8e21-87d24f443d76 opencode
2
+ INFO 2026-05-04T10:21:27 +2ms service=default directory=/app/open-design creating instance
3
+ INFO 2026-05-04T10:21:27 +13ms service=project directory=/app/open-design fromDirectory
4
+ INFO 2026-05-04T10:21:28 +980ms service=db path=/home/opencode/.local/share/opencode/opencode.db opening database
5
+ INFO 2026-05-04T10:21:28 +209ms service=db count=14 mode=bundled applying migrations
6
+ INFO 2026-05-04T10:21:28 +124ms service=file init
7
+ INFO 2026-05-04T10:21:29 +393ms service=provider status=started state
8
+ INFO 2026-05-04T10:21:29 +24ms service=config path=/home/opencode/.config/opencode/config.json loading
9
+ INFO 2026-05-04T10:21:29 +20ms service=config path=/home/opencode/.config/opencode/opencode.json loading
10
+ INFO 2026-05-04T10:21:29 +42ms service=config path=/home/opencode/.config/opencode/opencode.jsonc loading
11
+ INFO 2026-05-04T10:21:29 +204ms service=config path=/home/opencode/.config/opencode/opencode.json loading
12
+ INFO 2026-05-04T10:21:29 +46ms service=config path=/home/opencode/.config/opencode/opencode.jsonc loading
13
+ ERROR 2026-05-04T10:21:29 +119ms service=default name=PlatformError message=Unknown: FileSystem.writeFile (/home/opencode/.config/opencode/.gitignore) cause=Error: EROFS: read-only file system, open '/home/opencode/.config/opencode/.gitignore' stack=Error
14
+ at LA (/$bunfs/root/chunk-2jj9v4nh.js:71:4213)
15
+ at <anonymous> (/$bunfs/root/chunk-jtzgjw2e.js:709:10709)
16
+ at processTicksAndRejections (native:7:39) fatal
package/docs/cli.md ADDED
@@ -0,0 +1,72 @@
1
+ # `oak` CLI
2
+
3
+ `oak` is the dependency-free command-line frontend for the kit's existing
4
+ lifecycle, validation, and deterministic replay tools. It delegates to the same
5
+ engines as the shell wrappers; it does not add a second implementation.
6
+
7
+ ## Commands
8
+
9
+ | Command | Behavior |
10
+ | --- | --- |
11
+ | `oak install` | Install the portable harness with the existing ownership-safe lifecycle |
12
+ | `oak upgrade` | Preview or apply a compatible upgrade |
13
+ | `oak doctor` | Run actionable environment and installation diagnostics |
14
+ | `oak check` | Validate an installed harness with the checker shipped by this package |
15
+ | `oak replay` | Run the packaged deterministic routing corpus and fixtures |
16
+ | `oak uninstall` | Remove only unchanged files owned by the lifecycle manifest |
17
+ | `oak rollback` | Reverse the most recent committed lifecycle operation |
18
+ | `oak version` | Print the canonical package identity |
19
+
20
+ Use `oak --help` or `oak <command> --help` for the closed option set. The
21
+ existing `install.sh`, `upgrade.sh`, `doctor.sh`, `uninstall.sh`, and
22
+ `rollback.sh` wrappers remain supported.
23
+
24
+ ## Installed harness check
25
+
26
+ ```bash
27
+ oak check
28
+ oak check --target /path/to/opencode-config
29
+ ```
30
+
31
+ The target precedence is:
32
+
33
+ 1. `--target`;
34
+ 2. `OPENCODE_CONFIG_DIR`;
35
+ 3. `$HOME/.config/opencode`.
36
+
37
+ The target must be an existing non-symlink directory. `oak check` runs the
38
+ checker included in the package with the target as its working directory. It
39
+ never executes a checker supplied by the target and does not repair or write
40
+ files.
41
+
42
+ ## Deterministic replay
43
+
44
+ ```bash
45
+ oak replay
46
+ oak replay --corpus scenarios.jsonl --fixtures fixtures.jsonl
47
+ oak replay --output report.json
48
+ ```
49
+
50
+ With no overrides, replay uses the static public corpus and synthetic fixtures
51
+ included in the same package version. Overrides accept only `--corpus`,
52
+ `--fixtures`, and `--output`.
53
+
54
+ Replay preserves the engine's exit codes:
55
+
56
+ - `0`: pass;
57
+ - `1`: fail;
58
+ - `2`: invalid input or operational error;
59
+ - `3`: inconclusive.
60
+
61
+ Live replay is deliberately excluded because it requires an explicit OpenCode
62
+ runtime and session boundary. `oak benchmark` is also excluded until the kit
63
+ defines one canonical meaning rather than conflating metrics aggregation,
64
+ adversarial tests, and other evaluator workflows.
65
+
66
+ ## Safety boundary
67
+
68
+ The dispatcher uses Node directly with `shell: false`. It does not install
69
+ dependencies, access the network, authenticate, inspect providers or models,
70
+ read sessions, repair state, or publish artifacts. Lifecycle commands retain
71
+ their existing confirmation, dry-run, ownership, and rollback contracts.
72
+
@@ -72,7 +72,7 @@ Use these read-only checks from the repository root:
72
72
  ```bash
73
73
  node scripts/version.mjs
74
74
  npm run check:version
75
- node scripts/version.mjs --check-tag v1.0.31
75
+ node scripts/version.mjs --check-tag v1.0.33
76
76
  ```
77
77
 
78
78
  The tag check validates only the supplied value. It does not inspect the
@@ -107,12 +107,32 @@ Preserved user changes and pending protected-file merges are warnings, not autho
107
107
 
108
108
  Ordinary `doctor` is lock-free and read-only. Exit codes are:
109
109
 
110
- - `0`: healthy managed installation; stable preservation and user-only preserved evolution are allowed;
111
- - `1`: actionable state such as owned drift, a pending merge, obsolete preserved metadata, stale lock, interrupted transaction, rollback conflict, or cleanup residue;
110
+ - `0`: no finding requires action; informational and not-applicable findings are allowed;
111
+ - `1`: one or more findings require safe operator action, including incompatible
112
+ runtimes, incomplete dependencies or configuration, owned drift, a pending
113
+ merge, unsafe permissions, stale generated registries, legacy residue, stale
114
+ locks, interrupted transactions, rollback conflicts, or cleanup residue;
112
115
  - `2`: invalid invocation, corrupt/unknown state, unsafe path/symlink, structural collision, or a filesystem error that prevents safe analysis.
113
116
 
114
- Its structured report adds `sourceVersion`, `installedVersion`, and
115
- `versionState`. The state is exactly one of:
117
+ The human-readable report has a deterministic headline, twelve ordered checks,
118
+ an immediate action beneath every `action-required` finding, and a final
119
+ summary. Check statuses are `pass`, `info`, `action-required`, or
120
+ `not-applicable`. The stable check order is `opencode-version`,
121
+ `node-version`, `dependencies`, `installed-files`, `file-drift`,
122
+ `required-configuration`, `optional-plugins`, `permissions`,
123
+ `executable-scripts`, `skill-registry`, `compatibility`, and
124
+ `legacy-residue`.
125
+
126
+ External pinned plugins are reported as `info` when they cannot be verified
127
+ offline; missing local plugin files are actionable. Ordinary doctor does not
128
+ run npm, access the network, inspect models, authentication, or caches, repair
129
+ files, delete legacy state, or adopt unmanaged files. It never prints
130
+ configuration contents, subprocess stderr, environment values, credentials, or
131
+ lifecycle backup bytes. Only the explicit `--accept-preserved` workflow below
132
+ can mutate state.
133
+
134
+ The report retains `sourceVersion`, `installedVersion`, and `versionState`.
135
+ The state is exactly one of:
116
136
 
117
137
  - `not-installed`: manifest absent;
118
138
  - `current`: version and payload match;
@@ -73,5 +73,5 @@ Release upload require separate authorization and follow
73
73
  [the supply-chain runbook](supply-chain.md).
74
74
 
75
75
  For an explicitly planned release tag, validate it locally with
76
- `node scripts/version.mjs --check-tag v1.0.31`. This check does not create,
76
+ `node scripts/version.mjs --check-tag v1.0.33`. This check does not create,
77
77
  push, or publish the tag or a hosted release.
@@ -0,0 +1,68 @@
1
+ # v1.0.32 - Safe lifecycle and canonical release identity
2
+
3
+ This release adds crash-recoverable state for bounded `/loop` workflows and a
4
+ portable adversarial suite that exercises the kit's real safety boundaries.
5
+
6
+ ## Highlights
7
+
8
+ - `/loop` now keeps a schema-v1 JSON snapshot, append-only JSONL history, and an
9
+ exclusive lease alongside the approved human-readable contract.
10
+ - Contract hashing prevents a changed task from reusing prior approval, while
11
+ idempotent action IDs and explicit repair recover interrupted transitions.
12
+ - State paths reject traversal and symlink escapes, and same-session
13
+ transitions are serialized by a dedicated transition lock.
14
+ - A portable corpus covers 11 adversarial threats: injection in diffs and
15
+ repository documentation, unsafe symlinks and paths, control-character
16
+ filenames, shell-wrapper bypass, review-network exfiltration, approval
17
+ manipulation, credential canaries, unpinned external references, and corrupt
18
+ or repeated events.
19
+ - The adversarial tests exercise existing review, permission, loop-state,
20
+ replay, sanitization, and supply-chain controls rather than introducing a
21
+ separate security engine.
22
+ - Orchestrated reviewers have no network access, general review network access
23
+ requires approval, and wrapper arguments cannot silently broaden shell
24
+ allowlists.
25
+
26
+ ## Installation or upgrade
27
+
28
+ For a new installation, preview the complete ownership plan before applying it:
29
+
30
+ ```bash
31
+ ./install.sh --dry-run
32
+ ./install.sh
33
+ ```
34
+
35
+ For an existing manifest-owned installation, preview and apply the upgrade:
36
+
37
+ ```bash
38
+ ./upgrade.sh --dry-run
39
+ ./upgrade.sh
40
+ ./doctor.sh
41
+ ```
42
+
43
+ The supported runtime contract remains Node.js `^22.9.0 || ^24.0.0` with
44
+ OpenCode `>=1.14.41 <2.0.0`.
45
+
46
+ ## Migration
47
+
48
+ No ownership-manifest or configuration migration is required. Existing loop
49
+ contracts remain the human-readable source of approval; structured state is
50
+ created or migrated only through the explicit loop-state commands.
51
+
52
+ ## Validation performed
53
+
54
+ Release readiness covers contract checks, 856 bundled script tests,
55
+ typechecking, dependency and signature audits, installation smoke, package
56
+ smoke, canonical version/tag validation, public leak scanning, and independent
57
+ review of the private/public port.
58
+
59
+ The adversarial corpus uses symbolic canaries only. It performs no model calls,
60
+ network requests, plugin installation, or private-provider access.
61
+
62
+ ## Public safety boundary
63
+
64
+ The public release excludes private OpenCode configuration, local provider and
65
+ MCP wiring, credentials, authentication files, raw transcripts, private
66
+ evidence, user-specific absolute paths, machine-local state, and private
67
+ specification or planning documents. Local provider, search, and MCP
68
+ integrations are not part of this release.
@@ -0,0 +1,72 @@
1
+ # v1.0.33 - Safe lifecycle and canonical release identity
2
+
3
+ This release completes Phase 3 with a more diagnosable, maintainable, and
4
+ auditable public kit while preserving its local-first and human-gated scope.
5
+
6
+ ## Highlights
7
+
8
+ - `doctor.sh` now reports twelve ordered, actionable checks covering runtime,
9
+ compatibility, dependencies, managed-file drift, configuration, optional
10
+ plugins, executable permissions, the skill registry, and stale state.
11
+ - The dependency-free `oak` CLI exposes the existing install, upgrade, doctor,
12
+ check, replay, uninstall, rollback, and version engines through one closed
13
+ command surface without adding a second implementation.
14
+ - A closed declarative contract cross-checks public agents, permissions,
15
+ delegations, commands, workflows, retries, completion authority, and evidence
16
+ against the shipped frontmatter and routing corpus.
17
+ - The formal threat model records actors, assets, trust boundaries, agent
18
+ capabilities, twenty risks, and exact coverage of the eleven adversarial
19
+ scenarios.
20
+ - Two dependency-free reproducible case packs compare harness and reduced
21
+ flows. Their four live observations are published honestly as failures under
22
+ exact repository equivalence; no successful benchmark claim is inferred.
23
+ - The supply-chain contract pins `brace-expansion` 5.0.8 to remediate
24
+ GHSA-mh99-v99m-4gvg in the transitive OpenTUI/Babel dependency path without
25
+ accepting the audit tool's incompatible downgrade.
26
+
27
+ ## Installation or upgrade
28
+
29
+ For a new installation, preview the complete ownership plan before applying it:
30
+
31
+ ```bash
32
+ ./install.sh --dry-run
33
+ ./install.sh
34
+ ```
35
+
36
+ For an existing manifest-owned installation, preview and apply the upgrade:
37
+
38
+ ```bash
39
+ ./upgrade.sh --dry-run
40
+ ./upgrade.sh
41
+ ./doctor.sh
42
+ ```
43
+
44
+ The supported runtime contract remains Node.js `^22.9.0 || ^24.0.0` with
45
+ OpenCode `>=1.14.41 <2.0.0`.
46
+
47
+ ## Migration
48
+
49
+ No ownership-manifest schema or private configuration migration is required.
50
+ The new CLI, contracts, threat model, and case packs are additive. Existing
51
+ managed installations should use the normal dry-run upgrade flow so ownership
52
+ and preserved configuration remain explicit.
53
+
54
+ ## Validation performed
55
+
56
+ Release readiness covers contract checks, 968 bundled script tests,
57
+ typechecking, zero-vulnerability production audit, 128 verified registry
58
+ signatures, 29 verified attestations, installation smoke, package smoke,
59
+ canonical version/tag validation, public leak scanning, and package-content
60
+ inspection.
61
+
62
+ The four use-case observations consumed one invocation per variant with no
63
+ retries. Raw output, temporary repositories, model/provider identity, and
64
+ reliable aggregate token totals were not published.
65
+
66
+ ## Public safety boundary
67
+
68
+ The public release excludes private OpenCode configuration, local provider and
69
+ MCP wiring, credentials, authentication files, raw transcripts, private
70
+ evidence, user-specific absolute paths, machine-local state, and private
71
+ specification or planning documents. Local provider, search, and MCP
72
+ integrations are not part of this release.
package/docs/security.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Security
2
2
 
3
+ The canonical [threat model](threat-model.md) documents the system boundaries,
4
+ abuse cases, control evidence, and residual risks. This page keeps the concise
5
+ operational guidance.
6
+
3
7
  - Do not expose Open Design directly to the Internet without protection.
4
8
  - Do not commit auth files, sessions, `.env`, logs, or provider credentials.
5
9
  - Do not commit private product/design docs unless intended.
@@ -16,6 +16,7 @@ the immutable identifier consumed by the repository.
16
16
  | pnpm | 10.33.2 | exact version |
17
17
  | opencode-ai | 1.14.31 | exact version |
18
18
  | @babel/core override | 7.29.7 | exact version |
19
+ | brace-expansion override | 5.0.8 | exact version |
19
20
  | uuid override | 14.0.0 | exact version |
20
21
  <!-- supply-chain-pins:end -->
21
22
 
@@ -29,11 +30,12 @@ script exception requires a named dependency, a documented reason, and a
29
30
  focused test. There is currently no exception.
30
31
 
31
32
  The exact overrides exist for reviewable reasons: `@babel/core` 7.29.7 removes
32
- the audited low-severity findings without an incompatible downgrade, and
33
- `uuid` 14.0.0 preserves the already tested lockfile resolution. Change an
34
- override and regenerate the lockfile in the same reviewed diff. Review every
35
- changed version, `resolved` URL, integrity value, lifecycle script, and Git or
36
- non-registry dependency.
33
+ the audited low-severity findings without an incompatible downgrade,
34
+ `brace-expansion` 5.0.8 fixes GHSA-mh99-v99m-4gvg in the transitive
35
+ OpenTUI/Babel resolution, and `uuid` 14.0.0 preserves the already tested
36
+ lockfile resolution. Change an override and regenerate the lockfile in the same
37
+ reviewed diff. Review every changed version, `resolved` URL, integrity value,
38
+ lifecycle script, and Git or non-registry dependency.
37
39
 
38
40
  If installation preserves a target's differing `package.json` or
39
41
  `package-lock.json`, the kit lockfile does not control that target. Review and
@@ -79,6 +81,8 @@ For each surface, also record:
79
81
  build/load smoke.
80
82
  - `@babel/core` override: advisory rationale, manifest/lockfile diff, low audit,
81
83
  signature audit, import, and typecheck evidence.
84
+ - `brace-expansion` override: advisory rationale, manifest/lockfile diff, low
85
+ audit, signature audit, import, and full package smoke evidence.
82
86
  - `uuid` override: compatibility rationale, manifest/lockfile diff, signature
83
87
  audit, import, and typecheck evidence.
84
88