Skip to main content

ai-architecture-renderer

Generate SVG perspectives of a multi-service system from a registry of TOML config files + filesystem walks. Diagrams that can't drift — they're projections of the source of truth.

CI License: MIT Python: 3.10+

Lifted from raj-sadan, where it was built because PM said "I trust your judgment but have no visual way to verify what you're building." If you have that problem with your own multi-service system, this tool may help.

Status: v0.1.0. Three perspectives shipped (service-mesh, neural-organs, constitutional). Generic registry schema; raj-sadan-shaped systems supported out of the box.

What it does

Reads structured config (TOML) + walks the filesystem; renders three SVG perspectives plus a manifest.json with timestamps and counts:

Perspective What it shows
service-mesh Operational view — running services, their connections, ports
neural-organs For agent stacks: organs (mind, senses, memory, knowledge, dashboard) + their internal subdirs and file counts
constitutional Governance view — articles, ministers, sherpas, chain of authority

Output is plain SVG. Embed in your dashboard, paste into a doc, host on the static directory of your service. Re-run when the source of truth changes.

Install

# 1. Install Graphviz (the binary, not the Python wrapper)
sudo apt-get install graphviz       # Linux
brew install graphviz                # macOS
winget install graphviz              # Windows

# 2. Install the package
pip install ai-architecture-renderer

Use

Against your own repo

ai-architecture-renderer --root /path/to/repo --output diagrams/

The default --root is the current working directory; --output defaults to <root>/architecture.

Single perspective

ai-architecture-renderer --root . --perspective service-mesh
ai-architecture-renderer --root . --perspective neural-organs
ai-architecture-renderer --root . --perspective constitutional

Sample registries

The examples/ directory has three sample shapes:

  • raj-sadan/ — full nervous-system stack (5 organs + ministers + sherpas + protocols). The reference implementation.
  • simple-three-tier/registry.toml — classic web → api → db. Smallest possible example.
  • microservices/registry.toml — six services + gateway + queue + db.

Try them with:

git clone https://github.com/vraj0703/ai-architecture-renderer
cd ai-architecture-renderer
ai-architecture-renderer --root examples/simple-three-tier

What it expects to find

The renderer reads from a few raj-sadan-style paths by default:

  • mind/cortex/config.toml — service registry
  • senses/interoception/state/registry.toml — operational state
  • CONSTITUTION.toml — articles + ministers + sherpas
  • protocols/PROTOCOL-*.toml — protocol files
  • .claude/skills/ministry-*/ — minister directories
  • mind/sherpa/*/ — sherpa directories

If your repo has these (or you symlink to them), it works out of the box. If not, the missing perspective panels fall back to "(no data)" labels — partial diagrams still render.

What's not yet here: a fully generic registry schema where every source path is configurable per-perspective via a single registry.toml. Today it's "raj-sadan-shaped + missing-data-tolerant." A v0.2 plan to fully decouple the source paths is tracked.

Why this exists

Most architecture diagrams drift the moment they're drawn. Lucidchart files diverge from reality the day after the last refactor. Mermaid blocks in READMEs go stale. The fix isn't a better drawing tool — it's making the diagram a projection of the source of truth, regenerable any time, never authoritative on its own.

That's all this is. A small Python script that reads what's actually there + renders SVG. Re-run it when you change something and the diagram updates. Don't, and the diagram stays correct because nothing in the system has moved.

Configuration

Var Default Purpose
ARCH_RENDERER_ROOT cwd Repository root to introspect
ARCH_RENDERER_OUTPUT <root>/architecture Output directory

Both can also be passed as --root / --output CLI flags, which take precedence.

License

MIT.

See also

  • The original raj-sadan tools/architecture/render.py (this tool's source)
  • ai-mind, ai-senses, ai-memory, ai-knowledge — the organs the neural-organs perspective is built around
  • ai-constitution — the governance framework the constitutional perspective expects

Metadata

Release files for ai-architecture-renderer 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-architecture-renderer 0.1.1
File Size Uploaded Provenance
ai_architecture_renderer-0.1.1.tar.gz 15.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-architecture-renderer 0.1.1
File Interpreter ABI Platform
ai_architecture_renderer-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.0 kB

Release files / ai_architecture_renderer-0.1.1.tar.gz

Download URL ai_architecture_renderer-0.1.1.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e8660ca16a125ceb92bbe2311913081170dfca40e1e3ee7637a600f9b64e7050
BLAKE2b-256 checksum
How to use checksums
d3337d97033c0c16649bbdef8924e4bd635f58117efbb1496eae48d0cd2be480
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.

Transparency log

Release files / ai_architecture_renderer-0.1.1-py3-none-any.whl

Download URL ai_architecture_renderer-0.1.1-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b860317074a2b0cd83682f28e0a28f1fef075018ae1fb8fa187daa5178cb41e
BLAKE2b-256 checksum
How to use checksums
b1c02798db754e737b43a03a07a16e0e13cf0c07cb1576497c45c1a3ce4ab430
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.

Transparency log

Security for ai-architecture-renderer 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ai_architecture_renderer-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page