system
400.wtf

400.wtf / system / docs · docs/ADR/0010-workspace-with-in-repo-design-system.md

ADR-0010 — pnpm workspace with an in-repo design system

Status: Accepted (implemented 2026-10-10, DS-0)

Context

The civic redesign (docs/identity/brief.md) asks for a reusable design system rather than a collection of styled pages, and the plan builds that system before the site. The black hole, previously the site’s background, is to become a standalone project. Three bodies of code now have different lifecycles inside one repo.

Decision

Convert the repo to a pnpm workspace:

  • apps/site: the Astro site.
  • packages/ds (@400/ds): tokens, CSS, Vue components. Source-only: consumers import .ts/.vue directly and their bundler compiles them, so there is no DS build step. The one generated artifact (CSS from tokens) is committed and checked fresh in CI.
  • packages/black-hole: the renderer, parked until extracted (plan §6).

Alternatives considered

  • Separate DS repo, published package: versioning and release ceremony for one consumer. Rejected until a second consumer exists.
  • DS as a folder inside the site: no boundary. Site code would reach into DS internals and the “DS first” ordering couldn’t be enforced.

Consequences

  • Root scripts delegate (pnpm dev/build → site, pnpm check → every package).
  • CI deploys from apps/site. The worker is renamed 400-wtf-next so the fork never deploys over the live site.