Testability Doctor is a CLI that checks whether a repository is practical for AI coding agents to modify and test.
It is built for Codex, Claude Code, Cursor, and other AI coding agents that need a quick static preflight before changing code.
Testability Doctor looks at repository structure, package manager signals, lockfiles, test commands, docs, and external-environment hints. It returns a recommendation:
good_for_agent: the repo has a clear stack, test path, and low setup risk.manual_setup_needed: the repo may be workable, but setup or dependency state is unclear.docs_only: documentation changes are likely safe, while code changes need more testability.avoid: autonomous code changes are likely risky without human setup.
AI coding agents work best when they can make a small change, run a deterministic test command, and inspect the result. Many repositories are not shaped that way. Some lack lockfiles, hide test commands, require devices or cloud accounts, or depend on manual validation. Testability Doctor identifies those conditions before agent time is spent on an unsafe or untestable task.
Run from source:
python3 testability_doctor.py --versionInstall as a local package:
python3 -m pip install .
testability-doctor --versionThe tool has no runtime dependencies outside the Python standard library.
Analyze a repository and print Markdown:
python3 testability_doctor.py analyze --path examples/node-package-lockAnalyze and print JSON:
python3 testability_doctor.py analyze --path examples/node-no-lockfile --format jsonWrite a report:
python3 testability_doctor.py analyze --path examples/python-pytest --output examples/sample-report.mdWrite a default config:
python3 testability_doctor.py init-configUse a config file:
python3 testability_doctor.py analyze --path /path/to/repo --config testability-doctor.config.example.jsonMarkdown output includes:
- result, recommendation, exit code, and confidence
- detected stack, package manager, lockfiles, size, and file count
- discovered test commands and missing commands
- Docker suitability note
- risk flags and suggested next steps
JSON output follows this shape:
{
"recommendation": "good_for_agent",
"exit_code": 0,
"confidence": 0.88,
"repository": {},
"testability": {},
"risk_flags": [],
"suggested_next_steps": []
}good_for_agent means a coding agent can probably make and test ordinary code changes after normal review.
manual_setup_needed means a human should clarify setup, lockfiles, package boundaries, or package manager state before the agent starts.
docs_only means docs changes are reasonable, but code changes need a clearer automated test path.
avoid means the repo depends on external setup, unsupported validation, unclear tests, or environment requirements that make autonomous changes risky.
Exit codes:
0:good_for_agent1:warning,manual_setup_needed, ordocs_only2:avoid
Run Testability Doctor before asking an agent to edit a candidate repository:
python3 testability_doctor.py analyze --path /path/to/candidate --format jsonThen give the agent:
- the recommendation
- the detected test commands
- the risk flags
- the intended edit scope
For manual_setup_needed, ask the agent to inspect and propose setup clarifications before changing code. For avoid, keep the task with a human until validation is made local and deterministic.
AgentGate focuses on gating agent work and review boundaries. Testability Doctor runs earlier: it checks whether a repo appears testable enough to send into an agent workflow at all.
BountyLens helps inspect bounty opportunities. Testability Doctor can evaluate the repository behind a bounty before an agent attempts implementation.
Testability Doctor is static by default. It does not install dependencies, build projects, run package-manager commands, call external services, upload files, or read cookies, keychains, state stores, or credential folders. It skips common sensitive paths and only reads ordinary repository text files for static hints.
- It does not prove that tests pass.
- It does not run Docker.
- It does not install dependencies.
- It does not call external APIs.
- It does not replace human review.
- It does not certify security.
See CONTRIBUTING.md. Detector changes should include focused unit tests and explain the safety impact.
MIT License. See LICENSE.
- BountyLens: https://github.com/a78c7/bountylens
- Testability Doctor: https://github.com/a78c7/testability-doctor
- Toolkit: https://github.com/a78c7/ai-agent-safety-toolkit
This project is part of the AI Agent Safety Toolkit.
Read the full launch story: https://github.com/a78c7/ai-agent-safety-toolkit/blob/main/launch/launch-blog-post.md