audit
Inspect knowledge health across stale, orphans, archived, or conflicts modes. Identify drift, isolated memories, or contradictions.
Instructions
Inspect the health of knowledge in a domain across four modes. Omitting domain scans the entire workspace. Use for cross-domain drift review; scope to a domain for focused maintenance passes.
mode=stale: Return memories that may be stale, contradicted, or duplicated. Present each result to the user and ask for individual confirmation before archiving anything. Never archive autonomously.
mode=orphans: Return live, non-transient memories with zero connections. Present findings and suggest either linking them with connect, or archiving with forget if no longer relevant.
mode=archived: List all archived memories. This is the right tool when search returns nothing but you expect content to exist.
mode=conflicts: Surface candidate pairs of memories that are semantically adjacent and may warrant contradiction review. Returns {candidates: [...], truncated: bool}. Each candidate has a_id, a_label, b_id, b_label, semantic_distance, reason. Review each pair; use connect with relationship=contradicts only after confirming conflict. Never auto-file contradicts edges. Pairs already linked by a contradicts edge are excluded. After resolving a contradiction, connect the two memories with relationship=resolved (or resolved_by / supersedes) — do not disconnect the contradicts edge; resolution is additive and the original edge stays on record as history.
This tool only returns live nodes (for stale, orphans, and conflicts modes) or explicitly archived nodes (for archived mode).
Supply tags to scope to a workstream. Supply memory_id (mode=stale only) to scope to a memory's neighbourhood.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Required: stale (drift candidates), orphans (isolated memories), archived (list archived memories), or conflicts (semantic contradiction candidates) | |
| tags | No | Comma-separated tags. Only surfaces candidates carrying at least one of the supplied tags. OR semantics. Applies to all four modes. | |
| limit | No | Max candidates to return (default 10, applies to stale and conflicts modes) | |
| digest | No | When true, collapse multi-result lists to compact text lines (always a string array). Default false preserves current JSON shape. | |
| domain | No | Optional domain to scope the audit. Omit to scan the entire workspace. Use for cross-domain drift review; scope to a domain for focused maintenance passes. | |
| memory_id | No | Anchor memory ID. Scopes stale candidates to the depth-2 BFS neighbourhood of this memory. Applies to mode=stale only; ignored for orphans, archived, and conflicts. | |
| node_kind | No | Optional filter by node_kind. Space-separated for OR match. Applies to all four modes. |