← All tests

D2 vs Archify

Muse-setup architecture diagram, same spec both tools

2026-11-19FINDS - TESTSFind #70 (D2)

Report

D2 vs Archify — head-to-head

Date: 2026-11-19 · Run in: FINDS - TESTS (at Ros's direction) Subject (identical for both): Ros's Muse setup, from the Archify spec ~/workspace/design-skill-tests/archify-muse-setup.json (Nov 19, 2026 Muse Map v4 audit data) Archify baseline: archify-muse-setup.html (850 KB, interactive, spec 8.4 KB JSON; passed Archify's 4 gates; counts reconcile) D2 outputs: this folder — muse-setup.d2 (2.8 KB source), SVGs/PNGs for all three engines.

Tool

D2 v0.9.0 (GitHub release 2026-09-07, repo now d2lang/d2), linux-amd64 tarball, SHA256 verified against the release SHA256SUMS. MPL-2.0. Layout engines bundled: dagre, ELK, TALA.

What was run

  1. Extracted the Archify spec's full dataset: 19 components, 25 connections — Ros → Main Chat → Orchestrator → 8 departments (Health 4t/8j, Money 5/11, Career 5/8, Family 3/4, Builds 6/16, Knowledge 6/18, Home 3/5, Brain 4/11) → Approval Gate → 3 outputs, plus 4 supporting systems (Memory, Crons, Connectors, Vault). Team/job sums re-checked from the spec: 36 teams, 81 jobs ✓.
  2. Authored muse-setup.d2 with the same nodes, edges, labels, and counts, using D2 containers for Supporting systems / Departments / Outputs, shapes (person, cylinder, cloud, hexagon), a dashed edge for crons, and a markdown block for the Scale card.
  3. d2 validate + compiled to SVG with all three engines, PNG with all three, and a second TALA compile for the determinism check. All renders visually inspected.

Results

  • Agent reliability: the .d2 source was valid on the first try — zero syntax corrections (the research expected loops; one sample, conservative syntax). Compiles: ~30 ms (dagre/ELK) to ~0.6 s (TALA).
  • Fidelity: 19/19 nodes and 25/25 edges present, every label and count matching the Archify spec. Exception: Archify's three side cards — only the Scale card has a D2 analogue (markdown block); "How work flows" / "The gate" cards are presentation features D2 doesn't have (the gate's text survives only as the gate node's sublabel).
  • Determinism: TALA recompile is byte-identical (same SHA256). Archify is also deterministic.
  • Validation: D2 validates syntax only. Nothing checks the diagram against the data — a wrong count compiles happily. Archify's schema gates are a real difference here.
  • Layout quality (visual inspection, one engine each):
  • dagre — best narrative: the Ros → Main → Orchestrator → Departments → Gate → Outputs spine reads top-down like Archify's. Departments come out in reverse source order, and the Supporting-systems container is a large, mostly empty box.
  • ELK — departments in correct source order, cleanest orthogonal routing, no crossings; but the most sprawling canvas, with long edge runs and the supporting systems exiled bottom-left.
  • TALA — cleanest department stack and gate fan-in, zero crossings on the right side; but it breaks the main spine (Orchestrator lands bottom-left, the "delegates jobs" edge wraps around the whole canvas) and largely ignores direction: down.
  • None matches Archify's hand-placed layout, and D2 offers no position control to fix it — you take the engine's choice or restructure the source.
  • Output: static SVG (53 KB) / PNG / PDF / PPTX. No interactivity (no search, tracing, theme toggle, cards) vs Archify's interactive single-file HTML — at 850 KB, 16× the SVG. D2's source is 2.8 KB of diffable text that lives naturally in a repo; Archify's JSON is also text (8.4 KB) but its deliverable is the HTML.

Verdict

Split by job — Archify keeps the deliverable, D2 wins the repo.

  • For the Muse Map re-audit one-pager (Ros's adopted standard): Archify stays. The interactivity, cards, validation gates, and controlled layout are the product there.
  • For architecture diagrams that live in a repo or docs and get edited as code changes: D2 is the better tool — tiny git-native source, instant byte-deterministic compiles, renders anywhere, zero infrastructure.
  • Reuse status: Reuse later — reach for D2 on in-repo diagrams; do not re-render the Muse Map in D2.

Test record (for Finds Library)

  • Subject: D2 (github.com/d2lang/d2, MPL-2.0, v0.9.0) — alternative to Archify (find #64 lineage)
  • Date: 2026-11-19
  • What: authored the Muse-setup diagram in D2 from the exact Archify spec data (19 nodes, 25 edges, 36 teams / 81 jobs) and compiled it with all three bundled layout engines.
  • Outcome: Success-with-caveats — data fidelity perfect and source valid first try; deterministic (byte-identical recompiles); layout engine-dependent and not steerable (dagre best narrative, ELK cleanest routing, TALA breaks the spine); static output only, no cards, no semantic validation.
  • Output: this report + muse-setup.d2 + SVG/PNG per engine, in ~/workspace/finds-tests/d2-vs-archify-2026-11-19/
  • Reuse status: Reuse later (in-repo/docs diagrams) — Archify remains the adopted standard for the Muse Map re-audit render.

Screenshots & outputs