Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/brand/stackmap-readme-header-dark.svg">
<img alt="stackmap: interactive system diagrams your coding agent writes, as one offline HTML file" src="assets/brand/stackmap-readme-header.svg" width="100%">
<source media="(prefers-color-scheme: dark)" srcset="assets/brand/stackmap-readme-header-dark.png">
<img alt="stackmap: every layer of your stack, on one map. Interactive system diagrams your coding agent writes, as one offline HTML file" src="assets/brand/stackmap-readme-header.png" width="100%">
</picture>
</p>

<p align="center">
<img src="assets/readme/tour.webp" alt="A 25-second tour of the viewer on an agent tool call workflow: zoom in and select the planner, open the Approval gate guided view, pick a route from User to Final reply, play the flow hop by hop, then switch to the dark theme" width="100%" />
<a href="https://stackmap-site.vercel.app">Website</a> · <a href="https://stackmap-site.vercel.app/docs">Docs</a> · <a href="https://stackmap-site.vercel.app/examples">Examples</a>
</p>

Ask your coding agent to diagram a codebase, a system, a process or a request. It writes a small typed JSON, stackmap validates it with repair hints the agent acts on, lays it out, and delivers one self-contained HTML viewer. No server, no account, nothing to install to open it.
Expand All @@ -27,13 +27,22 @@ Then ask:

> Make an architecture diagram of this repository, backed by evidence from the code.

<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/readme/agent-loop-dark.svg">
<img alt="The loop: you ask your coding agent, it writes diagram.json, stackmap checks it and names the fix, the agent repairs it, and you open one HTML file" src="assets/readme/agent-loop-light.svg" width="100%">
</picture>
</p>

The agent writes `.stackmap/<name>/diagram.json`, validates and repairs it, and delivers `.stackmap/<name>/diagram.html`. Open that file in any browser. To change the diagram, ask again: the agent edits the JSON and delivers it again. The viewer itself is read-only.

## The viewer

<p align="center">
<img src="assets/readme/viewer-light.png" alt="stackmap viewer in light mode: a Commerce API topology with the Orders database selected and its upstream traced; the inspector shows its details, connections and source evidence" width="49%" />
<img src="assets/readme/viewer-dark.png" alt="The same diagram in dark mode" width="49%" />
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/readme/tour-dark.webp">
<img alt="A tour of the viewer on the Commerce API diagram: zoom in and select Orders DB to see its connections and source evidence, open the Checkout path view, route from Storefront to Stripe, and play the flow hop by hop" src="assets/readme/tour.webp" width="100%">
</picture>
</p>

- **Explore:** select a card for its details, connections and source evidence. **Trace** keeps a node's upstream and downstream; **Route** lights every path between two nodes.
Expand Down Expand Up @@ -63,11 +72,18 @@ The agent writes `.stackmap/<name>/diagram.json`, validates and repairs it, and
}
```

<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/readme/card-dark.png">
<img alt="A card's parts: the icon tile, up to three stats with a note, a footer with two items and a link; beside it, the six connection styles: a call, async, reply, main path, security crossing and failure path" src="assets/readme/card-light.png" width="100%">
</picture>
</p>

- **Nodes:** nine types set the colour (`client`, `gateway`, `service`, `database`, `cache`, `queue`, `storage`, `external`, `security`), and lifecycles have seven state types. Cards can add rows, stats, a footer, a link and one of 146 [Simple Icons](https://simpleicons.org) logos.
- **Edges** can be `async` or a `return`, with a `tone` for the main path, security crossings and failure paths.
- **No coordinates:** stackmap lays everything out, with [ELK](https://eclipse.dev/elk/) for architecture and dataflow and its own layout for lanes and sequences.

Full reference: [skill/references/schema.md](skill/references/schema.md). Modelling guidance: [authoring contract](skill/references/authoring-contract.md).
Full reference: [skill/references/schema.md](skill/references/schema.md), or the [schema reference](https://stackmap-site.vercel.app/docs/schema) on the website. Modelling guidance: [authoring contract](skill/references/authoring-contract.md).

## The CLI

Expand Down
2 changes: 1 addition & 1 deletion assets/brand/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Every file carries explicit colours, so pick the light file or its `-dark` twin
| `stackmap-wordmark.svg`, `-dark` | The name alone, where the mark would be under 16px |
| `stackmap-app-icon.svg`, `-512.png`, `stackmap-apple-touch-icon-180.png` | The full mark on the near-black icon tile |
| `stackmap-favicon.svg`, `-32.png`, `-16.png` | The compact mark on the icon tile (inlined in the viewer) |
| `stackmap-readme-header.svg`, `-dark` | The 1280×320 README header, in a `<picture>` at the full column width |
| `stackmap-readme-header.png`, `-dark` | The 1280×400 README header at 2×, in a `<picture>` at the full column width |
| `stackmap-social-card.png`, `.svg`, `-light.svg` | The 1200×630 link preview (`og:image`, the GitHub social preview) |

## Rules
Expand Down
Binary file added assets/brand/stackmap-readme-header-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion assets/brand/stackmap-readme-header-dark.svg

This file was deleted.

Binary file added assets/brand/stackmap-readme-header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion assets/brand/stackmap-readme-header.svg

This file was deleted.

67 changes: 67 additions & 0 deletions assets/readme/agent-loop-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions assets/readme/agent-loop-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/readme/card-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/readme/card-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/readme/tour-dark.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/readme/tour.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/readme/viewer-dark.png
Binary file not shown.
Binary file removed assets/readme/viewer-light.png
Binary file not shown.
Loading