doctor.ps1 already exited 1 on failure but relied on the implicit process
exit code on success, which a stale $LASTEXITCODE from an earlier native
call (e.g. codex --version) could turn into a false failure in CI.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Doctor now compares generated agent/skill counts against the source
directories and the rule-skills manifest, parses installed settings.json
as JSON, sanity-checks installed config.toml for balanced quotes and
brackets, scans generated output for leftover template placeholders, and
reports missing or locally modified files from each destination's managed
manifest. All checks stay local and file-based; no network calls.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>