/wiregraph-update
daily Β· incremental
Incrementally re-indexes only the files changed since the last index (git diff + uncommitted edits) β not a full rebuild.
When After normal editing β the cheap, everyday refresh. Hooks do this automatically at balanced+; this is the manual trigger. Prefers the update_graph tool with no arguments.
Worktree-safe A git worktree add inside an indexed project no longer forces a full rebuild, and a rebase / amend that orphans the stored sha reconciles the affected repo by on-disk content instead of tearing the graph down. A content-hash tiebreaker confirms every mtime+size match, so a same-size edit can't slip through as unchanged.
Args none β acts on the active project
$ /wiregraph-update
re-indexed 4 changed files Β· advanced git shas
/wiregraph-status
daily Β· doctor
Doctor β graph health + freshness, is the directive present, posture, whether hooks are firing, contract coverage; with a one-line fix for anything off.
When "Is my graph healthy / fresh / wired up correctly?" Triage before trusting a trace.
Args none β active project
$ /wiregraph-status
graph: indexed Β· 412 files Β· 5 180 symbols
freshness: STALE: 2 changed β run /wiregraph-update
posture: balanced Β· hooks active
/wiregraph-stats [--local]
daily Β· savings
Prints the measured token-savings dashboard β graph-tool usage, one-time tokens saved, the measured recurring-context savings replayed from your logged sessions, and the adoption gap. Deterministic; relayed verbatim. Default is machine-wide (every graph you've init'd or linked); --local scopes it to only the current project.
When "How much is wiregraph actually saving me?" Reporting or curiosity. The numbers are local counterfactuals the script itself labels β don't reformat them. Add --local for one project's numbers on their own.
How Every graph read (get_source, trace_*) logs the tokens it saved versus opening the files; each prompt logs a turn, and each session start, /clear, or compaction logs a boundary. The dashboard replays that log β one-time is reading the code once, recurring is that same context multiplied by how many turns it stayed resident before the next boundary (staying out of the prompt re-saves it on every turn until context resets). Reads are segmented per session, so one session never borrows another's turns.
Logs Plain JSON-lines at <project>/.wiregraph/metrics.jsonl β gitignored, never leaves your machine. On update, any pre-measurement log is archived once to metrics.v1.jsonl and ignored by the dashboard, so measurement starts clean.
Args optional --local scopes to the active project (resolved from any subdirectory); no args aggregates every graph on the machine
$ /wiregraph-stats
graph-tool calls: 218 Β· est. tokens saved: ~1.24M
session context: ~1.24M once β ~5.2M recurring (measured)
adoption: 82% of navigation via graph
/wiregraph-visualize [dir] [--functions|--all|--contract "<name>"]
daily Β· visualize
Renders the graph as a standalone offline HTML page (d3 force layout, one color cluster per repo, Contract nodes as the bridges in the middle) and opens it.
When You want to see which repos touch which contracts, or a full call graph. Everything is inlined β no network requests.
Args default (per-repo contract view), --functions, --all, --contract "<name>"
$ /wiregraph-visualize --contract "/api/logs"
42 nodes Β· 61 links β ~/log-server/.wiregraph/graph.html (opened)
/wiregraph-linearize <Class.method|method|ClassName> [--breadth tight|medium|full] [--depth N] [--out <path>]
daily Β· reading aid
Flattens a vertical call slice into one top-to-bottom pseudo-source file β follows the CALLS graph from a root symbol and inlines each reachable body once, in reading order, with a file:line banner and a back-reference on repeats.
When A flow is smeared across many files or deep call chains and you'd rather read it as a single script. It's a reading aid β the output doesn't compile. Language-agnostic and multi-compartment: it reads whatever the graph indexed, from each symbol's own compartment root.
Args root (required); --breadth tight/medium/full (how far across compartments), --depth, --file to disambiguate, --out to write a file
$ /wiregraph-linearize ProcessOrderUseCase.execute --breadth medium
inlined 37 symbols Β· depth 9 β one top-to-bottom slice
/wiregraph-posture <off|conservative|balanced|aggressive>
daily Β· posture
Sets how aggressively the graph self-updates β from off (hooks no-op) through balanced (re-index on edit) to aggressive (adds git commit / merge hooks). Writes state.json; no rebuild.
When Dial a noisy repo down to conservative, or turn a hot one up to aggressive. Also how a linked peer opts out of fanned-in edits (off).
Args <posture> (required); optional target-dir, else the active project
$ /wiregraph-posture aggressive
set autoUpdate posture to "aggressive"