This repository owns the reusable [protocol]works design-system foundation shared by product
repositories. The first package is @protocol-works/design-tokens.
@protocol-works/design-tokensat the repository root is the CSS-first, platform-neutral foundation.@protocol-works/uiunderpackages/ui/owns portable React primitives proven across product repositories.
- Keep the token package CSS-first and platform-neutral.
- Shared brand primitives, typography, motion, geometry, and theme values belong here.
- Portable component contracts needed by at least two consumers belong in
@protocol-works/ui. - Product-specific semantic roles, runtime theme persistence, framework adapters, and domain components stay in their consuming repositories.
- Do not add Next.js, Tauri, or another product runtime as a UI package dependency.
- Publish UI components through direct subpath exports; consumers should not need a barrel import.
- Do not add a token compiler while CSS remains sufficient for every consumer.
- Keep raw values in namespaced
--pw-*custom properties. Tailwind aliases may be unnamespaced because they intentionally define the shared utility vocabulary.
Run before committing:
npm run check
npm pack --dry-run
npm pack --dry-run --workspace @protocol-works/uiTests must protect the public token names, Tailwind utility generation, light/dark theme values, required contrast, UI subpath exports, server rendering, and packaged files.