audit
Identify stale, orphaned, conflicting, or archived knowledge and assess taxonomy health across domains.
Instructions
Inspect the health of knowledge in a domain across five modes. Omitting domain scans the entire workspace.
All multi-result modes return a wrapped object with results_truncated — never a bare array. When results_truncated is true, raise limit to retrieve more.
mode=stale: Returns {candidates, results_truncated}. Drift candidates — stale, contradicted, or duplicated memories. Empty result is {candidates: [], results_truncated: false}. Present each to the user; never archive autonomously. Default limit 10 (max 500).
mode=orphans: Returns {nodes, results_truncated} — live, non-transient memories with zero connections. Empty result is {nodes: [], results_truncated: false}. Default limit 50 (max 500).
mode=archived: Returns {nodes, results_truncated}. Empty result is {nodes: [], results_truncated: false}. Capped at 25 by default — this is not a complete archive listing. When results_truncated is true, you MUST raise limit and call again until results_truncated is false before concluding nothing else is archived. Use when search returns nothing but you expect content to exist.
mode=conflicts: Returns {candidates, results_truncated}. Empty result is {candidates: [], results_truncated: false}. Semantically adjacent pairs that may warrant contradiction review — candidates only, not confirmed conflicts. Default limit 10 (max 100). Pairs already linked by contradicts, resolved, resolved_by, or supersedes are excluded; other edge types do not suppress. After resolving, connect with relationship=resolved (or resolved_by / supersedes) — additive; do not disconnect the contradicts edge.
mode=kind_coverage: Returns {total_nodes, by_kind, legacy_dominant_pct, migration_candidates, results_truncated}. Taxonomy health signal — per-kind counts, legacy decision/standing dominance percentage, and lean migration_candidates (id, label, truncated why_matters only). Candidate-surfacing only; never auto-revise; use recall(id) for full content. Default limit 50 (max 500) on migration_candidates.
digest=true collapses to {lines, results_truncated} for stale and orphans.
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), conflicts (semantic contradiction candidates), or kind_coverage (taxonomy health / migration readiness) | |
| 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 results. Defaults: stale=10, orphans=50, archived=25, conflicts=10. When results_truncated is true, raise limit to retrieve more. archived max 500; stale/orphans max 500; conflicts max 100. | |
| digest | No | When true, stale and orphans return {lines, results_truncated} instead of full objects. Default false. | |
| 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. |