infrastructure-doctorlisted
Install: claude install-skill docxology/template
# Doctor Module
Repository-level "doctor mode": a diagnostic engine plus an automated, audited resolution engine. The doctor never leaves the patient worse off — every mutation is snapshotted before it runs and can be reversed by a single `undo` command.
## Quick start
```bash
# Diagnose only (read-only).
uv run python -m infrastructure.doctor
# Same, JSON for an agent.
uv run python -m infrastructure.doctor --json diagnose
# Show what would be fixed (no changes).
uv run python -m infrastructure.doctor fix --plan
# Apply the safest set of fixes.
uv run python -m infrastructure.doctor fix --apply
# Allow `uv sync` and other moderate-therapy fixes.
uv run python -m infrastructure.doctor fix --apply --moderate
# Allow radical fixes (e.g. delete orphan output directories — still backed up).
uv run python -m infrastructure.doctor fix --apply --aggressive
# Reverse the most recent applied, reversible action.
uv run python -m infrastructure.doctor undo --last
# Reverse one specific action (see `history`).
uv run python -m infrastructure.doctor undo --action-id <id>
# Inspect the journal.
uv run python -m infrastructure.doctor history
# Agent-facing capability manifest.
uv run python -m infrastructure.doctor capabilities
# Stable-text robot manual.
uv run python -m infrastructure.doctor robot-docs
```
## Safety contract
Every fix flows through `infrastructure.doctor.safety.mutate(plan, state)`. That function is the **only** code in this module that writes to the filesy