composto-ai 0.3.0 → 0.4.1
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 +46 -1
- package/dist/index.js +2514 -54
- package/dist/mcp/server.js +2396 -40
- package/dist/memory/api.js +986 -0
- package/dist/memory/pool.js +57 -0
- package/dist/memory/worker.js +448 -0
- package/package.json +4 -1
- package/dist/chunk-AARGW2GV.js +0 -1531
package/README.md
CHANGED
|
@@ -37,8 +37,24 @@ composto ir src/app.ts
|
|
|
37
37
|
|
|
38
38
|
# Smart context within a token budget
|
|
39
39
|
composto context src/ --budget 2000
|
|
40
|
+
|
|
41
|
+
# Historical blast radius for a file (beta, feature-flagged)
|
|
42
|
+
COMPOSTO_BLASTRADIUS=1 composto index
|
|
43
|
+
composto impact src/auth/login.ts
|
|
44
|
+
composto index --status
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### MCP plugin (Claude Code, Cursor, Claude Desktop)
|
|
48
|
+
|
|
49
|
+
The MCP server is bundled inside `composto-ai`. Install the package globally first, then register the server:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm install -g composto-ai
|
|
53
|
+
claude mcp add composto -- composto-mcp
|
|
40
54
|
```
|
|
41
55
|
|
|
56
|
+
Composto adds 5 tools to your AI assistant: `composto_ir`, `composto_benchmark`, `composto_context`, `composto_scan`, and `composto_blastradius` (the last one gated by `COMPOSTO_BLASTRADIUS=1` during beta).
|
|
57
|
+
|
|
42
58
|
---
|
|
43
59
|
|
|
44
60
|
## How It Works
|
|
@@ -81,10 +97,37 @@ composto trends .
|
|
|
81
97
|
|
|
82
98
|
# Compare LLM quality: raw code vs IR (requires ANTHROPIC_API_KEY)
|
|
83
99
|
composto benchmark-quality <file>
|
|
100
|
+
|
|
101
|
+
# Historical blast radius — beta, gated by COMPOSTO_BLASTRADIUS=1
|
|
102
|
+
composto index # bootstrap .composto/memory.db from git history
|
|
103
|
+
composto impact <file> # risk verdict + signals for a file
|
|
104
|
+
composto index --status # diagnostics: schema, freshness, calibration
|
|
84
105
|
```
|
|
85
106
|
|
|
86
107
|
---
|
|
87
108
|
|
|
109
|
+
## BlastRadius (beta)
|
|
110
|
+
|
|
111
|
+
Beyond compression, Composto indexes your repo's git history into a local SQLite graph and exposes it as a queryable risk surface. Before your agent edits a file, it can ask: *"has this region been reverted? does it have a fix cluster? is the last author still around?"* — signals no LLM can infer from current code alone.
|
|
112
|
+
|
|
113
|
+
Five signals per query: `revert_match`, `hotspot`, `fix_ratio`, `coverage_decline`, `author_churn`. Verdict is `low` / `medium` / `high` / `unknown`; when confidence is low the tool returns `unknown` rather than guessing. Precision is repo-calibrated (self-validation on every N=500 commits).
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
verdict: high
|
|
117
|
+
score: 1.00
|
|
118
|
+
confidence: 0.30
|
|
119
|
+
signals:
|
|
120
|
+
revert_match ■■■■■■■■■■ strength=1.00 precision=0.50
|
|
121
|
+
hotspot · strength=0.00 precision=0.30
|
|
122
|
+
...
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**v1 ship gate** on this repo: precision 93.9%, recall 100% on the `medium|high` band. Multi-repo validation pending. See [docs/blastradius-proof.md](docs/blastradius-proof.md) for the method + honest caveats.
|
|
126
|
+
|
|
127
|
+
Feature-flagged via `COMPOSTO_BLASTRADIUS=1` during the beta. Available as both CLI (`composto impact`, `composto index`) and MCP tool (`composto_blastradius`).
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
88
131
|
## Quality Proof
|
|
89
132
|
|
|
90
133
|
We tested 4 files from simple to hard. Same question, raw code vs IR: "What does this file do?"
|
|
@@ -184,7 +227,9 @@ Overall compression: 89.2%
|
|
|
184
227
|
L0 compression: 97.5%
|
|
185
228
|
AST engine: 51/51 files (0 regex fallback)
|
|
186
229
|
Languages: TypeScript, JavaScript, Python, Go, Rust
|
|
187
|
-
Tests:
|
|
230
|
+
Tests: 224 passing
|
|
231
|
+
BlastRadius v1: precision 90-96%, recall 99-100% on 3 repos
|
|
232
|
+
(composto, picomatch, zod; medium|high band)
|
|
188
233
|
```
|
|
189
234
|
|
|
190
235
|
---
|