agents-lab

Local-first lab for reusable AI-agent primitives and the curated pi-stack.

View on GitHub

Mermaid Authoring

Use Mermaid when a relationship is easier to inspect as a diagram than as prose. Keep the source text readable in Markdown because some renderers show the code block before rendering.

Portable Syntax

Good:

graph LR
  intake["Entrada"] --> board["Board canônico"]
  board --> validation["Validação focal"]

Risky:

graph LR
  Entrada --> Validação

Entrada and Validação are interpreted as ids. Some Mermaid renderers reject non-ASCII ids even when the label looks fine.

Where To Put Diagrams

Validation

In agents-lab:

pnpm run mermaid:check
pnpm run docs:site:build:smoke

The Mermaid check validates portable syntax in Markdown fences and .mermaid files. It does not enforce a diagram size policy. A site smoke validates the generated artifact when diagrams are published through a static site.