@kekkai/blueprint / runDoctor
Function: runDoctor()
runDoctor(
root,options?):Promise<{checks:DoctorCheck[];ok:boolean;verdict:DoctorVerdict; }>
Defined in: inspect/doctor.ts:192
Run blueprint doctor in root. Read-only. Answers the one question the adoption prompt's acceptance clause asks — "is adoption actually finished?" — as a checklist: config present, no leftover reference files, eslint wired to emitLint, the declared alias wired to the toolchain, the emitted rules still alive in the merged eslint config, and the architecture clean under the baseline (its detail states the coverage, so a vacuous green is visible). Exit 0 iff every check passes, so you can gate on it — a git hook, CI, an agent's verify loop.
ok is "nothing failed", which the exit code follows. It is NOT "everything was verified": a check that could not run rides on ok: true deliberately, so read verdict when the difference matters — the JSON said "ok": true while the text said ⊘ Adoption unverified about the same run, and that gap nearly became a green CI gate (field run #141).
Parameters
root
string
options?
DoctorOptions = {}
Returns
Promise<{ checks: DoctorCheck[]; ok: boolean; verdict: DoctorVerdict; }>
Example
const { ok, verdict } = await runDoctor(process.cwd());
process.exitCode = ok ? 0 : 1;
if (verdict === 'unverified') console.warn('a check could not run');