Evidence before geometry
Important nodes and edges trace back to code, contracts, runtime observations, or an explicit requirement.
AI-native engineering visualization
Diago is an open-source MCP toolkit for software architecture diagrams in Codex and Claude Code. Turn code, tasks, and conversations into interactive diagrams with evidence you can review.
Swipe or use arrow keys to pan the diagram.
A better engineering artifact
The toolkit gives agents a rigorous path from source evidence to a visual that can survive architecture review.
Important nodes and edges trace back to code, contracts, runtime observations, or an explicit requirement.
Eight focused engineering views each answer the question their layout is built to explain.
Facts, assumptions, and recommendations remain distinct instead of collapsing into one confident-looking diagram.
Choose by question
Start with the engineering decision. The advisor selects the smallest view that can explain it.
What exists, who owns it, and how the boundaries connect.
components · dependencies
What happens over time between callers, services, and providers.
calls · retries · responses
Which steps, decisions, approvals, and failure paths control the work.
branches · owners · exits
Where data begins, transforms, moves, and persists.
sources · lineage · stores
How an entity changes state and which guards allow each transition.
states · triggers · recovery
Which entities, fields, constraints, and relationships define the domain.
entities · keys · cardinality
Which engineering milestones occur and how phases depend on one another.
milestones · phases · dependencies
Where responsibilities, abstractions, controls, and defenses are enforced.
layers · controls · gaps
One durable contract
A small JSON plan keeps the agent, renderer, and reviewer aligned. The interactive HTML remains a delivery artifact—not the source of truth.
{
"schemaVersion": 2,
"task": "Add idempotent checkout",
"source": { "kind": "repository" },
"selection": {
"renderer": "architecture",
"profile": "feature-context"
},
"evidence": {
"facts": ["contract: idempotency-key"],
"assumptions": ["reservation expires"],
"recommendations": ["persist replay result"]
},
"complexity": { "detail": "balanced" },
"fidelity": { "omitted": [] }
}
Evidence workflows · new in v0.7.0
Plan source inspections and dependent cross-checks before authoring a diagram. Available in Diago v0.7.0 through the plugin’s MCP tool and the CLI.
The planner identifies ready tasks within a concurrency limit. A completed branch can unlock its next task while unrelated work continues.
Keep successful source reports when another task fails. Track elapsed time, retry only eligible failures, and stop at the attempt budget.
Preserve citations and separate supported, unverified, and contradicted reports. Conflicting claims stay out of diagram-plan facts.
node bin/diago.mjs evidence examples/checkout.evidence-workflow.json --json
The host performs inspections, verifies claims, and stops timed-out workers. Diago evaluates the supplied snapshot and returns the next eligible work; it does not launch agents or independently prove claims.
Start in a minute
Install the complete plugin, connect the standard local stdio MCP server directly, or use the deterministic CLI on its own. No cluster or remote endpoint is required.
Add the GitHub repository as a marketplace, then install the plugin with its skills and MCP tools.
codex plugin marketplace add amirtaherkhani/diago
codex plugin add diago@diago
Use $diago-engineering-diagram to visualize this feature from API entry point to persistence.
After installation
Start a new agent thread in the repository you want to explain. Ask Diago to inspect the source, choose the smallest useful diagram, keep assumptions visible, and render a reviewable HTML artifact.
CodexUse $diago-engineering-diagram to…
Claude Code/diago:diago-engineering-diagram
Use $diago-engineering-diagram to map this feature from its API entry point to persistence. Inspect the code, separate facts from assumptions, and render architecture and sequence views.
Use $diago-engineering-diagram to evaluate whether the Strategy pattern fits this task. Show the current coupling, proposed objects, tradeoffs, and where the pattern should not be used.
Use $diago-engineering-diagram to find the safest workflow for rolling out this schema change. Show owners, validation gates, failure paths, rollback steps, and the evidence for each recommendation.
Use $diago-review-diagram to audit this diagram against the repository. List unsupported claims, missing boundaries, ambiguous edges, and visual issues, then recommend focused corrections.
Use $diago-engineering-diagram to trace this timeout from the incoming request through every service and dependency. Ground the sequence in code and runtime evidence, then show retry, timeout, and failure paths.
Use $diago-engineering-diagram to follow customer data from collection to deletion. Show trust boundaries, transformations, stores, external processors, retention rules, and any unverified privacy assumptions.
Use $diago-engineering-diagram to explain the payment lifecycle. Map every state, transition trigger, guard, terminal outcome, timeout, and recovery path, and link verified behavior to its source.
Use $diago-engineering-diagram to plan extracting this module into a service. Compare current and proposed boundaries, dependencies, contracts, migration steps, compatibility risks, and rollback seams.
Use $diago-engineering-diagram to inspect this repository's order domain and render a data-model view. Show verified entities, keys, constraints, cardinality, and proposed changes without inventing missing relationships.
Use $diago-engineering-diagram to turn this migration plan and repository evidence into an engineering timeline. Show phases, dependencies, owners, validation gates, and rollback milestones; use ordered phases when dates are not confirmed.
Use $diago-engineering-diagram to show where authentication, authorization, validation, observability, and data-protection controls are enforced across this system's layers. Mark gaps and unsupported assumptions explicitly.
Claude Code Replace $diago-engineering-diagram with /diago:diago-engineering-diagram, or use /diago:diago-review-diagram for review prompts.
Source checkout · 11 diagram models
New dependency graphs, security matrices, and fishbones share Diago’s light/dark presentation and preserve explicit evidence and unknowns.
Explore the three new models →
Source checkout additions after v0.7.0.
System map · current source checkout
Trace an engineering question through Diago’s agent guidance, local CLI/MCP tools, evidence checks, renderer routing, and standalone HTML. Each perspective cites the source files behind its claims.
Open the Diago system map → · Authoring guide
The map describes the current source checkout; the v0.7.0 release predates some of these additions.
A few useful answers
Quick answers about Diago, its MCP tools, and the artifacts you can keep.
Diago is an open-source software engineering diagram toolkit for Codex and Claude Code. It combines agent skills, a local Model Context Protocol (MCP) server, and deterministic renderers to turn source evidence into interactive HTML diagrams.
Diago supports eight views: architecture, sequence, workflow, dataflow, lifecycle, data model, timeline, and layers. Choose a view for the question you need to answer, such as request ordering or entity relationships. Explore all eight views.
Your agent inspects the repository and authors the diagram JSON. Diago helps plan the view, validate the input, render the result, and review the plan. Evidence references and assumptions remain explicit; you still review claims against their sources.
Diago runs locally on Node.js 18 or newer through stdio MCP or its CLI. It needs no separate Diago account, hosted endpoint, or API key. Your chosen agent's account, model access, and data-handling settings still apply. See setup options.
Yes. Keep the source JSON and generated standalone HTML together. Open the HTML in a browser, share it for review, and regenerate it when the source changes. Check the content for private information before sharing outside your team.
Diago is available under the MIT license, with third-party notices preserved. Diago v0.7.0 includes eight diagram views and seven MCP tools, including evidence workflow planning. Update an older plugin installation to use the new tool. Check releases.
Build with shared understanding