A coding agent is only as good as the repository it works in. Harness Doctor scans for the
structure that keeps agents from guessing, reports what's missing, and scores the repo
0–100 so you can watch it improve.
~/your-project
$bunx --bun @andypai/harness-doctor@latest✔ AGENTS.md found — short and map-like! docs/ exists but AGENTS.md never points into it
✘ 3 unused exports, 1 circular import
────────────────────────────────────────
Harness score 82/100
No model calls. No network. The same repo always produces the same score.
What it checks
Two lenses on a repo, both deterministic — the kind of thing you could answer with
ls and wc -l, made rigorous.
🗺️
Structural checks
Reads your repository off disk — its files, layout, and docs. Does an agent
entry-point exist? Is it a short map or a 600-line wall of text? Does it actually
point into docs/? Is your pnpm setup hardened against supply-chain
attacks?
🧹
Dead-code analysis
Finds unused files, unused exports, unused dependencies, and circular imports — the
cruft that misleads an agent reading your codebase and quietly drags the score down.
🩺
Fix, not just blame
Every finding comes with a one-line explanation of what's wrong and a concrete fix —
written to be read by a human or handed straight to a coding agent.
0–100Deterministic readiness score
OfflineNo model calls, nothing to flake
schema v1Versioned JSON contract
5+Claude Code, Cursor, Codex, OpenCode…
Quick start
From the root of any project.
1 Audit
Get a score and a list of findings. Add --verbose for file and line
numbers.
2 Install for agents
Wire it into your agent's workflow so it reads findings, fixes them, and keeps the
score from sliding.
3 Get JSON
Emit a versioned report. Key automations off plugin/rule and
schemaVersion, not prose.
Run it in CI
Scan every pull request and leave findings inline. For hardened CI, pin
@v1 to a full commit SHA and let Dependabot or Renovate bump it.