ワンクリックで
knowledge-audit
Review and clean up stored memories — find duplicates, contradictions, stale entries, and consolidate
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Review and clean up stored memories — find duplicates, contradictions, stale entries, and consolidate
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when the user installs mnemo-mcp on a fresh machine and wants to restore prior memory state from S3 or Google Drive (Phase 2 passport sync). Triggers on phrases like "set up mnemo on this machine", "restore my memory passport", "import passport", "bootstrap mnemo", or when the user says they got a new laptop / VM and wants their memories back.
Use when the user explicitly says "remember this", "save this", "ghi nho", "luu lai", "save for next time", or otherwise asks to persist the immediately preceding context. Captures with the appropriate context_type (decision, preference, fact, skill, task, conversation) so future sessions can retrieve it accurately.
Use at session start, before significant decisions, or when a new task references a known project to recall mnemo memories matching the current working directory, recently edited files, or topic keywords. Helps maintain continuity across sessions and avoid redoing past research.
End-of-session knowledge capture — decisions, preferences, corrections, conventions, open questions
| name | knowledge-audit |
| description | Review and clean up stored memories — find duplicates, contradictions, stale entries, and consolidate |
| argument-hint | [topic or 'all'] |
Systematic review of stored memories to maintain quality. Finds duplicates, detects contradictions, flags stale entries, and consolidates overlapping memories.
Scope the audit:
memory(action="search", query="[topic]") to find all related memoriesmemory(action="list") to get full inventory, then memory(action="stats") for overviewIdentify duplicates:
memory(action="delete", id="[duplicate-id]") for removalsDetect contradictions:
Flag stale entries:
memory(action="update", ...) adding [STALE] prefix, or delete if clearly obsoleteConsolidate overlapping memories:
memory(action="consolidate", ...) if available, otherwise manual mergeProduce audit report:
## Knowledge Audit — [topic/all] — [date]
### Summary
- Total memories reviewed: [N]
- Duplicates removed: [N]
- Contradictions resolved: [N]
- Stale entries flagged/removed: [N]
- Memories consolidated: [N merged into M]
### Actions Taken
- [list of specific changes]
### Recommendations
- [any patterns noticed, e.g., "many memories lack WHY context"]
Phase 3 ships a temporal knowledge graph (entities + edges + bitemporal versioning + supersession). The audit checklist now also covers KG hygiene:
Stale entities: entity rows that no longer link to any active
memory (their last memory_entity_links row points at an archived /
superseded memory).
memory(action="entity_search", name="<entity>") returning
0 currently-valid hits → candidate stale.Orphan edges: edges in memory_edges whose source or target
memory_entities row was deleted but the edge survived.
entity_graph returns nodes referenced from edges that aren't in
the nodes list.Contradicting / superseded chains: a memory in a supersession
chain still surfaces in default memory.get results because someone
left valid_to = NULL on an old fact.
memory(action="history", entity_id=<x>) returning multiple
rows with valid_to = NULL for the same entity.valid_to on the others to the supersession timestamp.Bitemporal drift: capture has no valid_from set, falls outside
the bitemporal index. Usually a pre-Phase-3 row that was missed by
backfill, or a manual db.add that bypassed the capture pipeline.
SELECT COUNT(*) FROM memories WHERE valid_from IS NULL.MemoryDB._backfill_phase3_temporal)
or update the rows manually.Audit-trail integrity: every mutation (insert / update / supersede
/ delete) should write a memory_audit row with prev_state_hash
and new_state_hash. A gap in the chain (audit row absent for an
update) signals a bug or out-of-band write.
SELECT m.id FROM memories m LEFT JOIN memory_audit a ON a.memory_id = m.id WHERE a.id IS NULL.memory(action="capture", auto=True) batch with
KG_AUTO_ENABLED=true (entity resolution may need tuning).