Organism · stable · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)
Do and don't
Do: The strip
Rendered by score-us.tsOpen example: Score us · Do: The strip Use the full-page example to follow page links.
Do: The full explorer
Rendered by score-us.tsOpen example: Score us · Do: The full explorer Use the full-page example to follow page links.
Don't: Hiding a low score
Rendered by score-us.tsOpen example: Score us · Don't: Hiding a low score Use the full-page example to follow page links.
Don't: A private system's areas
Rendered by score-us.tsOpen example: Score us · Don't: A private system's areas Use the full-page example to follow page links.
Rules
| Rule | Why | Check |
|---|---|---|
| Score us is computed by Loom's code from Loom's real audit output for an open-source app and Loom's own two systems (written by npm run site:data), not drawn by hand. | A showcase is proof only if the product's own code produced what it shows. | Automated: scripts/site/interactives/check.ts (recomputes the showcase data and fails on drift) |
| Low scores are shown alongside high ones. | A scoreboard of only good news would not be believed. | Automated: scripts/site/interactives/check.ts (checkScoreUs) |
API
| Prop | Type | Required | Default | What it does |
|---|---|---|---|---|
instanceKey | string | No | Optional deterministic unique key for repeated static specimens. Letter first, then letters, digits, underscore or hyphen, up to64 characters; omit for singleton anchors. Duplicate keys are unsupported. | |
lang | en | ja | No | "en" | Interface language. |
variant | demo | strip | No | "demo" | The full explorer or the three-card strip. |
Contract details
The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests
Identity
| Aspect | Value |
|---|---|
| Id | score-us |
| Layer | Organisms |
| Category | showcase |
| Owner | Site system lead |
| Status | stable |
| Version | 1.0.0 |
| Source | apps/showcase/site/system/organisms/score-us.ts (private repository; the contract and the render function are this one module) |
| Version | Date | Change |
|---|---|---|
| 1.0.0 | 2026-10-26 | Score us: computed by Loom's code from Loom's real audit output for an open-source app and Loom's own two systems (written by npm run site:data). |
Use when
- The proof section (strip) and its demo page (full). Why: Showing our own low scores is the most credible proof that the audit is honest.
Do not use when
- For a private system's per-area detail. Why: Private systems appear only as aggregate scores.
Anatomy
| Part | What it is |
|---|---|
| root | figure.ix-honesty (strip) or div.ix-score (demo) |
| cards | Score cards: number, name, band word |
| table | Checks per area |
| reproduce | The command to reproduce each score |
| caption | Real audit output |
Made of: showcase-frame, band-word, stat, table, code-block, control, caption.
Used in: pages directly.
Variants
| Variant | When | Why |
|---|---|---|
| strip | The landing's proof section. | Three scores at a glance, each linking to its checks. |
| demo | /demos/audit-explorer/. | Every check and its command. |
States
| State | Rendered or not applicable |
|---|---|
| default | Strip variant shows build-time score cards; full demo shows the actual static audit table/reproduce commands before managed explorer enhancement. |
| hover | Full native system/area/copy buttons use hover affordances; strip cards retain their native links. |
| focus-visible | Full buttons, code and scrolling table regions show focus; strip links follow reading order. |
| active | Full demo selects an audited system/area or copies its reproduce command; no timed playback or Pause exists. |
| disabled | Not applicable: System/area/copy controls have no intrinsic disabled or busy mode; native host preparation is separate. |
| loading | Full demo prepares required audited JSON/rubric and root-local locale before managed mount; the static table remains readable. Strip is build-time only. |
| empty | An unassessed/null area score remains explicitly not assessed; it is not converted to known zero or an empty successful audit. |
| error | Full preparation/chunk/init failure preserves/restores the static table and host failed state, with remount retry. Clipboard rejection selects the command and gives a keyboard-copy message. Low/failing audit scores are findings, not loading failure. |
| current | Full system and area buttons expose aria-pressed; matching score/details/reproduce command update together. Strip has no current selection. |
| visited | Not applicable: No visited state on this root; any contained native links retain their own browser history. |
| expanded | Not applicable: No disclosure state on this root; replacing a view is not aria-expanded. |
Tokens
| Part | Token |
|---|---|
| card.rule | --rule in the band colour of the card's own score |
| reproduce.rule | --rule --ix-ink |
| code.font | --font-mono |
| --score-us-font-size-fs-small | var(--fs-small) |
| --score-us-padding-space-4 | var(--space-4) |
| --score-us-padding-space-5 | var(--space-5) |
| --score-us-border-bottom-line | var(--line) |
| --score-us-font-type-label | var(--type-label) |
| --score-us-color-ink-2 | var(--ink-2) |
| --score-us-gap-space-5 | var(--space-5) |
| --score-us-gap-space-7 | var(--space-7) |
| --score-us-margin-bottom-space-5 | var(--space-5) |
| --score-us-gap-space-4 | var(--space-4) |
| --score-us-gap-space-10 | var(--space-10) |
| --score-us-gap-space-3 | var(--space-3) |
| --score-us-background-cotton | var(--cotton) |
| --score-us-border-line | var(--line) |
| --score-us-border-radius-radius | var(--radius) |
| --score-us-border-color-indigo-ink | var(--indigo-ink) |
| --score-us-box-shadow-indigo-ink | var(--indigo-ink) |
| --score-us-padding-top-space-5 | var(--space-5) |
| --score-us-border-top-line-strong | var(--line-strong) |
| --score-us-font-type-h3 | var(--type-h3) |
| --score-us-letter-spacing-ls-h3 | var(--ls-h3) |
| --score-us-color-ink | var(--ink) |
| --score-us-font-type-h2 | var(--type-h2) |
| --score-us-letter-spacing-ls-h2 | var(--ls-h2) |
| --score-us-background-surface-2 | var(--surface-2) |
| --score-us-background-indigo-ink | var(--indigo-ink) |
| --score-us-transition-dur-weave | var(--dur-weave) |
| --score-us-background-surface | var(--surface) |
| --score-us-font-size-fs-label | var(--fs-label) |
| --score-us-font-type-figure | var(--type-figure) |
| --score-us-stroke-line | var(--line) |
| --score-us-fill-indigo-ink | var(--indigo-ink) |
| --score-us-stroke-indigo-ink | var(--indigo-ink) |
| --score-us-fill-surface | var(--surface) |
| --score-us-transition-dur-slow | var(--dur-slow) |
| --score-us-fill-ink | var(--ink) |
| --score-us-tier-indigo-ink | var(--indigo-ink) |
| --score-us-tier-teal-ink | var(--teal-ink) |
| --score-us-tier-madder-ink | var(--madder-ink) |
| --score-us-tier-ink-2 | var(--ink-2) |
| --score-us-gap-space-2 | var(--space-2) |
| --score-us-gap-space-6 | var(--space-6) |
| --score-us-margin-right-space-3 | var(--space-3) |
| --score-us-ix-ok-teal-ink | var(--teal-ink) |
| --score-us-ix-wait-saffron-ink | var(--saffron-ink) |
| --score-us-ix-broken-madder-ink | var(--madder-ink) |
| --score-us-ix-action-indigo-ink | var(--indigo-ink) |
| --score-us-ix-ink-ink | var(--ink) |
| --score-us-ix-ink-2-ink-2 | var(--ink-2) |
| --score-us-ix-line-line | var(--line) |
| --score-us-ix-surface-surface | var(--surface) |
| --score-us-margin-space-8 | var(--space-8) |
| --score-us-gap-space-1 | var(--space-1) |
| --score-us-padding-space-6 | var(--space-6) |
| --score-us-margin-top-space-5 | var(--space-5) |
| --score-us-margin-space-6 | var(--space-6) |
| --score-us-padding-bottom-space-4 | var(--space-4) |
| --score-us-margin-space-3 | var(--space-3) |
| --score-us-padding-left-space-7 | var(--space-7) |
| --score-us-margin-top-space-6 | var(--space-6) |
| --score-us-border-top-rule | var(--rule) |
| --score-us-margin-top-space-4 | var(--space-4) |
| --score-us-font-type-small-strong | var(--type-small-strong) |
| --score-us-outline-focus | var(--focus) |
| --score-us-margin-space-4 | var(--space-4) |
| --score-us-margin-space-5 | var(--space-5) |
Layout
| Aspect | Value |
|---|---|
| breakpoints | Required review at 390, 768, 1024 and 1440 px; execution is not implied by this declaration; columns stack under 768 px and controls fill the row on phones. |
| wrapping | Text wraps; code panes scroll inside their own focusable region. |
| textExpansion | Japanese strings come from the i18n tables and wrap; engine output stays English. |
Spacing and rhythm
| Aspect | Value |
|---|---|
| internal | Inside the Showcase frame's padding, controls and caption at its foot. |
| external | Full width of its section. |
| rhythm | One showcase per section, after the section's claim (D-SITE-008). |
Motion
| Aspect | Value |
|---|---|
| None | Scores are read; the explorer changes only when the reader picks an area. |
Runtime and reuse
stylesheet: /css/site.css. Built Site tokens, core and registered element CSS; preserve modes, focus and responsive rules.
stylesheet: /css/demos.css. Existing legacy demo styles where the rendered specimen uses them.
font: /fonts/. Self-hosted files referenced by Site @font-face, with licences; Japanese locale overrides remain applicable.
data: /i18n/ja.json. Required for a Japanese root; English interface fallbacks are authored in source. Root language changes require disposal and fresh preparation.
data: /data/audit-areas-takenote.json. Required first-party native source data; fetch aborts with the mount and invalid consumed fields reject before DOM initialization.
data: /data/audit-areas-loom-base.json. Required first-party native source data; fetch aborts with the mount and invalid consumed fields reject before DOM initialization.
data: /data/audit-areas-control-area.json. Required first-party native source data; fetch aborts with the mount and invalid consumed fields reject before DOM initialization.
data: /data/rubric.json. Required first-party native source data; fetch aborts with the mount and invalid consumed fields reject before DOM initialization.
Static fallback: Original build-time specimen remains readable before loading and after chunk/initialization failure; enhancement controls retain authored hidden state.
Before DOM initialization the configured host awaits apps/showcase/site/demos/explorer.ts#prepare for this root with a mount-owned AbortSignal. Preparation must throw on missing/invalid data; disposal/replacement aborts pending work, and a stale result cannot initialize or claim ready.
Configured initializer: apps/showcase/site/demos/explorer.ts#init. The host owns transactional static-markup restoration and runtime state.
Consumer module (imports relative to the configured source root): import { createRuntimeHost } from "./src/workflows/runtime-host"; import { SITE_RUNTIMES } from "./apps/showcase/site/runtime-registry"; const definition = SITE_RUNTIMES.find(entry => entry.binding.id === "explorer"); if (!definition || definition.binding.lifecycle.kind !== "managed") throw new Error("Managed runtime binding unavailable"); const host = createRuntimeHost([definition]); export function mountRuntime(container: ParentNode) { return host.mountAll(container); }After inserting the rendered markup, call mountRuntime(container) for the container holding [data-demo="explorer"]. Retain the returned disposal function and call it before removing, replacing or remounting, including every Storybook args render. The configured host restores captured static markup/attributes on disposal or caught load/initialization failure; retry starts a fresh managed remount.
Accessibility passport
| Aspect | Value |
|---|---|
| role | region with a heading, or a figure |
| name | Its heading or caption |
| keyboard | Tab and Enter/Space select full-demo system/area buttons or copy the command; native regions/code scroll. Strip uses native links. |
| focus | Manual button selection retains native focus; phone detail scrolling follows the existing reduced-motion-aware profile. |
| screenReader | Selected system/area uses aria-pressed; audit scores include words and copy completion/fallback uses a live status. No playback frame exists. |
| contrast | Ink on surface 14:1; state dyes only as marks with words. |
| target | Controls are 44 px. |
Content
| Slot | Length | Voice |
|---|---|---|
| caption | 1 sentence | Real audit output, low scores included |
Good: “Real audit output, scored with Loom's own open rubric, low scores included.”
Bad: “Industry-leading scores”
Japanese: i18n.ts ix.score.*.
Icons and illustrations
None: this element uses no icon or illustration of its own.
Decisions and exceptions
Usage
117 uses across the built pages (measured by npm run site:system).
Tests
| Aspect | Value |
|---|---|
| unit | tests/unit/site-system.test.ts: renders every do and don't example through the registry and checks the classes it owns |
| visual | Not yet: there are no screenshot baselines; the Library page is checked for sideways scroll at 1440 px by tests/site/system.spec.ts |
| a11y | tests/site/system.spec.ts: axe (0 serious or critical) on the element's Library page in light and dark |
| parity | scripts/site/system/check.ts: Library examples are rendered by the same render function the site imports |
Figma
not-yet: The Loom Site Figma library is the last stage of the plan; this element is not mapped yet.