Source of truth
Scope: every visual decision on every Mpalo surface.
Rule. Every Mpalo surface reads from apps/dev-site/design-system/. The developer build writes the public copy to public/design-system/, and every host serves that folder at /design-system/. A value is changed in the token source or it is not changed at all.
The design system is one hierarchy, not a page-level stylesheet, a copied value set, or a second source. The institution's charter and doctrine remain authoritative in internal/doctrine/. The documents in this folder are the design-facing expression of that material. Where they quote a commitment, they quote it exactly and do not soften it.
Do: change the token, rebuild, and verify every surface that consumes it.
Do not: add a hex value, an alpha tint, a second radius, or a shadow to a page stylesheet to solve a local problem.
Hierarchy
One folder owns each kind of decision, so a change has one place to land.
| Path | Holds | Authority |
|---|---|---|
tokens/ | Color, type, spacing, radius, motion, layers, domains, and base styles. | Canonical values. Every surface reads them. |
components.css | Buttons, cards, badges, fields, tables, overlays, and the other shared components. | Canonical component styles. Pages do not restyle a shared component. |
media.css, media.js | The video player and its behavior. | Canonical media treatment. See Media. |
data.js | Pagination and chart tooltip behavior. | Canonical behavior for the data components. See Data. |
assets/ | Icons, logos, and scribbles. | Canonical files. Do not add a second copy under public/. |
fonts/ | Radley, Helvetica LT Std, Eina, and ASM. | Canonical font files. Verify licences before adding a weight. |
docs/ | System, language, constitution, philosophy, and media notes. | Canonical explanation. Public pages express this material; they do not keep a second copy. |
public/design-system/ | The built stylesheet, components, media files, fonts, and assets. | Generated output. Never hand-edit it. |
The build bundles styles.css and its token imports into one mpalo.css, writes components.css and the media files beside it, and copies the fonts and assets. A page makes one stylesheet request for tokens and one for components, and the same relative URLs resolve on every host.
Documents
Each document has a source file and a public expression. The source governs.
| Document | Source | Public expression |
|---|---|---|
| Design system | apps/dev-site/design-system/README.md | Elements |
| Language | design/LANGUAGE.md | Language |
| Constitution | apps/dev-site/design-system/docs/constitution.md | No-Go's |
| Philosophy | apps/dev-site/design-system/docs/philosophy.md | Principles and Domains |
| Media | apps/dev-site/design-system/docs/media.md | Media |
| Mind Platform | design/code/DESIGN_SYSTEM.md | Mind Platform implementation rules |
| Public site | design/code/PUBLIC_SITE_DESIGN_SYSTEM.md | Public marketing implementation rules |
Design system
The system is the tokens and the components that read them. A page chooses a surface and a theme; it does not choose a palette, a radius, or a shadow. The rules are absolute because a local exception becomes a second design system.
Language
Three registers share one standard: institutional, explanatory, and interface. Each says what is known, names the real operation, and leaves the next decision with the person. The canonical statement is in Language. Contributing covers how a rule is written.
Constitution
The charter's commitments are design constraints, not background reading. Consent is a condition of operation. A preserved representation is a tribute to a person, not the person. Non-weaponisation is absolute. The interface may not imply a capability the system cannot show. No-Go's states the resulting boundaries.
Philosophy
Mpalo is an institution for human understanding, memory, and agency. Cognitive infrastructure is how that purpose is pursued today, and experience-aware memory is the current technical expression. The design system is quiet because the work is intimate; it does not perform depth with decoration. Principles derives the visual rules from that position.
Media
The player is one component for MP4 playback on every surface. It has no window chrome, one system radius, and the softer media shadow. Media documents the anatomy, tokens, and keyboard behavior.
Changing the system
A change lands in the source, the document, and the public page together.
- Change the token, not the page. If a value needs a new name, add it to
tokens/and update the component that reads it. Do not write a hex value, an alpha tint, or a second radius in a page stylesheet. - Fix the component, not the instance. A page that needs a different button is a signal that the shared button is wrong. Change it once, then verify every surface that uses it.
- Keep one explanation. If a rule already has a canonical paragraph, link to it. Do not restate it in a second place with different wording.
- Update the document with the rule. A visual rule that is not written down will be reinvented. Add the reason and the boundary to the matching file under
docs/. - Build and check. Run
npm run build:dev-site, thennpm run check:design-rules. The check fails on borders, non-token radius, shadows other than the two documented ones, alpha values, hard-coded hex values, and easing curves. - Verify the generated page. Inspect the generated output for every affected surface before publishing. The generated files are output, not source.
Why. A visual rule that is not checked will be reintroduced, and the next person will copy the exception rather than the system.
| Do | Do not |
|---|---|
| Add a semantic token when a repeated value has a real role. | Add a one-off value because a single page looks wrong. |
Change components.css and re-check every surface. | Override the component with a page id selector. |
| Regenerate and review the output. | Hand-edit a generated file under public/. |
Two shadows, two jobs. --shadow-overlay belongs to menus, dialogs, popovers, toasts, and the search panel. --shadow-media belongs to the video player and nothing else. The player also derives an ambient edge from its current frame; that edge is part of the player, not a third shadow token. A card, a button, and a page never cast a shadow.
Enforcement
The system is checked before publication and at deploy.
npm run check:design-ruleschecks the canonical token, component, media, and developer styles.npm run check:design-runtimechecks runtime design surfaces and control contrast.npm run check:fontschecks for external font dependencies.npm run build:dev-siteregenerates the public copy, andnpm run check:dev-sitechecks the page inventory.- Preview every affected surface before production. Do not change a surface that serves production traffic without a preview.
Owner: the Design owner. Review: before publication and before a deploy that changes a shared token or component.