Governance Doctor
Run doctor reports over PluginHost probes to classify healthy / degraded / broken.
What you will learn
- Import doctor
- Produce GovernanceDoctorReport
- Repair to healthy
Prerequisites
Surface
| Imports | @tmrxjd/agent-governance-system/doctor · @tmrxjd/agent-governance-system/plugin |
|---|---|
| MCP | governance_toc · sentinel_status |
What this feature does
Doctor aggregates probe + invariant issues into a status: healthy | degraded | broken. Use before claiming a host ready; Sentinel may reflex on doctor broken.
How to call it
Call these MCP tools through your AGS / tower-gov host — governance_toc, sentinel_status.. Prefer scan/get before validate/diff, and enforce only when the change set is ready.
- Load plugins
- runDoctorCore
- Fix error issues
- Re-run until healthy
- sentinel_status
import { createPluginHost } from '@tmrxjd/agent-governance-system/plugin'
import {
runDoctorCore,
summarizeGovernanceDoctorStatus,
} from '@tmrxjd/agent-governance-system/doctor'
const host = createPluginHost({ repoRoot })
const report = runDoctorCore(host)
console.log(report.status, report.summary)
// broken if any error-severity issuesWhat success looks like
status healthy
errorCount 0
Common failure modes
Ignoring degraded warnings until broken
Probes not registered on host
Clearing sentinel without doctor repair