Skip to main content
You can use an agent to read a repository and author an architecture diagram, then use iso-topology to validate, edit and render that diagram. iso-topology does not itself crawl a repository or infer its architecture. Its input is a diagram document, not an arbitrary source-code directory. This distinction matters when searching for an open-source code-to-architecture tool: rendering a supplied model, extracting dependencies and deciding what a diagram should communicate are different jobs. Read in Chinese.

Decide which question the diagram answers

Pick one view before collecting evidence: A useful first diagram might cover one request path or a few deployed components. Expanding it to every file usually adds detail without answering the original question.

Keep an evidence note beside the diagram

Before drawing, record the source revision, the files inspected and the statements each file supports. A small Markdown table is enough:
Replace the placeholders with real observations. Distinguish an implemented path from a configured deployment, and label proposed components as proposed. If the repository does not show an external system’s internals, represent the boundary rather than inventing its implementation. Keep this note outside the diagram DSL. A documentation convention is not an extra schema field, and adding arbitrary evidence fields to YAML can cause validation errors.

Give an agent a bounded task

With an agent that has authorized access to the repository and the CLI or MCP tools, adapt this task:
The agent supplies code-reading and reasoning abilities. iso-topology supplies a diagram contract and drawing tools. Neither an attractive image nor a clean validation result proves that the inferred architecture is correct.

Render the confirmed model

Start from the first-scene guide or an existing sample. Give components stable IDs and define what arrows mean in the accompanying document. Once the model is saved as architecture.yaml, use:
Inspect validation output before continuing: the CLI returns 0 for clean input, 2 for warnings and 3 for errors. Inspect out/topology.svg after rendering. The final command starts the local editor; parseable source edits save to the bound file. Render again when you want an updated published SVG. For a language-independent example of the finished source-to-image workflow, use the CI reference repository. It renders an authored model; it does not automatically extract that model from application code.

Keep it current without inventing automatic synchronization

When code changes, update the evidence note and the affected diagram source in the same review. CI can regenerate the image from YAML, but this only synchronizes diagram source to image. It does not establish that application code and diagram source still agree. Use a reviewer who understands the changed subsystem to check that relationship. Retain the source revision and unresolved questions so the next contributor can repeat the reasoning. Choose a diagram tool · Agent handoff · Local rendering and data boundaries Need to distinguish applications from deployment instances? Choose an architecture view before asking an agent to draw.