Skip to content

docs(diagrams): author the architecture and persistence diagrams with archify - #309

Merged
vishr merged 3 commits into
mainfrom
docs/archify-diagrams
Oct 14, 2026
Merged

vishr merged 3 commits into
mainfrom
docs/archify-diagrams

Conversation

@vishr

@vishr vishr commented Oct 14, 2026

Copy link
Copy Markdown
Member

What changed

The architecture and persistence diagrams had drifted from the code: MCP listed 9 tools instead of 20, the group admission window was 20 ms instead of 10, and the anomaly detector, the alert engine's inputs, and webhook targets were missing.

Both diagrams are now authored with archify (MIT):

  • One JSON source per diagram in docs/diagrams/. Every component cites repository evidence at the revision pinned in meta.repository, and archify verifies those references.
  • just diagrams renders each source with a local archify 3.1.0 install (ARCHIFY_HOME, never npm), exports one dual-theme SVG that follows the reader's color scheme, and copies it to site/public/diagrams/. The README and docs site use the same files.
  • The d2 sources and the pinned d2 generator are removed. CONTRIBUTING, the README, and the site alt text describe the new diagrams.

Rendering stays outside just build and just check; just diagrams-check still verifies the site copies match.

Verification

  • just check
  • just test-race when auth, API, ingest, query, MCP, or agent paths changed (documentation only)
  • User-facing behavior and configuration docs are current
  • No credentials, private telemetry, host details, or enterprise-only source are included
  • API, migration, ingest, MCP/AG-UI, or release-contract changes are called out (none)
  • just diagrams regenerates both SVGs; archify validation, delivery, strict check, and browser check pass for both
  • Exported SVGs contain no scripts and were reviewed rendered as images in light and dark

vishr added 3 commits October 14, 2026 14:03
… archify

The d2 diagrams had drifted from the code: MCP listed 9 tools instead of
20, the group admission window was 20 ms instead of 10, and the anomaly
detector, alert inputs, and webhook targets were missing.

Each diagram now has one archify JSON source in docs/diagrams/ whose
components cite repository evidence at a pinned revision. `just diagrams`
renders it with a local archify 3.1.0 install (ARCHIFY_HOME), exports one
dual-theme SVG that follows the reader's color scheme, and copies it to
the docs site. The d2 sources and the pinned d2 generator are removed.
The anomaly detector runs SQL over raw spans and logs, not over rollups;
the architecture diagram now says so and cites its queries.

Archify verifies that the evidence checkout's origin matches the pinned
repository, so a fork clone could not regenerate diagrams.
DIAGRAMS_EVIDENCE_ROOT selects a labstack/fanout clone that contains the
pinned revision, and the script checks origin and revision up front with
one clear error.
The script compared origin URLs as strings, rejecting equivalent upstream
forms such as SSH, HTTPS without .git, and insteadOf rewrites. Archify
already normalizes and verifies repository identity and the pinned
revision, so the script defers to it and adds the DIAGRAMS_EVIDENCE_ROOT
hint when archify reports a repository-evidence failure.
@vishr
vishr force-pushed the docs/archify-diagrams branch from c73b78f to 42c8dc8 Compare October 14, 2026 21:03
@vishr
vishr merged commit 870c90d into main Oct 14, 2026
14 checks passed
@vishr
vishr deleted the docs/archify-diagrams branch October 14, 2026 21:23
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