Skip to content

docs: embed mermaid diagrams inline (drop docs/diagrams)#28

Merged
henrypalacios merged 2 commits into
mainfrom
docs/inline-mermaid
May 4, 2026
Merged

docs: embed mermaid diagrams inline (drop docs/diagrams)#28
henrypalacios merged 2 commits into
mainfrom
docs/inline-mermaid

Conversation

@henrypalacios
Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #26 / #27. Move all mermaid diagrams from docs/diagrams/*.mmd files into inline fenced blocks where they are consumed.

Why

GitHub renders standalone .mmd files when you click them, but it does not embed them inline when linked from another markdown. The previous setup forced readers to click through every link to see each diagram. Inline mermaid blocks render directly in the README and docs.

Changes

  • README.md — new ## Architecture section with the C2 container diagram inline (renders on the repo home page).
  • docs/overview.md — C1 system-context diagram embedded right after the "What" section.
  • docs/flows/trade-execution.md — flow sequence diagram embedded under a ## Sequence section.
  • docs/flows/chain-onboarding.md — diagram reference updated to point at README#architecture (no dedicated diagram for this flow).
  • Removeddocs/diagrams/c1-context.mmd, docs/diagrams/c2-containers.mmd, docs/diagrams/flow-trade.mmd. Folder deleted.
  • Drive-by — fixed a stale link in docs/overview.md that pointed at ./packages/protocol-core.md (deleted in docs: move package docs to per-package READMEs #27).

The Diátaxis line caps still apply to prose; mermaid blocks are visual content and do not count against them.

Test plan

  • Open the repo home page on GitHub — Architecture diagram renders inline below the package table
  • Open docs/overview.md — C1 context diagram renders inline
  • Open docs/flows/trade-execution.md — sequence diagram renders inline
  • No links to .mmd files remain (grep -r "\.mmd" . is clean)

GitHub does not embed linked .mmd files inline in another markdown,
so the previous setup forced readers to click through to see each
diagram. Move each diagram to a fenced mermaid block where it is
consumed:

- C1 system context inline in docs/overview.md
- C2 container architecture inline in the root README under
  Architecture
- Trade execution sequence inline in docs/flows/trade-execution.md

Remove docs/diagrams/ as a separate folder and drop the broken
docs/packages/protocol-core.md link in docs/overview.md left over
from the previous follow-up.
Add accTitle and accDescr directives to every inline mermaid block
so screen readers announce a meaningful diagram title and
description instead of the raw graph IDs. Add ADR 003 capturing the
decision to use inline mermaid blocks over .mmd source plus
CI-rendered SVG, including the wins, costs, and revisit triggers.
@henrypalacios henrypalacios merged commit b5ed19a into main May 4, 2026
2 checks passed
@henrypalacios henrypalacios deleted the docs/inline-mermaid branch May 4, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant