Doctor Report
Use When
- Claude Code or Codex needs an environment health report before
attempting generation work.
- The agent wants JSON diagnostics instead of parsing the legacy
cm doctor human output.
- Local automation needs a stable
okplus check-count summary.
Invocation
cat <<'JSON' | node --import tsx scripts/harness/doctor-report.ts
{
"strict": false,
"outputPath": "output/content-machine/doctor/doctor.json"
}
JSON
Output Contract
- Runs the same core doctor checks used by the legacy CLI.
- Writes one JSON report file to
outputPath, or to
outputDir/report.json when a flow binds a run-scoped output
directory.
- Returns a JSON envelope with
ok, strict mode, and warning/failure
counts.
Validation Checklist
- The resolved report path exists.
- The report contains a top-level
okboolean and achecksarray. - Failure and warning counts in the envelope match the file.