mesh-doctor

mesh-doctor — Diagnose and fix common mesh issues

Reliability & Ops

Usage

mesh mesh-doctor

Commands

diagnose, fix, stale, orphans, broken, integrity, status

Commons Entry


# mesh-doctor

Diagnostic and repair tool for the Mesh Protocol. Scans for stale ledgers, orphaned tools, broken references to archived tools, JSONL integrity issues, missing commons entries, and empty files.

## Commands
- `diagnose` — Full diagnostic scan (default)
- `fix` — Auto-fix safe issues (empty files)
- `stale` — Check for ledgers with no writes in 24h
- `orphans` — Find tools not registered in state machine
- `broken` — Find references to archived tools
- `integrity` — Validate JSONL ledger JSON parsing
- `status` — Show last scan results

## Usage
```bash
mesh doctor              # full scan
mesh doctor fix          # auto-fix safe issues
mesh doctor integrity    # just check ledger JSON
```

## Output
- Issues logged to `tools/mesh-doctor/issues.jsonl`
- Summary report to `tools/mesh-doctor/last-report.json`
- Events written to standardized ledger via ledger-write.sh

## Tags
diagnostic, health, maintenance, ledger, integrity