Run Plainwing on your own repository
One command checks whether your tests ran the code your agent changed. Full checks for Python, JavaScript, TypeScript, Go, Java, Kotlin, Rust, C# and PHP; Ruby gets coverage and tamper checks. Private repositories included, with no account and nothing uploaded.
npx plainwing
Run it in your repository with Docker running. It compares your work, uncommitted and untracked files included, with the default branch, runs your tests with line coverage in a clean container, and prints a verdict per claim and every changed line that never ran. The first run pulls a Docker image for your language, which can take a minute.
What a run prints
One Python change with a test that never calls it.
All 4 tests passed, but 1 changed line never ran.
Tests 4 passed, 0 failed
Changed code ran 0 of 1 changed line
Verdict Claim
----------------------------------------------------------------------------
o not tested The change works
no changed line ran (0 of 1); call sites 0 of 1; judged on the
whole change: the claim names no file or function among the
changed lines
----------------------------------------------------------------------------
Lines not shown to run
calc.py:10 never ran
10 | return a - b
not tested: the suite passed but no changed call-site line ran under an
unmocked test; it says nothing about whether the change is right.
Took 31s, comparing with HEAD~1 (ab25b153), tests ran in Docker
image python:3.12.
Next: Run `plainwing brief` for a prompt to give your coding agent, then run
`plainwing` again.
Prompt for your coding agent
Claim: "The change works" (Plainwing verdict: not tested).
Plainwing ran this project's tests with line coverage on my change. The tests pass, but these changed lines were not run by any test:
- calc.py:10 `return a - b` (Low risk)
Please write tests that really execute the code described above. Rules:
- Call the real code under test. Do not mock, patch or stub the changed function or the call on those lines.
- Do not weaken, skip or delete any existing test.
- Each new test must fail if the changed behaviour is wrong.
- Use the project's existing test framework, folder layout and naming.
When you are done, run `plainwing` and show me its output. This claim should read verified.With --out DIR it also writes result.json and report.html, one self-contained file that makes no network request and runs no script.
Without Docker
Without Docker
npx plainwing --local
Runs your tests in a temporary copy with your own environment, so the project’s dependencies must already be installed. Python also needs coverage (pip install coverage).
When something was not tested
npx plainwing brief npx plainwing
plainwing brief prints a prompt for your coding agent, built on your machine with no model and no network. Paste it in, let the agent add tests, then run plainwing again.
Exit code 1 means a claim was not verified: a test failed, changed code was not tested, or no test was shown to notice a wrong change. It is not a crash. Exit code 2 means the check could not finish, and the message says how to fix it. A change to only tests, docs or configuration prints one sentence and exits 0. In a pipe, in CI, with NO_COLOR or with TERM=dumb the output is plain text; --json and the exit codes never change.
Check every pull request
The GitHub Action
on: pull_request
permissions:
contents: read
pull-requests: write
jobs:
plainwing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: Knoten-Tech/plainwing-action@v0Save it as .github/workflows/plainwing.yml. fetch-depth: 0 lets it find the merge base. It runs on your own runner, posts one comment per pull request and updates it on later pushes, and sends nothing to us.
Or let init write it
npx plainwing init
plainwing init asks two questions, writes .github/workflows/plainwing.yml and .claude/skills/plainwing/SKILL.md as you choose, and prints what it wrote and how to undo it. It never overwrites an existing file.
- Advisory by default: any verdict other than verified is reported as neutral and does not fail the job.
- To fail the job, add a
plainwing.ymlat the repository root that setsfail-ontonot-testedorran-not-checked. It is read from the merge base; see Security. - Annotates the unrun lines on the pull request, at most 10 per run; the comment lists every one.
Check before the agent says it is done
Each command tells one coding agent to run Plainwing before it says the task is finished. Existing files are merged, never replaced, and init prints how to undo what it wrote.
| Agent | Command | What it adds | How the check runs |
|---|---|---|---|
| Claude Code | npx plainwing init --agent claude | A Stop hook in .claude/settings.json and the Plainwing skill | The hook runs plainwing --local when the agent finishes, stays silent on a clean result, and otherwise hands the verdict and prompt back. It retries at most 2 times per session, gives up after 600 seconds, and exits 0 whenever the check cannot run. |
| Codex | npx plainwing init --agent codex | A marked section in AGENTS.md | The agent runs plainwing --local itself. |
| Cursor | npx plainwing init --agent cursor | .cursor/rules/plainwing.mdc | The agent runs plainwing --local itself. |
| Copilot | npx plainwing init --agent copilot | A section in .github/copilot-instructions.md | The agent runs plainwing --local itself. |
Reuse the coverage your CI already makes
If your CI already runs the tests with coverage, Plainwing can judge the change from that report and run nothing.
npx plainwing --coverage coverage.json npx plainwing --coverage coverage/ --coverage lcov.info
Formats are found by content: coverage.py JSON, Cobertura XML, lcov, Istanbul coverage-final.json (nyc, jest, c8) and a NODE_V8_COVERAGE folder. A folder is searched four levels deep and every report in it is merged, so sharded CI jobs work.
- Plainwing runs no tests and does not read the suite result, so the claim “tests pass” reads unverified.
- The fault check needs the suite, so a change whose lines all ran reads ran, not checked, never verified.
- A changed file newer than the report stops the run with exit code 2, because the report may describe other code;
--allow-stale-reportaccepts it anyway. - A changed file the report does not list reads not tested.
What each verdict means
Only verified is a pass. The check proves whether tests ran the changed code and whether they noticed the faults Plainwing planted. It does not prove the code is correct.
| Verdict | What it means | What it does not prove |
|---|---|---|
| verified | The suite passed, every changed call-site line ran under tests that do not mock that call, and a test noticed at least one planted fault on those lines. | That the change is correct, or that every fault would be noticed. At most 8 faults are tried. |
| failed | The suite failed. Coverage is not reported until it passes. | Anything about the changed lines; they are not judged. |
| not tested | The suite passed, but no changed call-site line ran, or they ran only under tests that mock the call. | That the change is wrong. It only says no test exercised it. |
| unverified | The suite passed, but only some of the changed call-site lines ran, or only imports or declarations changed. | That the lines that ran are checked, or that the rest is acceptably untested. |
| ran, not checked | Every changed call-site line ran, but no test was shown to notice a wrong change, or no fault could be planted or run. | That the change is wrong. A surviving fault can be an equivalent change. |
Requirements and limits
What it needs
- Node 18 or later to start it, and Python 3.9 or later on your PATH. It has no npm dependencies.
- git, and a repository with at least one commit.
- Docker, or
--localwith the project’s dependencies already installed. - A project with tests in Python, JavaScript, TypeScript, Go, Java, Kotlin, Rust, C# and PHP, or Ruby for coverage and tamper checks only. Anything else stops with a plain message and exit code 2.
What it does not do yet
- No account, dashboard, history or trends. Each run stands alone.
- Claims come from
--claim, from patterns in commit messages and, in the Action, from the pull request title and body; any other phrasing becomes “The change works”. - Line coverage only. It does not show that a test asserts anything about the line.
- Mock detection is a text heuristic and can be wrong in both directions.
- The fault check plants at most 8 faults, so it is a small sample.
- Docker runs are not cached, so every run repeats the install.
What is unproven
Run on real GitHub pull requests in a private Python repository on ubuntu-latest: untested code, an added test, a failing suite, a docs-only change, a test that asserts nothing, and pull request text holding workflow commands and HTML, which it showed without running. Not yet run in a real pull request:
- Node projects with Vitest, Jest and TypeScript. They are covered by tests on fixtures and a trial on 100 public repositories.
- Fork pull requests.
- Reused coverage.
- Windows and macOS runners.
The fault check has run only on small fixtures: verified means a test noticed those faults, not that the tests are strong.
A pull request’s tests run its own code. Read how Plainwing contains that before you run it on forks.
Request a demo
See it check your own agents’ code.