@pypl100/rune
v0.2.0
Published
The Software Intelligence Runtime — persistent, explainable software understanding for any AI.
Maintainers
Readme
Rune
The Software Intelligence Runtime.
Cursor, Codex, and Claude Code write your code — one session at a time. Open a session, they read your files cold, reason about them, make changes, and when the session ends, whatever they figured out is gone. Next session, same cold start.
Rune doesn't write code. It's the thing that runs underneath all of them, continuously — watching your codebase, keeping a standing, evidence-backed understanding of it current, so every session (yours or an agent's) starts already knowing the architecture instead of re-deriving it from scratch.
No more re-explaining your routes and components every time. No more every assistant independently rediscovering the same things. Connect an AI to Rune, and it already understands your codebase — and can show you exactly why.
Under the hood, Rune continuously builds an evidence-backed understanding of your software and exposes it through MCP — see How it works if you want the internals.
What Rune does
- Always current —
rune watchkeeps the understanding graph up to date as you edit, not just when someone remembers to re-run a scan. It's a runtime, not a one-shot CLI. - Persistent — understanding survives past any single session. Every AI you connect starts already knowing your software, instead of re-reading it cold.
- Shared — one understanding, many AI clients. Claude, GPT, Gemini, whatever you're running next month — they all ask the same Rune instance instead of maintaining separate, inconsistent mental models of your code.
- Explainable — nothing Rune tells an AI is a black box. Ask it to justify any claim and it shows the exact source location behind it.
- Read-only, suggest-only — Rune never writes to your source. That's the actual moat: everything else in this space is racing toward autonomous code-writing; Rune stays strictly on the reading, understanding, and (later) suggesting side of that line. It never becomes the thing you have to double-check for silently breaking your code.
How it works
You don't need to think about this to use Rune — it's here for anyone extending or debugging it.
Internally, Rune keeps two distinct layers:
- Facts — directly observed things: an import statement, an
app.get(...)call, a function that returns JSX, a file convention that defines a Next.js route. Every fact records its file, line, and the exact matched source text. - Derived understanding — conclusions built from facts: an architecture summary, a unified API surface across Express and Next.js, a component index, file-level dependency relationships. Every conclusion lists exactly which facts it's based on.
Nothing in the derived layer is asserted without a traceable path back to evidence. Call rune explain <id> (or the rune_explain MCP tool) on anything and get the fact chain behind it. That's the whole trust story: an AI using Rune isn't guessing about your architecture, and neither is Rune.
Install
npm install @pypl100/runeA Python distribution exists at python/ with full feature parity (same fact/derived model, same detectors, same MCP tool surface) for teams who'd rather not require Node.js — published as pip install north-rune (the CLI command is still rune; see python/README.md).
If you install both (
@pypl100/runevia npm globally, andnorth-runevia pip) on the same machine, only onerunecommand will actually be on yourPATH— whichever your shell finds first, not whichever you installed most recently. Check withwhich -a rune; if it lists more than one path, that's why. There's no version-detection magic here — it's plain OSPATHresolution, same as any two unrelated tools that happen to install a same-named binary. If you need a specific one, invoke it by its full path rather than relying on barerune.
Quickstart
cd your-project
npm install -g @pypl100/rune # or: npx -p @pypl100/rune rune <command>
rune init # sets up Rune in your project
rune watch & # keeps the understanding current in the background as you work
rune serve # starts an MCP server exposing it to any AI clientrune watch is the recommended default — it's what makes Rune a runtime instead of a tool you have to remember to re-run. rune scan (a one-shot version of the same thing) still works if you'd rather trigger it manually, e.g. in CI.
Then point any MCP-compatible client (Claude Desktop, Claude Code, custom agents, etc.) at the rune serve process. Every connected AI now shares the same, continuously current understanding instead of re-deriving it per session.
Example MCP client config entry:
{
"mcpServers": {
"rune": {
"command": "npx",
"args": ["-p", "@pypl100/rune", "rune", "serve", "/absolute/path/to/your-project"]
}
}
}CLI
| Command | What it does |
|---|---|
| rune init [dir] | Sets up .rune/ in the current (or given) project |
| rune scan [dir] | Builds (or rebuilds) the understanding graph, once |
| rune watch [dir] | Keeps the understanding graph current as files change (Ctrl+C to stop) |
| rune serve [dir] | Starts the MCP server |
| rune explain <id> | Prints the evidence trail behind any fact or conclusion |
| rune --version | Prints the installed Rune version |
Configuration
rune init writes .rune/config.json. The only setting in v0.1 is ignore — an array of directory/file names to exclude from scanning, on top of the built-in defaults (node_modules, .git, dist, build, .next, coverage, etc., and all dotfiles unconditionally):
{
"ignore": ["legacy", "vendor"],
"version": 1
}MCP tools exposed
| Tool | Purpose |
|---|---|
| rune_get_overview | Architecture summary — start here |
| rune_list_components | All detected React components |
| rune_list_routes | Unified Express + Next.js route list |
| rune_search | Find facts/derived nodes by name, file, or route substring |
| rune_explain | Full evidence trail for any id |
| rune_get_file_dependencies | Internal import graph for a file |
| rune_rescan | Re-scan on demand after code changes |
v0.1 scope and honest limitations
Rune v0.1 is intentionally narrow:
- Framework support: React, Next.js (pages + app router), Express. Everything else gets generic file/import scanning only.
- Extraction method: heuristic, regex-based pattern matching — not a full AST parser. This keeps v0.1 dependency-free and fast, and every fact still carries file/line/matched-text evidence, but it will miss unusual code shapes (e.g. components returned via
React.createElementwith no JSX, dynamically constructed route strings, deeply re-exported components). A real AST-based extractor is the natural v0.2 upgrade — the fact schema is designed so extraction method can be swapped without touching anything downstream. - No cross-file route-prefix resolution: an Express route mounted via
app.use('/api', router)in one file and defined in another isn't stitched into a single path yet. - Read-only: Rune never writes to your source files. It only ever writes its own graph to
.rune/graph.json. - Single-process, stdio MCP transport in v0.1 — no multi-client daemon yet.
Security notes
- Rune never scans dotfiles or dot-directories (
.env,.env.*.js,.git,.ssh, editor configs, etc.), with no exceptions. This is enforced in the scanner and covered by a regression test — a config file with a matching code extension (e.g..env.js) will not have its contents read or embedded as evidence. - Symlinks are not traversed, so a symlink pointing outside the project root can't pull external files into the scan.
.rune/graph.jsonis excluded from git byrune init(it creates.gitignoreif one doesn't already exist).- The graph itself is the only thing Rune writes. If you share
.rune/graph.jsonwith an AI client, you're sharing everything in it — treat it like any other file that quotes snippets of your source.
Verifying the MCP server
The unit test suite (npm test) covers scanning and the understanding graph, but doesn't spin up a real MCP client. scripts/verify-mcp-server.mjs does: it spawns rune serve as a real child process and drives it through the actual JSON-RPC handshake (initialize → notifications/initialized → tools/list → tools/call), checks that all expected tools are exposed, and confirms a genuinely invalid call is rejected cleanly rather than crashing the server.
npm install
npm run verify:mcp
# or against a real project instead of the bundled fixture:
npm run verify:mcp -- /path/to/your-projectRoadmap
- AST-based extraction (swap-in replacement for the regex scanner)
- Cross-file route resolution
- Data-flow tracing between frontend calls and backend routes
- True incremental re-scan —
rune watchexists now, but it still does a full rebuild on every change, not a diff of just what changed. Fine for small-to-medium projects; will matter on very large ones. - Suggestion tools (e.g. flagging a known-vulnerable dependency pattern with evidence, proposing a reviewable fix) — strictly additive to the read-only model, never auto-applied
License
MIT
If you want to support the circus: ETH 0xbc0979dde621c353737d21f6d7b4eb361f7bc11f
