Skip to content

docs: convert ASCII diagrams to Mermaid#2667

Merged
os-zhuang merged 1 commit into
mainfrom
docs/ascii-to-mermaid
Jul 6, 2026
Merged

docs: convert ASCII diagrams to Mermaid#2667
os-zhuang merged 1 commit into
mainfrom
docs/ascii-to-mermaid

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What & why

Follow-up to #2666. The docs still had many hand-drawn ASCII "diagrams" (flows, a state machine, architecture topologies) that read as plain text. This converts the genuine diagrams to Mermaid — the site already renders it (remarkMermaid in apps/docs/source.config.ts, ~7 pages used it before) — so they render as themed SVG.

17 diagrams converted, e.g.:

  • getting-started — the build loop (landing + build-with-claude-code recap)
  • concepts/architecture — the four usage-pattern flows
  • protocol — version-deprecation timeline, plugin-install state machine (stateDiagram-v2), Configuration-over-Code comparison (subgraphs), realtime sticky-session + Redis pub/sub topology (<-->)
  • references — marketplace / app-store / developer-portal journeys, seed-loader & package-upgrade flows, the skills chain

Deliberately kept as text (Mermaid can't represent these): 44 directory/file trees and ~1000 code / wire-format / grammar blocks. A classifier pass separated real diagrams from trees/code.

Verification

Ran the docs site and browser-verified every new diagram renders with no Mermaid parse errors — covering all four syntaxes used: flowchart, stateDiagram-v2, subgraph+direction, and bidirectional <--> edges (screenshots for the state machine, subgraph comparison, and Redis topology). Changed pages compile 200 with zero MDX errors.

🤖 Generated with Claude Code

Replace 17 hand-drawn ASCII diagrams with rendered Mermaid across the docs, using
the site's existing Mermaid support. Directory trees, wire formats, grammar, and
code blocks are deliberately left as monospace text (Mermaid can't represent them).

- getting-started: the build-loop (index + build-with-claude-code recap)
- concepts/architecture: the four usage-pattern flows
- protocol: version-deprecation timeline, plugin-install state machine
  (stateDiagram-v2), Configuration-over-Code comparison (subgraphs), realtime
  sticky-session + Redis pub/sub topology
- references: marketplace/app-store/developer-portal journeys, seed-loader and
  package-upgrade flows, the skills chain

All diagrams verified rendering in the browser (flowchart, stateDiagram, subgraph,
and bidirectional edges) with no Mermaid parse errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 6, 2026 11:50pm

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation size/m labels Jul 6, 2026
@os-zhuang
os-zhuang merged commit 9479dd8 into main Jul 6, 2026
15 checks passed
@os-zhuang
os-zhuang deleted the docs/ascii-to-mermaid branch July 6, 2026 23:54
os-zhuang pushed a commit that referenced this pull request Jul 18, 2026
…g in flows.mdx

The "Runs" section still described run history as an in-memory ring buffer whose
`sys_automation_run` rows "hold only live pauses", so "history starts fresh on
each boot". That predates the durable terminal run history (#2585): terminal
runs (completed / failed) are mirrored to `sys_automation_run` with a bounded
step log, and `listRuns` / `getRun` merge it so a run's status / steps / failure
reason survive a restart or ring-buffer eviction. Also note the Studio Runs
panel now nests body steps by iteration / branch / handler (#1505, objectui
#2667). Surfaced by the docs-drift check on #3240.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VuvxWgoadqryqBcjs7TpVi
os-zhuang added a commit that referenced this pull request Jul 18, 2026
…iners + early failures (#3240)

* fix(automation): region-aware run-history compaction keeps loop containers + early failures (#3234)

`compactStepsForHistory` bounded a terminal run's persisted step log to the last
`MAX_PERSISTED_HISTORY_STEPS` entries with a plain tail-slice. With the ADR-0031
structured-region step logs (#1505) a single `loop` can emit
`iterations × body-steps` entries, so the tail-slice dropped the
`loop`/`parallel`/`try_catch` container step (it precedes all its body steps) and
every early iteration — leaving `getRun`/`listRuns` (after a restart or
ring-buffer eviction) with body steps the Runs surface could no longer nest, and
silently hiding an early failure.

Introduce an exported, region-aware `compactStepLogForHistory`; the private
method now delegates to it. Over budget it keeps the run's structural backbone —
every top-level step (including the region container steps) and every failure,
each pulled in with its ancestor container chain — plus the most recent body
steps, order-preserving and hard-capped at `max` so `steps_json` stays bounded
(#2585). Every retained body step keeps its enclosing container(s), so the
compacted log never contains an orphan and the observability surface's
per-iteration / per-region nesting still reconstructs. Under budget behavior is
unchanged (whole log, stacks stripped).

Adds 7 unit tests (cap, container/backbone retention, recent-iteration tail,
early-failure retention, order preservation, nested-container no-orphan).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VuvxWgoadqryqBcjs7TpVi

* docs(automation): correct run-history durability + region-step nesting in flows.mdx

The "Runs" section still described run history as an in-memory ring buffer whose
`sys_automation_run` rows "hold only live pauses", so "history starts fresh on
each boot". That predates the durable terminal run history (#2585): terminal
runs (completed / failed) are mirrored to `sys_automation_run` with a bounded
step log, and `listRuns` / `getRun` merge it so a run's status / steps / failure
reason survive a restart or ring-buffer eviction. Also note the Studio Runs
panel now nests body steps by iteration / branch / handler (#1505, objectui
#2667). Surfaced by the docs-drift check on #3240.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VuvxWgoadqryqBcjs7TpVi

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant