/ Foundations — 05
Bytes are a feature.
Every component subpath has a brotli budget. CI fails if a PR drifts over. Adjusting a budget upward requires a new ADR with measurement evidence — never a casual increment.
The numbers
| Subpath | Brotli |
|---|---|
@kumiki/primitives/<each> | 500 B |
@kumiki/runtime | 1 KB |
@kumiki/machines/toggle | 800 B |
@kumiki/machines/combobox | 3 KB |
@kumiki/components/toggle | 1.5 KB |
@kumiki/components/dialog | 3.5 KB |
@kumiki/components/combobox | 4.5 KB |
@kumiki/locale/<lang> | 1 KB |
The full table — every subpath, every reasoning — lives at docs/design/09-bundle-budget.md. The current measured numbers are visible at /sizes; competitor comparisons live at /sizes/compare.
How budgets are enforced
size-limitmeasures every subpath on every CI run.- If a measurement exceeds the limit, the build fails. No
--ignore. agadooverifies tree-shaking — every package declaressideEffects: falseand is checked.publint+arethetypeswrongverify the published shape matches the declaredexports.
Why this is in the docs
Because reviewers should know. A pull request that bumps Combobox from 4.5 KB to 4.8 KB is not a small change — it's a decision that requires a corresponding ADR. The number is visible to consumers; the discipline must be visible too.