For Claude Code developers

Stop paying tokens
to find your own code

Speculator gives Claude a persistent memory of your architecture — stored as a knowledge graph right in your repo.

# instead of reading 40 files...
$ speculator get auth --facet reason
→ compliance requirement, added 2026-03
$ speculator list edges --from auth
→ user-service, jwt-utils, session-store
$
speculator get auth --facet reason
Context costs tokens. Too many tokens.

Every time Claude needs to understand your codebase, it reads dozens of files — burning your budget before writing a single line.

❌ Without Speculator

Files read per task ~40 files
Knows "why"? Never
Finds related code? Maybe
Tokens per task ~12 000
0
tokens wasted on context

✅ With Speculator

Files read per task 0 files
Knows "why"? Always
Finds related code? Instantly
Tokens per task ~800
0
tokens for targeted query
How it works
Three steps to a smarter Claude

Document once. Query forever. Your knowledge lives next to your code.

1

Document

Add entities and edges to the graph using CLI or MCP. Store architecture decisions, reasons, and relationships — right in your repo.

$ speculator add entity "auth" \
  "JWT auth middleware"
$ speculator add edge auth user-service \
  uses
2

Query

Claude asks the graph instead of reading files. One call returns the entity, all its edges, and the reasons behind every decision.

$ speculator get auth --facet reason
→ compliance, 2026-03
$ speculator list edges --from auth
→ user-service, jwt-utils
3

Act

Claude makes precise changes — knowing what's connected, why it was built that way, and what will break. No guessing, no rereading.

# Claude now knows:
✓ why auth exists
✓ what depends on it
✓ safe to change
Speculator finds paths across your graph

Watch how Speculator traverses the knowledge graph — finding connections even without a direct edge, and surfacing file locations, code snippets, and schemas stored on each edge.

🔍 Works even without direct edges 📄 Each edge carries file & code ⚡ Auto-plays all paths
Select a node
Click any node in the graph to see its connections and metadata
Now click another node to find the path →
Todo app — drag & explore

A typical frontend → api → database stack. Hover a node to see its summary. Search to highlight. This is what your KB looks like in practice.

Click node → edges & facts · Hover edge → label · Drag to rearrange
Connected edges
Get started
Add persistent memory to Claude Code in 60 seconds

One command bootstraps everything: downloads Speculator, wires Claude Code hooks, creates AGENTS.md, and initialises your knowledge base.

$ curl -fsSL https://github.com/madlexa/speculator/releases/latest/download/install.cmd | bash
downloads tools/speculator.cmd — no global install needed
wires hooks into .claude/settings.json — Claude queries your graph automatically
writes AGENTS.md with the knowledge-graph protocol
creates knowledge/ directory ready for entities and edges