@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.
- package/AGENT.md +296 -250
- package/CHANGELOG.md +468 -0
- package/README.md +163 -46
- package/agent/commands/acp.clarification-create.md +382 -0
- package/agent/commands/acp.command-create.md +0 -1
- package/agent/commands/acp.design-create.md +0 -1
- package/agent/commands/acp.init.md +0 -1
- package/agent/commands/acp.package-create.md +0 -1
- package/agent/commands/acp.package-info.md +0 -1
- package/agent/commands/acp.package-install.md +0 -1
- package/agent/commands/acp.package-list.md +0 -1
- package/agent/commands/acp.package-publish.md +0 -1
- package/agent/commands/acp.package-remove.md +0 -1
- package/agent/commands/acp.package-search.md +0 -1
- package/agent/commands/acp.package-update.md +0 -1
- package/agent/commands/acp.package-validate.md +0 -1
- package/agent/commands/acp.pattern-create.md +0 -1
- package/agent/commands/acp.plan.md +0 -1
- package/agent/commands/acp.proceed.md +0 -1
- package/agent/commands/acp.project-create.md +0 -1
- package/agent/commands/acp.project-info.md +309 -0
- package/agent/commands/acp.project-list.md +0 -1
- package/agent/commands/acp.project-remove.md +379 -0
- package/agent/commands/acp.project-set.md +0 -1
- package/agent/commands/acp.project-update.md +296 -0
- package/agent/commands/acp.report.md +0 -1
- package/agent/commands/acp.resume.md +0 -1
- package/agent/commands/acp.status.md +0 -1
- package/agent/commands/acp.sync.md +0 -1
- package/agent/commands/acp.task-create.md +17 -10
- package/agent/commands/acp.update.md +0 -1
- package/agent/commands/acp.validate.md +0 -1
- package/agent/commands/acp.version-check-for-updates.md +0 -1
- package/agent/commands/acp.version-check.md +0 -1
- package/agent/commands/acp.version-update.md +0 -1
- package/agent/commands/command.template.md +0 -5
- package/agent/commands/git.commit.md +13 -2
- package/agent/commands/git.init.md +0 -1
- package/agent/design/comment-memory-type.md +2 -2
- package/agent/design/local.collaborative-memory-sync.md +265 -0
- package/agent/design/local.content-flags.md +210 -0
- package/agent/design/local.ghost-persona-system.md +273 -0
- package/agent/design/local.group-acl-integration.md +338 -0
- package/agent/design/local.memory-acl-schema.md +352 -0
- package/agent/design/local.memory-collection-pattern-v2.md +348 -0
- package/agent/design/local.moderation-and-space-config.md +257 -0
- package/agent/design/local.v2-api-reference.md +621 -0
- package/agent/design/local.v2-migration-guide.md +191 -0
- package/agent/design/local.v2-usage-examples.md +265 -0
- package/agent/design/permissions-storage-architecture.md +11 -3
- package/agent/design/soft-delete-system.md +291 -0
- package/agent/design/trust-escalation-prevention.md +9 -2
- package/agent/design/trust-system-implementation.md +12 -3
- package/agent/milestones/milestone-13-soft-delete-system.md +306 -0
- package/agent/milestones/milestone-14-memory-collection-v2.md +182 -0
- package/agent/milestones/milestone-15-moderation-space-config.md +126 -0
- package/agent/package.template.yaml +0 -17
- package/agent/progress.yaml +762 -49
- package/agent/scripts/acp.common.sh +2 -0
- package/agent/scripts/acp.install.sh +15 -85
- package/agent/scripts/acp.package-install-optimized.sh +454 -0
- package/agent/scripts/acp.package-install.sh +248 -380
- package/agent/scripts/acp.package-validate.sh +0 -99
- package/agent/scripts/acp.project-info.sh +218 -0
- package/agent/scripts/acp.project-remove.sh +302 -0
- package/agent/scripts/acp.project-update.sh +296 -0
- package/agent/scripts/acp.yaml-parser.sh +128 -10
- package/agent/tasks/milestone-14-memory-collection-v2/task-165-core-infrastructure-setup.md +171 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-166-update-remember-publish.md +191 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-167-update-remember-retract.md +186 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-168-implement-remember-revise.md +184 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-169-update-remember-search-space.md +179 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-170-update-remember-create-update.md +139 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-172-performance-testing-optimization.md +161 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-173-documentation-examples.md +258 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-174-add-moderation-schema-fields.md +57 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-175-create-space-config-service.md +64 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-176-wire-moderation-publish-flow.md +45 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-177-add-moderation-search-filters.md +70 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-178-create-remember-moderate-tool.md +69 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-179-documentation-integration-tests.md +58 -0
- package/agent/tasks/milestone-16-ghost-system/task-187-ghost-config-firestore.md +41 -0
- package/agent/tasks/milestone-16-ghost-system/task-188-trust-filter-integration.md +44 -0
- package/agent/tasks/milestone-16-ghost-system/task-189-ghost-memory-filtering.md +43 -0
- package/agent/tasks/milestone-16-ghost-system/task-190-ghost-config-tools.md +45 -0
- package/agent/tasks/milestone-16-ghost-system/task-191-escalation-firestore.md +38 -0
- package/agent/tasks/milestone-16-ghost-system/task-192-documentation-verification.md +39 -0
- package/agent/tasks/milestone-7-trust-permissions/task-180-access-result-permission-types.md +69 -0
- package/agent/tasks/milestone-7-trust-permissions/task-181-firestore-permissions-access-logs.md +56 -0
- package/agent/tasks/milestone-7-trust-permissions/task-182-trust-enforcement-service.md +68 -0
- package/agent/tasks/milestone-7-trust-permissions/task-183-access-control-service.md +70 -0
- package/agent/tasks/milestone-7-trust-permissions/task-184-permission-tools.md +79 -0
- package/agent/tasks/milestone-7-trust-permissions/task-185-wire-trust-into-search-query.md +55 -0
- package/agent/tasks/milestone-7-trust-permissions/task-186-documentation-verification.md +56 -0
- package/agent/tasks/task-70-add-soft-delete-schema-fields.md +165 -0
- package/agent/tasks/task-71-implement-delete-confirmation-flow.md +257 -0
- package/agent/tasks/task-72-add-deleted-filter-to-search-tools.md +18 -0
- package/agent/tasks/task-73-update-relationship-handling.md +18 -0
- package/agent/tasks/task-74-add-unit-tests-soft-delete.md +18 -0
- package/agent/tasks/task-75-update-documentation-changelog.md +26 -0
- package/agent/tasks/task-76-fix-indexnullstate-schema-bug.md +197 -0
- package/dist/collections/composite-ids.d.ts +106 -0
- package/dist/collections/core-infrastructure.spec.d.ts +11 -0
- package/dist/collections/dot-notation.d.ts +106 -0
- package/dist/collections/tracking-arrays.d.ts +176 -0
- package/dist/constants/content-types.d.ts +1 -0
- package/dist/schema/v2-collections-comments.spec.d.ts +8 -0
- package/dist/schema/v2-collections.d.ts +210 -0
- package/dist/server-factory.d.ts +15 -0
- package/dist/server-factory.js +3261 -1316
- package/dist/server.js +2926 -1236
- package/dist/services/access-control.d.ts +103 -0
- package/dist/services/access-control.spec.d.ts +2 -0
- package/dist/services/credentials-provider.d.ts +24 -0
- package/dist/services/credentials-provider.spec.d.ts +2 -0
- package/dist/services/escalation.service.d.ts +22 -0
- package/dist/services/escalation.service.spec.d.ts +2 -0
- package/dist/services/ghost-config.service.d.ts +55 -0
- package/dist/services/ghost-config.service.spec.d.ts +2 -0
- package/dist/services/space-config.service.d.ts +23 -0
- package/dist/services/space-config.service.spec.d.ts +2 -0
- package/dist/services/trust-enforcement.d.ts +83 -0
- package/dist/services/trust-enforcement.spec.d.ts +2 -0
- package/dist/services/trust-validator.d.ts +43 -0
- package/dist/services/trust-validator.spec.d.ts +2 -0
- package/dist/tools/confirm-publish-moderation.spec.d.ts +8 -0
- package/dist/tools/confirm.d.ts +8 -1
- package/dist/tools/create-memory.d.ts +2 -1
- package/dist/tools/create-memory.spec.d.ts +10 -0
- package/dist/tools/create-relationship.d.ts +2 -1
- package/dist/tools/delete-memory.d.ts +7 -31
- package/dist/tools/delete-relationship.d.ts +2 -1
- package/dist/tools/deny.d.ts +2 -1
- package/dist/tools/find-similar.d.ts +10 -2
- package/dist/tools/get-preferences.d.ts +2 -1
- package/dist/tools/ghost-config.d.ts +27 -0
- package/dist/tools/ghost-config.spec.d.ts +2 -0
- package/dist/tools/moderate.d.ts +20 -0
- package/dist/tools/moderate.spec.d.ts +5 -0
- package/dist/tools/publish.d.ts +11 -3
- package/dist/tools/query-memory.d.ts +11 -2
- package/dist/tools/query-space.d.ts +4 -1
- package/dist/tools/retract.d.ts +29 -0
- package/dist/tools/revise.d.ts +45 -0
- package/dist/tools/revise.spec.d.ts +8 -0
- package/dist/tools/search-memory.d.ts +8 -1
- package/dist/tools/search-relationship.d.ts +10 -2
- package/dist/tools/search-space.d.ts +25 -5
- package/dist/tools/search-space.spec.d.ts +9 -0
- package/dist/tools/set-preference.d.ts +2 -1
- package/dist/tools/update-memory.d.ts +2 -1
- package/dist/tools/update-relationship.d.ts +2 -1
- package/dist/types/access-result.d.ts +48 -0
- package/dist/types/access-result.spec.d.ts +2 -0
- package/dist/types/auth.d.ts +46 -0
- package/dist/types/ghost-config.d.ts +36 -0
- package/dist/types/memory.d.ts +11 -1
- package/dist/types/preferences.d.ts +1 -1
- package/dist/types/space-memory.d.ts +3 -0
- package/dist/utils/auth-helpers.d.ts +14 -0
- package/dist/utils/auth-helpers.spec.d.ts +2 -0
- package/dist/utils/test-data-generator.d.ts +124 -0
- package/dist/utils/test-data-generator.spec.d.ts +12 -0
- package/dist/utils/weaviate-filters.d.ts +19 -0
- package/dist/v2-performance.e2e.d.ts +17 -0
- package/dist/v2-smoke.e2e.d.ts +14 -0
- package/dist/weaviate/client.d.ts +5 -8
- package/dist/weaviate/space-schema.d.ts +2 -2
- package/docs/performance/v2-benchmarks.md +80 -0
- package/jest.e2e.config.js +14 -3
- package/package.json +1 -1
- package/scripts/.collection-recreation-state.yaml +16 -0
- package/scripts/.gitkeep +5 -0
- package/scripts/README-collection-recreation.md +224 -0
- package/scripts/README.md +51 -0
- package/scripts/backup-collections.ts +543 -0
- package/scripts/delete-collection.ts +137 -0
- package/scripts/migrate-recreate-collections.ts +578 -0
- package/scripts/migrate-v1-to-v2.ts +1094 -0
- package/scripts/package-lock.json +1113 -0
- package/scripts/package.json +27 -0
- package/src/collections/composite-ids.ts +193 -0
- package/src/collections/core-infrastructure.spec.ts +353 -0
- package/src/collections/dot-notation.ts +212 -0
- package/src/collections/tracking-arrays.ts +298 -0
- package/src/constants/content-types.ts +20 -0
- package/src/schema/v2-collections-comments.spec.ts +141 -0
- package/src/schema/v2-collections.ts +433 -0
- package/src/server-factory.ts +89 -20
- package/src/server.ts +45 -17
- package/src/services/access-control.spec.ts +383 -0
- package/src/services/access-control.ts +291 -0
- package/src/services/credentials-provider.spec.ts +22 -0
- package/src/services/credentials-provider.ts +34 -0
- package/src/services/escalation.service.spec.ts +183 -0
- package/src/services/escalation.service.ts +150 -0
- package/src/services/ghost-config.service.spec.ts +339 -0
- package/src/services/ghost-config.service.ts +219 -0
- package/src/services/space-config.service.spec.ts +102 -0
- package/src/services/space-config.service.ts +79 -0
- package/src/services/trust-enforcement.spec.ts +309 -0
- package/src/services/trust-enforcement.ts +197 -0
- package/src/services/trust-validator.spec.ts +108 -0
- package/src/services/trust-validator.ts +105 -0
- package/src/tools/confirm-publish-moderation.spec.ts +240 -0
- package/src/tools/confirm.ts +914 -116
- package/src/tools/create-memory.spec.ts +126 -0
- package/src/tools/create-memory.ts +20 -27
- package/src/tools/create-relationship.ts +30 -8
- package/src/tools/delete-memory.ts +99 -64
- package/src/tools/delete-relationship.ts +15 -6
- package/src/tools/deny.ts +8 -1
- package/src/tools/find-similar.ts +44 -6
- package/src/tools/get-preferences.ts +10 -1
- package/src/tools/ghost-config.spec.ts +180 -0
- package/src/tools/ghost-config.ts +230 -0
- package/src/tools/moderate.spec.ts +277 -0
- package/src/tools/moderate.ts +219 -0
- package/src/tools/publish.ts +99 -41
- package/src/tools/query-memory.ts +44 -9
- package/src/tools/query-space.ts +39 -4
- package/src/tools/retract.ts +292 -0
- package/src/tools/revise.spec.ts +146 -0
- package/src/tools/revise.ts +283 -0
- package/src/tools/search-memory.ts +46 -10
- package/src/tools/search-relationship.ts +30 -7
- package/src/tools/search-space.spec.ts +341 -0
- package/src/tools/search-space.ts +323 -99
- package/src/tools/set-preference.ts +10 -1
- package/src/tools/update-memory.ts +24 -5
- package/src/tools/update-relationship.ts +10 -1
- package/src/types/access-result.spec.ts +193 -0
- package/src/types/access-result.ts +62 -0
- package/src/types/auth.ts +52 -0
- package/src/types/ghost-config.ts +46 -0
- package/src/types/memory.ts +20 -1
- package/src/types/preferences.ts +2 -2
- package/src/types/space-memory.ts +5 -0
- package/src/utils/auth-helpers.spec.ts +75 -0
- package/src/utils/auth-helpers.ts +25 -0
- package/src/utils/test-data-generator.spec.ts +317 -0
- package/src/utils/test-data-generator.ts +292 -0
- package/src/utils/weaviate-filters.ts +32 -5
- package/src/v2-performance.e2e.ts +173 -0
- package/src/v2-smoke.e2e.ts +401 -0
- package/src/weaviate/client.spec.ts +5 -5
- package/src/weaviate/client.ts +55 -35
- package/src/weaviate/schema.ts +11 -239
- package/src/weaviate/space-schema.spec.ts +28 -25
- 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
|
-
- **
|
|
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: `
|
|
153
|
-
-
|
|
154
|
-
-
|
|
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
|
-
###
|
|
162
|
+
### Memory Collection Pattern v2 (v3.1.0+)
|
|
160
163
|
|
|
161
|
-
|
|
164
|
+
Three-tier collection architecture with composite IDs and tracking arrays.
|
|
162
165
|
|
|
163
|
-
**
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
|
|
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
|
-
//
|
|
172
|
-
{
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
|
|
182
|
-
|
|
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. **
|
|
205
|
+
1. **Publish**: Generate confirmation token
|
|
198
206
|
```typescript
|
|
199
|
-
// Publish to
|
|
200
|
-
remember_publish({
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
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. **
|
|
216
|
+
2. **Confirm**: Execute the publication
|
|
209
217
|
```typescript
|
|
210
218
|
remember_confirm({ token: "xyz789" })
|
|
211
|
-
//
|
|
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. **
|
|
222
|
+
3. **Revise**: Sync content changes (confirmation required)
|
|
219
223
|
```typescript
|
|
220
|
-
//
|
|
221
|
-
|
|
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
|
-
|
|
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: "
|
|
226
|
-
spaces: ["
|
|
241
|
+
query: "pasta recipe",
|
|
242
|
+
spaces: ["cooking"],
|
|
243
|
+
search_type: "hybrid" // hybrid | bm25 | semantic
|
|
227
244
|
})
|
|
228
245
|
```
|
|
229
246
|
|
|
230
|
-
### Space
|
|
247
|
+
### Space & Group Tools
|
|
231
248
|
|
|
232
|
-
- `remember_publish` -
|
|
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/`
|
|
276
|
-
-
|
|
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
|