Whenever I onboard onto a 50k+ line monorepo or legacy service, AI coding assistants like Cursor or Claude Code can summarize the architecture into a clean ARCHITECTURE.md in seconds.
The problem? Reading a 400-line nested Markdown outline linearly makes my eyes glaze over — and the two classic visual workarounds both break down in an AI workflow:
- Proprietary mind map apps (XMind, Miro, etc.): Once your architecture lives in a binary/proprietary file, Cursor and Claude can no longer read or diff it. Docs drift from code immediately.
-
Read-only Markdown mind map viewers (like Markmap): Great for glancing at structure, terrible when you realize a module belongs under a different subsystem and want to drag a branch or press
Tabto add sub-notes without hunting through raw indentation.
Here is the 4-step local-first workflow I now use so the plain .md file on disk remains the single source of truth for both humans and AI agents.
Step 1: Ask Your AI for a Structured Outline + Inline Mermaid
Instead of asking "explain this repo", I use a compact prompt that produces a mind-map-friendly Markdown skeleton:
Inspect the entrypoints and core packages of this repo and write ARCHITECTURE.md:
1. Use standard Markdown headings (# / ## / ###) and bullet lists (-) for module hierarchy.
2. Include key file paths and responsibilities under each module.
3. For critical state machines or request flows, embed a ```
mermaid block directly under that bullet.
This gives you macro hierarchy (outline tree) and micro control flow (Mermaid) in one plain text file.
Step 2: Open a Two-Way Editable Mind Map Side-by-Side
Instead of scrolling raw Markdown, I open the file side-by-side in an editable Markdown mind map (Inkmap — available on VS Code Marketplace and Open VSX for Cursor / Windsurf, or you can try it with zero install in the live browser playground).
- Clicking a node highlights the exact line in
.md. - Pressing
Tab/Enteror dragging branches writes back to.mdbyte-for-byte — untouched paragraphs, blank lines, code blocks, and math stay identical sogit diffstays clean.
Step 3: Edit Inline Mermaid Flowcharts & LaTeX Inside Nodes
Trees are great for hierarchy, but real systems have loops, retries, and state transitions. Keeping mermaid blocks directly inside mind map nodes lets you inspect flowcharts, sequence diagrams, and state diagrams in context — and tweak diagram source inline without exporting PNGs back and forth.
Step 4: Feed the Refined Structure Back to Your AI Agent
Because the .md file on disk was updated cleanly as you dragged nodes around, you can immediately point Cursor, Claude Code, or Codex right back at ARCHITECTURE.md to implement a refactor or review plan. For team walkthroughs, switching to Org Chart / Timeline / Presentation mode replaces slide decks entirely.
If you use MCP-native agents (Claude Desktop, Claude Code, Codex, Antigravity), one command wires up the MCP App automatically:
bash
npx -y inkmap-mcp@latest install
- Zero-install Web Playground: https://www.zhiyuanv.com/inkmap.html?lang=en
- GitHub & Docs: https://github.com/zhiyuanvision-lang/InkMap
How do you keep architecture docs visual without breaking git diff or AI readability? Would love to hear your setup!



Top comments (0)