WI-002: Scaffold the monorepo
WI-002: Scaffold the monorepo
Problem
There is no build tooling. Everything downstream needs a workspace layout, a task runner, and shared TypeScript/lint/format configuration that packages extend rather than duplicate.
In scope
pnpm-workspace.yamlcoveringapps/*,packages/*,tools/*.- Turborepo with
lint,typecheck,test,buildpipelines and correct dependency ordering plus caching. packages/configexporting basetsconfig, ESLint, and Prettier configs.- Root
package.jsonwith agatescript running the full gate (see../standards/ci-and-gates.md). .gitignorecoveringnode_modules, build output,.dev.vars,.env.local.- Directory structure per
../standards/engineering-standards.md.
Out of scope
- Any real package contents —
packages/dbis WI-006,apps/docsis WI-004. - CI workflow files — WI-003.
- Runtime dependencies (Hono, Drizzle, Astro, Expo).
Definition of done
-
pnpm installsucceeds from a clean clone with no warnings about missing workspace globs. -
pnpm turbo lint typecheck test buildexits zero across all workspaces (trivially, with no packages yet). -
pnpm gateruns and exits zero. - A deliberately broken type in a throwaway package fails
typecheck— proving the pipeline actually runs, not that it silently found nothing. -
packages/configis consumed by at least one package viaextends, not copy-paste. - Turborepo caching demonstrably works: a second identical
pnpm turbo buildreports cache hits. -
tools/is a workspace but nothing depends on it.
Verification
rm -rf node_modules && pnpm installpnpm gatepnpm turbo build # note timingspnpm turbo build # must report FULL TURBO / cache hitsFor the negative check, add a file with const x: string = 42; to a scratch package, confirm pnpm turbo typecheck fails, then remove it.
Notes
The negative check matters more than the positive one. A green pipeline that isn’t running anything is the exact false-confidence failure the standards are built to prevent.