Karyo visual house style: the Operational Blueprint
This is the visual language of Karyo's README, documentation figures and screenshots. It exists so
that a reader can tell, at a glance and without a legend, what Karyo builds and enforces, what lies
beyond its boundary, where a person acts, what is optional, and what is a hard rule. Every rule
here is testable: tests/e2e/fixtures/repo-consistency.test.ts verifies the renders, the palette,
the embeds and the screenshot manifest without a browser, and the nightly frontend job
re-renders docs/diagrams/ and fails on drift. Karyo's figures are the sibling of Loci's Constraint Workshop
(docs/style-guide.md in the Loci repository), so
the two products read as one family and Loci appears in Karyo's figures in its own colour.
The metaphor is the drawing pinned up in the site office. Slate paper; navy ink for what Karyo builds and enforces; teal for what lies beyond its wall (Loci, an ERP, a carrier, a subscriber); amber hi-vis for the people on the floor. Nothing in a figure claims more than the code does, and each figure ends with a one-sentence caption, what it is derived from, and a link to its source.
The grammar legend, rendered from
diagrams/00-grammar-legend.mmd like every other figure.
1. Semantic palette
Every colour in a figure is a token in diagrams/tokens.json, and every
token has a light and a dark value. A diagram source never carries a colour: it assigns a role
to a node (class receive core), and the renderer injects the role's fill and stroke for each
variant. The renderer rejects a colour literal, a classDef, a style or linkStyle
statement, or an init directive; the only look a source may set is frontmatter config.look,
and the provenance line records the look that was applied. There are four
hues, and each has one job:
| Hue | Job | Light | Dark | Where it comes from |
|---|---|---|---|---|
| Slate | ink, neutral strokes, data at rest, frames, the database, optional things | #1f2937 ink, #64748b soft, #f1f5f9 surface |
#e6edf3 ink, #a9b4c2 soft, #1c2430 surface |
Cool slate rather than the product's warm neutrals, because figures sit on GitHub's white and #0d1117 |
| Navy | a Karyo step, module or container; the hard rule Karyo enforces; the frame around the one host or JVM | #1e3a5f on #e3eaf4 |
#9ec1ea on #17273b |
Drawing ink, deliberately not the product's interaction blue: in the console blue means "click me", and a figure never asks for a click |
| Teal | a system beyond Karyo's boundary (Loci, an ERP, a carrier, a webhook subscriber); the dashed boundary or refusal | #0d6861 on #d8ebe6 |
#64c7b8 on #183e38 |
Loci's own core tokens, verbatim, so Loci appears here in the colour its own README gives it |
| Amber | a person acts: operator, planner, administrator. The only amber in a figure | #8a4b00 on #fdefd3 |
#f2c15a on #3b2b0b |
The product's own status-attention and -soft tokens (frontend/web/src/index.css), both themes, so "a person must look at this" reads the same in the console and in the docs |
No red inside a figure. Red belongs to the product's status badges. A refusal, a 404 or a 502 is drawn teal and dashed and named in words, because in Karyo a truthful refusal is a feature (the slotting page's "502, never a silent fallback" is the model).
| Role | Shape | Meaning | Light fill / stroke | Dark fill / stroke |
|---|---|---|---|---|
artifact |
rectangle [ ] |
data at rest: an ASN, an order, a record, a document | #ffffff / #64748b |
#161b22 / #a9b4c2 |
core |
rounded ( ) |
a Karyo step, module or container | #e3eaf4 / #1e3a5f |
#17273b / #9ec1ea |
store |
cylinder [( )] |
the one PostgreSQL schema; the only cylinder | #f1f5f9 / #1e3a5f |
#1c2430 / #9ec1ea |
human |
double bar [[ ]] |
a person acts | #fdefd3 / #8a4b00 |
#3b2b0b / #f2c15a |
constraint |
hexagon {{ }}, 3 px |
a hard rule Karyo enforces whatever anyone advised; the only thick stroke | #ffffff / #1e3a5f |
#161b22 / #9ec1ea |
external |
rectangle | a separate product or system | #d8ebe6 / #0d6861 |
#183e38 / #64c7b8 |
boundary |
dashed 6 4 |
a trust or network boundary, or a refusal named in words | #f1f5f9 / #0d6861 |
#1c2430 / #64c7b8 |
optional |
dashed 4 3 |
optional, or yours to supply: a TLS terminator, an extension | #f1f5f9 / #64748b |
#1c2430 / #a9b4c2 |
frame |
subgraph | the solid frame around the one host or the one JVM | #f1f5f9 / #1e3a5f |
#1c2430 / #9ec1ea |
Ink is #1f2937 light and #e6edf3 dark; the page behind a transparent render is white on
GitHub light and #0d1117 on GitHub dark. The consistency test recomputes WCAG 2 contrast from
the tokens on every run: ink on every fill at least 4.5, every stroke on the page at least 3.0,
in both variants. On this palette the worst cases are 9.96 for text (external, dark) and 4.76
for a stroke (artifact and optional, light).
2. Typography
- Figures are set in
Arial, "Liberation Sans", Helvetica, sans-serifat 14 px, never in Space Grotesk. A GitHub<img>loads no web font, and Mermaid sizes every box from measured text, so the renderer embeds Liberation Sans (metric-compatible with Arial) while rendering and the SVG references the Arial stack. Renders are then byte-identical on any machine, and the boxes fit on any reader's system. Space Grotesk stays where it is self-hosted: in the product, and therefore in every screenshot. - Identifiers stay monospace in prose (
DEMO-DO-00835,karyo.slotting.loci.base-url) and are written plainly inside a figure. - Labels: at most four words per line and three lines per node. A title lives in the source's frontmatter, so the render carries its own heading.
- Prose stays GitHub's own typography. No images of text where a table would do.
3. Line treatment
- Solid 1.3 to 2 px,
curve: basis, one arrowhead style, no bidirectional edges: the flow of goods, work or requests. - Dashed: optional, conditional, or across a boundary (a webhook, a Loci call, a TLS terminator you supply).
- The 3 px navy hexagon is the only thick stroke: a hard rule Karyo enforces (the over-receipt guard, "fixed location is always Hold").
- Edge labels of at most four words, or one path list (
/api/, /q/health/live). Reasons go in the caption, not on the edge. - Frames: a solid navy frame is the one host or the one JVM; a dashed teal frame is beyond the boundary (Loci). One nesting level.
4. Diagram grammar
Shapes carry meaning before colour does, so a monochrome print still reads: a rectangle is data at rest, a rounded box is a Karyo step, the cylinder is the one schema, a double bar is a person, a hexagon is a hard rule. No diamonds (Karyo's figures state what happens; they do not ask the reader questions), no clouds, no gears, no icons. One concept per figure, at most twelve nodes, left to right for flows. The legend above is rendered from a source like every other figure.
Every figure ships with a one-sentence caption in italics, a "Derived from" naming the documents
or files behind the claim, and a link to its Mermaid source. How to author, render and check a
figure is in diagrams/README.md.
Vocabulary. Say: goods owner, unit load, location, work inbox, advice, reviews, applies through Karyo's workflows, refuses and says why, names the engine, one product, self-hosted, synthetic data, planned (of the managed service), upcoming (of 2.0.0), separate and optional (of Loci). Never: optimise, optimal, best location, exact bin, automatically (unless the code does it unattended), AI-powered, learns, add-on, unlock, locked, licensed, premium, enterprise, commercial edition, "released" of 2.0.0, "part of Karyo" of Loci, or any path outside this repository.
Customer words. Core and Extended are two profiles of one product (ADR
0052), and each names what the software
shows, never who a customer is. The console, the floor app and the user guide never say "small",
"basic", "starter", "simple warehouse", "advanced customer", "enterprise", "pro" or "upgrade". A
site on Core is not smaller, and a site on Extended is not more advanced: say which pages and
settings show. The list is whole words, so "proposal" is fine. The guard scans the code and the
static copy (index.html and public/) of both front ends, not their comments. It reads source
text, so it does not see copy built at run time. It also reads a // in JSX text as a comment,
unless a URL scheme such as https: comes right before it. tests/e2e/fixtures/copy-vocabulary.test.ts
holds the list and fails the build on a hit.
5. Hand-drawn or clean
Mermaid's look: handDrawn (rough.js, with handDrawnSeed pinned in
diagrams/theme.json so renders stay byte-identical) is reserved for
figures that explain an idea. Anything a reader might treat as a contract is drawn clean. The
renderer does not decide; the source's frontmatter does, and the consistency test holds the
budget.
| Hand-drawn (conceptual) | Clean (formal) | |
|---|---|---|
| Used for | The README lead (the warehouse execution flow) and the functional concept figures (what a hold holds, how the work inbox is filled) | The capability map, service architecture, the Karyo-Loci boundary, deployment topology, identity and trust boundaries, API sequences, anything in a decision record |
| Reads as | "Here is the shape of the work": approximate on purpose, pale hatched fills, at most eight nodes | "Here is what runs and what may reach what": exact labels, paths and ports, at most twelve nodes |
| Cost | About 150 KiB per SVG variant (sketch paths): the budget is two sources per repository | 17 to 31 KiB per variant; about 170 KiB for an ER figure that lists columns (Mermaid draws each outline and row divider as a path) |
| Must not appear in | Security, deployment, API, boundary and decision-record figures, and any figure with a port, a path or a role name in it | Nowhere forbidden |
6. Screenshot treatment
- Only the demo warehouse, labelled as such. Every capture comes from a stack running with
KARYO_DEMO=onafterPOST /api/v1/demo/seed. Capture Riverside DC, under Lumen Home Goods, as a manager granted on Lumen or the Company, or an operator granted on Riverside. Hillcrest DC is Lumen's sibling Facility; Eastport DC belongs to Cobalt Outdoor. Give the capture personas the names of people (a manager, an operator and an administrator), never a test harness's account names. Caption the data class honestly:- synthetic (default profile): "demo warehouse, synthetic data".
- open-demand (P2): "demo warehouse, real demand (UCI Online Retail, CC BY 4.0), simulated
fulfilment" - never present picks, stock, receipts or shipments as observed warehouse activity.
The user guide's rule against invented screenshots stays true: a synthetic or hybrid warehouse
honestly labelled is not an invention. The seed response and
GET /api/v1/demo/statusstate which parts are real and which are simulated, and carry the UCI attribution when open-demand is used; in the console, the read-only Demo profile badge on Operations Control shows that label and attribution for the Facility the profile seeded (the neutral "Demo data" label for a sibling Facility) whenever a profile is loaded, so a capture of Control carries its own caption (see the desktop console guide).
- Two named sets, Core first. The
coreset is the default story and the only one a README or a task page may show: the installation on the Core profile, with no Extended page in it. Theextendedset (files prefixedextended-) is captured after an administrator switches the profile to Extended and shows what Extended adds; it belongs on what Karyo extends into and the capability pages. The manifest records each capture's set, and the script returns the installation to Core. - Viewport captures, never full-page stitches, at 2x device scale: desktop 1440x900 for the
console, phone 390x844 for the floor app. A taller window (the manifest records it) is allowed
where a whole sidebar or list is the point, as on the Extended Home page and the Capabilities page. PNG, at most 600 KB each, under
docs/media/screens/with amanifest.jsonthat records scenario, role, route, theme, viewport, scale, the capture time and the alt text. The consistency test verifies presence, PNG dimensions, size, the alt text, that every listed capture is embedded somewhere and that every PNG is listed; pixels are reviewed by eye, never diffed, because they are not byte-stable across machines. - Light and dark are paired with
<picture>andprefers-color-scheme, which GitHub honours. The console's theme choice is the switch; the floor app is dark by design and ships one variant. - Capture the build people see.
tests/e2e/scripts/capture-screens.tstargetsBASE_URL, so the canonical set comes from the nginx stack (the Vite dev servers would also show the TanStack Query devtools button). The browser clock is pinned for the run, so a light and a dark capture of the same screen show the same time. - Honest states as prominent as success. An empty exceptions card and a zero count are captured as they are; nothing is staged.
- Framing where CSS exists (a documentation site): a 1 px border in the border token, 14 px radius, no drop shadow, no device chrome, no annotation baked into the pixels. GitHub shows the plain capture. Alt text states the state shown and what the reader can see decided.
7. README hierarchy
The README carries at most three figures and one screenshot pair; everything else lives under
docs/. Title, tagline and badges; the lead figure (the warehouse execution flow, hand-drawn) in
place of any animation; "What Karyo does" with the Operations Control light and night pair; "How
it is built" with the deployment topology; "One product, all capabilities included" with the
capability map. The service architecture lives in the
architecture overview and the Karyo-Loci boundary in
the engine boundaries. The consistency test holds the
README's count.
8. Accessibility rules
- Text inside a figure is at least 4.5:1 against its fill and every stroke at least 3:1 against
the page, in both renders; the test recomputes both from
tokens.jsonon every run. - Meaning is never carried by colour alone: a person is amber and double-barred and named; a rule is navy and a hexagon and 3 px; a boundary is teal and dashed and says "refused" or "optional".
- Every image has alt text that states the claim, not the picture; every figure links its Mermaid source as the text alternative; every screenshot's alt text states the state shown.
- Figure text is at least 14 px at natural size; renders carry absolute width and height, so an embed scales a wide figure down to the column and never scales a narrow one up.
- Light and dark are paired with
<picture>; no animation, no hover-only information, no images of text where a table would do. - Screenshots come from the console whose contrast, token purity and type floor are pinned by
frontend/web/src/test/theme-contrast.test.ts,token-purity.test.tsandtype-scale.test.ts.
Related
- Diagram sources - author, render, check and embed a figure
- Maintaining this repository - the consistency tests and when to re-render or re-capture
- The desktop console and the floor app - the two pages that carry captures