Docs menu

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
MCPgovernance_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.

  1. Load plugins
  2. runDoctorCore
  3. Fix error issues
  4. Re-run until healthy
  5. sentinel_status
Doctor (API) typescript
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 issues

What 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

Related reference

AGS documentation