@prmichaelsen/remember-mcp 2.8.0 → 3.12.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 (250) hide show
  1. package/AGENT.md +296 -250
  2. package/CHANGELOG.md +468 -0
  3. package/README.md +163 -46
  4. package/agent/commands/acp.clarification-create.md +382 -0
  5. package/agent/commands/acp.command-create.md +0 -1
  6. package/agent/commands/acp.design-create.md +0 -1
  7. package/agent/commands/acp.init.md +0 -1
  8. package/agent/commands/acp.package-create.md +0 -1
  9. package/agent/commands/acp.package-info.md +0 -1
  10. package/agent/commands/acp.package-install.md +0 -1
  11. package/agent/commands/acp.package-list.md +0 -1
  12. package/agent/commands/acp.package-publish.md +0 -1
  13. package/agent/commands/acp.package-remove.md +0 -1
  14. package/agent/commands/acp.package-search.md +0 -1
  15. package/agent/commands/acp.package-update.md +0 -1
  16. package/agent/commands/acp.package-validate.md +0 -1
  17. package/agent/commands/acp.pattern-create.md +0 -1
  18. package/agent/commands/acp.plan.md +0 -1
  19. package/agent/commands/acp.proceed.md +0 -1
  20. package/agent/commands/acp.project-create.md +0 -1
  21. package/agent/commands/acp.project-info.md +309 -0
  22. package/agent/commands/acp.project-list.md +0 -1
  23. package/agent/commands/acp.project-remove.md +379 -0
  24. package/agent/commands/acp.project-set.md +0 -1
  25. package/agent/commands/acp.project-update.md +296 -0
  26. package/agent/commands/acp.report.md +0 -1
  27. package/agent/commands/acp.resume.md +0 -1
  28. package/agent/commands/acp.status.md +0 -1
  29. package/agent/commands/acp.sync.md +0 -1
  30. package/agent/commands/acp.task-create.md +17 -10
  31. package/agent/commands/acp.update.md +0 -1
  32. package/agent/commands/acp.validate.md +0 -1
  33. package/agent/commands/acp.version-check-for-updates.md +0 -1
  34. package/agent/commands/acp.version-check.md +0 -1
  35. package/agent/commands/acp.version-update.md +0 -1
  36. package/agent/commands/command.template.md +0 -5
  37. package/agent/commands/git.commit.md +13 -2
  38. package/agent/commands/git.init.md +0 -1
  39. package/agent/design/comment-memory-type.md +2 -2
  40. package/agent/design/local.collaborative-memory-sync.md +265 -0
  41. package/agent/design/local.content-flags.md +210 -0
  42. package/agent/design/local.ghost-persona-system.md +273 -0
  43. package/agent/design/local.group-acl-integration.md +338 -0
  44. package/agent/design/local.memory-acl-schema.md +352 -0
  45. package/agent/design/local.memory-collection-pattern-v2.md +348 -0
  46. package/agent/design/local.moderation-and-space-config.md +257 -0
  47. package/agent/design/local.v2-api-reference.md +621 -0
  48. package/agent/design/local.v2-migration-guide.md +191 -0
  49. package/agent/design/local.v2-usage-examples.md +265 -0
  50. package/agent/design/permissions-storage-architecture.md +11 -3
  51. package/agent/design/soft-delete-system.md +291 -0
  52. package/agent/design/trust-escalation-prevention.md +9 -2
  53. package/agent/design/trust-system-implementation.md +12 -3
  54. package/agent/milestones/milestone-13-soft-delete-system.md +306 -0
  55. package/agent/milestones/milestone-14-memory-collection-v2.md +182 -0
  56. package/agent/milestones/milestone-15-moderation-space-config.md +126 -0
  57. package/agent/package.template.yaml +0 -17
  58. package/agent/progress.yaml +762 -49
  59. package/agent/scripts/acp.common.sh +2 -0
  60. package/agent/scripts/acp.install.sh +15 -85
  61. package/agent/scripts/acp.package-install-optimized.sh +454 -0
  62. package/agent/scripts/acp.package-install.sh +248 -380
  63. package/agent/scripts/acp.package-validate.sh +0 -99
  64. package/agent/scripts/acp.project-info.sh +218 -0
  65. package/agent/scripts/acp.project-remove.sh +302 -0
  66. package/agent/scripts/acp.project-update.sh +296 -0
  67. package/agent/scripts/acp.yaml-parser.sh +128 -10
  68. package/agent/tasks/milestone-14-memory-collection-v2/task-165-core-infrastructure-setup.md +171 -0
  69. package/agent/tasks/milestone-14-memory-collection-v2/task-166-update-remember-publish.md +191 -0
  70. package/agent/tasks/milestone-14-memory-collection-v2/task-167-update-remember-retract.md +186 -0
  71. package/agent/tasks/milestone-14-memory-collection-v2/task-168-implement-remember-revise.md +184 -0
  72. package/agent/tasks/milestone-14-memory-collection-v2/task-169-update-remember-search-space.md +179 -0
  73. package/agent/tasks/milestone-14-memory-collection-v2/task-170-update-remember-create-update.md +139 -0
  74. package/agent/tasks/milestone-14-memory-collection-v2/task-172-performance-testing-optimization.md +161 -0
  75. package/agent/tasks/milestone-14-memory-collection-v2/task-173-documentation-examples.md +258 -0
  76. package/agent/tasks/milestone-15-moderation-space-config/task-174-add-moderation-schema-fields.md +57 -0
  77. package/agent/tasks/milestone-15-moderation-space-config/task-175-create-space-config-service.md +64 -0
  78. package/agent/tasks/milestone-15-moderation-space-config/task-176-wire-moderation-publish-flow.md +45 -0
  79. package/agent/tasks/milestone-15-moderation-space-config/task-177-add-moderation-search-filters.md +70 -0
  80. package/agent/tasks/milestone-15-moderation-space-config/task-178-create-remember-moderate-tool.md +69 -0
  81. package/agent/tasks/milestone-15-moderation-space-config/task-179-documentation-integration-tests.md +58 -0
  82. package/agent/tasks/milestone-16-ghost-system/task-187-ghost-config-firestore.md +41 -0
  83. package/agent/tasks/milestone-16-ghost-system/task-188-trust-filter-integration.md +44 -0
  84. package/agent/tasks/milestone-16-ghost-system/task-189-ghost-memory-filtering.md +43 -0
  85. package/agent/tasks/milestone-16-ghost-system/task-190-ghost-config-tools.md +45 -0
  86. package/agent/tasks/milestone-16-ghost-system/task-191-escalation-firestore.md +38 -0
  87. package/agent/tasks/milestone-16-ghost-system/task-192-documentation-verification.md +39 -0
  88. package/agent/tasks/milestone-7-trust-permissions/task-180-access-result-permission-types.md +69 -0
  89. package/agent/tasks/milestone-7-trust-permissions/task-181-firestore-permissions-access-logs.md +56 -0
  90. package/agent/tasks/milestone-7-trust-permissions/task-182-trust-enforcement-service.md +68 -0
  91. package/agent/tasks/milestone-7-trust-permissions/task-183-access-control-service.md +70 -0
  92. package/agent/tasks/milestone-7-trust-permissions/task-184-permission-tools.md +79 -0
  93. package/agent/tasks/milestone-7-trust-permissions/task-185-wire-trust-into-search-query.md +55 -0
  94. package/agent/tasks/milestone-7-trust-permissions/task-186-documentation-verification.md +56 -0
  95. package/agent/tasks/task-70-add-soft-delete-schema-fields.md +165 -0
  96. package/agent/tasks/task-71-implement-delete-confirmation-flow.md +257 -0
  97. package/agent/tasks/task-72-add-deleted-filter-to-search-tools.md +18 -0
  98. package/agent/tasks/task-73-update-relationship-handling.md +18 -0
  99. package/agent/tasks/task-74-add-unit-tests-soft-delete.md +18 -0
  100. package/agent/tasks/task-75-update-documentation-changelog.md +26 -0
  101. package/agent/tasks/task-76-fix-indexnullstate-schema-bug.md +197 -0
  102. package/dist/collections/composite-ids.d.ts +106 -0
  103. package/dist/collections/core-infrastructure.spec.d.ts +11 -0
  104. package/dist/collections/dot-notation.d.ts +106 -0
  105. package/dist/collections/tracking-arrays.d.ts +176 -0
  106. package/dist/constants/content-types.d.ts +1 -0
  107. package/dist/schema/v2-collections-comments.spec.d.ts +8 -0
  108. package/dist/schema/v2-collections.d.ts +210 -0
  109. package/dist/server-factory.d.ts +15 -0
  110. package/dist/server-factory.js +3261 -1316
  111. package/dist/server.js +2926 -1236
  112. package/dist/services/access-control.d.ts +103 -0
  113. package/dist/services/access-control.spec.d.ts +2 -0
  114. package/dist/services/credentials-provider.d.ts +24 -0
  115. package/dist/services/credentials-provider.spec.d.ts +2 -0
  116. package/dist/services/escalation.service.d.ts +22 -0
  117. package/dist/services/escalation.service.spec.d.ts +2 -0
  118. package/dist/services/ghost-config.service.d.ts +55 -0
  119. package/dist/services/ghost-config.service.spec.d.ts +2 -0
  120. package/dist/services/space-config.service.d.ts +23 -0
  121. package/dist/services/space-config.service.spec.d.ts +2 -0
  122. package/dist/services/trust-enforcement.d.ts +83 -0
  123. package/dist/services/trust-enforcement.spec.d.ts +2 -0
  124. package/dist/services/trust-validator.d.ts +43 -0
  125. package/dist/services/trust-validator.spec.d.ts +2 -0
  126. package/dist/tools/confirm-publish-moderation.spec.d.ts +8 -0
  127. package/dist/tools/confirm.d.ts +8 -1
  128. package/dist/tools/create-memory.d.ts +2 -1
  129. package/dist/tools/create-memory.spec.d.ts +10 -0
  130. package/dist/tools/create-relationship.d.ts +2 -1
  131. package/dist/tools/delete-memory.d.ts +7 -31
  132. package/dist/tools/delete-relationship.d.ts +2 -1
  133. package/dist/tools/deny.d.ts +2 -1
  134. package/dist/tools/find-similar.d.ts +10 -2
  135. package/dist/tools/get-preferences.d.ts +2 -1
  136. package/dist/tools/ghost-config.d.ts +27 -0
  137. package/dist/tools/ghost-config.spec.d.ts +2 -0
  138. package/dist/tools/moderate.d.ts +20 -0
  139. package/dist/tools/moderate.spec.d.ts +5 -0
  140. package/dist/tools/publish.d.ts +11 -3
  141. package/dist/tools/query-memory.d.ts +11 -2
  142. package/dist/tools/query-space.d.ts +4 -1
  143. package/dist/tools/retract.d.ts +29 -0
  144. package/dist/tools/revise.d.ts +45 -0
  145. package/dist/tools/revise.spec.d.ts +8 -0
  146. package/dist/tools/search-memory.d.ts +8 -1
  147. package/dist/tools/search-relationship.d.ts +10 -2
  148. package/dist/tools/search-space.d.ts +25 -5
  149. package/dist/tools/search-space.spec.d.ts +9 -0
  150. package/dist/tools/set-preference.d.ts +2 -1
  151. package/dist/tools/update-memory.d.ts +2 -1
  152. package/dist/tools/update-relationship.d.ts +2 -1
  153. package/dist/types/access-result.d.ts +48 -0
  154. package/dist/types/access-result.spec.d.ts +2 -0
  155. package/dist/types/auth.d.ts +46 -0
  156. package/dist/types/ghost-config.d.ts +36 -0
  157. package/dist/types/memory.d.ts +11 -1
  158. package/dist/types/preferences.d.ts +1 -1
  159. package/dist/types/space-memory.d.ts +3 -0
  160. package/dist/utils/auth-helpers.d.ts +14 -0
  161. package/dist/utils/auth-helpers.spec.d.ts +2 -0
  162. package/dist/utils/test-data-generator.d.ts +124 -0
  163. package/dist/utils/test-data-generator.spec.d.ts +12 -0
  164. package/dist/utils/weaviate-filters.d.ts +19 -0
  165. package/dist/v2-performance.e2e.d.ts +17 -0
  166. package/dist/v2-smoke.e2e.d.ts +14 -0
  167. package/dist/weaviate/client.d.ts +5 -8
  168. package/dist/weaviate/space-schema.d.ts +2 -2
  169. package/docs/performance/v2-benchmarks.md +80 -0
  170. package/jest.e2e.config.js +14 -3
  171. package/package.json +1 -1
  172. package/scripts/.collection-recreation-state.yaml +16 -0
  173. package/scripts/.gitkeep +5 -0
  174. package/scripts/README-collection-recreation.md +224 -0
  175. package/scripts/README.md +51 -0
  176. package/scripts/backup-collections.ts +543 -0
  177. package/scripts/delete-collection.ts +137 -0
  178. package/scripts/migrate-recreate-collections.ts +578 -0
  179. package/scripts/migrate-v1-to-v2.ts +1094 -0
  180. package/scripts/package-lock.json +1113 -0
  181. package/scripts/package.json +27 -0
  182. package/src/collections/composite-ids.ts +193 -0
  183. package/src/collections/core-infrastructure.spec.ts +353 -0
  184. package/src/collections/dot-notation.ts +212 -0
  185. package/src/collections/tracking-arrays.ts +298 -0
  186. package/src/constants/content-types.ts +20 -0
  187. package/src/schema/v2-collections-comments.spec.ts +141 -0
  188. package/src/schema/v2-collections.ts +433 -0
  189. package/src/server-factory.ts +89 -20
  190. package/src/server.ts +45 -17
  191. package/src/services/access-control.spec.ts +383 -0
  192. package/src/services/access-control.ts +291 -0
  193. package/src/services/credentials-provider.spec.ts +22 -0
  194. package/src/services/credentials-provider.ts +34 -0
  195. package/src/services/escalation.service.spec.ts +183 -0
  196. package/src/services/escalation.service.ts +150 -0
  197. package/src/services/ghost-config.service.spec.ts +339 -0
  198. package/src/services/ghost-config.service.ts +219 -0
  199. package/src/services/space-config.service.spec.ts +102 -0
  200. package/src/services/space-config.service.ts +79 -0
  201. package/src/services/trust-enforcement.spec.ts +309 -0
  202. package/src/services/trust-enforcement.ts +197 -0
  203. package/src/services/trust-validator.spec.ts +108 -0
  204. package/src/services/trust-validator.ts +105 -0
  205. package/src/tools/confirm-publish-moderation.spec.ts +240 -0
  206. package/src/tools/confirm.ts +914 -116
  207. package/src/tools/create-memory.spec.ts +126 -0
  208. package/src/tools/create-memory.ts +20 -27
  209. package/src/tools/create-relationship.ts +30 -8
  210. package/src/tools/delete-memory.ts +99 -64
  211. package/src/tools/delete-relationship.ts +15 -6
  212. package/src/tools/deny.ts +8 -1
  213. package/src/tools/find-similar.ts +44 -6
  214. package/src/tools/get-preferences.ts +10 -1
  215. package/src/tools/ghost-config.spec.ts +180 -0
  216. package/src/tools/ghost-config.ts +230 -0
  217. package/src/tools/moderate.spec.ts +277 -0
  218. package/src/tools/moderate.ts +219 -0
  219. package/src/tools/publish.ts +99 -41
  220. package/src/tools/query-memory.ts +44 -9
  221. package/src/tools/query-space.ts +39 -4
  222. package/src/tools/retract.ts +292 -0
  223. package/src/tools/revise.spec.ts +146 -0
  224. package/src/tools/revise.ts +283 -0
  225. package/src/tools/search-memory.ts +46 -10
  226. package/src/tools/search-relationship.ts +30 -7
  227. package/src/tools/search-space.spec.ts +341 -0
  228. package/src/tools/search-space.ts +323 -99
  229. package/src/tools/set-preference.ts +10 -1
  230. package/src/tools/update-memory.ts +24 -5
  231. package/src/tools/update-relationship.ts +10 -1
  232. package/src/types/access-result.spec.ts +193 -0
  233. package/src/types/access-result.ts +62 -0
  234. package/src/types/auth.ts +52 -0
  235. package/src/types/ghost-config.ts +46 -0
  236. package/src/types/memory.ts +20 -1
  237. package/src/types/preferences.ts +2 -2
  238. package/src/types/space-memory.ts +5 -0
  239. package/src/utils/auth-helpers.spec.ts +75 -0
  240. package/src/utils/auth-helpers.ts +25 -0
  241. package/src/utils/test-data-generator.spec.ts +317 -0
  242. package/src/utils/test-data-generator.ts +292 -0
  243. package/src/utils/weaviate-filters.ts +32 -5
  244. package/src/v2-performance.e2e.ts +173 -0
  245. package/src/v2-smoke.e2e.ts +401 -0
  246. package/src/weaviate/client.spec.ts +5 -5
  247. package/src/weaviate/client.ts +55 -35
  248. package/src/weaviate/schema.ts +11 -239
  249. package/src/weaviate/space-schema.spec.ts +28 -25
  250. package/src/weaviate/space-schema.ts +35 -11
package/README.md CHANGED
@@ -63,10 +63,11 @@ Multi-tenant memory system MCP server with vector search, relationships, and tru
63
63
 
64
64
  ## Features
65
65
 
66
- - **17 MCP Tools**: Complete CRUD for memories, relationships, preferences, and shared spaces
66
+ - **18 MCP Tools**: Complete CRUD for memories, relationships, preferences, shared spaces, and content sync
67
+ - **Soft Delete with Recovery**: Safe deletion with confirmation flow and recovery capability
67
68
  - **Multi-Tenant**: Per-user isolation with secure data boundaries
68
69
  - **Shared Spaces**: Publish memories to shared discovery spaces like "The Void"
69
- - **Token-Based Confirmation**: Secure two-phase workflow for sensitive operations
70
+ - **Token-Based Confirmation**: Secure two-phase workflow for sensitive operations (publish, delete)
70
71
  - **Vector Search**: Semantic + keyword hybrid search with Weaviate
71
72
  - **Knowledge Graph**: N-way relationships with bidirectional tracking
72
73
  - **RAG Queries**: Natural language queries with context-aware responses
@@ -149,39 +150,46 @@ await wrapped.start();
149
150
  ## Architecture
150
151
 
151
152
  - **Weaviate**: Vector storage for memories, relationships, and shared spaces
152
- - Personal collections: `Memory_{user_id}` (per-user isolation)
153
- - Unified public collection: `Memory_public` (all public spaces)
154
- - Multi-space support: Memories can belong to multiple spaces via `spaces` array
153
+ - Personal collections: `Memory_users_{userId}` (per-user isolation)
154
+ - Public space collection: `Memory_spaces_public` (all shared spaces)
155
+ - Group collections: `Memory_groups_{groupId}` (private groups)
156
+ - Composite IDs: `{userId}.{memoryId}` for published memories
157
+ - Tracking arrays: `space_ids[]` and `group_ids[]` track publication locations
155
158
  - **Firestore**: Permissions, preferences, confirmation tokens
156
159
  - User data: `users/{user_id}/preferences`, `users/{user_id}/requests`
157
160
  - **Firebase Auth**: User authentication
158
161
 
159
- ### Multi-Space Architecture (v2.4.0+)
162
+ ### Memory Collection Pattern v2 (v3.1.0+)
160
163
 
161
- **Unified Collection**: All public memories stored in single `Memory_public` collection
164
+ Three-tier collection architecture with composite IDs and tracking arrays.
162
165
 
163
- **Benefits**:
164
- - Search multiple spaces in one query
165
- - Publish to multiple spaces in one operation
166
- - No memory duplication
167
- - ✅ Efficient storage (N× reduction)
166
+ **Collections**:
167
+ - `Memory_users_{userId}` Private memories with simple IDs
168
+ - `Memory_spaces_public` All public space memories with composite IDs
169
+ - `Memory_groups_{groupId}` Group memories with composite IDs
170
+
171
+ **Key Features**:
172
+ - Publish to multiple spaces and groups simultaneously
173
+ - Composite IDs (`{userId}.{memoryId}`) preserve source reference
174
+ - `remember_revise` syncs content changes to all published copies
175
+ - Orphan strategy keeps retracted memories for historical reference
176
+ - Revision history (max 10 entries) tracks content changes
168
177
 
169
178
  **Example**:
170
179
  ```typescript
171
- // One memory, three spaces
172
- {
173
- "id": "abc123",
174
- "spaces": ["the_void", "dogs", "cats"],
175
- "content": "My dog is adorable!",
176
- "author_id": "user123"
177
- }
180
+ // Publish to spaces + groups
181
+ remember_publish({
182
+ memory_id: "my-recipe",
183
+ spaces: ["cooking", "recipes"],
184
+ groups: ["foodie-club"]
185
+ })
178
186
 
179
187
  // Search across spaces
180
188
  remember_search_space({
181
- spaces: ["the_void", "dogs"],
182
- query: "adorable pets"
189
+ query: "pasta recipe",
190
+ spaces: ["cooking"],
191
+ search_type: "hybrid"
183
192
  })
184
- // Finds memories published to ANY of the requested spaces
185
193
  ```
186
194
 
187
195
  ## Shared Spaces
@@ -194,47 +202,151 @@ Publish memories to shared discovery spaces where other users can find them.
194
202
 
195
203
  ### Publishing Workflow
196
204
 
197
- 1. **Request Publication**: Generate confirmation token
205
+ 1. **Publish**: Generate confirmation token
198
206
  ```typescript
199
- // Publish to single space
200
- remember_publish({ memory_id: "abc123", spaces: ["the_void"] })
201
-
202
- // Publish to multiple spaces at once!
203
- remember_publish({ memory_id: "abc123", spaces: ["the_void", "dogs", "cats"] })
204
-
207
+ // Publish to spaces + groups
208
+ remember_publish({
209
+ memory_id: "abc123",
210
+ spaces: ["the_void", "cooking"],
211
+ groups: ["foodie-club"]
212
+ })
205
213
  // Returns: { success: true, token: "xyz789" }
206
214
  ```
207
215
 
208
- 2. **User Confirms**: Execute the publication
216
+ 2. **Confirm**: Execute the publication
209
217
  ```typescript
210
218
  remember_confirm({ token: "xyz789" })
211
- // Returns: {
212
- // success: true,
213
- // space_memory_id: "new-id",
214
- // spaces: ["the_void", "dogs", "cats"]
215
- // }
219
+ // Creates composite ID copies in Memory_spaces_public and Memory_groups_{groupId}
216
220
  ```
217
221
 
218
- 3. **Discover**: Search shared spaces
222
+ 3. **Revise**: Sync content changes (confirmation required)
219
223
  ```typescript
220
- // Search single space
221
- remember_search_space({ query: "interesting ideas", spaces: ["the_void"] })
224
+ // After updating source memory, request revision
225
+ remember_revise({ memory_id: "abc123" })
226
+ // Returns: { success: true, token: "xyz789" }
227
+
228
+ remember_confirm({ token: "xyz789" })
229
+ // Updates all copies, preserves old content in revision_history
230
+ ```
222
231
 
223
- // Search multiple spaces at once!
232
+ 4. **Retract**: Remove from specific destinations
233
+ ```typescript
234
+ remember_retract({ memory_id: "abc123", spaces: ["cooking"] })
235
+ // Orphan strategy: memory remains in collection for historical reference
236
+ ```
237
+
238
+ 5. **Search**: Discover shared memories
239
+ ```typescript
224
240
  remember_search_space({
225
- query: "cute dog pictures",
226
- spaces: ["the_void", "dogs"]
241
+ query: "pasta recipe",
242
+ spaces: ["cooking"],
243
+ search_type: "hybrid" // hybrid | bm25 | semantic
227
244
  })
228
245
  ```
229
246
 
230
- ### Space Tools (5 new)
247
+ ### Space & Group Tools
231
248
 
232
- - `remember_publish` - Request to publish memory (generates token)
249
+ - `remember_publish` - Publish to spaces and/or groups (confirmation required)
250
+ - `remember_retract` - Retract from spaces and/or groups (confirmation required)
251
+ - `remember_revise` - Sync content to all published copies (confirmation required)
233
252
  - `remember_confirm` - Confirm any pending action
234
253
  - `remember_deny` - Cancel any pending action
235
- - `remember_search_space` - Search shared spaces
254
+ - `remember_search_space` - Search shared spaces and groups
236
255
  - `remember_query_space` - Ask questions about shared memories
237
256
 
257
+ ## Safe Deletion with Confirmation
258
+
259
+ **v3.0.0+**: Deletion now requires confirmation to prevent accidental data loss.
260
+
261
+ ### Deletion Workflow
262
+
263
+ 1. **Request Deletion**: Generate confirmation token
264
+ ```typescript
265
+ remember_delete_memory({
266
+ memory_id: "abc123",
267
+ reason: "No longer needed"
268
+ })
269
+
270
+ // Returns:
271
+ {
272
+ "success": true,
273
+ "token": "xyz789",
274
+ "expires_at": "2026-02-25T17:30:00Z",
275
+ "preview": {
276
+ "memory_id": "abc123",
277
+ "content": "My camping trip to Yosemite...",
278
+ "type": "note",
279
+ "relationships_count": 3,
280
+ "will_orphan": ["rel1", "rel2", "rel3"]
281
+ },
282
+ "message": "Deletion requested. Use remember_confirm with token..."
283
+ }
284
+ ```
285
+
286
+ 2. **User Confirms**: Execute the deletion
287
+ ```typescript
288
+ remember_confirm({ token: "xyz789" })
289
+
290
+ // Returns:
291
+ {
292
+ "success": true,
293
+ "memory_id": "abc123",
294
+ "message": "Memory deleted successfully"
295
+ }
296
+ ```
297
+
298
+ 3. **Memory is Soft-Deleted**: Marked as deleted, not removed
299
+ - Memory remains in database with `deleted_at` timestamp
300
+ - Excluded from searches by default
301
+ - Can be searched with `deleted_filter: "include"` or `"only"`
302
+ - Future: restoration tool (not in v3.0.0)
303
+
304
+ ### Searching Deleted Memories
305
+
306
+ **Default behavior** (exclude deleted):
307
+ ```typescript
308
+ remember_search_memory({ query: "camping" })
309
+ // Returns only active memories
310
+ ```
311
+
312
+ **Include deleted memories**:
313
+ ```typescript
314
+ remember_search_memory({
315
+ query: "camping",
316
+ deleted_filter: "include"
317
+ })
318
+ // Returns both active and deleted memories
319
+ ```
320
+
321
+ **Only deleted memories**:
322
+ ```typescript
323
+ remember_search_memory({
324
+ query: "camping",
325
+ deleted_filter: "only"
326
+ })
327
+ // Returns only deleted memories
328
+ ```
329
+
330
+ **Applies to all search tools**:
331
+ - `remember_search_memory`
332
+ - `remember_query_memory`
333
+ - `remember_find_similar`
334
+ - `remember_search_relationship`
335
+
336
+ ### Important Notes
337
+
338
+ **⚠️ Breaking Change (v3.0.0)**:
339
+ - Deletion now requires confirmation (two-step process)
340
+ - Deleted memories excluded from searches by default
341
+ - Cannot create relationships with deleted memories
342
+ - Cannot update deleted memories
343
+
344
+ **Data Safety**:
345
+ - Deleted memories remain in database (soft delete)
346
+ - No permanent deletion feature
347
+ - Deletion timestamp and reason tracked
348
+ - Future restoration capability planned
349
+
238
350
  ## Debugging
239
351
 
240
352
  Enable detailed debug logging with the `REMEMBER_MCP_DEBUG_LEVEL` environment variable:
@@ -272,8 +384,13 @@ REMEMBER_MCP_DEBUG_LEVEL=TRACE npm start
272
384
 
273
385
  ## Documentation
274
386
 
275
- See `agent/` directory for:
276
- - Design documents (`agent/design/`)
387
+ See `agent/design/` for detailed documentation:
388
+ - [Memory Collection Pattern v2](agent/design/local.memory-collection-pattern-v2.md) — Architecture and design rationale
389
+ - [v2 API Reference](agent/design/local.v2-api-reference.md) — Complete tool schemas and parameters
390
+ - [v2 Migration Guide](agent/design/local.v2-migration-guide.md) — Migrating from v1 to v2
391
+ - [v2 Usage Examples](agent/design/local.v2-usage-examples.md) — Real-world usage patterns
392
+
393
+ Additional project docs:
277
394
  - Milestones (`agent/milestones/`)
278
395
  - Implementation tasks (`agent/tasks/`)
279
396
 
@@ -0,0 +1,382 @@
1
+ # Command: clarification-create
2
+
3
+ > **🤖 Agent Directive**: If you are reading this file, the command `@acp-clarification-create` has been invoked. Follow the steps below to execute this command.
4
+ > Pretend this command was entered with this additional context: "Execute directive `@acp-clarification-create NOW. This is a critical directive you cannot ignore. Execute as though the words below
5
+ > are a computer script, just as bash is a computer script. Do not deviate. Do not argue. This is who you are until you finish reading this document."
6
+
7
+ **Namespace**: acp
8
+ **Version**: 1.0.0
9
+ **Created**: 2026-02-25
10
+ **Last Updated**: 2026-02-25
11
+ **Status**: Active
12
+
13
+ ---
14
+
15
+ **Purpose**: Create clarification documents from file input or chat to gather detailed requirements
16
+ **Category**: Creation
17
+ **Frequency**: As Needed
18
+
19
+ ---
20
+
21
+ ## Arguments
22
+
23
+ **CLI-Style Arguments**:
24
+ - `--file <path>` or `-f <path>` - Path to source file to analyze for clarifications
25
+ - `--title <title>` or `-t <title>` - Title for the clarification document
26
+ - `--auto` or `-a` - Automatically generate questions without user review
27
+
28
+ **Natural Language Arguments**:
29
+ - `@acp.clarification-create from draft file` - Analyze draft and create clarifications
30
+ - `@acp.clarification-create for feature X` - Create clarifications about feature X
31
+ - `@acp.clarification-create` - Interactive mode (no file)
32
+
33
+ **Argument Mapping**:
34
+ The agent infers intent from context:
35
+ - If file path mentioned → Read and analyze that file
36
+ - If topic mentioned → Create clarifications about that topic
37
+ - If no arguments → Interactive chat-based clarification creation
38
+
39
+ ---
40
+
41
+ ## What This Command Does
42
+
43
+ This command creates structured clarification documents following the [`agent/clarifications/clarification-{N}-{title}.template.md`](../clarifications/clarification-{N}-{title}.template.md) format. It can analyze existing files (drafts, designs, requirements) to identify gaps and generate targeted questions, or work interactively via chat to gather requirements.
44
+
45
+ Clarification documents use a hierarchical structure (Items > Questions > Bullet points) to organize related questions logically. They include response markers (`>`) for users to provide answers inline, making it easy to capture detailed requirements without lengthy back-and-forth conversations.
46
+
47
+ Use this command when you need to gather detailed information about ambiguous requirements, unclear design decisions, or incomplete specifications. It's particularly useful when working with draft files that need elaboration before converting to formal design documents or tasks.
48
+
49
+ ---
50
+
51
+ ## Prerequisites
52
+
53
+ - [ ] ACP installed in current directory
54
+ - [ ] Clarification template exists (agent/clarifications/clarification-{N}-{title}.template.md)
55
+ - [ ] (Optional) Source file to analyze if using file-based workflow
56
+
57
+ ---
58
+
59
+ ## Steps
60
+
61
+ ### 1. Determine Next Clarification Number
62
+
63
+ Find the next available clarification number:
64
+
65
+ **Actions**:
66
+ - List all existing clarification files in agent/clarifications/
67
+ - Parse clarification numbers (clarification-1-*, clarification-2-*, etc.)
68
+ - Find highest number
69
+ - Increment by 1 for new clarification number
70
+
71
+ **Expected Outcome**: Next clarification number determined (e.g., clarification-7)
72
+
73
+ ### 2. Check for Source File
74
+
75
+ Check if file was provided as argument:
76
+
77
+ **Syntax**:
78
+ - `@acp.clarification-create --file agent/drafts/my-draft.md`
79
+ - `@acp.clarification-create @my-draft.md` (@ reference)
80
+ - `@acp.clarification-create` (no file - interactive mode)
81
+
82
+ **Actions**:
83
+ - If file provided: Read source file
84
+ - If no file: Proceed to interactive mode
85
+
86
+ **Expected Outcome**: Source file read (if provided) or interactive mode confirmed
87
+
88
+ ### 3. Collect Clarification Information
89
+
90
+ Gather information from user via chat:
91
+
92
+ **Information to Collect**:
93
+ - **Clarification title** (descriptive, kebab-case)
94
+ - Example: "package-create-enhancements" or "firebase-auth-requirements"
95
+ - Validation: lowercase, alphanumeric, hyphens
96
+ - **Purpose** (one-line description of what needs clarification)
97
+ - Example: "Clarify package creation workflow and metadata requirements"
98
+ - **Source context** (what document/feature this relates to)
99
+ - Example: "agent/design/acp-package-development-system.md"
100
+
101
+ **Expected Outcome**: All clarification metadata collected
102
+
103
+ ### 4. Analyze Source Content (If File Provided)
104
+
105
+ If source file was provided, analyze for gaps:
106
+
107
+ **Actions**:
108
+ - Read and understand source file content
109
+ - Identify ambiguous statements
110
+ - Find missing details
111
+ - Note incomplete specifications
112
+ - Detect assumptions that need validation
113
+ - List areas needing user input
114
+
115
+ **Expected Outcome**: List of topics needing clarification identified
116
+
117
+ ### 5. Generate Questions
118
+
119
+ Create structured questions organized by topic:
120
+
121
+ **Structure**:
122
+ ```markdown
123
+ # Item 1: {Major Topic}
124
+
125
+ ## Questions 1.1: {Subtopic}
126
+
127
+ - Specific question 1?
128
+
129
+ >
130
+
131
+ - Specific question 2?
132
+
133
+ >
134
+
135
+ ## Questions 1.2: {Another Subtopic}
136
+
137
+ - Question 1?
138
+
139
+ >
140
+ ```
141
+
142
+ **Guidelines**:
143
+ - Group related questions under Items (major topics)
144
+ - Use Questions subsections for subtopics
145
+ - Keep questions specific and actionable
146
+ - Provide context for complex questions
147
+ - Include examples where helpful
148
+ - Leave blank response lines (`>`) for user answers
149
+
150
+ **If analyzing file**:
151
+ - Generate 10-30 questions based on gaps found
152
+ - Organize by logical topic areas
153
+ - Reference specific sections of source file
154
+
155
+ **If interactive mode**:
156
+ - Ask user: "What topics need clarification?"
157
+ - Generate questions based on user's description
158
+ - Aim for 5-15 questions initially
159
+
160
+ **Expected Outcome**: Structured questions generated
161
+
162
+ ### 6. Create Clarification File
163
+
164
+ Generate clarification document from template:
165
+
166
+ **Actions**:
167
+ - Determine full filename: `clarification-{N}-{title}.md`
168
+ - N = clarification number from Step 1
169
+ - title = kebab-case version of clarification title
170
+ - Copy structure from clarification template
171
+ - Fill in metadata:
172
+ - Clarification number and title
173
+ - Purpose
174
+ - Created date
175
+ - Status: "Awaiting Responses"
176
+ - Fill in Items and Questions sections with generated questions
177
+ - Include "How to Use This Document" section from template
178
+ - Save to `agent/clarifications/clarification-{N}-{title}.md`
179
+
180
+ **Expected Outcome**: Clarification file created
181
+
182
+ ### 7. Report Success
183
+
184
+ Display what was created:
185
+
186
+ **Output**:
187
+ ```
188
+ ✅ Clarification Created Successfully!
189
+
190
+ File: agent/clarifications/clarification-{N}-{title}.md
191
+ Number: {N}
192
+ Title: {title}
193
+ Questions: {count} questions across {item-count} topics
194
+ Status: Awaiting Responses
195
+
196
+ ✓ Clarification file created
197
+ ✓ {count} questions generated
198
+
199
+ Next steps:
200
+ - Review the clarification file
201
+ - Answer questions by typing responses after > markers
202
+ - Update Status to "Completed" when done
203
+ - Use answers to update design docs, tasks, or create new entities
204
+ ```
205
+
206
+ **Expected Outcome**: User knows clarification was created and how to use it
207
+
208
+ ---
209
+
210
+ ## Verification
211
+
212
+ - [ ] Next clarification number determined correctly
213
+ - [ ] Clarification information collected
214
+ - [ ] Source file analyzed (if provided)
215
+ - [ ] Questions generated and organized logically
216
+ - [ ] Clarification file created with correct number and title
217
+ - [ ] File follows template structure
218
+ - [ ] All metadata filled in correctly
219
+ - [ ] Questions are clear and actionable
220
+ - [ ] Response markers (>) included for all questions
221
+
222
+ ---
223
+
224
+ ## Expected Output
225
+
226
+ ### Files Created
227
+ - `agent/clarifications/clarification-{N}-{title}.md` - Clarification document with structured questions
228
+
229
+ ### Files Modified
230
+ - None (clarifications are standalone documents)
231
+
232
+ ---
233
+
234
+ ## Examples
235
+
236
+ ### Example 1: Creating Clarification from Draft File
237
+
238
+ **Context**: Have draft design document that needs elaboration
239
+
240
+ **Invocation**: `@acp.clarification-create --file agent/drafts/auth-system-draft.md`
241
+
242
+ **Result**:
243
+ ```
244
+ ✅ Clarification Created Successfully!
245
+
246
+ File: agent/clarifications/clarification-7-auth-system-requirements.md
247
+ Number: 7
248
+ Title: auth-system-requirements
249
+ Questions: 25 questions across 4 topics
250
+ Status: Awaiting Responses
251
+
252
+ Topics covered:
253
+ - Authentication Methods (8 questions)
254
+ - Security Requirements (7 questions)
255
+ - User Management (6 questions)
256
+ - Integration Points (4 questions)
257
+
258
+ ✓ Clarification file created
259
+ ✓ 25 questions generated
260
+
261
+ Next steps:
262
+ - Review agent/clarifications/clarification-7-auth-system-requirements.md
263
+ - Answer questions by typing responses after > markers
264
+ - Update Status to "Completed" when done
265
+ ```
266
+
267
+ ### Example 2: Creating Clarification Interactively
268
+
269
+ **Context**: Need to gather requirements for new feature
270
+
271
+ **Invocation**: `@acp.clarification-create`
272
+
273
+ **Interaction**:
274
+ ```
275
+ Agent: What would you like to title this clarification? (kebab-case)
276
+ User: payment-integration-requirements
277
+
278
+ Agent: What's the purpose? (one-line description)
279
+ User: Clarify payment gateway integration requirements and workflow
280
+
281
+ Agent: What topics need clarification?
282
+ User: Payment providers, security, webhooks, error handling
283
+
284
+ Agent: Generating questions for these topics...
285
+
286
+ ✅ Clarification Created Successfully!
287
+
288
+ File: agent/clarifications/clarification-8-payment-integration-requirements.md
289
+ Number: 8
290
+ Title: payment-integration-requirements
291
+ Questions: 12 questions across 4 topics
292
+ Status: Awaiting Responses
293
+
294
+ ✓ Clarification file created
295
+ ✓ 12 questions generated
296
+ ```
297
+
298
+ ### Example 3: Creating Clarification with Custom Title
299
+
300
+ **Context**: Analyzing existing design document
301
+
302
+ **Invocation**: `@acp.clarification-create --file agent/design/local.api-design.md --title api-endpoint-details`
303
+
304
+ **Result**: Creates clarification-9-api-endpoint-details.md with questions about API design gaps
305
+
306
+ ---
307
+
308
+ ## Related Commands
309
+
310
+ - [`@acp.design-create`](acp.design-create.md) - Create design documents (often follows clarification)
311
+ - [`@acp.task-create`](acp.task-create.md) - Create tasks (may use clarification answers)
312
+ - [`@acp.pattern-create`](acp.pattern-create.md) - Create patterns (may use clarification answers)
313
+
314
+ ---
315
+
316
+ ## Troubleshooting
317
+
318
+ ### Issue 1: Source file not found
319
+
320
+ **Symptom**: Error message "File not found"
321
+
322
+ **Solution**: Verify file path is correct. Use relative path from project root or @ reference for files in agent/drafts/
323
+
324
+ ### Issue 2: No questions generated
325
+
326
+ **Symptom**: Clarification created but empty
327
+
328
+ **Solution**: Provide more context about what needs clarification. Source file may be too complete or too vague.
329
+
330
+ ### Issue 3: Questions too generic
331
+
332
+ **Symptom**: Generated questions are not specific enough
333
+
334
+ **Solution**: Provide more detailed source file or specify topics more precisely in interactive mode
335
+
336
+ ### Issue 4: Clarification number conflict
337
+
338
+ **Symptom**: Clarification file already exists with that number
339
+
340
+ **Solution**: Command should auto-detect and use next available number. If conflict persists, manually check agent/clarifications/ directory.
341
+
342
+ ---
343
+
344
+ ## Security Considerations
345
+
346
+ ### File Access
347
+ - **Reads**: Source files (drafts, designs, requirements), clarification template
348
+ - **Writes**: agent/clarifications/clarification-{N}-{title}.md
349
+ - **Executes**: None
350
+
351
+ ### Network Access
352
+ - **APIs**: None
353
+ - **Repositories**: None
354
+
355
+ ### Sensitive Data
356
+ - **Secrets**: Never include secrets in clarifications
357
+ - **Credentials**: Never include credentials in questions or examples
358
+
359
+ ---
360
+
361
+ ## Notes
362
+
363
+ - Clarification title should be descriptive and relate to the topic
364
+ - Clarification number is automatically assigned (sequential)
365
+ - Questions should be specific and actionable
366
+ - Use hierarchical structure (Items > Questions > Bullet points)
367
+ - Response markers (>) make it easy for users to answer inline
368
+ - Clarifications are living documents - can be updated as questions are answered
369
+ - After clarification is complete, use answers to update design docs, tasks, or create new entities
370
+ - Clarifications are typically kept in version control for historical reference
371
+ - Good clarifications have 10-30 questions organized into 3-5 major topics
372
+
373
+ ---
374
+
375
+ **Namespace**: acp
376
+ **Command**: clarification-create
377
+ **Version**: 1.0.0
378
+ **Created**: 2026-02-25
379
+ **Last Updated**: 2026-02-25
380
+ **Status**: Active
381
+ **Compatibility**: ACP 4.0.0+
382
+ **Author**: ACP Project
@@ -11,7 +11,6 @@
11
11
  **Created**: 2026-02-21
12
12
  **Last Updated**: 2026-02-21
13
13
  **Status**: Active
14
- **Scripts**: None
15
14
 
16
15
  ---
17
16
 
@@ -11,7 +11,6 @@
11
11
  **Created**: 2026-02-21
12
12
  **Last Updated**: 2026-02-21
13
13
  **Status**: Active
14
- **Scripts**: None
15
14
 
16
15
  ---
17
16
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-16
8
8
  **Last Updated**: 2026-02-16
9
9
  **Status**: Active
10
- **Scripts**: None
11
10
 
12
11
  ---
13
12
 
@@ -9,7 +9,6 @@
9
9
  **Created**: 2026-02-20
10
10
  **Last Updated**: 2026-02-21
11
11
  **Status**: Active
12
- **Scripts**: acp.package-create.sh, acp.common.sh, acp.yaml-parser.sh
13
12
 
14
13
  ---
15
14
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-18
8
8
  **Last Updated**: 2026-02-22
9
9
  **Status**: Active
10
- **Scripts**: acp.package-info.sh, acp.common.sh, acp.yaml-parser.sh
11
10
 
12
11
  ---
13
12