2.1 KiB
2.1 KiB
packages/AGENTS.md
Follow the root AGENTS.md first. This file only records module-level boundaries for packages/.
Package responsibilities
packages/contracts: web/daemon app contract layer. Keep it pure TypeScript; it must not depend on Next.js, Express, Node filesystem/process APIs, browser APIs, SQLite, daemon internals, or the sidecar control-plane protocol.packages/sidecar-proto: Open Design sidecar business protocol. Owns app/mode/source constants, namespace validation, stamp descriptor/fields/flags, IPC message schema, status shapes, error semantics, and default product path constants.packages/sidecar: generic sidecar runtime primitives. Includes bootstrap, IPC transport, path/runtime resolution, launch env, and JSON runtime file helpers; it must not hard-code Open Design app keys or IPC business messages.packages/platform: generic OS process primitives. Includes stamp serialization, command parsing, and process matching/search; it must consume thesidecar-protodescriptor and must not hard-code--od-stamp-*details.
Removed directories
packages/sharedhas been removed; do not restore it.- For new shared types, choose the boundary first: web/daemon app DTOs go in
contracts; sidecar control-plane protocol goes insidecar-proto; generic runtime code goes insidecar; generic OS/process code goes inplatform.
Boundary checklist
- Do not move runtime validation/schema enforcement into
contractsprematurely; current contracts define the typed target shape only. - Do not let app packages depend directly on sidecar control-plane details.
- Do not hard-code Open Design app/source/mode constants in
sidecarorplatform. - Keep stamp fields limited to five:
app,mode,namespace,ipc, andsource.
Common package commands
pnpm --filter @open-design/contracts typecheck
pnpm --filter @open-design/sidecar-proto typecheck
pnpm --filter @open-design/sidecar-proto test
pnpm --filter @open-design/sidecar typecheck
pnpm --filter @open-design/sidecar test
pnpm --filter @open-design/platform typecheck
pnpm --filter @open-design/platform test