Local diagrams for agents

DiagramPilot

Source in the repo. SVG out for review.

npx diagrampilot check
.dp.yaml
source
check
validate
SVG
review

Workflow

Source to SVG.

One checkout. One reviewable artifact.

Source sits beside the code.

docs/architecture.dp.yamlsource
version: 1
id: checkout_architecture
title: Checkout service architecture
objects:
  - id: web_app
    label: Web app
    kind: service
  - id: checkout_api
    label: Checkout API
    kind: service
edges:
  - id: submit_order
    from: web_app
    to: checkout_api
Terminallocal
$ npx diagrampilot check
ok 1 DiagramPilot Source File
ok docs/architecture.svg is fresh$ npx diagrampilot generate
ok wrote docs/architecture.svg
ok wrote docs/architecture.md
SVG artifactarchitecture.svg
Review-stable SVG artifactA DiagramPilot architecture SVG showing web, checkout, payment, queue, worker, and database components with labeled data flow.demo-projects/checkoutweb appsource checkoutcheckout APIvalidates orderpayment providerauthorize cardorder queueasync receiptorders DBpersist stateworkersend receiptsubmitauthorizepublishrendered from docs/architecture.dp.yaml for code review

Repo

Local

Works in a checkout, next to source code.

CLI

Checked

`diagrampilot check` validates before review.

Error

Repairable

Failures name the DiagramSpec field to fix.

Tools

Authored

`diagrampilot create`, `diagrampilot inspect`, `diagrampilot format`, and `diagrampilot watch` stay local.

MCP

Agent-ready

Add `@diagrampilot/mcp` and run `diagrampilot-mcp` for local agent helpers.

Local path

Repo to SVG.

Keep DiagramSpec source beside rendered output. Validate locally, then review the artifact.

  1. repo checkoutdemo-projects/checkout
  2. sourcedocs/architecture.dp.yaml
  3. checknpx diagrampilot check
  4. artifactdocs/architecture.svg

Start.

Install the CLI, try the demo, inspect npm, or open GitHub. Public docs cover Output Profiles, DiagramSpec, MCP usage, and repairable validation errors.