@vishnuvmx/recall-memory 0.0.0-stage → 0.1.0

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.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +386 -2
  3. package/dist/cli/index.d.ts +2 -0
  4. package/dist/cli/index.js +451 -0
  5. package/dist/core/agent.d.ts +21 -0
  6. package/dist/core/agent.js +140 -0
  7. package/dist/core/checkpoint.d.ts +42 -0
  8. package/dist/core/checkpoint.js +233 -0
  9. package/dist/core/config.d.ts +5 -0
  10. package/dist/core/config.js +36 -0
  11. package/dist/core/cost.d.ts +19 -0
  12. package/dist/core/cost.js +78 -0
  13. package/dist/core/doctor.d.ts +7 -0
  14. package/dist/core/doctor.js +69 -0
  15. package/dist/core/git.d.ts +27 -0
  16. package/dist/core/git.js +107 -0
  17. package/dist/core/index-builder.d.ts +11 -0
  18. package/dist/core/index-builder.js +84 -0
  19. package/dist/core/init.d.ts +13 -0
  20. package/dist/core/init.js +52 -0
  21. package/dist/core/landmarks.d.ts +19 -0
  22. package/dist/core/landmarks.js +323 -0
  23. package/dist/core/mapper.d.ts +28 -0
  24. package/dist/core/mapper.js +357 -0
  25. package/dist/core/memory.d.ts +44 -0
  26. package/dist/core/memory.js +199 -0
  27. package/dist/core/project.d.ts +12 -0
  28. package/dist/core/project.js +34 -0
  29. package/dist/core/retrieval.d.ts +27 -0
  30. package/dist/core/retrieval.js +180 -0
  31. package/dist/core/seed.d.ts +25 -0
  32. package/dist/core/seed.js +196 -0
  33. package/dist/core/service.d.ts +76 -0
  34. package/dist/core/service.js +228 -0
  35. package/dist/core/where.d.ts +14 -0
  36. package/dist/core/where.js +86 -0
  37. package/dist/index.d.ts +11 -0
  38. package/dist/index.js +11 -0
  39. package/dist/mcp/server.d.ts +65 -0
  40. package/dist/mcp/server.js +121 -0
  41. package/dist/schemas/index.d.ts +68 -0
  42. package/dist/schemas/index.js +43 -0
  43. package/dist/templates/index.d.ts +21 -0
  44. package/dist/templates/index.js +62 -0
  45. package/dist/utils/fs.d.ts +15 -0
  46. package/dist/utils/fs.js +73 -0
  47. package/dist/utils/managed.d.ts +5 -0
  48. package/dist/utils/managed.js +41 -0
  49. package/dist/utils/secrets.d.ts +3 -0
  50. package/dist/utils/secrets.js +23 -0
  51. package/package.json +65 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 vishnuvmx
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,387 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <p align="center">
4
+ <img src="recall.png" alt="Recall Logo" width="100" />
5
+ </p>
6
+
7
+ # Recall: Zero-Maintenance Project Memory for AI Coding Agents
8
+
9
+ **Local-first, zero-maintenance project memory for AI coding agents.**
10
+
11
+ Markdown-based decisions, conventions, and codebase topology — retrieved on demand.
12
+ Init once — your AI agent does the reading, learning, and checkpointing.
13
+
14
+ <!-- Badges -->
15
+
16
+ [![Status: Alpha](https://img.shields.io/badge/status-alpha%20(v0.1.0)-orange.svg)](#-about)
17
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
18
+ [![Node](https://img.shields.io/badge/node-%3E%3D20-339933?logo=node.js&logoColor=white)](https://nodejs.org)
19
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org)
20
+ [![Tests](https://img.shields.io/badge/tests-vitest-6E9F18?logo=vitest&logoColor=white)](https://vitest.dev)
21
+ [![Local only](https://img.shields.io/badge/network-zero%20calls-success)](docs/SECURITY.md)
22
+ [![Storage](https://img.shields.io/badge/storage-local%20markdown-orange)](docs/ARCHITECTURE.md)
23
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](#-contributing)
24
+
25
+ <br />
26
+
27
+ [Quick Start](#-quick-start) •
28
+ [Commands](#-commands-reference) •
29
+ [Agent Compatibility](#-agent-compatibility) •
30
+ [Docs](#-documentation) •
31
+ [Contributing](#-contributing)
32
+
33
+ </div>
34
+
35
+ ---
36
+
37
+ ## 📖 Table of Contents
38
+
39
+ - [About](#-about)
40
+ - [Cold Start & Seeding](#-cold-start--seeding)
41
+ - [Features](#-features)
42
+ - [Installation](#-installation)
43
+ - [Quick Start](#-quick-start)
44
+ - [Directory Structure](#-directory-structure)
45
+ - [Commands Reference](#-commands-reference)
46
+ - [Agent Compatibility](#-agent-compatibility)
47
+ - [How Retrieval Works Without Embeddings](#-how-retrieval-works-without-embeddings)
48
+ - [Supported Landmark Languages](#-supported-landmark-languages)
49
+ - [Token Budgets](#-token-budgets--priority-truncation)
50
+ - [Known Limitations & Trade-offs](#-known-limitations--trade-offs)
51
+ - [Why Not Just Use X?](#-why-not-just-use-x)
52
+ - [Development](#-development)
53
+ - [Documentation](#-documentation)
54
+ - [Contributing](#-contributing)
55
+ - [Security](#-security)
56
+ - [License](#-license)
57
+
58
+ ---
59
+
60
+ ## 🎯 About
61
+
62
+ > [!NOTE]
63
+ > **Status: Alpha (v0.1.0)**. Recall gives AI coding agents persistent project memory in plain Markdown inside `.recall/`.
64
+
65
+ AI coding agents forget decisions between sessions and re-scan whole repositories. Recall gives them structured memory without the prompt bloat or Git-like ceremony.
66
+
67
+ - **Init once, AI agents do the rest:** Run `recall init` once. Your agent automatically looks up architecture context when needed, records non-obvious learnings and bugfixes, and checkpoints sessions via hooks. Zero manual maintenance.
68
+ - **Cache-stable & token-disciplined:** Always-on prompt footprint is under **~120 tokens** and byte-stable across sessions (preserving provider prompt caching). No prompt mutation, no mandatory turn-ending tool calls.
69
+ - **No network calls, no vector DB:** Plain Markdown in `.recall/`, deterministic stem search (~0.2 ms), and local symbol landmark jumps (`recall where`).
70
+
71
+ ---
72
+
73
+ ## 📊 Measured Token Footprint (`recall cost`)
74
+
75
+ Never trust unmeasured claims about "token savings". Run `recall cost` in any Recall-enabled repo to inspect the exact footprint:
76
+
77
+ ```text
78
+ Always-on (sent with every agent turn):
79
+ AGENTS.md (Recall block only) ~ 97 tok
80
+ skill name + description ~ 18 tok
81
+ TOTAL ~ 115 tok
82
+
83
+ MCP (only if configured):
84
+ MCP tool schemas (3 tools) ~ 184 tok (only if `recall serve` is configured)
85
+
86
+ On-demand (only when the agent asks):
87
+ skill body ~ 282 tok (loaded when the agent picks the skill)
88
+ `recall context` response ~ 400 tok (hard cap)
89
+ .recall/CURRENT_STATE.md ~ 186 tok (read only for continue/resume)
90
+ .recall/PROJECT_MAP.md ~ 2191 tok (for humans; agents use `recall where`)
91
+ ```
92
+
93
+ - **Byte-stable always-on rules:** Recall never writes dynamic session state into your always-on prompt, protecting your provider's prompt cache.
94
+ - **Pull, not push:** Agents never read `PROJECT_MAP.md` upfront; they call `recall where <name>` for targeted `file:line` rows (~50 tokens).
95
+ - **Capped context responses:** `recall context` returns compact hits capped at ~400 tokens.
96
+
97
+ ---
98
+
99
+ ## 🚫 When NOT to use Recall
100
+
101
+ Be realistic about whether your repository needs Recall:
102
+
103
+ - **Small repos (<15 files):** Your agent can already fit all relevant source files in its context window. Recall adds overhead for zero gain.
104
+ - **Single-file tasks or routine typo fixes:** Agents do not need to consult memory or search landmarks.
105
+ - **One-off exploratory scripts:** If code is discarded in hours, persistent memory provides no ROI.
106
+
107
+ **Where Recall actually pays off:**
108
+ - Repositories with files >300 lines of code (targeted `recall where` jumps).
109
+ - Non-obvious architectural invariants, API quirks, or rejected approaches that agents repeatedly get wrong across different chats.
110
+ - Multi-developer teams aligning multiple AI agents (Cursor, Antigravity, Claude Code, Windsurf) to the same project conventions.
111
+
112
+ ---
113
+
114
+ ## ✨ Features
115
+
116
+ - ⚡ **Init Once, Zero Maintenance**: Run `recall init` once. Agents autonomously search context, record learnings, and checkpoint via hooks.
117
+ - 🗂️ **Structured memory**: decisions, lessons, conventions, bugfixes, failed approaches, and design tokens.
118
+ - 🔎 **Fast offline retrieval**: deterministic keyword search with suffix stemming, capped at ~400 tokens per lookup.
119
+ - 🧭 **Targeted symbol jumps**: `recall where <symbol>` returns live cached `file:line` rows instead of reading a 2,000-token file map.
120
+ - 🔄 **Autonomous de-duplication**: Repeated agent writes update existing memories in place rather than bloating future retrieval turns.
121
+ - 🔌 **Ultra-lean MCP server**: 3 terse tools (`recall_context`, `recall_where`, `recall_remember`) keeping schema overhead under 190 tokens.
122
+ - 🛡️ **Safety guardrails**: best-effort secret regex scanning and non-destructive Git rollbacks via `recall undo`.
123
+
124
+ ---
125
+
126
+ ## 📦 Installation
127
+
128
+ **Requirements:** Node.js ≥ 20 and Git (recommended).
129
+
130
+ ### From npm (available from the 22 Oct launch)
131
+
132
+ ```bash
133
+ npm install -g @vishnuvmx/recall-memory # exposes the `recall` command
134
+ # or run without installing:
135
+ npx @vishnuvmx/recall-memory init
136
+ ```
137
+
138
+ ### From source
139
+
140
+ ```bash
141
+ git clone https://github.com/vishnuvmx/recall-memory.git
142
+ cd recall-memory
143
+ npm install
144
+ npm run build
145
+ npm link # exposes `recall` globally
146
+ ```
147
+
148
+ ---
149
+
150
+ ## 🚀 Quick Start
151
+
152
+ ```bash
153
+ cd /path/to/my-project
154
+
155
+ # 1. Initialize Recall in your repository
156
+ recall init
157
+
158
+ # 2. Add an architectural decision or lesson
159
+ recall remember "Keep rendering separate from annotation state" --type decision --tag pdf
160
+
161
+ # 3. Retrieve context on demand
162
+ recall context "PDF annotation scaling"
163
+
164
+ # 4. Check repo memory health & status
165
+ recall status
166
+ ```
167
+
168
+ ---
169
+
170
+ ## 🗃️ Directory Structure
171
+
172
+ Running `recall init` creates:
173
+
174
+ ```text
175
+ .recall/
176
+ config.json # Core settings (e.g. target agent instruction file)
177
+ MEMORY.md # Human-curated invariants & negative architectural boundaries
178
+ INDEX.md # Generated catalog of active decisions, lessons, and conventions
179
+ PROJECT_MAP.md # Generated codebase topology, entry points, design tokens, landmarks
180
+ CURRENT_STATE.md # Single-snapshot iteration state (progress, active files, next steps)
181
+ rules/ # Project conventions and rules
182
+ decisions/ # Architectural decision records
183
+ lessons/ # Lessons learned and documented failed approaches
184
+ tasks/ # Task definitions and status
185
+ sessions/
186
+ session-log.md # Rolling 14-day history of session checkpoints (auto-pruned as log grows)
187
+ logs/
188
+ CHANGELOG.md # Local memory operation log
189
+ ```
190
+
191
+ Memory files are Markdown with validated YAML frontmatter (`id, title, type, created, updated, tags, status, verification, sources`).
192
+
193
+ ---
194
+
195
+ ## 🧰 Commands Reference
196
+
197
+ | Command | What it does |
198
+ | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
199
+ | `recall init [--no-agent]` | Scaffolds `.recall/`, maps the project, and installs lean, cache-stable agent instructions. One command; agents handle the rest. |
200
+ | `recall cost [--json]` | Inspects the exact token footprint of Recall in your repo: always-on instructions vs MCP schemas vs on-demand lookups. |
201
+ | `recall where <name> [-n N]` | Fast symbol & file locator. Returns live cached `file:line` rows so agents jump straight to code without reading `PROJECT_MAP.md`. |
202
+ | `recall remember <text> [-t title] [--type T] [--tag X]…` | Saves a memory. Active immediately in default `auto` mode; similar titles update in place. Pass `--proposed` for review mode. |
203
+ | `recall context <task> [-n N] [--verbose] [--format json]` | Local keyword and stem search. Returns compact results hard-capped at ~400 tokens by default. Pass `--verbose` for human scores. |
204
+ | `recall seed [--from git\|docs\|all] [-n N] [--dry-run]` | Automatically mines Git commit history and documentation (`docs/`) into proposed architectural memories. Solves the cold-start problem. |
205
+ | `recall review [--approve-all] [--archive-all]` | Optional audit command: inspects pending proposed memories and allows batch activation or archiving. |
206
+ | `recall approve <id>` | Promotes a `proposed` memory to `active` (only needed if running in gated `review` mode). |
207
+ | `recall archive <id>` | Sets status to `archived`. Kept on disk for history but excluded from default search. Never deletes files. |
208
+ | `recall checkpoint [summary] [--auto] [--hook]` | Records an iteration snapshot. Run automatically by the agent `Stop` hook; manual invocation is optional. |
209
+ | `recall prune [--days D] [--max N]` | Prunes entries in `session-log.md` older than the retention window (default: 14 days) or exceeding max entries (default: 50). |
210
+ | `recall status [--json]` | Displays memory counts, index health, agent integration status, and uncommitted memory changes. |
211
+ | `recall map` | Regenerates `PROJECT_MAP.md` directory layout and file line landmarks. |
212
+ | `recall rebuild` | Deterministically rebuilds `INDEX.md`. Preserves user notes outside markers; reports malformed files without deleting them. |
213
+ | `recall undo [--dry-run]` | Safely discards uncommitted changes and removes untracked files in `.recall/`. Never touches gitignored files or project source code. |
214
+ | `recall doctor` | Diagnoses configuration, directories, frontmatter, map, state, and Git tracking. Suggests fixes without destructive auto-repairs. |
215
+ | `recall serve` | Ultra-lean stdio MCP server exposing `recall_context`, `recall_where`, and `recall_remember` (<190 tok schema overhead). |
216
+
217
+ **Memory types:** `fact | decision | convention | lesson | bugfix | failed_approach | task | design_system`
218
+ **Lifecycle:** `proposed | active | superseded | archived`
219
+ **Verification:** `unverified | verified | needs_review`
220
+
221
+ ---
222
+
223
+ ## 🤖 Agent Compatibility
224
+
225
+ | Agent / Tool | Native File | How to Configure Recall |
226
+ | :--------------------- | :----------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
227
+ | **Google Antigravity** | `.agents/rules/` + `.agents/skills/` | Native. `recall init` scaffolds an always-on rule (`.agents/rules/recall.md`) and on-demand skill (`.agents/skills/recall/SKILL.md`) alongside `AGENTS.md`. |
228
+ | **Claude Code** | `CLAUDE.md` | If `CLAUDE.md` exists, `recall init` appends `@AGENTS.md` into it. Otherwise add `@AGENTS.md` to `CLAUDE.md` or set `"agentFile": "CLAUDE.md"` in `.recall/config.json`. |
229
+ | **Cursor** | `.cursorrules` / `AGENTS.md` | Set `"agentFile": ".cursorrules"` in `.recall/config.json` or let Cursor read `AGENTS.md`. |
230
+ | **Windsurf / Cascade** | `.windsurfrules` / `AGENTS.md` | Reads `AGENTS.md` natively, or set `"agentFile": ".windsurfrules"`. |
231
+ | **GitHub Copilot** | `.github/copilot-instructions.md` | Set `"agentFile": ".github/copilot-instructions.md"`. |
232
+ | **Any MCP Client** | Stdio MCP | Register `recall serve` in your editor's MCP settings. |
233
+
234
+ Example MCP configuration:
235
+
236
+ ```json
237
+ {
238
+ "mcpServers": {
239
+ "recall": { "command": "recall", "args": ["serve"] }
240
+ }
241
+ }
242
+ ```
243
+
244
+ ### Existing agent files
245
+
246
+ `recall init` uses explicit markers:
247
+
248
+ ```markdown
249
+ <!-- recall:begin -->
250
+
251
+ ... managed instructions ...
252
+
253
+ <!-- recall:end -->
254
+ ```
255
+
256
+ If `AGENTS.md` already exists, any instructions outside those boundaries are strictly preserved.
257
+
258
+ ---
259
+
260
+ ## 🔍 How Retrieval Works Without Embeddings
261
+
262
+ Recall avoids vector databases and remote embedding APIs by combining deterministic indexing with local linguistic normalization:
263
+
264
+ 1. **Tokenization & stopwords:** strips punctuation, normalizes case, filters common English stopwords.
265
+ 2. **Suffix stemming:** words with common suffixes (`-ing`, `-ed`, `-s`, `-es`, `-ies`) match root forms (query `"scale"` matches `"scaling"`; `"token"` matches `"tokens"`).
266
+ 3. **Field weighting:** exact title (15 pts) > partial title (8) > tag match (2) > heading match (2) > body occurrence (1 each, max 3).
267
+ 4. **Lifecycle & verification boosts:** active memories get full score; verified memories get +0.5; proposed and superseded are discounted; archived are excluded by default.
268
+
269
+ ---
270
+
271
+ ## 🌐 Supported Landmark Languages
272
+
273
+ The landmark engine parses symbols in files with 300+ lines across:
274
+
275
+ | Language | Extensions | Symbols |
276
+ | --------------------------- | ------------------------- | --------------------------------------------------------- |
277
+ | **Dart** | `.dart` | Classes, states, widget `build` methods, handlers |
278
+ | **Kotlin** | `.kt` | Classes, data classes, `suspend fun`, objects, interfaces |
279
+ | **Java** | `.java` | Classes, interfaces, public/protected methods |
280
+ | **Swift** | `.swift` | Classes, structs, protocols, `func` |
281
+ | **TypeScript / JavaScript** | `.ts` `.tsx` `.js` `.jsx` | Classes, exported functions, arrow components, methods |
282
+ | **Python** | `.py` | Classes, `def` functions |
283
+ | **Go** | `.go` | Struct types, functions/methods |
284
+ | **Rust** | `.rs` | Structs, enums, traits, `fn` |
285
+ | **C#** | `.cs` | Classes, interfaces, structs, records, `async` methods |
286
+ | **C / C++** | `.c` `.cpp` `.h` `.hpp` | Classes, structs, functions |
287
+ | **PHP** | `.php` | Classes, interfaces, traits, functions/methods |
288
+ | **Ruby** | `.rb` | Classes, modules, `def` methods |
289
+
290
+ Unsupported file types are still mapped in the directory tree; symbol landmarking is skipped cleanly without error.
291
+
292
+ ---
293
+
294
+ ## 📏 Token Budgets & Priority Truncation
295
+
296
+ | Document | Target Footprint | Guardrail |
297
+ | :----------------- | :------------------ | :----------------------------------------------------------------------------------------- |
298
+ | `CURRENT_STATE.md` | ~200–300 tokens | Capped single snapshot. History streams to `session-log.md` (rolling 14-day window). |
299
+ | `session-log.md` | Rolling window | Auto-pruned beyond 14 days or 50 entries to keep disk and context lean. |
300
+ | `PROJECT_MAP.md` | ~1,500–1,700 tokens | Priority truncation protects landmarks first. Hard ceiling of 5,600 chars (~1,500 tokens). |
301
+ | `MEMORY.md` | ~300–500 tokens | Human-curated invariants only. Recommended < 4 KB. |
302
+ | `AGENTS.md` block | ~400–450 tokens | Recommended < 4 KB. |
303
+
304
+ **Total initial orientation footprint:** Typically **1,500–3,000 tokens** across files.
305
+
306
+ ---
307
+
308
+ ## ⚠️ Known Limitations & Trade-offs
309
+
310
+ 1. **Mid-task line drift:** `recall checkpoint` recalculates landmarks at session end, but mid-task edits shift lines below the edit. Treat landmarks as symbol anchors (`L5240: _toggleEditMode`) with a rough ±50-line window, and search for the symbol nearby rather than reading the whole file.
311
+ 2. **Silent sequential ID collisions across branches:** Memory IDs increment sequentially (`mem_001`, `mem_002`, etc.). Because filenames include title slugs (e.g. `mem_015-auth.md` vs `mem_015-cache.md`), Git sees two distinct files and will merge them without conflict. The collision is silent until `recall doctor` or `recall status` reports a duplicate ID, requiring manual renumbering of one file.
312
+ 3. **Local vs. shared state:** `CURRENT_STATE.md` and `sessions/` are local to your machine and branch. They do not sync across teammates or fresh clones.
313
+ 4. **Proposal gate bypass with shell access:** The stdio MCP interface strictly uses `recall_propose` (`proposed`), and `RECALL_AGENT=1` forces `proposed` status across operations. However, any agent operating with direct shell access can pass `--active` or write Markdown files directly to disk. Human code review on Pull Requests remains the primary line of defense.
314
+ 5. **No automated seeding command:** `recall init` scaffolds an empty memory structure. Extracting initial decisions from existing ADRs or commit history is a manual prompting exercise rather than a built-in automated command.
315
+
316
+ ---
317
+
318
+ ## ⚖️ Why Not Just Use X?
319
+
320
+ | Alternative | Difference |
321
+ | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
322
+ | **Plain `AGENTS.md` / `CLAUDE.md`** | A monolithic rules file grows monotonically and costs prompt budget every turn. Recall adds modular records, on-demand retrieval, codebase topology, and a proposal gate. |
323
+ | **Aider's Repo Map** | Aider builds an in-memory Tree-sitter map per session. Recall adds persistent, Git-versioned decisions, design tokens, bugfix history, and iteration progress. |
324
+ | **Claude Code auto-memory** | Machine-local (`~/.claude/`), unversioned, not shared. Recall lives in `.recall/`, versioned in Git and usable across all AI tools. |
325
+ | **Cursor codebase index** | Proprietary cloud vector embeddings. Recall is 100% offline, zero-cost, and reviewable via `git diff`. |
326
+
327
+ ---
328
+
329
+ ## 🛠️ Development
330
+
331
+ ```bash
332
+ npm install # install dependencies
333
+ npm run build # compile TypeScript to dist/
334
+ npm run typecheck # type-check without emitting
335
+ npm test # run the Vitest suite
336
+ npm run bench # run benchmarks
337
+ ```
338
+
339
+ ### Project layout
340
+
341
+ ```text
342
+ src/
343
+ cli/ # Commander-based CLI entry (recall ...)
344
+ core/ # Memory store, search, map, git, checkpoint logic
345
+ mcp/ # Stdio MCP server
346
+ schemas/ # Zod schemas for frontmatter and config
347
+ templates/ # Scaffolding templates for `recall init`
348
+ utils/ # Shared helpers
349
+ tests/ # Vitest test suite
350
+ docs/ # Architecture, benchmarks, security specifications
351
+ scripts/ # Benchmark scripts
352
+ ```
353
+
354
+ **Tech stack:** TypeScript (ESM), [Commander](https://github.com/tj/commander.js), [gray-matter](https://github.com/jonschlinkert/gray-matter), [Zod](https://zod.dev), [Vitest](https://vitest.dev).
355
+
356
+ ---
357
+
358
+ ## 📚 Documentation
359
+
360
+ - [Architecture & Technical Specification](docs/ARCHITECTURE.md): orientation loop, landmark protocol, competitor matrix, retrieval mechanics.
361
+ - [Empirical Benchmarks & Token Experiments](docs/BENCHMARKS.md): hardware benchmarks, 80k-LOC metrics, token orientation model.
362
+ - [Security & Governance Model](docs/SECURITY.md): threat model, memory-poisoning defense, secret scanning, CODEOWNERS governance.
363
+
364
+ ---
365
+
366
+ ## 🤝 Contributing
367
+
368
+ Contributions are welcome!
369
+
370
+ 1. Fork the repository and create a feature branch: `git checkout -b feat/my-change`
371
+ 2. Make your changes and add tests under `tests/`.
372
+ 3. Ensure `npm run typecheck` and `npm test` pass.
373
+ 4. Commit with a clear message and open a Pull Request describing the change and motivation.
374
+
375
+ Please open an issue first for large changes or new features. Never include credentials or secrets in memory files or commits.
376
+
377
+ ---
378
+
379
+ ## 🔒 Security
380
+
381
+ Recall performs no network calls and rejects secret-looking content in memories via regex scanning. To report a vulnerability, please open a private security advisory on GitHub rather than a public issue. See [docs/SECURITY.md](docs/SECURITY.md) for the full threat model.
382
+
383
+ ---
384
+
385
+ ## 📄 License
386
+
387
+ Released under the [MIT License](LICENSE).
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};