@unerr-ai/unerr 0.0.0-beta.1 → 0.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +234 -141
- package/dist/cli.js +16530 -5805
- package/dist/ui/assets/index-BISLlJyc.js +10 -0
- package/dist/ui/assets/index-BUChTv4H.css +1 -0
- package/dist/ui/assets/rolldown-runtime-S-ySWqyJ.js +1 -0
- package/dist/ui/index.html +3 -3
- package/dist/ui/screenshots/code-base-intelligence.png +0 -0
- package/dist/ui/screenshots/reasoning-quality.png +0 -0
- package/dist/ui/screenshots/reasoning-session.png +0 -0
- package/dist/ui/screenshots/token-session.png +0 -0
- package/dist/ui/screenshots/token-trace-main.png +0 -0
- package/dist/ui/screenshots/token-turn.png +0 -0
- package/package.json +53 -18
- package/dist/ui/assets/index-D2WA0ARw.js +0 -9
- package/dist/ui/assets/index-GLtew9E-.css +0 -1
- package/dist/ui/assets/rolldown-runtime-jpDsebLB.js +0 -1
package/README.md
CHANGED
|
@@ -7,97 +7,156 @@
|
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
A local intelligence layer that sits between your AI agent and your codebase —<br/>
|
|
11
|
+
indexes every call, remembers every decision, and gets sharper the longer you use it.
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
<p align="center">
|
|
15
|
-
<a href="
|
|
15
|
+
<a href="https://www.npmjs.com/package/@unerr-ai/unerr"><img src="https://img.shields.io/badge/install-npm_i_@unerr--ai/unerr-8B5CF6?style=flat-square&logo=npm" alt="Install" /></a>
|
|
16
16
|
<img src="https://img.shields.io/badge/runtime-Node.js_≥20-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node.js" />
|
|
17
17
|
<img src="https://img.shields.io/badge/protocol-MCP-7C3AED?style=flat-square" alt="MCP" />
|
|
18
|
-
<img src="https://img.shields.io/badge/
|
|
18
|
+
<img src="https://img.shields.io/badge/local--first-no_cloud-22D3EE?style=flat-square" alt="Local-first" />
|
|
19
19
|
<img src="https://img.shields.io/badge/license-ELv2-A1A1AA?style=flat-square" alt="License" />
|
|
20
20
|
</p>
|
|
21
21
|
|
|
22
22
|
<p align="center">
|
|
23
|
-
<code>
|
|
23
|
+
<code>npm install -g @unerr-ai/unerr</code>
|
|
24
24
|
</p>
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## The agent isn't stupid. It's flying blind.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Watch any AI coding session for ten minutes and you'll see the same loop:
|
|
31
31
|
|
|
32
|
-
**
|
|
32
|
+
- It **reads 30 files** to find one function — burning the context window before it writes a line.
|
|
33
|
+
- It **edits something with 40 callers** and never knows it just broke three services.
|
|
34
|
+
- It **re-derives the same conventions** you taught it yesterday, this morning, and an hour ago.
|
|
35
|
+
- It **forgets the entire session** the moment the window closes.
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
- It doesn't know your team uses `fetch` prefixes, not `get`
|
|
36
|
-
- It forgot everything from yesterday's session
|
|
37
|
+
Every one of these is the same root cause: the agent has **no persistent memory of your code, your team's style, or its own past mistakes**. unerr is that memory. One process, fully local, indexed in seconds — and your agent picks it up automatically through MCP.
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## What you actually see
|
|
42
|
+
|
|
43
|
+
Run `unerr` and open the dashboard. Four panes, all live:
|
|
44
|
+
|
|
45
|
+
| Pane | Answers the question | Powered by |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| **Token Optimization** | *How much context did unerr save my agent this session?* — saved vs. delivered, compounding multiplier, breakdown by mechanism (compression, graph hits, skipped re-reads). | Per-turn ledger of every tool call |
|
|
48
|
+
| **Reasoning Quality** | *Did the agent actually use what it remembered?* — 4-pillar score across exploration, planning, execution, persistent memory. | 5-turn outcome window per fact/convention |
|
|
49
|
+
| **Codebase Map + Code Intelligence** | *What's the call graph and where are the blast-radius landmines?* — entities, edges, fan-in/out chokepoints, cross-module surprise links. | CozoDB graph (in-process, <5ms) |
|
|
50
|
+
| **Project Memory + Activity** | *What did we already learn, and what was I doing last time?* — facts the agent recorded, sessions stitched into intents, open blockers. | Append-only fact store + timeline.db |
|
|
51
|
+
|
|
52
|
+
The agent reads from the same store through MCP — every claim on the dashboard is also a tool call it just made.
|
|
53
|
+
|
|
54
|
+
### See it in action
|
|
55
|
+
|
|
56
|
+
<p align="center">
|
|
57
|
+
<table>
|
|
58
|
+
<tr>
|
|
59
|
+
<td align="center">
|
|
60
|
+
<img src="https://unerr.dev/open-cli/screenshots/code-base-intelligence.png" alt="unerr codebase intelligence" width="130" />
|
|
61
|
+
<br/><sub>Codebase intelligence</sub>
|
|
62
|
+
</td>
|
|
63
|
+
<td align="center">
|
|
64
|
+
<img src="https://unerr.dev/open-cli/screenshots/reasoning-session.png" alt="unerr reasoning session" width="130" />
|
|
65
|
+
<br/><sub>Reasoning session</sub>
|
|
66
|
+
</td>
|
|
67
|
+
<td align="center">
|
|
68
|
+
<img src="https://unerr.dev/open-cli/screenshots/reasoning-quality.png" alt="unerr reasoning quality" width="130" />
|
|
69
|
+
<br/><sub>Reasoning quality</sub>
|
|
70
|
+
</td>
|
|
71
|
+
<td align="center">
|
|
72
|
+
<img src="https://unerr.dev/open-cli/screenshots/token-trace-main.png" alt="unerr token trace — main view" width="130" />
|
|
73
|
+
<br/><sub>Token trace</sub>
|
|
74
|
+
</td>
|
|
75
|
+
<td align="center">
|
|
76
|
+
<img src="https://unerr.dev/open-cli/screenshots/token-session.png" alt="unerr session token tracking" width="130" />
|
|
77
|
+
<br/><sub>Session tracking</sub>
|
|
78
|
+
</td>
|
|
79
|
+
<td align="center">
|
|
80
|
+
<img src="https://unerr.dev/open-cli/screenshots/token-turn.png" alt="unerr per-turn token breakdown" width="130" />
|
|
81
|
+
<br/><sub>Per-turn breakdown</sub>
|
|
82
|
+
</td>
|
|
83
|
+
</tr>
|
|
84
|
+
</table>
|
|
85
|
+
</p>
|
|
39
86
|
|
|
40
87
|
---
|
|
41
88
|
|
|
42
|
-
##
|
|
89
|
+
## Quick Start (4 explicit steps)
|
|
90
|
+
|
|
91
|
+
> unerr is **per-repository**. Each project gets its own `.unerr/` directory, graph DB, and config. Run install once per repo.
|
|
92
|
+
|
|
93
|
+
### 1. Install the CLI globally
|
|
43
94
|
|
|
44
95
|
```bash
|
|
45
|
-
|
|
96
|
+
npm install -g @unerr-ai/unerr
|
|
97
|
+
# verify
|
|
98
|
+
unerr --version
|
|
46
99
|
```
|
|
47
100
|
|
|
48
|
-
**
|
|
49
|
-
|
|
50
|
-
| Before unerr | After unerr |
|
|
51
|
-
|:---|:---|
|
|
52
|
-
| Reads 30 files to understand a call graph | Queries the graph in 5ms |
|
|
53
|
-
| Misses downstream callers, breaks things | Sees full blast radius before editing |
|
|
54
|
-
| Re-derives conventions every session | Knows your patterns, enforces them |
|
|
55
|
-
| Session degrades at 70% context fill | Stays sharp — 93% shell compression, context lasts 3-5x longer |
|
|
56
|
-
| Starts from zero tomorrow | Resumes where it left off |
|
|
101
|
+
### 2. `cd` into the **root of the repository** you want to enhance
|
|
57
102
|
|
|
103
|
+
```bash
|
|
104
|
+
cd /path/to/your-project # must be the repo root (where .git or package.json lives)
|
|
58
105
|
```
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
106
|
+
|
|
107
|
+
This matters: every file unerr writes — `.mcp.json`, `.claude/`, `.cursor/`, `.unerr/`, `.gitignore` entry — is scoped to the current working directory. Running install from a subdirectory will create a stray, broken setup.
|
|
108
|
+
|
|
109
|
+
### 3. Install unerr for your coding agent
|
|
110
|
+
|
|
111
|
+
Pick the agent you actually use. Each command writes the MCP config, agent-specific skill files, instruction injection, and (where supported) hooks — all in the current repo:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
unerr install claude-code # → .mcp.json + CLAUDE.md + .claude/skills/ + hooks
|
|
115
|
+
unerr install cursor # → .cursor/mcp.json + .cursor/rules/ + hooks
|
|
116
|
+
unerr install antigravity # → .antigravity/mcp_config.json + .agents/rules/ + .agents/skills/
|
|
117
|
+
unerr install windsurf # → ~/.codeium/windsurf/mcp_config.json + .windsurf/rules/ + .windsurf/skills/
|
|
118
|
+
unerr install gemini-cli # → .gemini/settings.json + GEMINI.md + .gemini/skills/
|
|
119
|
+
unerr install github-copilot-cli # → .copilot/mcp-config.json + .github/copilot-instructions.md + .github/skills/
|
|
63
120
|
```
|
|
64
121
|
|
|
65
|
-
|
|
122
|
+
What this actually does, in order:
|
|
123
|
+
|
|
124
|
+
1. Writes a project-level MCP config (`{"command": "unerr", "args": ["--mcp"]}`) — never global.
|
|
125
|
+
2. Drops 11 bundled skills into the agent's skills directory so the agent knows when to call which tool.
|
|
126
|
+
3. Injects a tool-preference section into the agent's instruction file (CLAUDE.md, .cursor/rules, etc.) — idempotent, removable with `unerr uninstall`.
|
|
127
|
+
4. Installs hooks where the agent supports them (Claude Code, Cursor, Cline) — these compress shell output and steer the agent back to graph tools.
|
|
128
|
+
5. Adds `.unerr` to `.gitignore`.
|
|
129
|
+
6. For Claude Code, denies built-in `Read`/`Grep`/`Glob` so the agent must use unerr's graph-aware equivalents (opt out with `--no-force-tools`).
|
|
130
|
+
|
|
131
|
+
> Need a different agent or doing it by hand? `unerr install --show-instructions <agent>` prints copy-pasteable setup. 16 agents are supported today (6 fully integrated, 10 in progress).
|
|
66
132
|
|
|
67
|
-
|
|
133
|
+
### 4. Run `unerr` — and **keep it running**
|
|
68
134
|
|
|
69
135
|
```bash
|
|
70
|
-
|
|
136
|
+
unerr # first run: indexes the repo, starts the daemon; subsequent: resumes in <1s
|
|
71
137
|
```
|
|
72
138
|
|
|
73
|
-
|
|
139
|
+
**This is the part most people skip.** The `unerr --mcp` process your IDE spawns is just a **stdio bridge** — it owns nothing. All the intelligence (graph indexing, file watching, drift detection, fact storage, behavior automation) lives in the long-lived `unerr` daemon.
|
|
74
140
|
|
|
75
|
-
|
|
141
|
+
If the daemon isn't running, you still get tool responses, but they go stale: file edits won't show up in the graph, no incremental re-index, no live drift overlay, no convention auto-detection from new code. **Leave `unerr` running in a terminal tab or as a background service for the whole work session.** It uses ~80–200 MB and idles at near-zero CPU.
|
|
76
142
|
|
|
77
143
|
```bash
|
|
78
|
-
|
|
79
|
-
unerr
|
|
80
|
-
|
|
81
|
-
unerr install windsurf # .windsurf/mcp.json + .windsurf/rules/
|
|
82
|
-
unerr install zed # .zed/mcp.json
|
|
83
|
-
unerr install codex # .codex/mcp.json
|
|
84
|
-
unerr install gemini-cli # .gemini/settings.json
|
|
85
|
-
unerr install kiro # .kiro/mcp.json
|
|
86
|
-
unerr install aider # .aider/mcp.json
|
|
87
|
-
unerr install continue # .continue/config.json
|
|
144
|
+
# typical workflow
|
|
145
|
+
unerr & # start daemon in background (or run in a tmux/screen pane)
|
|
146
|
+
# now open Claude Code / Cursor / etc. — it auto-connects via MCP
|
|
88
147
|
```
|
|
89
148
|
|
|
90
|
-
|
|
149
|
+
After this, your agent connects automatically the next time you open the IDE. No config files to edit by hand.
|
|
91
150
|
|
|
92
151
|
<details>
|
|
93
|
-
<summary>Manual MCP config (any
|
|
152
|
+
<summary>Manual MCP config (any MCP-compatible client)</summary>
|
|
94
153
|
|
|
95
154
|
```json
|
|
96
155
|
{
|
|
97
156
|
"mcpServers": {
|
|
98
157
|
"unerr": {
|
|
99
158
|
"command": "npx",
|
|
100
|
-
"args": ["@unerr/unerr", "--mcp"]
|
|
159
|
+
"args": ["@unerr-ai/unerr", "--mcp"]
|
|
101
160
|
}
|
|
102
161
|
}
|
|
103
162
|
}
|
|
@@ -107,28 +166,38 @@ Works with any MCP-compatible agent. 15 supported out of the box.
|
|
|
107
166
|
|
|
108
167
|
---
|
|
109
168
|
|
|
110
|
-
## What you
|
|
169
|
+
## What changes the moment you connect
|
|
111
170
|
|
|
112
|
-
###
|
|
171
|
+
### First session — instant value
|
|
113
172
|
|
|
114
|
-
- **Graph navigation** — `
|
|
115
|
-
- **Blast radius
|
|
116
|
-
- **
|
|
117
|
-
- **Shell compression** —
|
|
118
|
-
- **
|
|
119
|
-
- **
|
|
173
|
+
- **Graph navigation in <5ms** — `get_entity`, `get_references`, `get_imports`, `search_code`. The agent stops reading 30 files to find one function.
|
|
174
|
+
- **Blast radius before edits** — `get_references` returns every caller. No more confident wrong changes that ripple across services.
|
|
175
|
+
- **Targeted file reads** — `file_read({entity: "fnName"})` returns just that function + relevant conventions/facts, not 2000 lines.
|
|
176
|
+
- **Shell compression** — 11 strategies, 645+ command classifiers. Diffs, errors, logs, test runs, YAML — each compressed differently. **93% average compression** across real-world benchmarks (2 MB → 138 KB). Raw output is kept on disk; the agent can recover it on demand.
|
|
177
|
+
- **Convention awareness** — naming, structure, import patterns auto-detected and injected into the agent's context.
|
|
178
|
+
- **Tool adoption nudging** — five reinforcement layers (exec nudges, hook interception, instruction injection, skill reminders, default-deny of built-ins on Claude Code) push the agent to use the graph instead of grep.
|
|
120
179
|
|
|
121
|
-
###
|
|
180
|
+
### Session 2+ — it starts compounding
|
|
122
181
|
|
|
123
|
-
- **Session persistence** —
|
|
124
|
-
- **
|
|
125
|
-
- **
|
|
126
|
-
- **
|
|
127
|
-
- **
|
|
182
|
+
- **Session persistence** — what the agent learned today is available tomorrow. No more starting from zero.
|
|
183
|
+
- **Fact memory** — `record_fact` persists conventions, decisions, and anti-patterns; `recall_facts` retrieves them with decay-adjusted confidence. Facts also auto-detect from coding sessions.
|
|
184
|
+
- **Episodic narratives** — when you reopen a file, the agent sees what was modified there, when, and why.
|
|
185
|
+
- **Loop prevention** — a circuit breaker fires after repeated failed attempts on the same entity, surfacing the failure mode instead of letting the agent thrash.
|
|
186
|
+
- **Memory-effectiveness scoring** — every fact and convention opens a 5-turn observation window and resolves to a verdict (reinforced / acted_on / caught / ignored / corrected). The Reasoning Quality pane shows the **load-bearing rate** — not just how much the agent remembered, but how much of it actually mattered.
|
|
128
187
|
|
|
129
|
-
###
|
|
188
|
+
### Daemon mode — automated behaviors
|
|
189
|
+
|
|
190
|
+
When `unerr` is running long-lived, these activate in the background:
|
|
191
|
+
|
|
192
|
+
- **Architecture guard** — flags structural violations before they ship.
|
|
193
|
+
- **Cascade guard** — warns when an edit has wide blast radius.
|
|
194
|
+
- **Convention drift** — detects when new code diverges from established patterns.
|
|
195
|
+
- **Auto-doc** — generates docs for undocumented entities.
|
|
196
|
+
- **Change narrative** — tracks the story behind multi-step refactors.
|
|
197
|
+
- **Loop breaker** — intervenes when the agent is stuck retrying.
|
|
198
|
+
- **Session continuity** — preserves state across restarts.
|
|
130
199
|
|
|
131
|
-
|
|
200
|
+
### Shell compression benchmarks
|
|
132
201
|
|
|
133
202
|
| Strategy | What it compresses | Avg compression |
|
|
134
203
|
|----------|-------------------|:-:|
|
|
@@ -141,86 +210,109 @@ Every shell command the agent runs is classified (645 command patterns + content
|
|
|
141
210
|
| **error_diagnostic** | `tsc`, `eslint`, `rustc`, `shellcheck` | **72%** |
|
|
142
211
|
| **key_value** | `env`, `kubectl describe`, `systemctl status` | **48%** |
|
|
143
212
|
| **tree_paths** | `find`, `tree`, `ls -R` | **42%** |
|
|
213
|
+
| **yaml** | YAML configs, `kubectl get -o yaml`, Helm output | adaptive |
|
|
144
214
|
| **omni** | Fallback for unrecognized output | adaptive |
|
|
145
215
|
|
|
146
|
-
**Overall: 93% compression** (
|
|
216
|
+
**Overall: 93% compression** (2 MB → 138 KB across 40 real-world test cases).
|
|
147
217
|
|
|
148
218
|
### Language support
|
|
149
219
|
|
|
150
|
-
| Language |
|
|
151
|
-
|
|
152
|
-
| TypeScript | ✓ | ✓ | ✓ | ✓ |
|
|
153
|
-
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
| C / C++ | ✓ | ✓ | ✓ | — |
|
|
160
|
-
| Ruby | ✓ | ✓ | ✓ | — |
|
|
161
|
-
| PHP | ✓ | ✓ | ✓ | — |
|
|
162
|
-
| Kotlin | ✓ | ✓ | ✓ | — |
|
|
163
|
-
| Swift | ✓ | ✓ | ✓ | — |
|
|
164
|
-
|
|
165
|
-
All 13 languages get full regex-based entity extraction (functions, classes, interfaces, methods with `parent_class` detection) and tree-sitter AST extraction when WASM grammars are available. SCIP integration provides compiler-verified call graphs for TypeScript, Python, Go, Java, and Rust.
|
|
220
|
+
| Language | Tier | Entities | Edges | Tree-sitter | SCIP |
|
|
221
|
+
|----------|:---:|:-:|:-:|:-:|:-:|
|
|
222
|
+
| TypeScript / JavaScript / Python / Go / Java / Kotlin / Scala / Rust / Ruby / C / C++ / C# | 1 | ✓ | ✓ | ✓ | ✓ |
|
|
223
|
+
| PHP / Swift / Lua / Dart / Elixir / Zig | 2 | ✓ | ✓ | ✓ | — |
|
|
224
|
+
|
|
225
|
+
**Tier 1** (12 languages): full tree-sitter AST + dedicated extraction + SCIP compiler-verified call graphs where the toolchain is on PATH.
|
|
226
|
+
**Tier 2** (6 languages): tree-sitter AST + generic extraction. Regex fallback for the rest.
|
|
227
|
+
|
|
228
|
+
**Tier 3 (search-discoverable):** Markdown, IaC (`.tf`, `.yaml`, `.toml`), schemas (`.proto`, `.graphql`, `.prisma`), SQL, shell, templates, build files, CI configs — indexed for `search_code` only, no entity extraction.
|
|
166
229
|
|
|
167
230
|
---
|
|
168
231
|
|
|
169
232
|
## How it works
|
|
170
233
|
|
|
171
234
|
```
|
|
172
|
-
AI Agent (Claude Code / Cursor /
|
|
235
|
+
AI Agent (Claude Code / Cursor / Windsurf / any MCP client)
|
|
173
236
|
│
|
|
174
|
-
├── MCP
|
|
175
|
-
│
|
|
176
|
-
│
|
|
177
|
-
│
|
|
178
|
-
│
|
|
179
|
-
│
|
|
237
|
+
├── stdio MCP ──→ unerr --mcp (bridge, per IDE session)
|
|
238
|
+
│ │
|
|
239
|
+
│ └── UDS ──→ unerr (long-lived daemon, owns everything)
|
|
240
|
+
│ │
|
|
241
|
+
│ ├── CozoDB graph (in-process, <5ms)
|
|
242
|
+
│ ├── Fact store (cross-session memory)
|
|
243
|
+
│ ├── Timeline + ledger (every tool call)
|
|
244
|
+
│ ├── File watcher (incremental reindex)
|
|
245
|
+
│ ├── Convention engine
|
|
246
|
+
│ ├── Compression engine (11 strategies, 645+ classifiers)
|
|
247
|
+
│ └── Behavior modules (cascade-guard, loop-breaker, auto-doc…)
|
|
180
248
|
│
|
|
181
|
-
└──
|
|
249
|
+
└── Dashboard ──→ http://localhost:<port> (SSE-streamed live)
|
|
182
250
|
```
|
|
183
251
|
|
|
184
|
-
|
|
252
|
+
Two processes, one local DB. Zero network calls. No API keys. No cloud. Your code never leaves the machine.
|
|
185
253
|
|
|
186
254
|
---
|
|
187
255
|
|
|
188
|
-
## MCP Tools (
|
|
256
|
+
## MCP Tools (20)
|
|
257
|
+
|
|
258
|
+
### Graph Intelligence (8)
|
|
259
|
+
|
|
260
|
+
| Tool | What the agent gets |
|
|
261
|
+
|------|-----|
|
|
262
|
+
| `get_entity` | Any code entity — signature, body, callers, callees, risk |
|
|
263
|
+
| `get_file` | All entities in a file with risk summary |
|
|
264
|
+
| `get_references` | Callers (blast radius) or callees (dependencies) |
|
|
265
|
+
| `get_imports` | Import graph for a file |
|
|
266
|
+
| `search_code` | Graph-ranked full-text search across all entities |
|
|
267
|
+
| `get_conventions` | Detected naming/structure/import patterns + adherence rates |
|
|
268
|
+
| `get_critical_nodes` | High fan-in/fan-out chokepoints |
|
|
269
|
+
| `get_cross_boundary_links` | Unexpected cross-module dependencies, scored by surprise |
|
|
270
|
+
|
|
271
|
+
### Structural Analysis (3)
|
|
272
|
+
|
|
273
|
+
| Tool | What the agent gets |
|
|
274
|
+
|------|-----|
|
|
275
|
+
| `get_project_stats` | Entity counts, risk distribution, health grade |
|
|
276
|
+
| `file_connections` | Imports + co-change correlations for a file |
|
|
277
|
+
| `get_test_coverage` | Direct + transitive tests for any entity |
|
|
278
|
+
|
|
279
|
+
### File Protocol (2)
|
|
189
280
|
|
|
190
281
|
| Tool | What the agent gets |
|
|
191
282
|
|------|-----|
|
|
192
|
-
| `
|
|
193
|
-
| `
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
|
198
|
-
|
|
199
|
-
| `
|
|
200
|
-
| `
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
283
|
+
| `file_read` | Context-aware read — auto-injects conventions and facts |
|
|
284
|
+
| `file_outline` | File structure (entities, exports) without reading the body |
|
|
285
|
+
|
|
286
|
+
### Persistent Memory (2)
|
|
287
|
+
|
|
288
|
+
| Tool | What the agent gets |
|
|
289
|
+
|------|-----|
|
|
290
|
+
| `record_fact` | Persist a convention, decision, or anti-pattern |
|
|
291
|
+
| `recall_facts` | Retrieve facts with hierarchical scope + decay-adjusted confidence |
|
|
292
|
+
|
|
293
|
+
### Session Narrative — Markers (4)
|
|
294
|
+
|
|
295
|
+
Inline markers the agent emits as it works. Persisted to the shadow ledger and `.unerr/timeline.db` — powers turn titles, cross-session intent stitching, the resume strip, and loop/blocker miners.
|
|
296
|
+
|
|
297
|
+
| Tool | What it does |
|
|
298
|
+
|------|-----|
|
|
299
|
+
| `mark_intent` | One-sentence task start (≤80 chars). Becomes the turn title |
|
|
300
|
+
| `mark_decision` | Records a chosen approach + up to 5 alternatives (≤140 chars) |
|
|
301
|
+
| `mark_blocker` | Flags an unresolved obstacle. Carries into the next session's resume strip |
|
|
302
|
+
| `mark_resolution` | Resolves a prior blocker by `marker_id` |
|
|
303
|
+
|
|
304
|
+
Every response includes `_meta` (latency, risk level, drift status) and inline `ur|<tag>` signals for high-priority guidance (drift, blast-radius warnings, circuit-breaker halts).
|
|
208
305
|
|
|
209
306
|
---
|
|
210
307
|
|
|
211
308
|
<details>
|
|
212
|
-
<summary><strong>
|
|
309
|
+
<summary><strong>CLI commands</strong></summary>
|
|
213
310
|
|
|
214
311
|
```bash
|
|
215
|
-
unerr # Start
|
|
216
|
-
unerr
|
|
217
|
-
unerr
|
|
218
|
-
unerr
|
|
219
|
-
unerr init # Initialize unerr in a new project
|
|
220
|
-
unerr timeline # What happened across sessions
|
|
221
|
-
unerr rewind # Restore to a previous working state
|
|
222
|
-
unerr learn # Teach unerr a convention or correction
|
|
223
|
-
unerr debug # Diagnostic dump
|
|
312
|
+
unerr # Start the long-lived daemon (or resume; auto-spawned by IDE if missing)
|
|
313
|
+
unerr --mcp # Stdio bridge — what your IDE invokes via .mcp.json
|
|
314
|
+
unerr install <agent> # Install MCP config + skills + instructions for one agent
|
|
315
|
+
unerr uninstall # Remove unerr integration from agents in this repo
|
|
224
316
|
```
|
|
225
317
|
|
|
226
318
|
</details>
|
|
@@ -230,26 +322,29 @@ unerr debug # Diagnostic dump
|
|
|
230
322
|
|
|
231
323
|
```
|
|
232
324
|
src/
|
|
233
|
-
entrypoints/
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
tracking/
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
325
|
+
entrypoints/ CLI entry + boot state machine
|
|
326
|
+
proxy/ MCP server (daemon), stdio↔UDS bridge, session stats, shell compression
|
|
327
|
+
intelligence/ CozoDB graph, AST extraction, conventions, rules, search, semantic
|
|
328
|
+
tracking/ Prompt ledger, drift detection, git attribution
|
|
329
|
+
behaviors/ Cascade guard, loop breaker, auto-doc, change narrative…
|
|
330
|
+
commands/ CLI commands (install, status, stats, timeline, learn, debug, …)
|
|
331
|
+
tools/ MCP tool implementations (intelligence + coding)
|
|
332
|
+
hooks/ Claude Code hook system integration
|
|
333
|
+
skills/ 11 bundled skill definitions
|
|
334
|
+
server/ + ui/ HTTP API + React (Vite) dashboard
|
|
335
|
+
config/ Agent registry (16 agents), MCP config writer, instruction injector
|
|
336
|
+
schemas/ Zod schemas
|
|
243
337
|
```
|
|
244
338
|
|
|
245
|
-
**Design principles
|
|
246
|
-
- Zero network calls — fully local, no API keys
|
|
247
|
-
- stdout is sacred — MCP JSON-RPC only, everything else to stderr
|
|
248
|
-
- <5ms query responses — CozoDB runs in-process (Rust via NAPI)
|
|
249
|
-
- 30s time-to-value — shallow index first, deep enrichment in background
|
|
250
|
-
- Enhancement, not dependency — agent falls back gracefully if unerr is unavailable
|
|
339
|
+
**Design principles**
|
|
251
340
|
|
|
252
|
-
|
|
341
|
+
- Zero network calls — fully local, no API keys.
|
|
342
|
+
- stdout is sacred — MCP JSON-RPC only; everything else to stderr.
|
|
343
|
+
- <5 ms query responses — CozoDB runs in-process (Rust via NAPI).
|
|
344
|
+
- First useful output <5 s — shallow index first, deep enrichment in background.
|
|
345
|
+
- Graceful degradation — the agent still works if unerr is down, you just lose the intelligence layer.
|
|
346
|
+
|
|
347
|
+
**Tech stack** TypeScript (ESM) · CozoDB (Rust/NAPI) · web-tree-sitter (WASM) · MCP SDK · Ink (React CLI) · React + Vite (dashboard) · tsup · Vitest
|
|
253
348
|
|
|
254
349
|
</details>
|
|
255
350
|
|
|
@@ -260,13 +355,11 @@ src/
|
|
|
260
355
|
pnpm install
|
|
261
356
|
pnpm run build # tsup → dist/ (ESM, node20)
|
|
262
357
|
pnpm run dev # tsx watch
|
|
263
|
-
pnpm run test:run # full suite
|
|
358
|
+
pnpm run test:run # full suite
|
|
264
359
|
pnpm run lint # biome check
|
|
265
360
|
pnpm run typecheck # tsc --noEmit
|
|
266
|
-
```
|
|
267
361
|
|
|
268
|
-
|
|
269
|
-
pnpm link --global # make `unerr` available globally
|
|
362
|
+
pnpm link --global # make local `unerr` available globally
|
|
270
363
|
```
|
|
271
364
|
|
|
272
365
|
</details>
|
|
@@ -274,15 +367,15 @@ pnpm link --global # make `unerr` available globally
|
|
|
274
367
|
<details>
|
|
275
368
|
<summary><strong>Contributing</strong></summary>
|
|
276
369
|
|
|
277
|
-
Contributions welcome
|
|
370
|
+
Contributions welcome — please open an issue first.
|
|
278
371
|
|
|
279
372
|
**Before submitting a PR:**
|
|
280
|
-
-
|
|
281
|
-
- All output
|
|
373
|
+
- `pnpm run typecheck && pnpm run lint && pnpm run test:run`
|
|
374
|
+
- All output to stderr — never stdout (MCP JSON-RPC channel)
|
|
282
375
|
- All CozoDB interactions are async — always `await`
|
|
283
376
|
- Use `.js` extensions in imports (NodeNext resolution)
|
|
284
377
|
|
|
285
|
-
See [CLAUDE.md](./CLAUDE.md) for
|
|
378
|
+
See [CLAUDE.md](./CLAUDE.md) for full conventions.
|
|
286
379
|
|
|
287
380
|
</details>
|
|
288
381
|
|
|
@@ -295,7 +388,7 @@ See [CLAUDE.md](./CLAUDE.md) for detailed conventions.
|
|
|
295
388
|
---
|
|
296
389
|
|
|
297
390
|
<p align="center">
|
|
298
|
-
<code>
|
|
391
|
+
<code>npm install -g @unerr-ai/unerr</code>
|
|
299
392
|
<br /><br />
|
|
300
|
-
<sub>
|
|
393
|
+
<a href="https://www.npmjs.com/package/@unerr-ai/unerr"><sub>npm registry</sub></a> · <sub>Fully local. No account. No cloud. Free.</sub>
|
|
301
394
|
</p>
|