> ## Documentation Index
> Fetch the complete documentation index at: https://iso-topology.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent diagram benchmark: iso-topology, D2 and Mermaid

> A maintainer-run, 27-task comparison with source, SVGs, event logs, edit-preservation checks and explicit limitations.

All three tools completed the prescribed diagram and edit-preservation checks in this
small experiment. **These results do not establish a best diagramming tool.** They
show what one agent/client configuration accomplished through three CLI workflows.

This evaluation was conducted by the iso-topology maintainer on December 2, 2026.
It is not an independent review. The separate MCP regression below is a different
experiment and is not counted again in the cross-tool totals.

[Inspect the complete evidence directory](https://github.com/NexusFox88/iso-topology/tree/main/docs/assets/evidence/2026-12-02)
for the protocol, prompts, event logs, sources, SVGs, verification results and hashes.
Local machine paths are redacted consistently; client-state stderr is omitted.

## Use the evidence to choose a workflow

Choose by the task you need to maintain: a native isometric scene, a concise flat diagram, or a familiar text format in existing documentation. All three tools passed the graph checks in this sample; that does not remove their interface, layout and environment differences. [Try a small editable iso-topology scene](https://nexusfox88.github.io/iso-topology/) and compare its next edit with your current workflow. The playground is a current product surface, not a rerun of the historical experiment below.

## Cross-tool task results

Each tool ran each task three times. The agent was Codex CLI 0.162.1 requesting
`gpt-6-astra` with medium reasoning effort. Each fresh turn had a 240-second limit,
with at most two evaluations running concurrently on one macOS arm64 machine.
Tool-specific minimal syntax examples and exact CLI commands were supplied and
are preserved in the prompts. No model/API calls are part of normal project CI.

| Task | Required artifact behavior |
| - | - |
| A: first diagram | User → API → Database, stable IDs, HTTPS/query edge labels, exactly three nodes and two directed edges |
| B: logical RAG | Docs → ETL → Embedder → Vector DB; App → Retriever → LLM; Retriever → Vector DB; exactly seven nodes and six edges |
| C: edit and continue | Add Cache and two edges without removing API → Database; controller changes API to Public API; a new agent turn adds Monitor while preserving that label, all existing IDs/edges and the source comment |

Task C uses **a scripted, label-only maintainer edit**, not a human participant or
GUI usability study. It contains two timed turns. Thus 27 task runs contain 36
model turns. The controller's edit time is not included in the task latency.
All three tools use editable text input; native isometric rendering is not required
of the flat-diagram baselines.

| Tool / fixed implementation | Graph/edit checks | Median A | Median B | Median C (two turns) |
| - | -: | -: | -: | -: |
| iso-topology `395a5bb`, YAML CLI with `--readable` | 9/9 | 49.49 s | 45.08 s | 87.32 s |
| D2 `0.8.1-HEAD`, local binary SHA recorded | 9/9 | 29.00 s | 28.56 s | 62.76 s |
| Mermaid CLI `12.2.0`, Mermaid `12.4.1` | 9/9 | 60.11 s | 71.69 s | 145.00 s |

The checks read the artifacts independently of the agent's success message:
exact IDs, labels and directed edges; original edge-label/comment preservation;
rendered labels/edge counts; native validation where available; and source/export
identity for iso-topology. Mermaid's successful CLI render supplies its syntax
check. The verifier accepts the flat syntax used by these tasks, not every possible
D2 or Mermaid program. The event logs retain the actual commands and failed attempts.

These are **agent-session latencies**, not renderer benchmarks. Time to the first
semantically valid intermediate output was not separately instrumented; the table
reports final-session completion only. Model/network time,
command invocation, approval handling and browser startup are included. Mermaid's
Chrome launch required normal sandbox escalation in these sessions. The order was
not randomized across tools: iso-topology/D2 ran before the completed Mermaid cohort.
D2's local build identifies itself as `0.8.1-HEAD`; its exact source revision was not
available in its build metadata. Its binary hash is recorded, but this is not a
claim about the published D2 0.8.1 release. With three repeats per task, no universal
speed, success-rate or market-preference claim is warranted.

## Failures and setup costs are retained

The Mermaid installation was affected by slow package downloads. After an initial
successful smoke test, a still-running npm installation failed and removed runtime
dependencies. Five task directories had started before the harness was stopped.
Those original logs and sources remain under `comparison/environment-failures`.
This was an evaluation orchestration error, not evidence that Mermaid could not
draw the diagrams. It is excluded from product success/latency figures, explicitly.

A separate directory was then installed to completion, package integrity and the
lockfile were recorded, and rendering was smoke-tested before nine fresh Mermaid
tasks ran. Installation time is excluded for all tools. Do not add the failed setup
attempts to the completed cohort and call the result a product failure rate.

FossFLOW and draw\.io were considered but not included in this round because a
comparable, verified execution setup was not established. This is not a statement
that they lack agent workflows or cannot perform these tasks.

## What the diagrams look like at a documentation width

All 27 final SVGs were loaded at 900 CSS pixels wide. The DOM audit recorded label
bounds and found no overlapping label boxes. This check does not establish good
routing, lack of node occlusion, accessibility, or aesthetic quality.
The maintainer also reviewed the first repeat's outputs; no independent or blind
reader panel was used. The original SVGs allow inspection at other sizes.

A concrete visual limitation remains in iso-topology's first C output: the `query`
edge-label chip sits over the Cache box's top face, making its association with the
preserved API → Database edge less clear. The original is retained in the evidence;
passing graph/edit checks does not make that placement publication-ready. Inspect
labels against both other labels and the nodes/edges they appear to describe.

![iso-topology's first RAG output](https://mintcdn.com/iso-topology/-uQ_bFH8zAh3J-Ol/assets/evidence/2026-12-02/comparison/runs/iso/B-r1/B/out/topology.svg?fit=max\&auto=format\&n=-uQ_bFH8zAh3J-Ol\&q=85\&s=367c7ff1889c10b8d55932fde4ff6172)

For corresponding flat diagrams, inspect the
[D2 RAG source and SVG](https://github.com/NexusFox88/iso-topology/tree/main/docs/assets/evidence/2026-12-02/comparison/runs/d2/B-r1/B)
and [Mermaid RAG source and SVG](https://github.com/NexusFox88/iso-topology/tree/main/docs/assets/evidence/2026-12-02/comparison/runs/mermaid/B-r1/B).
Readability is a separate review from graph correctness: a valid SVG can still
need a different projection, spacing or label treatment for its final display.

## Separate MCP regression: concise discovery and source continuity

Before this comparison, the same Codex/model configuration completed four MCP
tasks three times before and after the onboarding change: first generation,
cache insertion, continuing from a saved Public API label, and a RAG source with
known diagnostics. Each phase had 12 runs, all passing artifact checks.

| Observation | Baseline | After concise discovery |
| - | -: | -: |
| Verified task completion | 12/12 | 12/12 |
| Typical capability response, including client wrapper | 65,643 bytes | 2,113 bytes |
| Median observed session latency | 64.36 s | 55.66 s |

The concise capability response was about 96.8% smaller in these recordings.
**Success rate did not improve: it was already 12/12.** Session timing is descriptive,
not a general performance claim. The baseline was built from a working tree during
an engine refactor; its binary SHA and initial base commit are recorded, but that
commit alone cannot reproduce the exact binary. This limits causal interpretation.
The post-change source is available through [PR #28](https://github.com/NexusFox88/iso-topology/pull/28).

The repeatable handoff task used a saved seed with Public API already present.
Separate installation tests exercised actual Studio-to-agent handoff with Codex
and Claude Code/MiniMax; these are distinct records, not extra comparison repeats.

An exploratory Claude Code 2.1.284 / MiniMax-M3 cohort had 12 baseline and five early
retest sessions end at their per-call budget. Its exposed file tools and model
behavior differed, so it is not pooled into the Codex comparison. After correcting
the available file-writing workflow, first generation/cache insertion succeeded;
a Studio continuation preserved the artifact but later hit its session budget and
retained two warnings. The CLI's total cost estimate was \$4.170484 with an unknown
billing basis; it is not presented as a provider invoice. No further MiniMax calls
were made for this comparison.

## A failure that belongs in a regression test

Earlier generated examples used an invalid node/shape structure. They are now
[fixed test inputs](https://github.com/NexusFox88/iso-topology/tree/main/cmd/isotopo-mcp/testdata).
The server must identify the structural error and refuse rendering. Repair is not
a universal schema converter: correct invalid syntax/structure first, validate
again, then render. A successful render can still retain explicit warnings.

For a concrete source-continuity example, inspect
[the first cache-edit result](https://github.com/NexusFox88/iso-topology/tree/main/docs/assets/evidence/2026-12-02/w2/codex/retest/T2-r1)
and [the saved-label continuation](https://github.com/NexusFox88/iso-topology/tree/main/docs/assets/evidence/2026-12-02/w2/codex/retest/T3-r1).
Each folder includes the exact prompt, event log, authored source and exported SVG/source.

## Use the evidence to choose a workflow

The prescribed semantic tasks succeeded with all three tools. Prefer a workflow
that fits the artifact you maintain: a simple text-diagram pipeline, an existing
Mermaid documentation setup, or iso-topology's isometric source/MCP/Studio loop.
This experiment did not compare visual-editor usability, large graphs, native
isometric aesthetics, every client, or recovery from every kind of invalid source.

To reproduce the iso-topology path, use a
[pinned installation](https://iso-topology.mintlify.site/getting-started/01-install.md), then follow the
[agent workflow](https://iso-topology.mintlify.site/agent/workflow.md). To compare another model, version or task set,
record a new cohort rather than silently merging it into these results.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.