Dashboardopencodepackages/opencode module shape

packages/opencode module shape

Category: preference
Confidence: 1.00
ID: 01a0aac4-25cb-7553-99da-954260f7677c
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 0
Source session: 1JyMljb40jX8CuggV
Created: 2026-09-14 09:33:25
Updated: 2026-09-16 15:09:36

Content

Never declare export namespace Foo. Use flat exports plus export * as Foo from "./foo"; modules under multi-sibling directories such as src/session and src/config each use their own file and self-export, not a barrel index.ts. Keep namespace-private helpers as non-exported top-level declarations in that file so export * as does not project them. Chose explicit ownership over barrels because hidden exports enlarge dependency surfaces.

Move to: