Diagrammatic Dialogues github.com/sprine/diagrammatic-dialogues
1 / 2

Codebase orientation tool

Diagrammatic Dialogues

Open a codebase you didn't write. Claude draws it as a diagram. Click a box, ask a question, get the next diagram — every earlier one stays on screen, and every flag stays clickable.

Built for one question: is this the decision I would have taken?

Card, flag, next card — the strip is the lineage, root on the left.

System

InterfaceLocal web app, one browser tab, served by FastAPI + server-sent events
RenderingASCII grid → geometry → hand-drawn SVG, one renderer, server-side
StorageSQLite — a trail is a rooted tree of cards, kept across restarts
Engineclaude -p, one CLI turn per card, children fork their parent's session
Requiresuv and a logged-in claude CLI
Default port127.0.0.1:8420

The loop

  1. 01 Open
    Point at a directory

    Fast, shallow opening sketch — not an audit.

  2. 02 Flag
    Click a box

    Ask a question; what you clicked rides along.

  3. 03 Redraw
    Get the next card

    Redrawn at whatever depth the question called for.

  4. 04 Trail
    Every flag stays live

    Re-flag an old card and it branches from there.

Quickstart

# from the project root
./run.sh                     # -> http://127.0.0.1:8420

# run the test suite
uv run --extra dev python -m pytest -q
VariableEffectDefault
SID_PORTPort the app binds to8420
SID_DBPath to the SQLite trail database./diagrams.db
SID_OPENSet to 0 to skip auto-launching a browser tab1
2 / 2

Trust & guarantees

The app exists to answer questions about code you did not write, so it is built to not ask for faith.

PropertyMechanism
WatchableA running card shows an elapsed clock, each file as it's opened, and a live line of what's being drawn
ReceiptedEvery card lists every file read and search run, in order, with cost and wall time; blocked calls are shown as blocked, not dropped
Source-trueOne click swaps the picture for the exact ASCII it was mechanically drawn from
Read-only by defaultAn allowlist, not a denylist: Read, Glob, Grep, read-only git/ls/find. Writes and shell redirects are refused
Editing is opt-inTick let it edit files on one remark; only that turn runs with write access, and the resulting card is badged wrote code
Failures are filed, not patchedA bad render goes to training-data/ with your description and both the raw and repaired ASCII — nothing quietly edits the renderer

Architecture

asciigrid.pyASCII grid → geometry, plus repair() and audit()
sketch.pyGeometry → hand-drawn SVG; also a standalone CLI
claude_cli.pyDrives claude -p, streams progress, retries a broken drawing
prompts.pyThe drawing contract, output schema, depth ladder
models.pySQLite; a trail is a rooted tree of cards
web.pyFastAPI + SSE; renders each card server-side

Effort ladder

DepthModelEffort
Opening sketchSonnetLow
Follow-up flagSonnet → OpusRising
Deep questionOpusHigh

Every card records the model and effort that produced it; both are overridable before asking.

Design notes

  • The ASCII grid is the layout. Boxes render where the model drew them — no layout engine, so the picture is provably faithful to text you can inspect.
  • One renderer, in Python. Serves both the app and the standalone CLI; there is deliberately no JS renderer.
  • Wobble is seeded per card. Same card, same picture, on every render.
  • repair() before audit(). Repair straightens boxes deterministically; only a box that still won't close earns a redraw turn.