@prmichaelsen/remember-mcp 2.3.4 → 2.5.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.
Files changed (34) hide show
  1. package/AGENT.md +2 -2
  2. package/CHANGELOG.md +63 -0
  3. package/README.md +50 -5
  4. package/agent/commands/git.commit.md +511 -0
  5. package/agent/commands/git.init.md +513 -0
  6. package/agent/milestones/milestone-11-unified-public-collection.md +205 -0
  7. package/agent/scripts/install.sh +31 -16
  8. package/agent/scripts/update.sh +32 -17
  9. package/agent/tasks/task-45-fix-publish-false-success-bug.md +114 -181
  10. package/agent/tasks/task-46-update-spacememory-types.md +94 -0
  11. package/agent/tasks/task-47-update-space-schema.md +102 -0
  12. package/agent/tasks/task-48-create-memory-public-collection.md +96 -0
  13. package/agent/tasks/task-49-update-remember-publish.md +153 -0
  14. package/agent/tasks/task-50-update-remember-confirm.md +111 -0
  15. package/agent/tasks/task-51-update-remember-search-space.md +154 -0
  16. package/agent/tasks/task-52-update-remember-query-space.md +142 -0
  17. package/agent/tasks/task-53-add-multispace-tests.md +193 -0
  18. package/agent/tasks/task-54-update-documentation-multispace.md +191 -0
  19. package/dist/server-factory.js +203 -107
  20. package/dist/server.js +203 -107
  21. package/dist/tools/publish.d.ts +1 -1
  22. package/dist/tools/query-space.d.ts +1 -1
  23. package/dist/tools/search-space.d.ts +1 -1
  24. package/dist/types/space-memory.d.ts +5 -3
  25. package/dist/weaviate/space-schema.d.ts +16 -0
  26. package/package.json +1 -1
  27. package/src/services/confirmation-token.service.ts +74 -30
  28. package/src/tools/confirm.ts +15 -16
  29. package/src/tools/publish.ts +42 -20
  30. package/src/tools/query-space.ts +38 -24
  31. package/src/tools/search-space.ts +51 -28
  32. package/src/types/space-memory.ts +5 -3
  33. package/src/weaviate/space-schema.spec.ts +55 -0
  34. package/src/weaviate/space-schema.ts +45 -6
@@ -0,0 +1,513 @@
1
+ # Command: init
2
+
3
+ > **🤖 Agent Directive**: If you are reading this file, the command `@git.init` has been invoked. Follow the steps below to execute this command.
4
+
5
+ **Namespace**: git
6
+ **Version**: 1.0.0
7
+ **Created**: 2026-02-16
8
+ **Last Updated**: 2026-02-16
9
+ **Status**: Active
10
+
11
+ ---
12
+
13
+ **Purpose**: Initialize a git repository with intelligent .gitignore based on project type
14
+ **Category**: Creation
15
+ **Frequency**: Once
16
+
17
+ ---
18
+
19
+ ## What This Command Does
20
+
21
+ This command intelligently initializes a git repository for your project by:
22
+ 1. Analyzing the project structure to detect the project type (Node.js, Python, Rust, etc.)
23
+ 2. Running `git init` to create the repository
24
+ 3. Creating or updating `.gitignore` with sensible defaults based on the detected project type
25
+ 4. Ensuring dependency lock files are NOT ignored (they should be committed)
26
+ 5. Ignoring build directories, distribution directories, and dependency installation directories
27
+
28
+ The command is smart about .gitignore - it evaluates your project to determine what should be ignored rather than using a generic template. This ensures your repository follows best practices for your specific technology stack.
29
+
30
+ **Example**: "For a Node.js project, this command will detect `package.json`, initialize git, and create a `.gitignore` that ignores `node_modules/`, `dist/`, `*.tgz`, but keeps `package-lock.json` committed."
31
+
32
+ ---
33
+
34
+ ## Prerequisites
35
+
36
+ - [ ] Project directory exists and contains project files
37
+ - [ ] Git is installed on the system
38
+ - [ ] No existing `.git` directory (or you want to reinitialize)
39
+
40
+ ---
41
+
42
+ ## Steps
43
+
44
+ ### 1. Evaluate Project Type
45
+
46
+ Analyze the project structure to determine the technology stack and project type.
47
+
48
+ **Actions**:
49
+ - Check for `package.json` (Node.js/npm)
50
+ - Check for `pyproject.toml`, `setup.py`, `requirements.txt` (Python)
51
+ - Check for `Cargo.toml` (Rust)
52
+ - Check for `pom.xml`, `build.gradle` (Java)
53
+ - Check for `go.mod` (Go)
54
+ - Check for `composer.json` (PHP)
55
+ - Check for `.csproj`, `.sln` (C#/.NET)
56
+ - Check for `Gemfile` (Ruby)
57
+ - Identify any other project-specific files
58
+
59
+ **If Project Type is Unknown**:
60
+ - If the project type cannot be determined from known patterns, use available web search tools (e.g., `mcp--brave-search--brave_web_search`) to research the project structure
61
+ - Search for: "{detected_file_pattern} gitignore best practices"
62
+ - Search for: "{detected_file_pattern} project structure"
63
+ - Search for: "{language_or_framework} build artifacts"
64
+ - Use the search results to determine:
65
+ - What directories should be ignored (build output, dependencies)
66
+ - What lock files exist and should be committed
67
+ - What temporary files should be ignored
68
+ - Common IDE/editor files for that ecosystem
69
+
70
+ **Expected Outcome**: Determine the primary project type(s) and technology stack, using web research if necessary.
71
+
72
+ **Example**:
73
+ ```bash
74
+ # Check for various project files
75
+ ls -la | grep -E "(package.json|pyproject.toml|Cargo.toml|go.mod)"
76
+ ```
77
+
78
+ ### 2. Initialize Git Repository
79
+
80
+ Create the git repository if it doesn't exist.
81
+
82
+ **Actions**:
83
+ - Run `git init` to initialize the repository
84
+ - Verify `.git` directory was created
85
+ - Set initial branch name (typically `main` or `mainline`)
86
+
87
+ **Expected Outcome**: Git repository initialized with `.git` directory created.
88
+
89
+ **Example**:
90
+ ```bash
91
+ git init
92
+ git branch -M main # or mainline, depending on preference
93
+ ```
94
+
95
+ ### 3. Create or Update .gitignore
96
+
97
+ Generate a `.gitignore` file with intelligent defaults based on the detected project type.
98
+
99
+ **Actions**:
100
+ - Create `.gitignore` if it doesn't exist, or read existing one
101
+ - Add project-type-specific ignore patterns
102
+ - Ensure dependency lock files are NOT ignored
103
+ - Add common ignore patterns for build/dist directories
104
+ - Add editor/IDE specific ignores
105
+
106
+ **Expected Outcome**: `.gitignore` file created or updated with appropriate patterns.
107
+
108
+ **Common Patterns to Include**:
109
+
110
+ #### All Projects
111
+ ```gitignore
112
+ # Editor/IDE
113
+ .vscode/
114
+ .idea/
115
+ *.swp
116
+ *.swo
117
+ *~
118
+ .DS_Store
119
+ Thumbs.db
120
+
121
+ # Environment
122
+ .env
123
+ .env.local
124
+ .env.*.local
125
+ *.log
126
+ ```
127
+
128
+ #### Node.js/npm Projects
129
+ ```gitignore
130
+ # Dependencies
131
+ node_modules/
132
+
133
+ # Build output
134
+ dist/
135
+ build/
136
+ out/
137
+ .next/
138
+ .nuxt/
139
+
140
+ # Package files (but NOT lock files)
141
+ *.tgz
142
+
143
+ # Testing
144
+ coverage/
145
+ .nyc_output/
146
+
147
+ # Cache
148
+ .npm
149
+ .eslintcache
150
+ .cache/
151
+ ```
152
+
153
+ #### Python Projects
154
+ ```gitignore
155
+ # Dependencies
156
+ __pycache__/
157
+ *.py[cod]
158
+ *$py.class
159
+ .Python
160
+
161
+ # Virtual environments
162
+ venv/
163
+ env/
164
+ ENV/
165
+ .venv
166
+
167
+ # Build output
168
+ dist/
169
+ build/
170
+ *.egg-info/
171
+ .eggs/
172
+
173
+ # Testing
174
+ .pytest_cache/
175
+ .coverage
176
+ htmlcov/
177
+ .tox/
178
+ ```
179
+
180
+ #### Rust Projects
181
+ ```gitignore
182
+ # Build output
183
+ target/
184
+ Cargo.lock # Only for libraries; applications should commit this
185
+
186
+ # Debug
187
+ **/*.rs.bk
188
+ ```
189
+
190
+ #### Go Projects
191
+ ```gitignore
192
+ # Build output
193
+ bin/
194
+ *.exe
195
+ *.exe~
196
+ *.dll
197
+ *.so
198
+ *.dylib
199
+
200
+ # Test
201
+ *.test
202
+ *.out
203
+
204
+ # Vendor (if not using modules)
205
+ vendor/
206
+ ```
207
+
208
+ #### Java Projects
209
+ ```gitignore
210
+ # Build output
211
+ target/
212
+ build/
213
+ out/
214
+ *.class
215
+ *.jar
216
+ *.war
217
+ *.ear
218
+
219
+ # IDE
220
+ .gradle/
221
+ .settings/
222
+ .classpath
223
+ .project
224
+ ```
225
+
226
+ **CRITICAL**: Ensure these are NOT ignored:
227
+ - `package-lock.json` (Node.js)
228
+ - `yarn.lock` (Node.js/Yarn)
229
+ - `pnpm-lock.yaml` (Node.js/pnpm)
230
+ - `Pipfile.lock` (Python/Pipenv)
231
+ - `poetry.lock` (Python/Poetry)
232
+ - `Cargo.lock` (Rust applications)
233
+ - `go.sum` (Go)
234
+ - `composer.lock` (PHP)
235
+ - `Gemfile.lock` (Ruby)
236
+
237
+ ### 4. Verify .gitignore
238
+
239
+ Check that the `.gitignore` file is correct and complete.
240
+
241
+ **Actions**:
242
+ - Read the created `.gitignore` file
243
+ - Verify lock files are not ignored
244
+ - Verify build/dist directories are ignored
245
+ - Verify dependency directories are ignored
246
+ - Check for any project-specific patterns that should be added
247
+
248
+ **Expected Outcome**: `.gitignore` file is correct and follows best practices.
249
+
250
+ ### 5. Display Summary
251
+
252
+ Show what was done and what's ready to be committed.
253
+
254
+ **Actions**:
255
+ - Display detected project type
256
+ - Show `.gitignore` patterns added
257
+ - Run `git status` to show initial state
258
+ - Provide next steps
259
+
260
+ **Expected Outcome**: User understands what was initialized and what to do next.
261
+
262
+ **Example**:
263
+ ```bash
264
+ git status
265
+ ```
266
+
267
+ ---
268
+
269
+ ## Verification
270
+
271
+ - [ ] `.git` directory exists
272
+ - [ ] `.gitignore` file exists and contains appropriate patterns
273
+ - [ ] Dependency lock files are NOT in `.gitignore`
274
+ - [ ] Build directories (dist/, build/, target/) are in `.gitignore`
275
+ - [ ] Dependency install directories (node_modules/, venv/, etc.) are in `.gitignore`
276
+ - [ ] `git status` shows untracked files correctly
277
+ - [ ] No sensitive files (like `.env`) are accidentally tracked
278
+
279
+ ---
280
+
281
+ ## Expected Output
282
+
283
+ ### Files Modified
284
+ - `.git/` - Git repository directory created
285
+ - `.gitignore` - Created or updated with project-specific patterns
286
+
287
+ ### Console Output
288
+ ```
289
+ ✓ Detected project type: Node.js (npm)
290
+ ✓ Initialized git repository
291
+ ✓ Created .gitignore with patterns:
292
+ - node_modules/ (dependencies)
293
+ - dist/ (build output)
294
+ - *.tgz (package archives)
295
+ - .env* (environment files)
296
+ ✓ Preserved lock files:
297
+ - package-lock.json (will be committed)
298
+
299
+ Next steps:
300
+ git add .
301
+ git commit -m "Initial commit"
302
+ ```
303
+
304
+ ### Status Update
305
+ - Git repository initialized
306
+ - `.gitignore` configured for project type
307
+ - Ready for initial commit
308
+
309
+ ---
310
+
311
+ ## Examples
312
+
313
+ ### Example 1: Node.js Project
314
+
315
+ **Context**: Starting a new Node.js project with npm
316
+
317
+ **Invocation**: `@git.init`
318
+
319
+ **Result**:
320
+ - Detects `package.json`
321
+ - Initializes git repository
322
+ - Creates `.gitignore` with:
323
+ - `node_modules/` ignored
324
+ - `dist/`, `build/` ignored
325
+ - `*.tgz` ignored
326
+ - `package-lock.json` NOT ignored (will be committed)
327
+ - `.env*` ignored
328
+
329
+ ### Example 2: Python Project
330
+
331
+ **Context**: Starting a Python project with Poetry
332
+
333
+ **Invocation**: `@git.init`
334
+
335
+ **Result**:
336
+ - Detects `pyproject.toml`
337
+ - Initializes git repository
338
+ - Creates `.gitignore` with:
339
+ - `__pycache__/`, `*.pyc` ignored
340
+ - `venv/`, `.venv/` ignored
341
+ - `dist/`, `build/` ignored
342
+ - `poetry.lock` NOT ignored (will be committed)
343
+ - `.env*` ignored
344
+
345
+ ### Example 3: Rust Project
346
+
347
+ **Context**: Starting a Rust application
348
+
349
+ **Invocation**: `@git.init`
350
+
351
+ **Result**:
352
+ - Detects `Cargo.toml`
353
+ - Initializes git repository
354
+ - Creates `.gitignore` with:
355
+ - `target/` ignored
356
+ - `Cargo.lock` NOT ignored for applications (will be committed)
357
+ - `.env*` ignored
358
+
359
+ ### Example 4: Multi-Language Project
360
+
361
+ **Context**: Project with both Node.js frontend and Python backend
362
+
363
+ **Invocation**: `@git.init`
364
+
365
+ **Result**:
366
+ - Detects both `package.json` and `pyproject.toml`
367
+ - Initializes git repository
368
+ - Creates `.gitignore` with patterns for both:
369
+ - `node_modules/` and `__pycache__/` ignored
370
+ - `dist/`, `build/`, `target/` ignored
371
+ - Both `package-lock.json` and `poetry.lock` NOT ignored
372
+ - `.env*` ignored
373
+
374
+ ### Example 5: Unknown Project Type (Elixir)
375
+
376
+ **Context**: Starting an Elixir project with Mix
377
+
378
+ **Invocation**: `@git.init`
379
+
380
+ **Process**:
381
+ - Detects `mix.exs` file (unknown to built-in patterns)
382
+ - Uses web search: "mix.exs gitignore best practices"
383
+ - Finds that Elixir projects should ignore:
384
+ - `_build/` (build output)
385
+ - `deps/` (dependencies)
386
+ - `*.ez` (compiled archives)
387
+ - `mix.lock` should be committed
388
+
389
+ **Result**:
390
+ - Initializes git repository
391
+ - Creates `.gitignore` based on web research:
392
+ - `_build/` ignored
393
+ - `deps/` ignored
394
+ - `*.ez` ignored
395
+ - `mix.lock` NOT ignored (will be committed)
396
+ - `.env*` ignored
397
+
398
+ ---
399
+
400
+ ## Related Commands
401
+
402
+ - [`@git.commit`](git.commit.md) - Use after initialization to make your first commit
403
+ - [`@acp.init`](acp.init.md) - Use to initialize ACP structure after git init
404
+
405
+ ---
406
+
407
+ ## Troubleshooting
408
+
409
+ ### Issue 1: Git already initialized
410
+
411
+ **Symptom**: Error message "Reinitialized existing Git repository"
412
+
413
+ **Cause**: `.git` directory already exists
414
+
415
+ **Solution**: This is usually fine - git will reinitialize without losing history. If you want a fresh start, delete `.git` directory first: `rm -rf .git`
416
+
417
+ ### Issue 2: .gitignore conflicts with existing file
418
+
419
+ **Symptom**: `.gitignore` already exists with different patterns
420
+
421
+ **Cause**: Project already has a `.gitignore`
422
+
423
+ **Solution**: The command will merge patterns, adding new ones while preserving existing ones. Review the result and manually adjust if needed.
424
+
425
+ ### Issue 3: Lock files are ignored
426
+
427
+ **Symptom**: `git status` shows lock files as ignored
428
+
429
+ **Cause**: Existing `.gitignore` has patterns that ignore lock files
430
+
431
+ **Solution**: Edit `.gitignore` and remove any lines that ignore lock files (e.g., `*.lock`, `*-lock.json`). Lock files should always be committed.
432
+
433
+ ### Issue 4: Too many files shown as untracked
434
+
435
+ **Symptom**: `git status` shows hundreds of dependency files
436
+
437
+ **Cause**: Dependency directories not properly ignored
438
+
439
+ **Solution**: Verify `.gitignore` includes dependency directories for your project type. Add missing patterns manually if needed.
440
+
441
+ ### Issue 5: Unknown or uncommon project type
442
+
443
+ **Symptom**: Project type cannot be automatically detected
444
+
445
+ **Cause**: Using a less common language, framework, or custom project structure
446
+
447
+ **Solution**:
448
+ 1. The command will use web search tools to research the project type
449
+ 2. Search queries will be constructed based on detected files (e.g., "makefile gitignore best practices")
450
+ 3. Review the search results and manually verify the suggested patterns
451
+ 4. If still unclear, create a minimal `.gitignore` with common patterns:
452
+ ```gitignore
453
+ # Dependencies (adjust as needed)
454
+ vendor/
455
+ deps/
456
+
457
+ # Build output (adjust as needed)
458
+ build/
459
+ dist/
460
+ out/
461
+ target/
462
+
463
+ # Environment
464
+ .env
465
+ .env.local
466
+
467
+ # Editor
468
+ .vscode/
469
+ .idea/
470
+ ```
471
+ 5. Refine the `.gitignore` as you learn more about the project's build process
472
+
473
+ ---
474
+
475
+ ## Security Considerations
476
+
477
+ ### File Access
478
+ - **Reads**: Project root directory to detect project type
479
+ - **Writes**: `.git/` directory (git repository), `.gitignore` file
480
+ - **Executes**: `git init` command
481
+
482
+ ### Network Access
483
+ - **APIs**: May use web search APIs (e.g., Brave Search) to research unknown project types
484
+ - **Repositories**: None
485
+
486
+ ### Sensitive Data
487
+ - **Secrets**: Automatically ignores `.env` files and environment-specific files
488
+ - **Credentials**: Does not access any credentials
489
+ - **Important**: Always verify `.env` files are in `.gitignore` before committing
490
+
491
+ ---
492
+
493
+ ## Notes
494
+
495
+ - Lock files (package-lock.json, poetry.lock, etc.) should ALWAYS be committed to ensure reproducible builds
496
+ - Build directories (dist/, build/, target/) should ALWAYS be ignored - they can be regenerated
497
+ - Dependency directories (node_modules/, venv/) should ALWAYS be ignored - they can be reinstalled
498
+ - `.tgz` files should be ignored for npm packages to avoid committing packed archives
499
+ - Environment files (`.env`, `.env.local`) should ALWAYS be ignored to prevent credential leaks
500
+ - The command is idempotent - running it multiple times is safe
501
+ - For monorepos, consider running this at the root and adding workspace-specific patterns
502
+ - Always review the generated `.gitignore` to ensure it matches your project's needs
503
+
504
+ ---
505
+
506
+ **Namespace**: git
507
+ **Command**: init
508
+ **Version**: 1.0.0
509
+ **Created**: 2026-02-16
510
+ **Last Updated**: 2026-02-16
511
+ **Status**: Active
512
+ **Compatibility**: ACP 1.3.0+
513
+ **Author**: Agent Context Protocol
@@ -0,0 +1,205 @@
1
+ # Milestone 11: Unified Public Collection
2
+
3
+ **Goal**: Implement unified `Memory_public` collection with multi-space support
4
+ **Duration**: 1-2 weeks
5
+ **Dependencies**: M10 (Shared Spaces & Confirmation Flow)
6
+ **Status**: Not Started
7
+
8
+ ---
9
+
10
+ ## Overview
11
+
12
+ Replace per-space collections (`Memory_the_void`, `Memory_dogs`, etc.) with a unified `Memory_public` collection where memories can belong to multiple spaces simultaneously. This enables multi-space search, eliminates duplication, and provides a more flexible and scalable architecture.
13
+
14
+ This milestone introduces:
15
+ - **Unified Collection**: Single `Memory_public` for all public spaces
16
+ - **Multi-Space Support**: `spaces: string[]` array instead of single `space_id`
17
+ - **Multi-Space Search**: Query multiple spaces in one call
18
+ - **No Duplication**: One memory, multiple spaces
19
+ - **Efficient Storage**: N× reduction in documents
20
+
21
+ ---
22
+
23
+ ## Deliverables
24
+
25
+ ### 1. Type System Updates
26
+ - Update `SpaceMemory` interface: `space_id: string` → `spaces: string[]`
27
+ - Update type exports and constants
28
+ - Backward compatibility considerations
29
+
30
+ ### 2. Schema Updates
31
+ - Add `spaces` array field to Weaviate schema
32
+ - Create `Memory_public` collection
33
+ - Update space schema utilities
34
+ - Collection name constants
35
+
36
+ ### 3. Tool Updates (5 tools)
37
+ - Update `remember_publish` - Support `spaces` array parameter
38
+ - Update `remember_confirm` - Handle multi-space publishing
39
+ - Update `remember_search_space` - Multi-space search with `containsAny`
40
+ - Update `remember_query_space` - Multi-space RAG queries
41
+ - Update `remember_deny` - No changes needed
42
+
43
+ ### 4. Migration Strategy
44
+ - Backward compatibility during transition
45
+ - Data migration plan (if needed)
46
+ - Deprecation timeline
47
+
48
+ ### 5. Testing & Documentation
49
+ - Update unit tests for all affected tools
50
+ - Add multi-space test scenarios
51
+ - Update README with multi-space examples
52
+ - Update API documentation
53
+
54
+ ---
55
+
56
+ ## Success Criteria
57
+
58
+ - [ ] `SpaceMemory` type uses `spaces: string[]`
59
+ - [ ] `Memory_public` collection created successfully
60
+ - [ ] `remember_publish` accepts `spaces` array
61
+ - [ ] Can publish to multiple spaces in one call
62
+ - [ ] `remember_search_space` accepts `spaces` array
63
+ - [ ] Multi-space search returns results from all requested spaces
64
+ - [ ] No memory duplication across spaces
65
+ - [ ] All 5 space tools work with new architecture
66
+ - [ ] TypeScript compiles without errors
67
+ - [ ] All tests passing (including new multi-space tests)
68
+ - [ ] Build successful
69
+ - [ ] README updated with multi-space examples
70
+ - [ ] Backward compatibility maintained (if applicable)
71
+
72
+ ---
73
+
74
+ ## Key Files to Modify
75
+
76
+ ```
77
+ src/
78
+ ├── types/
79
+ │ └── space-memory.ts # Update SpaceMemory interface
80
+ ├── weaviate/
81
+ │ └── space-schema.ts # Update schema, add Memory_public
82
+ └── tools/
83
+ ├── publish.ts # Support spaces array
84
+ ├── confirm.ts # Handle multi-space publish
85
+ ├── search-space.ts # Multi-space search
86
+ └── query-space.ts # Multi-space query
87
+
88
+ tests/
89
+ └── unit/
90
+ ├── space-schema.test.ts # Add multi-space tests
91
+ ├── publish.test.ts # Add multi-space tests
92
+ ├── search-space.test.ts # Add multi-space tests
93
+ └── query-space.test.ts # Add multi-space tests
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Implementation Tasks
99
+
100
+ See individual task documents:
101
+ - Task 46: Update SpaceMemory Types for Multi-Space
102
+ - Task 47: Update Space Schema with Spaces Array
103
+ - Task 48: Create Memory_public Collection
104
+ - Task 49: Update remember_publish for Multi-Space
105
+ - Task 50: Update remember_confirm for Multi-Space
106
+ - Task 51: Update remember_search_space for Multi-Space
107
+ - Task 52: Update remember_query_space for Multi-Space
108
+ - Task 53: Add Multi-Space Unit Tests
109
+ - Task 54: Update Documentation for Multi-Space
110
+
111
+ ---
112
+
113
+ ## Architecture Notes
114
+
115
+ ### Before (Per-Space Collections)
116
+ ```
117
+ Memory_the_void → Only "The Void" memories
118
+ Memory_dogs → Only "Dogs" memories
119
+ Memory_cats → Only "Cats" memories
120
+ ```
121
+
122
+ **Problems**:
123
+ - Can't search multiple spaces at once
124
+ - Memory duplication if published to multiple spaces
125
+ - Collection proliferation
126
+
127
+ ### After (Unified Collection)
128
+ ```
129
+ Memory_public → ALL public memories
130
+ - spaces: ["the_void"]
131
+ - spaces: ["dogs", "cats"]
132
+ - spaces: ["the_void", "dogs"]
133
+ ```
134
+
135
+ **Benefits**:
136
+ - ✅ Multi-space search in one query
137
+ - ✅ No duplication
138
+ - ✅ Efficient storage
139
+ - ✅ Flexible space management
140
+
141
+ ### Multi-Space Search Example
142
+ ```typescript
143
+ remember_search_space({
144
+ spaces: ["the_void", "dogs"], // ✅ Multiple spaces!
145
+ query: "cute dog pictures"
146
+ })
147
+
148
+ // Weaviate filter:
149
+ collection.filter.byProperty('spaces').containsAny(['the_void', 'dogs'])
150
+ ```
151
+
152
+ ---
153
+
154
+ ## Migration Strategy
155
+
156
+ ### Phase 1: Add Support (v2.4.0 - Backward Compatible)
157
+ - Add `spaces` field to schema (keep `space_id` temporarily)
158
+ - Support both `space` and `spaces` parameters
159
+ - Create `Memory_public` collection
160
+ - Dual-write to both old and new collections
161
+
162
+ ### Phase 2: Migrate Data (v2.5.0)
163
+ - Copy existing memories from per-space to unified
164
+ - Verify data integrity
165
+ - Mark old collections as deprecated
166
+
167
+ ### Phase 3: Remove Old (v3.0.0 - Breaking Change)
168
+ - Remove `space_id` field
169
+ - Remove per-space collections
170
+ - Remove backward compatibility code
171
+ - Update all documentation
172
+
173
+ ---
174
+
175
+ ## Testing Strategy
176
+
177
+ 1. **Unit Tests**: Each tool with multi-space scenarios
178
+ 2. **Integration Tests**: Full publish → search workflow
179
+ 3. **Migration Tests**: Data migration validation
180
+ 4. **Performance Tests**: Compare single vs. multi-space queries
181
+
182
+ ---
183
+
184
+ ## Breaking Changes
185
+
186
+ **v3.0.0 (Future)**:
187
+ - Remove `space_id` field from SpaceMemory
188
+ - Remove per-space collections
189
+ - Remove `space` parameter (use `spaces` only)
190
+
191
+ **Migration Guide**:
192
+ ```typescript
193
+ // Before (v2.3.x)
194
+ remember_publish({ memory_id: "abc", target: "the_void" })
195
+ remember_search_space({ space: "the_void", query: "..." })
196
+
197
+ // After (v3.0.0)
198
+ remember_publish({ memory_id: "abc", spaces: ["the_void"] })
199
+ remember_search_space({ spaces: ["the_void"], query: "..." })
200
+ ```
201
+
202
+ ---
203
+
204
+ **Next Milestone**: M12 - Comment System (3 schema fields only!)
205
+ **Blockers**: None (builds on M10)