run_diagnostics
Validate and repair state-memory graphs, broken references, and SHA-256 audit chains; run storage maintenance including compaction, pruning, and deduplication.
Instructions
Run graph sanity checks, health diagnostics, reference validation, audit chain verification, and storage maintenance (actions: validate, doctor, check_refs, audit_chain, compact, archive, prune_events, version, dedupe). Use run_diagnostics instead of get_analytics when performing database repair, AST reference auto-healing, or verifying SHA-256 event hash chains.
Returns validation diagnostics, health report, broken reference repair log, Merkle chain audit, or maintenance stats.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apply | No | For dedupe action: whether to apply merging (default: false for dry-run). | |
| action | Yes | The diagnostic or maintenance action to execute: validate, doctor, check_refs, audit_chain, compact, archive, prune_events, version, dedupe. | |
| checks | No | Optional subset of validation checks. | |
| dry_run | No | Simulate event pruning without deleting. | |
| project | No | Target project name or slug. | |
| auto_heal | No | Automatically fix broken file references on check_refs. | |
| older_than | No | Age duration threshold for prune_events (e.g. 90d). | |
| preserve_types | No | Event types to preserve from pruning. | |
| older_than_days | No | Age threshold in days for archive (default: 30). | |
| prune_orphaned_edges | No | Whether to prune dangling edges during compact. |