0002 — Agents own their own code, zero shared TypeScript

Context

Given ADR-0001 (decouple web from agents), the next question is how much code they may share.

Decision

Zero shared TypeScript files. src/ (Vercel web) and agents/** (AWS runtimes) do not import from each other. There is no packages/ folder of common code.

Each side maintains its own:

Schema coordination happens via human-readable documentation in docs/architecture/data-contract.md (to be written), not via compile-time types. The DDB tables are the source of truth. Schema changes are a two-sided PR across both runtimes, reviewed explicitly.

Consequences

Easier

Harder

Enforcement

Alternatives considered

Shared types package (packages/types). Rejected because it still creates a deploy-coordination burden: when types change, both sides must consume the new version before deploying consumers of the changed field.

Agents import from src/lib/data/types.ts only. Status quo. Rejected because it's how we got drift — any "just one import" turns into dozens.

Generate types from a schema source of truth. Overengineered for a 4-person team. Revisit later.