A persistent, git-native reasoning graph over your codebase — the decisions, bugs, and invariants behind every line — surfaced to Claude Code at reasoning time. So your AI stops re-deriving understanding, and stops undoing intentional design.
Every AI session starts from zero. The model re-reads your code, re-guesses the intent, and happily "fixes" the thing you deliberately did last month — because the reasoning lives in PRs, Slack, and people's heads, not in the repo.
Three layers, no documentation chore. Index is deterministic. Learning happens on every commit. Grounding reaches Claude Code through every door it has.
tree-sitter parses your repo into a symbol & dependency graph — functions, call edges, imports, components — plus churn and fan-in metrics. Pure, fast, deterministic.
hunch indexEach commit becomes a structured Decision; a failing test becomes a Bug with a ranked suspect list; recurring or severe bugs are promoted into Constraints that raise a component's fragility.
post-commit → synthesisClaude Code reads it through an MCP server, an auto-maintained CLAUDE.md, and slash commands — and every answer cites its provenance: source, confidence, evidence. Nothing is a blind assertion.
MCP + CLAUDE.md + slashThe links are what let the agent answer “why” and “what must not break” with evidence, not vibes — every node attached to its components, symbols, and commits.
A stateless JWT couldn't be revoked server-side. Caught by auth.revocation.spec.ts, root cause attributed, severity critical.
Sessions move server-side; the JWT carries only an opaque id. Alternatives rejected, consequences recorded, commit a1b2c3d as evidence.
Never trust JWT expiry alone for logout. Scoped to src/auth/**, blocking — checked before any edit in that scope.
Claude queries Hunch for the why behind a file, the blast radius of a change, a bug's lineage, and the invariants in scope — and writes new decisions back. The structured two-way API it calls under the hood.
Every record carries source, confidence and evidence. Inferred < llm-draft < human-confirmed. Low-confidence items stay advisory and cheap to discard.
The Hunch graph is plain JSON committed beside your code — the source of truth, reviewable in PRs, synced for free over push/pull. A merge driver resolves it by record id, not conflict markers.
Synthesis is billed to your Claude subscription via the CLI — never the pay-per-token API. No claude? A deterministic heuristic keeps the loop alive.
Rank the riskiest code by churn × bug-count × fan-in × coverage gaps — and get the bug history behind it, not a generic lecture.
Every write is temp-file + rename with a Windows-safe fallback. An interrupted write can't truncate the index; a corrupt index refuses to be flattened.
Decisions and invariants carry a git-anchored valid-time window. Query the graph --as-of any commit or tag; supersession closes a window instead of deleting it, so history stays auditable.
Re-adding a symbol or dependency a decision deliberately retired gets flagged — warns always, fails a strict commit only when tied to a blocking invariant. The AI stops undoing intentional design.
A GitHub Action runs on every PR — comments the invariants and decisions a change affects (with con_/dec_ ids) and fails the check on a direct, high-confidence, non-stale blocking invariant. Memory that blocks a merge, not just advises.
Node 20+. npm install -g @davesheffer/hunch puts a global hunch on your PATH. That's the whole install — no build, no SaaS.
One hunch init indexes the repo, installs the hooks + merge driver, and writes MCP config + rules for Claude Code, Cursor, VS Code & Windsurf — all pointing at the same .hunch/ graph. Reload your editor to pick up the tools.
hunch backfill --since 90d replays recent history so an empty graph isn't your day-1 experience.
In any of those editors: “why is the session module built this way?” — and it answers from memory, with the commit as evidence.
One hunch init wires the same graph into every door your AI knocks on — the MCP server is client-agnostic, so each assistant reads the same .hunch/.
Plus AGENTS.md / Codex, and a VS Code visualizer extension on Open VSX. Skip any with hunch init --no-providers.
The longer it runs, the smarter it gets — and the more expensive it is to go back to a stateless AI.