Organism · stable · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)
Do and don't
Do: On Agents and MCP
Rendered by flow-diagram.tsOpen example: The agent loop · Do: On Agents and MCP Use the full-page example to follow page links.
Do: Tagged as a diagram
Rendered by flow-diagram.tsOpen example: The agent loop · Do: Tagged as a diagram Use the full-page example to follow page links.
Don't: As output
Rendered by flow-diagram.tsOpen example: The agent loop · Don't: As output Use the full-page example to follow page links.
Don't: With invented tools
Rendered by flow-diagram.tsOpen example: The agent loop · Don't: With invented tools Use the full-page example to follow page links.
Rules
| Rule | Why | Check |
|---|---|---|
| The the agent loop is drawn from Loom's MCP tool flow (scripts/site/diagrams.ts) at build time. | A figure read from the real records cannot drift from them. | Automated: npm run site:build (reads the data; fails if it is missing) |
| Each step names a real MCP tool. | The diagram must match the server. | Automated: tests/unit (MCP tool list) |
API
No props.
Contract details
The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests
Identity
| Aspect | Value |
|---|---|
| Id | flow-diagram |
| Layer | Organisms |
| Category | figure |
| Owner | Site system lead |
| Status | stable |
| Version | 1.0.0 |
| Source | apps/showcase/site/system/organisms/flow-diagram.ts (private repository; the contract and the render function are this one module) |
| Version | Date | Change |
|---|---|---|
| 1.0.0 | 2026-10-26 | The agent loop, drawn at build time from Loom's MCP tool flow (scripts/site/diagrams.ts). |
Use when
- Agents and MCP. Why: The loop is the method in one picture.
Do not use when
- For a process that is not a loop. Why: Use the Flows organism for linear steps.
Anatomy
| Part | What it is |
|---|---|
| root | figure.visual.diagram.d-agent-loop |
| steps | ol.rows.flow-thread with each step |
| tag | Diagram |
Made of: figure-frame, rows-list, tag, caption.
Used in: pages directly.
Variants
| Variant | When | Why |
|---|---|---|
| default | Wherever its claim is made. | One drawing per claim keeps the evidence consistent. |
States
| State | Rendered or not applicable |
|---|---|
| default | default |
| hover | Not applicable: The the agent loop is not interactive, so it has no hover state. |
| focus-visible | Not applicable: The the agent loop does not take focus; links and buttons inside it carry their own focus ring. |
| active | Not applicable: The the agent loop cannot be pressed. |
| disabled | Not applicable: The the agent loop has nothing to disable. |
| loading | Not applicable: The the agent loop is rendered at build time and is complete when the page loads. |
| empty | Not applicable: The the agent loop is not rendered without content; the builder skips it. |
| error | Not applicable: The the agent loop shows no data that can fail. |
| current | Not applicable: The the agent loop has no current item. |
| visited | Not applicable: The the agent loop is not a link. |
| expanded | Not applicable: The the agent loop does not open or close. |
Tokens
| Part | Token |
|---|---|
| step.rule | --rule --ink |
| loop.arrow | --ink-2 |
| --flow-diagram-gap-space-2 | var(--space-2) |
| --flow-diagram-padding-space-8 | var(--space-8) |
| --flow-diagram-padding-space-10 | var(--space-10) |
| --flow-diagram-left-space-4 | var(--space-4) |
| --flow-diagram-top-space-3 | var(--space-3) |
| --flow-diagram-bottom-space-3 | var(--space-3) |
| --flow-diagram-border-radius-radius | var(--radius) |
| --flow-diagram-background-indigo | var(--indigo) |
| --flow-diagram-left-space-2 | var(--space-2) |
| --flow-diagram-top-space-1 | var(--space-1) |
| --flow-diagram-background-surface | var(--surface) |
| --flow-diagram-box-shadow-indigo | var(--indigo) |
| --flow-diagram-font-type-strong | var(--type-strong) |
| --flow-diagram-font-size-fs-small | var(--fs-small) |
| --flow-diagram-color-ink-2 | var(--ink-2) |
| --flow-diagram-gap-space-5 | var(--space-5) |
| --flow-diagram-padding-space-9 | var(--space-9) |
| --flow-diagram-padding-space-3 | var(--space-3) |
| --flow-diagram-right-space-5 | var(--space-5) |
| --flow-diagram-top-space-4 | var(--space-4) |
| --flow-diagram-top-space-2 | var(--space-2) |
Layout
| Aspect | Value |
|---|---|
| breakpoints | Required review at 390, 768, 1024 and 1440 px; execution is not implied by this declaration; the figure reflows to one column under 768 px. |
| wrapping | Labels wrap; drawings scale to the column. |
| textExpansion | Japanese labels are 20 to 40% longer and wrap inside their cells. |
Spacing and rhythm
| Aspect | Value |
|---|---|
| internal | Inside the Figure frame's --space-7 padding. |
| external | --space-9 above and below in prose. |
| rhythm | After the text whose claim it proves. |
Motion
| Aspect | Value |
|---|---|
| None | A record is evidence: it holds still so it can be read. |
Runtime and reuse
Render-only element; mount any registered child enhancements separately. Preserve required Site CSS, fonts, responsive and locale rules from nativeElement.
Accessibility passport
| Aspect | Value |
|---|---|
| role | figure, named by its caption |
| name | The caption, and a text alternative for any drawing |
| keyboard | Not interactive unless stated. |
| focus | Links inside are in reading order. |
| screenReader | Reads the figure's text and caption; drawings have role=img with a description. |
| contrast | Ink on surface 14:1; dyes used only as marks with their words. |
| target | Not a target. |
Content
| Slot | Length | Voice |
|---|---|---|
| step | 6 words | The tool and what it does |
Good: “search_system: does it already exist?”
Bad: “AI magic”
Japanese: English only (Agents and MCP).
Icons and illustrations
None: this element uses no icon or illustration of its own.
Decisions and exceptions
Usage
2 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.