anomalyco / anomalyco/opencode
chore: adopt opencode-drive and terminal catalog as packages/drive and packages/lab/catalog
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
What
Adopt the anomalyco/opencode-drive repo into this monorepo as two packages, and deploy the terminal catalog to dev.opencode.ai/lab/catalog.
packages/drive— theopencode-drivenpm package (~24k lines TS): TUI driver, deterministic LLM, frame capture, recording, script runner, CLI.packages/lab/catalog— the terminal-state catalog app (~8k lines TS/TSX/CSS + 2.7 MB capture frames), currently deployed at catalog.kitlangton.dev.packages/lab/*becomes the umbrella for internal design/dev tooling (precedent: nested workspaces already exist viapackages/console/*).
Why
- Drive's whole purpose is testing OpenCode at HEAD, but from an external repo it chases published
@opencode-ai/clientnext-channel snapshots (0.0.0-next-17010today). In-repo it becomesworkspace:*and tests/captures run against the working tree. - Catalog captures of "current HEAD" stop requiring detached-worktree preparation of this repo.
- Opens the door to TUI regression gates in CI using drive.
- One less repo to maintain; the catalog gets first-party hosting instead of a personal domain.
Preconditions
- The in-flight theme-matrix work in
opencode-drivelands first (full 63-state recapture at current HEAD for themes opencode/tokyonight/everforest, Notifications toast family). Do not start before that merges.
Plan
1. Flat import (no history)
- Copy
packages/driveandapps/catalog→packages/driveandpackages/lab/catalog. Clean import; history stays in the archived source repo. - Add
packages/lab/*to rootpackage.jsonworkspaces. - Drop Changesets entirely (config, scripts, CHANGELOG workflow). If/when
opencode-driveneeds publishing from here, follow the@opencode-ai/http-recorderprecedent. - Dependency alignment:
@opencode-ai/client→workspace:*;effect/@effect/*/shared dev deps →catalog:entries (versions already match: bun 1.3.14, effect 4.0.0-beta.101). Keep@opentui/corepinned as drive requires. - Wire
typecheckinto turbo, keep package-localbun run test(repo rule: tests never run from root).
2. Capture pipeline simplification
- Current-HEAD captures run directly against the working tree (no worktree prep). Keep
--revisionworktree mode for capturing historical/pinned commits.
3. Base path support
- The app assumes root serving. Add
/lab/catalogbase:bun build --public-path, base constant indeep-link.tsURL builders, and prefixed fetches forcatalog.json/drive-captures.json/ capture frames.
4. Deploy
packages/lab/catalog/wrangler.jsonc: workeropencode-lab-catalog, assets binding, routedev.opencode.ai/lab/catalog*(zoneopencode.ai). No production route on purpose — this is internal tooling; promoting it later is a two-line change..github/workflows/deploy-lab-catalog.ymlcloned fromdeploy-www.yml: push todevwithpaths: packages/lab/catalog/**(+packages/drive/**since captures embed drive behavior), build,wrangler deploywith existingCLOUDFLARE_API_TOKEN.
5. Decommission
- Point
catalog.kitlangton.devat the new worker temporarily or delete the oldopencode-terminal-catalogworker after verifying the new URL. - Archive
anomalyco/opencode-drive(read-only) with a README pointer. Move thecatalog/design-feedbackissue labels + prefilled-feedback URL target toanomalyco/opencode(updatesrc/feedback.ts). - Migrate the repo skills/AGENTS notes that reference
opencode-drivepaths.
Verification
bun run lint,bun typecheck,bun run testfrom both package dirs; catalogbun run build.- One full capture run against working-tree HEAD producing all states across the three themes.
- Browser-verify
dev.opencode.ai/lab/catalog: deep links, filters, viewer, feedback links target the new repo.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by checking the theme-matrix precondition and then inspect root package.json, packages/drive, packages/lab/catalog, and the deploy-www.yml workflow. Run the listed package-local checks and catalog build while tracing the capture pipeline and deep-link.ts base-path handling. Done means both packages are integrated, deployed at the specified route, and browser verification passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, github-actions, typescript
- Domain
- build-system, ci-cd, cloud, devops, testing-qa, tooling, web-dev
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100