amalfa 1.0.0 → 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 (85) hide show
  1. package/README.md +226 -247
  2. package/amalfa.config.example.ts +8 -6
  3. package/docs/AGENT-METADATA-PATTERNS.md +1021 -0
  4. package/docs/CONFIG_E2E_VALIDATION.md +147 -0
  5. package/docs/CONFIG_UNIFICATION.md +187 -0
  6. package/docs/CONFIG_VALIDATION.md +103 -0
  7. package/docs/LEGACY_DEPRECATION.md +174 -0
  8. package/docs/MCP_SETUP.md +317 -0
  9. package/docs/QUICK_START_MCP.md +168 -0
  10. package/docs/SESSION-2026-01-06-METADATA-PATTERNS.md +346 -0
  11. package/docs/SETUP.md +464 -0
  12. package/docs/SETUP_COMPLETE.md +464 -0
  13. package/docs/VISION-AGENT-LEARNING.md +1242 -0
  14. package/docs/_current-config-status.md +93 -0
  15. package/package.json +6 -3
  16. package/polyvis.settings.json.bak +38 -0
  17. package/src/cli.ts +159 -31
  18. package/src/config/defaults.ts +73 -15
  19. package/src/core/VectorEngine.ts +18 -9
  20. package/src/daemon/index.ts +12 -8
  21. package/src/mcp/index.ts +62 -7
  22. package/src/pipeline/AmalfaIngestor.ts +22 -12
  23. package/src/pipeline/PreFlightAnalyzer.ts +434 -0
  24. package/src/resonance/DatabaseFactory.ts +3 -4
  25. package/src/resonance/db.ts +8 -6
  26. package/src/resonance/schema.ts +19 -1
  27. package/src/resonance/services/vector-daemon.ts +151 -0
  28. package/src/utils/DaemonManager.ts +147 -0
  29. package/src/utils/ZombieDefense.ts +5 -1
  30. package/:memory: +0 -0
  31. package/:memory:-shm +0 -0
  32. package/:memory:-wal +0 -0
  33. package/README.old.md +0 -112
  34. package/agents.config.json +0 -11
  35. package/drizzle/0000_minor_iron_fist.sql +0 -19
  36. package/drizzle/meta/0000_snapshot.json +0 -139
  37. package/drizzle/meta/_journal.json +0 -13
  38. package/example_usage.ts +0 -39
  39. package/experiment.sh +0 -35
  40. package/hello +0 -2
  41. package/index.html +0 -52
  42. package/knowledge/excalibur.md +0 -12
  43. package/plans/experience-graph-integration.md +0 -60
  44. package/prompts/gemini-king-mode-prompt.md +0 -46
  45. package/public/docs/MCP_TOOLS.md +0 -372
  46. package/schemas/README.md +0 -20
  47. package/schemas/cda.schema.json +0 -84
  48. package/schemas/conceptual-lexicon.schema.json +0 -75
  49. package/scratchpads/dummy-debrief-boxed.md +0 -39
  50. package/scratchpads/dummy-debrief.md +0 -27
  51. package/scratchpads/scratchpad-design.md +0 -50
  52. package/scratchpads/scratchpad-scrolling.md +0 -20
  53. package/scratchpads/scratchpad-toc-disappearance.md +0 -23
  54. package/scratchpads/scratchpad-toc.md +0 -28
  55. package/scratchpads/test_gardener.md +0 -7
  56. package/src/core/LLMClient.ts +0 -93
  57. package/src/core/TagEngine.ts +0 -56
  58. package/src/db/schema.ts +0 -46
  59. package/src/gardeners/AutoTagger.ts +0 -116
  60. package/src/pipeline/HarvesterPipeline.ts +0 -101
  61. package/src/pipeline/Ingestor.ts +0 -555
  62. package/src/resonance/cli/ingest.ts +0 -41
  63. package/src/resonance/cli/migrate.ts +0 -54
  64. package/src/resonance/config.ts +0 -40
  65. package/src/resonance/daemon.ts +0 -236
  66. package/src/resonance/pipeline/extract.ts +0 -89
  67. package/src/resonance/pipeline/transform_docs.ts +0 -60
  68. package/src/resonance/services/tokenizer.ts +0 -159
  69. package/src/resonance/transform/cda.ts +0 -393
  70. package/src/utils/EnvironmentVerifier.ts +0 -67
  71. package/substack/substack-playbook-1.md +0 -95
  72. package/substack/substack-playbook-2.md +0 -78
  73. package/tasks/ui-investigation.md +0 -26
  74. package/test-db +0 -0
  75. package/test-db-shm +0 -0
  76. package/test-db-wal +0 -0
  77. package/tests/canary/verify_pinch_check.ts +0 -44
  78. package/tests/fixtures/ingest_test.md +0 -12
  79. package/tests/fixtures/ingest_test_boxed.md +0 -13
  80. package/tests/fixtures/safety_test.md +0 -45
  81. package/tests/fixtures/safety_test_boxed.md +0 -49
  82. package/tests/fixtures/tagged_output.md +0 -49
  83. package/tests/fixtures/tagged_test.md +0 -49
  84. package/tests/mcp-server-settings.json +0 -8
  85. package/verify-embedder.ts +0 -54
package/README.md CHANGED
@@ -2,355 +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
- "source": "./docs",
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
- Or use TypeScript:
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
- ```typescript
71
- // amalfa.config.ts
72
- export default {
73
- source: "./docs",
74
- database: ".amalfa/resonance.db",
75
- // ... rest of config
76
- };
77
- ```
40
+ ---
78
41
 
79
- ### Claude Desktop Integration
42
+ ## Core Concepts
80
43
 
81
- Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
44
+ ### Brief-Debrief-Playbook Pattern
82
45
 
83
- ```json
84
- {
85
- "mcpServers": {
86
- "amalfa": {
87
- "command": "amalfa",
88
- "args": ["serve"]
89
- }
90
- }
91
- }
92
46
  ```
93
-
94
- Restart Claude Desktop, and you'll see AMALFA tools available in the conversation.
95
-
96
- ## CLI Commands
97
-
98
- ### `amalfa init`
99
-
100
- Initialize knowledge graph from markdown files.
101
-
102
- ```bash
103
- amalfa init
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)
104
56
  ```
105
57
 
106
- **What it does:**
107
- - Scans your source directory for `.md` files
108
- - Generates vector embeddings (384 dimensions)
109
- - Extracts WikiLinks (`[[links]]`) and semantic tags
110
- - Creates edges between related documents
111
- - Stores everything in SQLite with WAL mode
58
+ **Debriefs** capture:
59
+ - What worked (successes)
60
+ - What failed (dead ends)
61
+ - Lessons learned (abstractions)
112
62
 
113
- **Output:**
114
- ```
115
- 📚 Starting ingestion from: ./docs
116
- 📁 Found 127 markdown files
117
- 100% (127/127)
118
- ✅ Initialization complete!
119
-
120
- 📊 Summary:
121
- Files processed: 127
122
- Nodes created: 127
123
- Edges created: 243
124
- Embeddings: 127
125
- Duration: 8.42s
126
- ```
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)
127
68
 
128
- ### `amalfa daemon <action>`
69
+ ### Auto-Augmentation
129
70
 
130
- Manage the file watcher daemon.
71
+ Amalfa **automatically** adds:
131
72
 
132
- ```bash
133
- amalfa daemon start # Start watching for changes
134
- amalfa daemon stop # Stop the daemon
135
- amalfa daemon status # Check if running
136
- amalfa daemon restart # Restart daemon
137
- ```
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
138
77
 
139
- **Features:**
140
- - Watches source directory recursively
141
- - Debounced updates (1s default)
142
- - Hash-based change detection (only processes modified files)
143
- - Retry logic with exponential backoff
144
- - Native macOS notifications
78
+ **Agents don't maintain metadata manually.** Amalfa handles it via git-audited auto-augmentation.
145
79
 
146
- ### `amalfa serve`
80
+ ### Latent Space Tagging
147
81
 
148
- Start MCP server for Claude Desktop (stdio transport).
82
+ **Innovation:** Tags emerge from vector clustering, not predefined taxonomy.
149
83
 
150
- ```bash
151
- amalfa serve
84
+ ```python
85
+ # Cluster documents in embedding space
86
+ clusters = cluster(all_docs, min_size=3)
87
+
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)
152
93
  ```
153
94
 
154
- **Available Tools:**
155
- - `search_knowledge`: Semantic search across all documents
156
- - `get_node`: Retrieve specific document by ID
157
- - `get_neighbors`: Find related documents (graph traversal)
95
+ **Result:** Self-organizing knowledge base that adapts as it grows.
158
96
 
159
- See [docs/MCP_TOOLS.md](docs/MCP_TOOLS.md) for detailed tool schemas.
97
+ ---
160
98
 
161
- ### `amalfa stats`
99
+ ## Quick Start
162
100
 
163
- View knowledge graph statistics.
101
+ ### Installation
164
102
 
165
103
  ```bash
166
- amalfa stats
104
+ npm install -g amalfa
105
+ # or
106
+ bun install -g amalfa
167
107
  ```
168
108
 
169
- ### `amalfa doctor`
170
-
171
- Health check and diagnostics.
172
-
109
+ **From source** (for development):
173
110
  ```bash
174
- amalfa doctor
111
+ git clone https://github.com/pjsvis/amalfa.git
112
+ cd amalfa
113
+ bun install
175
114
  ```
176
115
 
177
- ## Architecture
116
+ ### Setup MCP Server
178
117
 
179
- ### Philosophy: Markdown is Truth
118
+ 1. **Configure your sources** in `amalfa.config.json`:
119
+ ```json
120
+ {
121
+ "sources": ["./docs", "./playbooks"],
122
+ "database": ".amalfa/resonance.db"
123
+ }
124
+ ```
180
125
 
181
- AMALFA implements the **"Hollow Nodes"** pattern:
126
+ 2. **Ingest your markdown**:
127
+ ```bash
128
+ bun run scripts/cli/ingest.ts
129
+ ```
182
130
 
183
- - **Markdown files** = Source of truth (version controlled, human-readable)
184
- - **SQLite database** = Ephemeral cache (can be regenerated anytime)
131
+ 3. **Generate MCP config**:
132
+ ```bash
133
+ bun run scripts/setup_mcp.ts
134
+ ```
185
135
 
186
- This means:
187
- - ✅ You can delete `.amalfa/` and rebuild with `amalfa init`
188
- - ✅ Your markdown files remain the canonical source
189
- - ✅ Database changes are never written back to files
190
- - ✅ No lock-in, no vendor formats
191
-
192
- ### Technology Stack
136
+ 4. **Add to Claude Desktop**: Copy the JSON output to:
137
+ ```
138
+ ~/Library/Application Support/Claude/claude_desktop_config.json
139
+ ```
193
140
 
194
- - **Runtime**: Bun (fast, modern JavaScript runtime)
195
- - **Database**: SQLite with WAL mode
196
- - **Embeddings**: FastEmbed (local, no API calls)
197
- - **Vectors**: 384-dimensional (BAAI/bge-small-en-v1.5)
198
- - **Search**: Pure dot product (cosine similarity)
199
- - **Protocol**: Model Context Protocol (MCP)
141
+ 5. **Restart Claude Desktop**
200
142
 
201
- ### File Structure
143
+ **Full setup guide:** [docs/MCP_SETUP.md](docs/MCP_SETUP.md)
202
144
 
203
- ```
204
- your-project/
205
- ├── docs/ # Your markdown files
206
- │ ├── README.md
207
- │ ├── architecture.md
208
- │ └── ...
209
- ├── .amalfa/ # AMALFA data (gitignored)
210
- │ └── resonance.db # SQLite database (2-5 MB typical)
211
- ├── amalfa.config.json # Configuration (optional)
212
- └── .amalfa-daemon.pid # Daemon process ID (if running)
213
- ```
145
+ **Package status:** Reserved at https://www.npmjs.com/package/amalfa (v1.0 coming soon)
214
146
 
215
- ## Features
147
+ ---
216
148
 
217
- ### Vector Search (FAFCAS Protocol)
149
+ ## Architecture
218
150
 
219
- Fast, accurate search without a vector database:
151
+ ### Technology Stack
220
152
 
221
- - L2-normalized embeddings (unit vectors)
222
- - Pure dot product = cosine similarity
223
- - 85%+ accuracy at <10ms per query
224
- - 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)
225
158
 
226
- ### Edge Weaving
159
+ ### Project Structure
227
160
 
228
- 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
+ ```
229
179
 
230
- - **WikiLinks**: `[[Document Name]]` creates `CITES` edges
231
- - **Tags**: `[tag: Concept]` creates `TAGGED_AS` edges
232
- - **Metadata**: `<!-- tags: [RELATION: Target] -->` for explicit edges
233
- - **Louvain Gate**: Prevents graph pollution (community detection)
180
+ ### Key Patterns
234
181
 
235
- ### 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
236
186
 
237
- The daemon watches for changes and only re-processes modified files:
187
+ ---
238
188
 
239
- - MD5 hash tracking
240
- - Batch transactions (50 files)
241
- - Debounced (1s default)
242
- - Automatic retry on failure (3 attempts, exponential backoff)
189
+ ## Vision
243
190
 
244
- ## Use Cases
191
+ See [VISION-AGENT-LEARNING.md](docs/VISION-AGENT-LEARNING.md) for the full vision.
245
192
 
246
- ### Personal Knowledge Base
193
+ **TL;DR:**
247
194
 
248
- ```bash
249
- # Your notes directory
250
- cd ~/Documents/notes
251
- amalfa init
252
- amalfa daemon start
195
+ Agents generate knowledge through structured reflection. Amalfa provides semantic infrastructure to make this knowledge:
253
196
 
254
- # Now ask Claude: "What did I write about X?"
255
- # Claude uses AMALFA to search your notes
256
- ```
197
+ - **Queryable** (vector search + graph traversal)
198
+ - **Persistent** (across sessions and agents)
199
+ - **Self-organizing** (latent space clustering)
200
+ - **Auditable** (git-based workflow)
257
201
 
258
- ### Project Documentation
202
+ **The goal:** Enable agents to maintain institutional memory without human bottlenecks.
259
203
 
260
- ```bash
261
- # Your project's docs
262
- cd ~/Code/my-project
263
- amalfa init
204
+ ---
264
205
 
265
- # Ask Claude: "Explain the architecture"
266
- # Claude searches ./docs and provides context
267
- ```
206
+ ## Implementation Status
268
207
 
269
- ### Research & Zettelkasten
208
+ ### Phase 1: Basic Auto-Augmentation (In Progress)
270
209
 
271
- ```bash
272
- # Zettelkasten notes
273
- cd ~/Zettelkasten
274
- amalfa init
210
+ - [ ] Entity extraction
211
+ - [ ] Auto-linking (wiki-style)
212
+ - [ ] Tag extraction
213
+ - [ ] Embedding generation
214
+ - [ ] Git integration
275
215
 
276
- # Ask Claude: "Find connections between concept A and B"
277
- # Claude traverses the knowledge graph
278
- ```
216
+ ### Phase 2: Latent Space Tagging (Planned)
279
217
 
280
- ## Troubleshooting
218
+ - [ ] Document clustering (HDBSCAN)
219
+ - [ ] Cluster label generation
220
+ - [ ] Confidence-based tagging
221
+ - [ ] Topic modeling (BERTopic)
281
222
 
282
- ### Daemon won't start
223
+ ### Phase 3: Semantic Relationships (Planned)
283
224
 
284
- Check logs:
285
- ```bash
286
- tail -f .amalfa-daemon.log
287
- ```
225
+ - [ ] K-nearest neighbor search
226
+ - [ ] Suggested reading lists
227
+ - [ ] Temporal sequences
228
+ - [ ] Backlink maintenance
288
229
 
289
- Common issues:
290
- - Source directory doesn't exist
291
- - Database permissions
292
- - Port conflicts (if running multiple instances)
230
+ ### Phase 4: Learning from Corrections (Future)
293
231
 
294
- ### Database corruption
232
+ - [ ] Track human edits
233
+ - [ ] Adjust confidence thresholds
234
+ - [ ] Improve extraction
235
+ - [ ] Weekly digest
295
236
 
296
- Rebuild from markdown:
297
- ```bash
298
- rm -rf .amalfa/
299
- amalfa init
300
- ```
237
+ ---
301
238
 
302
- Your markdown files are the source of truth, so this is always safe.
239
+ ## Development
303
240
 
304
- ### Slow initialization
241
+ ### Prerequisites
305
242
 
306
- 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
307
246
 
308
- ## Development
247
+ ### Setup
309
248
 
310
249
  ```bash
311
- # Clone repository
250
+ # Clone repo
312
251
  git clone https://github.com/pjsvis/amalfa.git
313
252
  cd amalfa
314
253
 
315
254
  # Install dependencies
316
255
  bun install
317
256
 
318
- # Run CLI locally
319
- bun run src/cli.ts help
320
-
321
257
  # Run tests
322
258
  bun test
323
259
 
324
- # Type checking
325
- bun run tsc --noEmit
260
+ # Start development server
261
+ bun run dev
326
262
  ```
327
263
 
328
- ## Roadmap
264
+ ### Commands
329
265
 
330
- - [ ] v1.1: Web UI for graph visualization
331
- - [ ] v1.2: Multi-language embedding models
332
- - [ ] v1.3: PDF/DOCX support
333
- - [ ] 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
+ ---
334
288
 
335
289
  ## Contributing
336
290
 
337
- 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
+ ---
338
299
 
339
300
  ## License
340
301
 
341
- MIT License - see [LICENSE](LICENSE) for details.
302
+ MIT
303
+
304
+ ---
342
305
 
343
- ## Credits
306
+ ## Lineage
344
307
 
345
- Built with:
346
- - [Bun](https://bun.sh) - Fast JavaScript runtime
347
- - [FastEmbed](https://github.com/qdrant/fastembed) - Local embeddings
348
- - [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.
349
311
 
350
312
  ---
351
313
 
352
- **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)
353
327
 
354
- 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
+ ---
355
334
 
356
- **[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.**
@@ -9,16 +9,18 @@
9
9
 
10
10
  export default {
11
11
  /**
12
- * Source directory containing markdown files
12
+ * Source directories containing markdown files
13
13
  * Relative to project root
14
14
  *
15
15
  * Examples:
16
- * - "./docs" - Standard documentation folder
17
- * - "./notes" - Personal notes
18
- * - "./content" - Content management
19
- * - "." - Current directory (scans all .md files)
16
+ * - ["./docs"] - Single directory
17
+ * - ["./docs", "./notes"] - Multiple directories
18
+ * - ["./docs", "../shared/notes"] - Across repositories
19
+ * - ["."] - Current directory (scans all .md files)
20
+ *
21
+ * Legacy: Single 'source' string still supported for backward compatibility
20
22
  */
21
- source: "./docs",
23
+ sources: ["./docs"],
22
24
 
23
25
  /**
24
26
  * Database file location