causantic 0.4.0 → 0.4.2
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
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
**Long-term memory for Claude Code — local-first, graph-augmented, self-benchmarking.**
|
|
10
10
|
|
|
11
|
-
No cloud. No
|
|
11
|
+
No cloud. No data leaves your machine. Runs entirely on your hardware with optional per-chunk encryption. An optional Anthropic API key enables cluster topic labeling via Haiku — all core retrieval works without it.
|
|
12
12
|
|
|
13
13
|
<p align="center">
|
|
14
14
|
<strong>Long-term episodic memory for Claude Code</strong><br/>
|
|
@@ -74,7 +74,7 @@ Vector search finds chunks that *look similar*. BM25 keyword search finds chunks
|
|
|
74
74
|
**3. Sequential Causal Graph with Episodic Chain Walking**
|
|
75
75
|
Chunks are connected in a sequential linked list — intra-turn chunks chained sequentially, inter-turn edges linking last→first, cross-session edges bridging sessions. The `recall` tool walks this graph backward to reconstruct episodic narratives; `predict` walks forward. Chains are scored by cosine similarity per token, producing ordered narratives where each chunk adds new information.
|
|
76
76
|
|
|
77
|
-
**
|
|
77
|
+
**4. HDBSCAN Cluster-Guided Expansion**
|
|
78
78
|
Topic clusters group semantically related chunks. During retrieval, results expand through cluster siblings — surfacing context that neither vector nor keyword search found independently. Native TypeScript implementation (130× faster than hdbscan-ts).
|
|
79
79
|
|
|
80
80
|
**5. Self-Benchmarking Suite**
|
|
@@ -192,18 +192,18 @@ Causantic installs 14 Claude Code slash commands (via `npx causantic init`) for
|
|
|
192
192
|
|
|
193
193
|
| Skill | Description |
|
|
194
194
|
|-------|-------------|
|
|
195
|
-
| `/causantic-recall [query]` |
|
|
196
|
-
| `/causantic-search [query]` |
|
|
197
|
-
| `/causantic-predict <context>` | Surface
|
|
198
|
-
| `/causantic-explain [question]` | Answer "why" questions
|
|
195
|
+
| `/causantic-recall [query]` | Reconstruct how something happened — walks backward through causal chains (how did we solve X?) |
|
|
196
|
+
| `/causantic-search [query]` | Broad discovery — find everything memory knows about a topic (what do I know about X?) |
|
|
197
|
+
| `/causantic-predict <context>` | Surface what came after similar past situations — walks forward through causal chains (what's likely relevant next?) |
|
|
198
|
+
| `/causantic-explain [question]` | Answer "why" questions using memory + codebase (why does X work this way?) |
|
|
199
199
|
| `/causantic-debug [error]` | Search for prior encounters with an error (auto-extracts from conversation if no argument) |
|
|
200
200
|
| `/causantic-resume` | Resume interrupted work — start-of-session briefing |
|
|
201
|
-
| `/causantic-reconstruct [time]` |
|
|
202
|
-
| `/causantic-summary [time]` |
|
|
201
|
+
| `/causantic-reconstruct [time]` | Replay a past session chronologically by time range |
|
|
202
|
+
| `/causantic-summary [time]` | Factual recap of what was done across recent sessions |
|
|
203
203
|
| `/causantic-list-projects` | Discover available projects in memory |
|
|
204
204
|
| `/causantic-status` | Check system health and memory statistics |
|
|
205
205
|
| `/causantic-crossref [pattern]` | Search across all projects for reusable patterns |
|
|
206
|
-
| `/causantic-retro [scope]` |
|
|
206
|
+
| `/causantic-retro [scope]` | Surface recurring patterns, problems, and decisions across sessions |
|
|
207
207
|
| `/causantic-cleanup` | Memory-informed codebase review and cleanup plan |
|
|
208
208
|
| `/causantic-forget [query]` | Delete memory by topic, time range, or session (always previews first) |
|
|
209
209
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-templates.d.ts","sourceRoot":"","sources":["../../src/cli/skill-templates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,aAAa;IAC5B,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,gBAAgB,EAAE,aAAa,EA8xC3C,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"skill-templates.d.ts","sourceRoot":"","sources":["../../src/cli/skill-templates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,aAAa;IAC5B,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,gBAAgB,EAAE,aAAa,EA8xC3C,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CA8FhD"}
|
|
@@ -1330,24 +1330,24 @@ Long-term memory is available via the \`causantic\` MCP server.
|
|
|
1330
1330
|
### Skills
|
|
1331
1331
|
|
|
1332
1332
|
**Core retrieval:**
|
|
1333
|
-
- \`/causantic-recall [query]\` —
|
|
1334
|
-
- \`/causantic-search [query]\` —
|
|
1335
|
-
- \`/causantic-predict <context>\` — Surface
|
|
1333
|
+
- \`/causantic-recall [query]\` — Reconstruct how something happened — walks backward through causal chains (how did we solve X?)
|
|
1334
|
+
- \`/causantic-search [query]\` — Broad discovery — find everything memory knows about a topic (what do I know about X?)
|
|
1335
|
+
- \`/causantic-predict <context>\` — Surface what came after similar past situations — walks forward through causal chains (what's likely relevant next?)
|
|
1336
1336
|
|
|
1337
1337
|
**Understanding & analysis:**
|
|
1338
|
-
- \`/causantic-explain [question]\` — Answer "why" questions
|
|
1338
|
+
- \`/causantic-explain [question]\` — Answer "why" questions using memory + codebase (why does X work this way?)
|
|
1339
1339
|
- \`/causantic-debug [error]\` — Search for prior encounters with an error (auto-extracts from conversation if no argument)
|
|
1340
1340
|
|
|
1341
1341
|
**Session & project navigation:**
|
|
1342
|
-
- \`/causantic-resume\` — Resume interrupted work
|
|
1343
|
-
- \`/causantic-reconstruct [time range]\` —
|
|
1344
|
-
- \`/causantic-summary [time range]\` —
|
|
1342
|
+
- \`/causantic-resume\` — Resume interrupted work — start-of-session briefing
|
|
1343
|
+
- \`/causantic-reconstruct [time range]\` — Replay a past session chronologically by time range
|
|
1344
|
+
- \`/causantic-summary [time range]\` — Factual recap of what was done across recent sessions
|
|
1345
1345
|
- \`/causantic-list-projects\` — Discover available projects
|
|
1346
1346
|
- \`/causantic-status\` — Check system health and memory statistics
|
|
1347
1347
|
|
|
1348
1348
|
**Cross-cutting analysis:**
|
|
1349
1349
|
- \`/causantic-crossref [pattern]\` — Search across all projects for reusable patterns
|
|
1350
|
-
- \`/causantic-retro [scope]\` —
|
|
1350
|
+
- \`/causantic-retro [scope]\` — Surface recurring patterns, problems, and decisions across sessions
|
|
1351
1351
|
- \`/causantic-cleanup\` — Memory-informed codebase review and cleanup plan
|
|
1352
1352
|
|
|
1353
1353
|
**Memory management:**
|
|
@@ -1380,6 +1380,31 @@ Long-term memory is available via the \`causantic\` MCP server.
|
|
|
1380
1380
|
- The user explicitly provides all needed context
|
|
1381
1381
|
- First attempt at resolving a new error (try solving it first, check memory if stuck)
|
|
1382
1382
|
|
|
1383
|
+
### CLI Commands
|
|
1384
|
+
|
|
1385
|
+
When the user asks to run Causantic operations from the command line:
|
|
1386
|
+
|
|
1387
|
+
\`\`\`
|
|
1388
|
+
npx causantic init — Setup wizard (MCP, hooks, skills, import)
|
|
1389
|
+
npx causantic serve — Start the MCP server
|
|
1390
|
+
npx causantic dashboard — Launch the web dashboard
|
|
1391
|
+
npx causantic batch-ingest [dir] — Ingest all sessions from a directory
|
|
1392
|
+
npx causantic ingest <path> — Ingest a single session or project
|
|
1393
|
+
npx causantic recall <query> — Query memory from the CLI
|
|
1394
|
+
npx causantic stats — Show memory statistics
|
|
1395
|
+
npx causantic health — Check system health
|
|
1396
|
+
npx causantic config [subcommand] — Manage configuration
|
|
1397
|
+
npx causantic maintenance [status|run|daemon] — Maintenance tasks
|
|
1398
|
+
npx causantic benchmark-collection [--quick|--standard|--full] — Run benchmarks
|
|
1399
|
+
npx causantic encryption [subcommand] — Manage database encryption
|
|
1400
|
+
npx causantic export — Export memory data
|
|
1401
|
+
npx causantic import <file> — Import memory data
|
|
1402
|
+
npx causantic hook <name> — Run a hook manually
|
|
1403
|
+
npx causantic uninstall — Remove Causantic and all its artifacts
|
|
1404
|
+
\`\`\`
|
|
1405
|
+
|
|
1406
|
+
Run \`npx causantic <command> --help\` for command-specific options.
|
|
1407
|
+
|
|
1383
1408
|
### Combining Memory with Other Tools
|
|
1384
1409
|
|
|
1385
1410
|
Memory provides historical context, not current code state. After retrieving memory:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-templates.js","sourceRoot":"","sources":["../../src/cli/skill-templates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C;QACE,OAAO,EAAE,kBAAkB;QAC3B,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCZ;KACE;IACD;QACE,OAAO,EAAE,kBAAkB;QAC3B,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCZ;KACE;IACD;QACE,OAAO,EAAE,mBAAmB;QAC5B,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCZ;KACE;IACD;QACE,OAAO,EAAE,mBAAmB;QAC5B,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEZ;KACE;IACD;QACE,OAAO,EAAE,iBAAiB;QAC1B,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDZ;KACE;IACD;QACE,OAAO,EAAE,kBAAkB;QAC3B,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDZ;KACE;IACD;QACE,OAAO,EAAE,uBAAuB;QAChC,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DZ;KACE;IACD;QACE,OAAO,EAAE,yBAAyB;QAClC,OAAO,EAAE;;;;;;;;;;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