Repository navigation
Description
Goal
Make docks-kit OMP-only without requiring OpenCode Zen or importing OpenCode commands on the kit’s behalf. Coordinate with #283, which owns removing the CLI launcher, model picker and default selector.
Yolo: the user delegated every decision except the merge to the agent.
Mode: plan-and-implement
Research
Repository facts
- Replace the free-model wrapper with top-level fast tier flags #283 landed in
820d4faf(PR Replace the free-model wrapper with top-level fast tier flags #289):cli/src/engine-native/ompSession.ts,ompOverlay.ts, andcommands/omp.tsare gone, and with them theopencode-zenfree-session selector and the model picker.grep -rniIE 'opencode|\bzen\b'over the checkout at820d4faf(withoutnode_modules,.git,dist,CHANGELOG.md,cli/src/generated, and the frozen.agents/skills/review-benchmark/cases/) finds only:cli/src/engine-native/ompRemovals.ts:82,106: the retired exact-value entries["commands.enableOpencodeUser", false]and["commands.enableOpencodeProject", false]. Sync prunes a key while it holds that old kit value (ompRemovals.ts:418-430compares the value, not who set it), so a value other thanfalsestays, and afalsethat the user set in the deployedconfig.ymlis pruned too. They are migration safeguards for configs that an older kit wrote, not an integration.commands.enableOpencodeUserleft the SoT in the omp 18.19.0 cleanup, wherefalsewas omp's default (CHANGELOG.md:1204-1215);commands.enableOpencodeProjectis one of the 18 overrides returned to the omp 19.0.0 default (true), and only it has a row in thecli/docs/omp-context.mdtable (lines 148-171). That doc already tells users to keep an old kit value in a project configuration or aPI_CONFIG_FILESfile, which sync does not write (lines 173-175).cli/docs/omp-context.md:169: the retired-entries table row forcommands.enableOpencodeProject(old kit valuefalse, omp defaulttrue).cli/docs/omp-models.md:250: a quoted third-party benchmark entry ("Opencode with GLM-5.3"), which is data about another harness, not a kit path.AGENTS.md:3: the agents.md compatibility note for agents that work on this repository, not a kit surface..agents/skills/review-benchmark/cases/: frozen benchmark fixtures (Do not touch).cli/test/unit/ompRetiredSync.test.ts:41,64andcli/test/unit/ompRemovals.test.ts:201: tests that prune the uneditedcommands.enableOpencodeProject: false.
grep -rniIE 'opencode|\bzen\b' SoT cli/src/generatedfinds nothing: the SoT and the shipped payload hold no OpenCode or Zen key, so sync writes no OpenCode setting into a fresh home.- Test gaps: no test proves that a fresh-home sync writes no
commandskey, and none proves that a user'scommands.enableOpencodeUser: trueorcommands.enableOpencodeProject: truesurvives sync, or that the uneditedcommands.enableOpencodeUser: falseis pruned. cli/test/unit/ompRemovals.test.tscallssyncOmpRemovals(testCtx(root), file, false)on a deployedconfig.ymland checks the pruned count and the result;cli/test/unit/ompRetiredSync.test.tsruns the publicsyncover thehome-freshfixture withrunPublicCli.- Root
AGENTS.md: tests and docs bump no version.
Tool facts
- Bun 1.4.5 and omp 19.2.1: verified pins in
SoT/toolchain.json. The defaults of omp's owncommands.enableOpencode*settings belong to omp (Do not touch); omp 19.2.1 (docs/slash-command-internals.md,opencodeprovider):commands.enableOpencodeProject(defaulttrue) switches the project commands in.opencode/commands, sofalseis an opt-out; the user commands in.config/opencode/commandsunder the home folder load when OpenCode is opted in throughenabledProvidersor whencommands.enableOpencodeUseristrue(defaultfalse), so that key is an extra opt-in, andfalsedoes not override a provider-level opt-in. - GNU tar 1.35 with gzip 1.14 (
tar --version,gzip --versionon 2026-12-01, the host packages):cli/scripts/package-smoke.tslists the gzipped tarball withtar -tzf, and rootAGENTS.md(Testing) asks for GNU tar for the Linuxchecksuite. - Vitest 5.1.2 (exact pin,
package.json:62) runs on Node.js v26.13.0 (node --versionon 2026-12-01) through its#!/usr/bin/env nodeshebang. The worktree has its frozen dependencies (bun install --frozen-lockfile), and the rows run the local runner withbun x --no-install vitest, so no unpinned copy installs.
Decisions
- Choice: keep both
ompRemovals.tsOpenCode entries. Reason: they prune only the old kit value; removing them would leavefalsefrom an older kit in upgraded configs. Rejected: deleting them, for that reason. Consequence: afalsethat the user set in the deployedconfig.ymlis pruned as well, because sync cannot tell it from the old kit value; the doc sentence of Step 2 says so and names the project configuration andPI_CONFIG_FILESas the places that keep the opt-out. This is the documented behavior of every retired entry, not an erase of OpenCode's own config or credentials (Do not touch). - Choice: change no SoT file and bump no version: the change adds tests and one doc sentence.
- Choice: keep
AGENTS.md:3and the benchmark text. Reason: neither is a kit-owned OpenCode path.
Request corrections
- Asked: remove residual kit-owned OpenCode paths after Replace the free-model wrapper with top-level fast tier flags #283. Did: no runtime path remains; the plan adds regression tests for the boundary and documents the two migration entries. Reason: Research inventory.
Steps
| # | Id | Task | Files | Depends | Effect | Status | Done when |
|---|---|---|---|---|---|---|---|
| 1 | regressions | Write the tests first; they cover existing behavior. The commands.enableOpencodeUser: true keep case must also fail once against the planted change named in Done when; the other cases are regression guards. In ompRemovals.test.ts: the unedited commands.enableOpencodeUser: false and commands.enableOpencodeProject: false are pruned, and a user's true for each stays with the file otherwise unchanged. In ompRetiredSync.test.ts: a public sync of the home-fresh fixture writes a config.yml with no commands key and no key whose name contains opencode (case-insensitive), and its output names no OpenCode setup. |
cli/test/unit/ompRemovals.test.ts, cli/test/unit/ompRetiredSync.test.ts |
- | local | done | The new tests pass; a planted ["commands.enableOpencodeUser", true] entry in ompRemovals.ts makes the commands.enableOpencodeUser: true keep test fail (red check, then reverted); the prune and fresh-home tests need no planted change, because they pin the existing behavior. |
| 2 | docs | In cli/docs/omp-context.md, after the retired-entries table, add prose (not a table row): the kit writes no OpenCode setting; sync still prunes commands.enableOpencodeProject: false (the table row) and commands.enableOpencodeUser: false (retired in the omp 18.19.0 cleanup) while they hold that old kit value, also when you set that value yourself; omp's own defaults then apply. commands.enableOpencodeProject: false turns off the project OpenCode commands, so to keep that opt-out, set it in a project configuration or a PI_CONFIG_FILES file. commands.enableOpencodeUser only adds the user OpenCode commands: false is omp's default and does not turn them off when enabledProviders opts OpenCode in. |
cli/docs/omp-context.md |
1 | local | done | The prose names both keys, says that a user's false in the deployed file is pruned too, names where the project opt-out stays, and says that the user key is an opt-in that false does not veto. |
Acceptance
| ID | Command | Expected |
|---|---|---|
| tests | bun x --no-install vitest run --reporter=verbose cli/test/unit/ompRemovals.test.ts cli/test/unit/ompRetiredSync.test.ts |
Exit 0; the report lists the prune, keep, and fresh-home cases as passed. |
| sync | ./docks-kit sync --dry-run |
Exit 0, and each preview line starts with [dry-run]. No line sets up or writes an OpenCode setting; a [dry-run] prune line that names a retired commands.enableOpencode* key is the intended migration and is allowed. |
| smoke | bun run smoke:package |
Exit 0 with [package-smoke] clean-room consumer install passed: the packed tarball installs in a clean folder and its CLI runs (root AGENTS.md asks for it on user-facing changes). It does not read the docs topic; the docs row checks the prose. |
| docs | ./docks-kit docs omp-context |
Exit 0, and the output holds the Step 2 prose with both commands.enableOpencode* keys. |
| upgrade | bun run golden:mutation |
golden-mutation: OK. |
| check | bun run check |
Exit 0. |
Do not touch
Do not change upstream OMP providers, erase user OpenCode config or credentials, or rewrite historical changelog/benchmark fixtures. Do not duplicate #283’s CLI changes.
Open questions
None. #283 landed in 820d4faf.
Verification Results
Audited source d3731bc and the installed 0.31.3 help and dry-run; no real provider session started.
Candidate b2ec8bff on Linux x64, 2026-12-01 (one commit holds Steps 1 and 2: the tests and the omp-context.md prose):
- Red check, Step 1: with a planted
["commands.enableOpencodeUser", true]entry inompRemovals.ts,bun x --no-install vitest run --reporter=verbose cli/test/unit/ompRemovals.test.ts -t "OpenCode|enableOpencode"gave 1 failed, 2 passed: thecommands.enableOpencodeUser: truekeep case failed; the prune case and the project keep case passed as guards. The entry was then reverted withgit restore. tests: exit 0, 31 passed, withprunes both OpenCode command switches at the old kit value false, bothkeeps commands.<key>: true and leaves the file unchangedcases, andwrites no OpenCode setting and names no OpenCode setup.sync:./docks-kit sync --dry-run: exit 0; each preview line starts with[dry-run], and no line names OpenCode.upgrade:golden-mutation: OK (13 case(s)).smoke: exit 0,[package-smoke] clean-room consumer install passed.docs:./docks-kit docs omp-context: exit 0; the output holds the new prose with bothcommands.enableOpencode*keys.check:bun run check: exit 0; 6395 unit tests passed, 12 skipped;golden-dryrun: OK (12 case(s));golden-mutation: OK (13 case(s)).
Candidate ba1b13d7 (review repairs f6438698 and 20b4d7a7, then origin/main a08384b4 merged) on Linux x64, 2026-12-01:
tests: exit 0, 31 passed; the fresh-home case also checks the shippedastGrep.enabled: trueand thatconfig.ymlhas noenabledProviderskey.sync: exit 0; every preview line starts with[dry-run]; no line names OpenCode.upgrade:golden-mutation: OK (13 case(s)).smoke: exit 0,[package-smoke] clean-room consumer install passed.docs: exit 0, the prose holds both keys.check:bun run check: exit 0; 6454 unit tests passed, 12 skipped; both golden suites OK.
Activity
DocksDocks commentedon Dec 1, 2026
Delegation grant: yolo: "check all open issues and solve them please."
DocksDocks commentedon Dec 1, 2026
Plan review round 1, full
Plan-review: repair
regressionsanddocs; Do not touch - The plan says a user's own value stays, butcli/src/engine-native/ompRemovals.ts:82,106,418-430compares values, not who set them. A user who explicitly setcommands.enableOpencodeProject: falsein the deployed OMP config loses that opt-out on sync. OMP 19.2.1 then defaults project command discovery totrue. The proposedtruecases verify preservation of different values, not preservation of user intent - State explicitly that keeping the migration removes eitherfalseeven if the user set it. Reconcile that exception with Do not touch and document where users can keep the opt-out without sync pruning it, ascli/docs/omp-context.md:173-175already describes - class: exact-value matching mistaken for provenancesync- An upgraded home containing either retiredfalsevalue can exit 0 and correctly print a[dry-run] pruneline naming the OpenCode key. The expected result rejects that output even though the plan keeps the migration.cli/src/engine-native/ompSync.ts:76-79calls the prune, andcli/src/engine-native/ompRemovals.ts:398-405prints the key - Run this check against an isolated fresh home or forbid OpenCode setup actions while allowing retirement previews - class: acceptance rejects intended migration outputdocs; Acceptance -cli/src/commands/docs.ts:11,37-40,77-81ships the edited prose throughdocks-kit docs omp-context.AGENTS.md:71requiresbun run smoke:packagefor user-facing changes, butpackage.json:33-48shows thatbun run checkdoes not include it. Every listed check can pass without running the required package smoke - Addbun run smoke:packageto Acceptance with its successful exit and[package-smoke] clean-room consumer install passedresult - class: required repository check missing from acceptancegrep -rniI 'opencode|zen'uses basic regular expressions. It searches for a literal pipe rather than matching either term, so it would miss even the known entry atcli/src/engine-native/ompRemovals.ts:82. The separate SoT search checks onlyopencode, notZen- Record the actual 820d4fa inventory using separate patterns or extended alternation, including the SoT and shipped payload - class: search evidence does not match the claimed inventorydocs, “the twocommands.enableOpencode*rows” - The table atcli/docs/omp-context.md:148-171has one OpenCode row, forcommands.enableOpencodeProject.commands.enableOpencodeUserwas retired separately, asCHANGELOG.md:1204-1215records. Adding the sentence as written would point readers to a row that does not exist - Describe both migration entries in prose without presenting the user setting as part of the 18-row table - class: documentation step refers to a nonexistent entryTool facts; Acceptancetestsandcheck- The plan records Bun and OMP but omits the Vitest 5.1.2 pin inpackage.json:62and the Node runtime that Vitest's shebang selects. On a worktree without installed dependencies,bunxcan install an unpinned copy; with dependencies installed but an unsupported Node version, the command can fail before running the regressions - Record the existing Vitest pin and a supported Node version, require the frozen checkout dependencies, and invoke the local runner without an install fallback - class: acceptance runner not bound to the recorded toolchainDocksDocks commentedon Dec 1, 2026
Plan review round 2, delta
Plan-review: repair
regressions, Task and Done when - The Task requires every new test to fail against the planted change, but Done when specifies only adding a retirement entry forcommands.enableOpencodeUser: true. The exact-value comparison incli/src/engine-native/ompRemovals.ts:418-430leaves bothfalsecases unchanged, and the fresh-home config written bycli/src/engine-native/ompSync.ts:76-79has no matching key. Only the keep test can fail from that edit - Limit the planted check to the keep test it is designed to exercise - class: completion condition contradicts the specified checkdocs- The proposed prose treats bothfalsevalues as opt-outs. OMP 19.2.1's OpenCode provider treatscommands.enableOpencodeUseras an additional opt-in, not a veto. A user withenabledProviders: [opencode]who follows the advice and sets that toggle tofalsein a project or overlay file still gets user-level OpenCode commands - Distinguish the project-command opt-out from the user-command opt-in, and explain thatfalsedoes not override a provider-level opt-in - class: opt-in toggle documented as an opt-outsmoke- The clean-room success marker does not verify the edited prose.cli/scripts/package-smoke.ts:44-48,315-333,456-467,510runs the packaged CLI's version, help, dry-run, and tier checks, but never invokesdocs omp-context. It can print the same marker with the old prose - Keep the required smoke gate and report what its marker proves. If this row is meant to prove delivery of the edited prose, check the packaged topic's output directly - class: acceptance success marker does not verify the claimed outputsmokeandcheck-cli/scripts/package-smoke.ts:259-262requirestar -tzf, andAGENTS.md:77requires GNU tar for the Linuxchecksuite. The recorded Bun, Node, Vitest, and OMP versions do not establish which archive reader is available. Without a compatibletaronPATH, the smoke fails before the installed CLI checks - Record the GNU tar version and its source for the Linux acceptance environment, as the plan contract's Tool facts rule requires - class: unrecorded archive-reader prerequisitePrevious findings:
regressionsanddocs, and Do not touch: resolved - Research, Decisions, and Step 2 now say that sync removes either matchingfalseregardless of who set it, and distinguish the deployed OMP file from OpenCode's own config and credentials.sync: resolved - The row now allows a dry-run prune message naming either retired key.bun run smoke:packageand its success marker.testsinvokes the local runner with--no-install.Manager response to round 1
Repaired:
falsein the deployedconfig.ymlis pruned too; Step 2 documents it and names the project configuration andPI_CONFIG_FILESas the places that keep the opt-out; Decisions reconcile it with Do not touch.syncrejected the intended migration output: the row allows a[dry-run] pruneline for a retiredcommands.enableOpencode*key and forbids only an OpenCode setup or write.smokerunsbun run smoke:packagewith its expected line.grep -rniIE 'opencode|\bzen\b'at820d4faf, with the SoT andcli/src/generatedsearched for both terms.testsrow runsbun x --no-install vitest.Rejected: none.
Redesigned: none.
DocksDocks commentedon Dec 1, 2026
Plan review round 3, delta
Plan-review: repair
regressions, Task and Done when - The Task still says every new test must fail against a planted change, but Done when exempts the prune and fresh-home tests. The sole planted entry matches onlycommands.enableOpencodeUser: trueunder the exact path and value check incli/src/engine-native/ompRemovals.ts:347-354,418-430. Thecommands.enableOpencodeProject: truekeep case, bothfalseprune cases, and the fresh-home case still pass - Limit the Task's planted-red requirement to the user-keytruekeep case and treat the other cases as regression guards - class: completion condition contradicts the specified checkPrevious findings:
regressions, Task and Done when: open - repeated abovedocs: resolved - Tool facts and Step 2 distinguish the project opt-out from the user opt-in and say thatfalsedoes not vetoenabledProviders.smoke: resolved - The smoke row now claims only a clean-room install and CLI run. The newdocsrow checks the revised prose through./docks-kit docs omp-context.smokeandcheck: resolved - Tool facts record GNU tar 1.35 and gzip 1.14 with dated version commands.Manager response to round 2
Repaired:
commands.enableOpencodeUser: truekeep test; the prune and fresh-home tests pin existing behavior and need no planted change.opencodeprovider rules; Step 2 prose separates the project opt-out (commands.enableOpencodeProject: false) from the user opt-in (commands.enableOpencodeUser), and says thatfalsedoes not override anenabledProvidersopt-in.smokerow says what its marker proves; a newdocsrow runs./docks-kit docs omp-contextand checks the prose.Rejected: none.
Redesigned: none.
DocksDocks commentedon Dec 1, 2026
Plan review round 4, delta
Plan-review: pass
None.
Previous findings:
regressions, Task and Done when: resolved - Step 1 now requires the planted failure only for thecommands.enableOpencodeUser: truekeep case and treats all other cases as regression guards. The exact path and value matcher incli/src/engine-native/ompRemovals.ts:418-430supports that distinction.Manager response to round 3
Repaired:
commands.enableOpencodeUser: truekeep case and names the other cases regression guards, as Done when does.Rejected: none.
Redesigned: none.
DocksDocks commentedon Dec 1, 2026
Code review round 1, lens correctness
Code-review: pass
Standards
enabledProviders: [opencode]. Sync installs the setting without naming it in its output, and the test scans YAML keys but not values. On a machine with user OpenCode commands, omp would then import them, as the new docs explain at cli/docs/omp-context.md:184-186. - Keep the key and output checks, and assert thatenabledProviderscontains none ofopencode,*, orall. - class: regression assertion misses provider opt-inSpec
None.
Code review round 1, lens spec-and-tests and text-and-safety
Code-review: pass
Standards
commands.enableOpencodeProject: falsein a project config orPI_CONFIG_FILESkeeps that opt-out after sync prunes the deployed copy. “omp's own defaults then apply” omits that condition, even though omp 19.2.1 merges both layers over the deployed user config. - Say omp uses its defaults only when no other settings layer supplies a value. - class: omitted configuration precedencehome-freshpublic sync case deploys a valid mapping today, but the focused test would also pass if sync wrote an empty file or a YAML scalar and exited successfully.valueAtandkeyNamesboth treat those values as having no keys. The separate Linux mutation golden checks the deployed bytes. - Also assert a shipped setting already covered in this file, such asastGrep.enabled: true, before checking for absent keys. - class: vacuous negative assertionSpec
None.
DocksDocks commentedon Dec 1, 2026
Code review round 2, delta
Code-review: pass
Previous findings
PI_CONFIG_FILEScan still supply the value after pruning.Standards
enabledProviders: [{ path: "~/work", providers: [opencode] }], the fresh-home test would pass (inference from the assertion):map(String)turns the entry into[object Object], and the key scan does not inspect values. Omp 19.2.1 resolves path-scoped provider entries, so a user with OpenCode commands who starts omp under~/workwould have them imported. - Checkopencode,*, andallin both bare entries and theproviders,values, anditemsfields of scoped entries. - class: regression assertion misses provider opt-inSpec
None.
Manager response to round 1
Repaired:
enabledProvidersholds none ofopencode,*, orall.PI_CONFIG_FILESfile, or else its default.astGrep.enabled: true.Rejected: none.
Redesigned: none.
DocksDocks commentedon Dec 1, 2026
Code review round 3, delta
Code-review: pass
Previous findings
enabledProvidersentries, including path-scoped entries, but misses opt-ins introduced through a YAML merge key. Repeated under Standards.Standards
<<: { enabledProviders: [opencode] }at the root, the fresh-home test still passes (inference). The test'syamlparser leaves<<unexpanded by default, so the root lookup finds noenabledProvidersand the key scan missesopencodebecause it is a value. omp 19.2.1 loads the file with Bun's YAML parser, which expands the merge key. Users with OpenCode commands would then have them imported. - Parse the deployed config with Bun's YAML parser before checking for provider opt-ins. - class: regression assertion misses provider opt-inSpec
None.
Manager response to round 2
Repaired:
config.ymlhas noenabledProviderskey at all; the SoT ships none, so a bare or path-scoped opt-in of any form fails the test.Rejected: none.
Redesigned: none.
DocksDocks commentedon Dec 1, 2026
Code review round 4, lens correctness, spec-and-tests, text-and-safety (panel)
Code-review: pass
Previous findings
home-freshmutation golden compares the deployed config digest. Adding a merge key to the shipped config would fail that comparison unless the golden were updated. Seecli/test/goldens/mutation.json:501andcli/test/golden-mutation.ts:374-381.Standards
config.ymlsupplies either OpenCode switch asfalsethrough a YAML merge undercommands, sync leaves it in place and omp still readsfalse(inference). The pruner checks direct YAML entries, while omp expands merges. The shipped config, retirement fixtures, and documented examples do not use this form. - Clarify that sync prunes directly declaredfalsevalues; keep the project andPI_CONFIG_FILESguidance. - class: documentation overstates YAML retirement coverageSpec
None.
Manager response to round 3
Repaired: none.
Rejected:
<<) at the root: rejected. The fresh-home test is a regression guard for the shippedSoT/.omp/config.yml, which has no merge key and noenabledProviders. The mutation golden (bun run golden:mutation, casehome-fresh) pins the bytes that a fresh sync deploys, so any SoT change that adds a merge key, anenabledProvidersentry, or any other key fails that golden and gets reviewed; a parser change in this one test would duplicate that guard.Redesigned: none.
Pin the OpenCode boundary of sync in tests
Fix round 1 review findings on the OpenCode boundary
Assert that a fresh-home sync ships no enabledProviders
DocksDocks commentedon Dec 1, 2026
Archived with landing pull request #292