Skip to content

forge-architecture

Diagrams generated from code, kept in git, with a gate that fails when they go stale (FLT-379).

Run it

dotnet build Forge.Architecture.slnx -warnaserror
# render with an explicit, hash-checked D2 binary:
dotnet src/Forge.Architecture.Cli/bin/Debug/net10.0/forge-arch.dll generate --config architecture.json --d2 <path-to-d2-v0.9.0>
dotnet src/Forge.Architecture.Cli/bin/Debug/net10.0/forge-arch.dll check --config architecture.json --d2 <path-to-d2-v0.9.0>

FORGE_ARCH_D2 may hold the binary path instead of --d2. Every launch hashes the binary against the pin embedded in the tool (built from tools/d2.pin.json, never read from the scanned repo) and refuses to run on mismatch.

What green means

Green = the committed files in docs/architecture/ equal this generator's output for the declared sources. It does NOT mean the picture is the whole system, a runtime call graph, or an exposure map. Each diagram carries that stamp. check exits 0 fresh, 1 stale (naming what changed), 2 cannot-run. Extra or missing managed files are exit 1; any unowned file, subdirectory or link in the output directory is exit 2. Overlapping generates are not guarded: never run two generates on the same output directory at the same time.

See docs/plain/README.md for the plain-language version and docs/technical/ for the model, security, and testing notes.