amalfa 1.0.1 → 1.0.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.
Files changed (83) hide show
  1. package/README.md +226 -263
  2. package/docs/AGENT-METADATA-PATTERNS.md +1021 -0
  3. package/docs/CONFIG_E2E_VALIDATION.md +147 -0
  4. package/docs/CONFIG_UNIFICATION.md +187 -0
  5. package/docs/CONFIG_VALIDATION.md +103 -0
  6. package/docs/LEGACY_DEPRECATION.md +174 -0
  7. package/docs/MCP_SETUP.md +317 -0
  8. package/docs/QUICK_START_MCP.md +168 -0
  9. package/docs/SESSION-2026-01-06-METADATA-PATTERNS.md +346 -0
  10. package/docs/SETUP.md +464 -0
  11. package/docs/SETUP_COMPLETE.md +464 -0
  12. package/docs/VISION-AGENT-LEARNING.md +1242 -0
  13. package/docs/_current-config-status.md +93 -0
  14. package/package.json +6 -3
  15. package/polyvis.settings.json.bak +38 -0
  16. package/src/cli.ts +103 -21
  17. package/src/config/defaults.ts +52 -12
  18. package/src/core/VectorEngine.ts +18 -9
  19. package/src/mcp/index.ts +62 -7
  20. package/src/resonance/DatabaseFactory.ts +3 -4
  21. package/src/resonance/db.ts +4 -4
  22. package/src/resonance/services/vector-daemon.ts +151 -0
  23. package/src/utils/DaemonManager.ts +147 -0
  24. package/src/utils/ZombieDefense.ts +5 -1
  25. package/:memory: +0 -0
  26. package/:memory:-shm +0 -0
  27. package/:memory:-wal +0 -0
  28. package/CHANGELOG.md.old +0 -43
  29. package/README.old.md +0 -112
  30. package/ROADMAP.md +0 -316
  31. package/TEST_PLAN.md +0 -561
  32. package/agents.config.json +0 -11
  33. package/drizzle/0000_minor_iron_fist.sql +0 -19
  34. package/drizzle/meta/0000_snapshot.json +0 -139
  35. package/drizzle/meta/_journal.json +0 -13
  36. package/example_usage.ts +0 -39
  37. package/experiment.sh +0 -35
  38. package/hello +0 -2
  39. package/index.html +0 -52
  40. package/knowledge/excalibur.md +0 -12
  41. package/plans/experience-graph-integration.md +0 -60
  42. package/prompts/gemini-king-mode-prompt.md +0 -46
  43. package/public/docs/MCP_TOOLS.md +0 -372
  44. package/schemas/README.md +0 -20
  45. package/schemas/cda.schema.json +0 -84
  46. package/schemas/conceptual-lexicon.schema.json +0 -75
  47. package/scratchpads/dummy-debrief-boxed.md +0 -39
  48. package/scratchpads/dummy-debrief.md +0 -27
  49. package/scratchpads/scratchpad-design.md +0 -50
  50. package/scratchpads/scratchpad-scrolling.md +0 -20
  51. package/scratchpads/scratchpad-toc-disappearance.md +0 -23
  52. package/scratchpads/scratchpad-toc.md +0 -28
  53. package/scratchpads/test_gardener.md +0 -7
  54. package/src/core/LLMClient.ts +0 -93
  55. package/src/core/TagEngine.ts +0 -56
  56. package/src/db/schema.ts +0 -46
  57. package/src/gardeners/AutoTagger.ts +0 -116
  58. package/src/pipeline/HarvesterPipeline.ts +0 -101
  59. package/src/pipeline/Ingestor.ts +0 -555
  60. package/src/resonance/cli/ingest.ts +0 -41
  61. package/src/resonance/cli/migrate.ts +0 -54
  62. package/src/resonance/config.ts +0 -40
  63. package/src/resonance/daemon.ts +0 -236
  64. package/src/resonance/pipeline/extract.ts +0 -89
  65. package/src/resonance/pipeline/transform_docs.ts +0 -60
  66. package/src/resonance/services/tokenizer.ts +0 -159
  67. package/src/resonance/transform/cda.ts +0 -393
  68. package/src/utils/EnvironmentVerifier.ts +0 -67
  69. package/substack/substack-playbook-1.md +0 -95
  70. package/substack/substack-playbook-2.md +0 -78
  71. package/tasks/ui-investigation.md +0 -26
  72. package/test-db +0 -0
  73. package/test-db-shm +0 -0
  74. package/test-db-wal +0 -0
  75. package/tests/canary/verify_pinch_check.ts +0 -44
  76. package/tests/fixtures/ingest_test.md +0 -12
  77. package/tests/fixtures/ingest_test_boxed.md +0 -13
  78. package/tests/fixtures/safety_test.md +0 -45
  79. package/tests/fixtures/safety_test_boxed.md +0 -49
  80. package/tests/fixtures/tagged_output.md +0 -49
  81. package/tests/fixtures/tagged_test.md +0 -49
  82. package/tests/mcp-server-settings.json +0 -8
  83. package/verify-embedder.ts +0 -54
package/README.md CHANGED
@@ -2,371 +2,334 @@
2
2
 
3
3
  **A Memory Layer For Agents**
4
4
 
5
- A local-first knowledge graph engine that transforms your markdown files into a searchable memory layer for AI agents. Built for privacy, speed, and zero API costs.
5
+ MCP server that gives AI agents semantic access to project knowledge graphs.
6
6
 
7
- [![NPM Version](https://img.shields.io/npm/v/amalfa)](https://www.npmjs.com/package/amalfa)
8
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ ---
9
8
 
10
- ## Why AMALFA?
9
+ ## Status
11
10
 
12
- AI agents need memory. AMALFA provides:
11
+ **v1.0 published** - Available on npm
13
12
 
14
- - **🔒 Privacy-first**: Your data never leaves your machine
15
- - **⚡️ Fast**: SQLite + vector embeddings for sub-second search
16
- - **💰 Zero cost**: No API calls, no subscriptions
17
- - **📝 Markdown native**: Your notes are the source of truth
18
- - **🔄 Real-time**: File watcher keeps your knowledge graph up-to-date
19
- - **🤖 Agent-ready**: MCP protocol integration with Claude Desktop
13
+ [![npm](https://img.shields.io/npm/v/amalfa?logo=npm)](https://www.npmjs.com/package/amalfa)
14
+ [![downloads](https://img.shields.io/npm/dm/amalfa)](https://www.npmjs.com/package/amalfa)
20
15
 
21
- ## Quick Start
16
+ ---
22
17
 
23
- ### Installation
18
+ ## What is Amalfa?
24
19
 
25
- ```bash
26
- # Install globally
27
- bun add -g amalfa
20
+ Amalfa is a **Model Context Protocol (MCP) server** that provides AI agents with:
28
21
 
29
- # Or use with bunx
30
- bunx amalfa --help
31
- ```
22
+ - 🔍 **Semantic search** over markdown documentation
23
+ - 📊 **Graph traversal** of relationships between documents
24
+ - 🧠 **Agent continuity** across sessions via persistent memory
25
+ - ⚡ **Auto-augmentation** of metadata (tags, links, clusters)
26
+ - 🏷️ **Latent space tagging** for emergent organization
32
27
 
33
- ### Initialize Your Knowledge Graph
28
+ Built with **Bun + SQLite + FastEmbed**.
34
29
 
35
- ```bash
36
- # 1. Navigate to your project with markdown files
37
- cd ~/Documents/my-notes
30
+ ---
38
31
 
39
- # 2. Initialize AMALFA (creates .amalfa/resonance.db)
40
- amalfa init
32
+ ## The Problem
41
33
 
42
- # 3. Start the file watcher (optional)
43
- amalfa daemon start
34
+ **Current state:** AI agents lose context between sessions. Knowledge resets. Same problems get re-solved.
44
35
 
45
- # 4. Connect to Claude Desktop (see Configuration below)
46
- ```
47
-
48
- ## Configuration
49
-
50
- Create `amalfa.config.json` in your project root:
51
-
52
- ```json
53
- {
54
- "sources": ["./docs", "./notes"],
55
- "database": ".amalfa/resonance.db",
56
- "embeddings": {
57
- "model": "BAAI/bge-small-en-v1.5",
58
- "dimensions": 384
59
- },
60
- "watch": {
61
- "enabled": true,
62
- "debounce": 1000
63
- },
64
- "excludePatterns": ["node_modules", ".git", ".amalfa"]
65
- }
66
- ```
36
+ **Amalfa solves this:** Agents write structured reflections (briefs work → debriefs → playbooks). Amalfa indexes this as a queryable knowledge graph with semantic search.
67
37
 
68
- **New in v1.0.1:** Multi-source support! Use `sources` array to scan multiple directories. Single `source` string still works (auto-migrates).
38
+ **Result:** Agents can query "What did we learn about authentication?" and get ranked, relevant past work—even across different agents and sessions.
69
39
 
70
- Or use TypeScript:
71
-
72
- ```typescript
73
- // amalfa.config.ts
74
- export default {
75
- source: "./docs",
76
- database: ".amalfa/resonance.db",
77
- // ... rest of config
78
- };
79
- ```
40
+ ---
80
41
 
81
- ### Claude Desktop Integration
42
+ ## Core Concepts
82
43
 
83
- Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
44
+ ### Brief-Debrief-Playbook Pattern
84
45
 
85
- ```json
86
- {
87
- "mcpServers": {
88
- "amalfa": {
89
- "command": "amalfa",
90
- "args": ["serve"]
91
- }
92
- }
93
- }
46
+ ```
47
+ Brief (task spec)
48
+
49
+ Work (implementation)
50
+
51
+ Debrief (what we learned)
52
+
53
+ Playbook (codified patterns)
54
+
55
+ Future briefs (informed by playbooks)
94
56
  ```
95
57
 
96
- Restart Claude Desktop, and you'll see AMALFA tools available in the conversation.
97
-
98
- ## CLI Commands
99
-
100
- ### `amalfa init [--force]`
58
+ **Debriefs** capture:
59
+ - What worked (successes)
60
+ - What failed (dead ends)
61
+ - Lessons learned (abstractions)
101
62
 
102
- Initialize knowledge graph from markdown files with pre-flight validation.
63
+ **Playbooks** codify:
64
+ - Principles (how we do things)
65
+ - Patterns (reusable solutions)
66
+ - Anti-patterns (what to avoid)
67
+ - Decision records (why we chose X over Y)
103
68
 
104
- ```bash
105
- amalfa init # With validation
106
- amalfa init --force # Override warnings (use with caution)
107
- ```
108
-
109
- **What it does:**
110
- - **Pre-flight validation** (v1.0.1): Checks for large files, symlinks, circular references
111
- - Scans your source directories for `.md` files
112
- - Generates vector embeddings (384 dimensions)
113
- - Extracts WikiLinks (`[[links]]`) and semantic tags
114
- - Creates edges between related documents
115
- - Stores metadata in SQLite (content in filesystem - "hollow nodes")
116
-
117
- **Pre-Flight Protection** (v1.0.1):
118
- - Blocks files >10MB (prevents memory issues)
119
- - Detects symlink loops (prevents infinite recursion)
120
- - Warns about small files (<50 bytes) and large corpora (10K+ files)
121
- - Generates `.amalfa-pre-flight.log` with actionable recommendations
122
- - Use `--force` to override warnings (errors still block)
123
-
124
- **Output:**
125
- ```
126
- 📚 Starting ingestion from: ./docs
127
- 📁 Found 127 markdown files
128
- 100% (127/127)
129
- ✅ Initialization complete!
130
-
131
- 📊 Summary:
132
- Files processed: 127
133
- Nodes created: 127
134
- Edges created: 243
135
- Embeddings: 127
136
- Duration: 8.42s
137
- ```
69
+ ### Auto-Augmentation
138
70
 
139
- ### `amalfa daemon <action>`
71
+ Amalfa **automatically** adds:
140
72
 
141
- Manage the file watcher daemon.
73
+ - **Tags:** Extracted from content + latent space clustering
74
+ - **Links:** Wiki-style links between related documents
75
+ - **Clusters:** Documents organized by embedding similarity
76
+ - **Suggested reading:** Context for new sessions
142
77
 
143
- ```bash
144
- amalfa daemon start # Start watching for changes
145
- amalfa daemon stop # Stop the daemon
146
- amalfa daemon status # Check if running
147
- amalfa daemon restart # Restart daemon
148
- ```
78
+ **Agents don't maintain metadata manually.** Amalfa handles it via git-audited auto-augmentation.
149
79
 
150
- **Features:**
151
- - Watches source directory recursively
152
- - Debounced updates (1s default)
153
- - Hash-based change detection (only processes modified files)
154
- - Retry logic with exponential backoff
155
- - Native macOS notifications
80
+ ### Latent Space Tagging
156
81
 
157
- ### `amalfa serve`
82
+ **Innovation:** Tags emerge from vector clustering, not predefined taxonomy.
158
83
 
159
- Start MCP server for Claude Desktop (stdio transport).
84
+ ```python
85
+ # Cluster documents in embedding space
86
+ clusters = cluster(all_docs, min_size=3)
160
87
 
161
- ```bash
162
- amalfa serve
88
+ # Generate labels from cluster content
89
+ for cluster in clusters:
90
+ label = generate_label(cluster.docs) # e.g., "auth-state-patterns"
91
+ for doc in cluster:
92
+ doc.add_tag(f"latent:{label}", confidence_score)
163
93
  ```
164
94
 
165
- **Available Tools:**
166
- - `search_knowledge`: Semantic search across all documents
167
- - `get_node`: Retrieve specific document by ID
168
- - `get_neighbors`: Find related documents (graph traversal)
95
+ **Result:** Self-organizing knowledge base that adapts as it grows.
169
96
 
170
- See [docs/MCP_TOOLS.md](docs/MCP_TOOLS.md) for detailed tool schemas.
97
+ ---
171
98
 
172
- ### `amalfa stats`
99
+ ## Quick Start
173
100
 
174
- View knowledge graph statistics.
101
+ ### Installation
175
102
 
176
103
  ```bash
177
- amalfa stats
104
+ npm install -g amalfa
105
+ # or
106
+ bun install -g amalfa
178
107
  ```
179
108
 
180
- ### `amalfa doctor`
181
-
182
- Health check and diagnostics.
183
-
109
+ **From source** (for development):
184
110
  ```bash
185
- amalfa doctor
111
+ git clone https://github.com/pjsvis/amalfa.git
112
+ cd amalfa
113
+ bun install
186
114
  ```
187
115
 
188
- ## Architecture
189
-
190
- ### Philosophy: Markdown is Truth
116
+ ### Setup MCP Server
191
117
 
192
- AMALFA implements the **"Hollow Nodes"** pattern:
118
+ 1. **Configure your sources** in `amalfa.config.json`:
119
+ ```json
120
+ {
121
+ "sources": ["./docs", "./playbooks"],
122
+ "database": ".amalfa/resonance.db"
123
+ }
124
+ ```
193
125
 
194
- - **Markdown files** = Source of truth (version controlled, human-readable)
195
- - **SQLite database** = Ephemeral cache (can be regenerated anytime)
126
+ 2. **Ingest your markdown**:
127
+ ```bash
128
+ bun run scripts/cli/ingest.ts
129
+ ```
196
130
 
197
- **v1.0.1 Enhancement:** Schema v6 fully implements hollow nodes - content is never stored in the database, only metadata and embeddings. This reduces database size dramatically (~350MB saved for 70K documents) and maintains the filesystem as the single source of truth.
131
+ 3. **Generate MCP config**:
132
+ ```bash
133
+ bun run scripts/setup_mcp.ts
134
+ ```
198
135
 
199
- This means:
200
- - ✅ You can delete `.amalfa/` and rebuild with `amalfa init`
201
- - ✅ Your markdown files remain the canonical source
202
- - ✅ Database changes are never written back to files
203
- - ✅ No lock-in, no vendor formats
204
- - ✅ Smaller databases, faster writes (v1.0.1)
205
-
206
- ### Technology Stack
136
+ 4. **Add to Claude Desktop**: Copy the JSON output to:
137
+ ```
138
+ ~/Library/Application Support/Claude/claude_desktop_config.json
139
+ ```
207
140
 
208
- - **Runtime**: Bun (fast, modern JavaScript runtime)
209
- - **Database**: SQLite with WAL mode
210
- - **Embeddings**: FastEmbed (local, no API calls)
211
- - **Vectors**: 384-dimensional (BAAI/bge-small-en-v1.5)
212
- - **Search**: Pure dot product (cosine similarity)
213
- - **Protocol**: Model Context Protocol (MCP)
141
+ 5. **Restart Claude Desktop**
214
142
 
215
- ### File Structure
143
+ **Full setup guide:** [docs/MCP_SETUP.md](docs/MCP_SETUP.md)
216
144
 
217
- ```
218
- your-project/
219
- ├── docs/ # Your markdown files
220
- │ ├── README.md
221
- │ ├── architecture.md
222
- │ └── ...
223
- ├── .amalfa/ # AMALFA data (gitignored)
224
- │ └── resonance.db # SQLite database (schema v6 - hollow nodes)
225
- ├── amalfa.config.json # Configuration (optional)
226
- ├── .amalfa-daemon.pid # Daemon process ID (if running)
227
- ├── .amalfa-daemon.log # Daemon logs
228
- └── .amalfa-pre-flight.log # Validation report (generated by init)
229
- ```
145
+ **Package status:** Reserved at https://www.npmjs.com/package/amalfa (v1.0 coming soon)
230
146
 
231
- ## Features
147
+ ---
232
148
 
233
- ### Vector Search (FAFCAS Protocol)
149
+ ## Architecture
234
150
 
235
- Fast, accurate search without a vector database:
151
+ ### Technology Stack
236
152
 
237
- - L2-normalized embeddings (unit vectors)
238
- - Pure dot product = cosine similarity
239
- - 85%+ accuracy at <10ms per query
240
- - No chunking needed (markdown files are already chunk-sized)
153
+ - **Runtime:** Bun (fast, TypeScript-native)
154
+ - **Database:** SQLite with WAL mode (local-first, portable)
155
+ - **Embeddings:** FastEmbed (`all-MiniLM-L6-v2`, 384 dims)
156
+ - **Search:** Vector similarity + full-text (FTS5)
157
+ - **Protocol:** Model Context Protocol (MCP)
241
158
 
242
- ### Edge Weaving
159
+ ### Project Structure
243
160
 
244
- Automatic relationship detection:
161
+ ```
162
+ amalfa/
163
+ ├── src/
164
+ │ ├── mcp/ # MCP server implementation
165
+ │ ├── resonance/ # Database layer (SQLite wrapper)
166
+ │ ├── core/ # Graph processing (EdgeWeaver, VectorEngine)
167
+ │ └── utils/ # Logging, validation, lifecycle
168
+ ├── scripts/
169
+ │ ├── cli/ # Command-line tools
170
+ │ └── pipeline/ # Data ingestion pipeline
171
+ ├── docs/
172
+ │ ├── VISION-AGENT-LEARNING.md # Core vision
173
+ │ ├── AGENT-METADATA-PATTERNS.md # Auto-augmentation design
174
+ │ └── SETUP.md # NPM publishing guide
175
+ ├── briefs/ # Task specifications
176
+ ├── debriefs/ # Reflective documents
177
+ └── playbooks/ # Codified patterns
178
+ ```
245
179
 
246
- - **WikiLinks**: `[[Document Name]]` creates `CITES` edges
247
- - **Tags**: `[tag: Concept]` creates `TAGGED_AS` edges
248
- - **Metadata**: `<!-- tags: [RELATION: Target] -->` for explicit edges
249
- - **Louvain Gate**: Prevents graph pollution (community detection)
180
+ ### Key Patterns
250
181
 
251
- ### Incremental Updates
182
+ 1. **Hollow Nodes:** Node metadata in SQLite, content on filesystem
183
+ 2. **FAFCAS Protocol:** Fast Approximate Fuzzy Cosine Similarity search
184
+ 3. **Git-Based Auditing:** All agent augmentations are git commits
185
+ 4. **ServiceLifecycle:** Unified daemon management pattern
252
186
 
253
- The daemon watches for changes and only re-processes modified files:
187
+ ---
254
188
 
255
- - MD5 hash tracking
256
- - Batch transactions (50 files)
257
- - Debounced (1s default)
258
- - Automatic retry on failure (3 attempts, exponential backoff)
189
+ ## Vision
259
190
 
260
- ## Use Cases
191
+ See [VISION-AGENT-LEARNING.md](docs/VISION-AGENT-LEARNING.md) for the full vision.
261
192
 
262
- ### Personal Knowledge Base
193
+ **TL;DR:**
263
194
 
264
- ```bash
265
- # Your notes directory
266
- cd ~/Documents/notes
267
- amalfa init
268
- amalfa daemon start
195
+ Agents generate knowledge through structured reflection. Amalfa provides semantic infrastructure to make this knowledge:
269
196
 
270
- # Now ask Claude: "What did I write about X?"
271
- # Claude uses AMALFA to search your notes
272
- ```
197
+ - **Queryable** (vector search + graph traversal)
198
+ - **Persistent** (across sessions and agents)
199
+ - **Self-organizing** (latent space clustering)
200
+ - **Auditable** (git-based workflow)
273
201
 
274
- ### Project Documentation
202
+ **The goal:** Enable agents to maintain institutional memory without human bottlenecks.
275
203
 
276
- ```bash
277
- # Your project's docs
278
- cd ~/Code/my-project
279
- amalfa init
204
+ ---
280
205
 
281
- # Ask Claude: "Explain the architecture"
282
- # Claude searches ./docs and provides context
283
- ```
206
+ ## Implementation Status
284
207
 
285
- ### Research & Zettelkasten
208
+ ### Phase 1: Basic Auto-Augmentation (In Progress)
286
209
 
287
- ```bash
288
- # Zettelkasten notes
289
- cd ~/Zettelkasten
290
- amalfa init
210
+ - [ ] Entity extraction
211
+ - [ ] Auto-linking (wiki-style)
212
+ - [ ] Tag extraction
213
+ - [ ] Embedding generation
214
+ - [ ] Git integration
291
215
 
292
- # Ask Claude: "Find connections between concept A and B"
293
- # Claude traverses the knowledge graph
294
- ```
216
+ ### Phase 2: Latent Space Tagging (Planned)
295
217
 
296
- ## Troubleshooting
218
+ - [ ] Document clustering (HDBSCAN)
219
+ - [ ] Cluster label generation
220
+ - [ ] Confidence-based tagging
221
+ - [ ] Topic modeling (BERTopic)
297
222
 
298
- ### Daemon won't start
223
+ ### Phase 3: Semantic Relationships (Planned)
299
224
 
300
- Check logs:
301
- ```bash
302
- tail -f .amalfa-daemon.log
303
- ```
225
+ - [ ] K-nearest neighbor search
226
+ - [ ] Suggested reading lists
227
+ - [ ] Temporal sequences
228
+ - [ ] Backlink maintenance
304
229
 
305
- Common issues:
306
- - Source directory doesn't exist
307
- - Database permissions
308
- - Port conflicts (if running multiple instances)
230
+ ### Phase 4: Learning from Corrections (Future)
309
231
 
310
- ### Database corruption
232
+ - [ ] Track human edits
233
+ - [ ] Adjust confidence thresholds
234
+ - [ ] Improve extraction
235
+ - [ ] Weekly digest
311
236
 
312
- Rebuild from markdown:
313
- ```bash
314
- rm -rf .amalfa/
315
- amalfa init
316
- ```
237
+ ---
317
238
 
318
- Your markdown files are the source of truth, so this is always safe.
239
+ ## Development
319
240
 
320
- ### Slow initialization
241
+ ### Prerequisites
321
242
 
322
- Large repositories (1000+ files) may take 2-5 minutes on first run. Subsequent updates are fast (hash checking prevents re-processing).
243
+ - **Bun:** v1.0+ (required)
244
+ - **Node:** v22.x (for compatibility)
245
+ - **Git:** For version control
323
246
 
324
- ## Development
247
+ ### Setup
325
248
 
326
249
  ```bash
327
- # Clone repository
250
+ # Clone repo
328
251
  git clone https://github.com/pjsvis/amalfa.git
329
252
  cd amalfa
330
253
 
331
254
  # Install dependencies
332
255
  bun install
333
256
 
334
- # Run CLI locally
335
- bun run src/cli.ts help
336
-
337
257
  # Run tests
338
258
  bun test
339
259
 
340
- # Type checking
341
- bun run tsc --noEmit
260
+ # Start development server
261
+ bun run dev
342
262
  ```
343
263
 
344
- ## Roadmap
264
+ ### Commands
345
265
 
346
- - [ ] v1.1: Web UI for graph visualization
347
- - [ ] v1.2: Multi-language embedding models
348
- - [ ] v1.3: PDF/DOCX support
349
- - [ ] v2.0: Distributed sync (private P2P)
266
+ ```bash
267
+ bun run dev # Start dev server
268
+ bun run build # Build for production
269
+ bun test # Run tests
270
+ bun run precommit # TypeScript + Biome checks
271
+ ```
272
+
273
+ ---
274
+
275
+ ## Documentation
276
+
277
+ - **[VISION-AGENT-LEARNING.md](docs/VISION-AGENT-LEARNING.md)** - Why agent-generated knowledge works
278
+ - **[AGENT-METADATA-PATTERNS.md](docs/AGENT-METADATA-PATTERNS.md)** - Auto-augmentation design
279
+ - **[SETUP.md](docs/SETUP.md)** - NPM publishing setup
280
+
281
+ ### Playbooks
282
+
283
+ - **[embeddings-and-fafcas-protocol-playbook.md](playbooks/embeddings-and-fafcas-protocol-playbook.md)** - Vector search patterns
284
+ - **[local-first-vector-db-playbook.md](playbooks/local-first-vector-db-playbook.md)** - Database architecture
285
+ - **[problem-solving-playbook.md](playbooks/problem-solving-playbook.md)** - Debugging strategies
286
+
287
+ ---
350
288
 
351
289
  ## Contributing
352
290
 
353
- Contributions welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md).
291
+ Amalfa is in early development. Contributions welcome once v1.0 is released.
292
+
293
+ **For now:**
294
+ - ⭐ Star the repo if interested
295
+ - 👀 Watch for release announcements
296
+ - 💬 Open issues for feedback
297
+
298
+ ---
354
299
 
355
300
  ## License
356
301
 
357
- MIT License - see [LICENSE](LICENSE) for details.
302
+ MIT
303
+
304
+ ---
358
305
 
359
- ## Credits
306
+ ## Lineage
360
307
 
361
- Built with:
362
- - [Bun](https://bun.sh) - Fast JavaScript runtime
363
- - [FastEmbed](https://github.com/qdrant/fastembed) - Local embeddings
364
- - [Model Context Protocol](https://modelcontextprotocol.io) - AI agent integration
308
+ Amalfa evolved from patterns discovered in the [PolyVis](https://github.com/pjsvis/polyvis) project, where agents spontaneously maintained documentation through brief-debrief-playbook workflows.
309
+
310
+ **Key insight:** When given minimal structure, agents naturally build institutional memory. Amalfa scales this with semantic infrastructure.
365
311
 
366
312
  ---
367
313
 
368
- **AMALFA** = **A Memory Layer For Agents**
314
+ ## Roadmap
315
+
316
+ ### v1.0 (Q1 2026)
317
+
318
+ - ✅ Package name reserved on npm
319
+ - ✅ Core vision documented
320
+ - ✅ Auto-augmentation design complete
321
+ - 🚧 MVP implementation (in progress)
322
+ - [ ] MCP server functional
323
+ - [ ] Basic semantic search working
324
+ - [ ] Initial release
325
+
326
+ ### v1.1+ (Future)
369
327
 
370
- Give your AI agents a memory. Keep your privacy. Own your data.
328
+ - Latent space clustering
329
+ - Multi-agent knowledge sharing
330
+ - Cross-repo knowledge graphs
331
+ - Agent-to-agent learning
332
+
333
+ ---
371
334
 
372
- **[GitHub](https://github.com/pjsvis/amalfa)** **[NPM](https://www.npmjs.com/package/amalfa)** **[Issues](https://github.com/pjsvis/amalfa/issues)**
335
+ **Built with ❤️ by developers frustrated with context loss.**