Verification harness for AI-generated code
Project description
goalie
Verification harness for AI-generated code. Checks that a diff actually does what it should, using oracles independent of whoever (or whatever) wrote it — and returns machine-readable verdicts an agent loop can act on.
Commands
goalie diff-test # old vs new implementation on generated inputs
goalie properties # generate + run property-based tests [planned]
goalie mutate # property tests by injecting bugs [planned]
goalie bench # performance regression check [planned]
diff-test
For refactors, the old implementation is a free oracle. goalie extracts changed
functions from the git diff, generates inputs with Hypothesis, and runs both versions:
{
"target": "core/rolling.py::rolling_max",
"verdict": "FAIL",
"examples": 2000,
"seed": 42,
"counterexample": { "kwargs": { "xs": "[1, 2, 2]", "w": "2" }, "old": "2", "new": "1" }
}
Deterministic, reproducible from the seed, no LLM involved. Add one line to your AGENTS.md / CLAUDE.md and your agent has to prove its refactor preserved behavior before calling it done.
properties [planned]
An LLM proposes Hypothesis invariants for a function; they're written to .goalie/
as plain code you review and commit. Generation uses a model once — execution
is deterministic forever.
mutate [planned]
Trust check for the property suite: inject small bugs (<= → <, max → min) and re-run. Properties that don't catch planted bugs won't catch real ones. Outputs a mutation score.
bench [planned]
pyperf old vs new with a regression threshold. Catches the O(n²) that passes every test.
Roadmap
v0 — diff-test end-to-end on pure-ish typed functions v0.1 — pipx install goalie, CI exit codes, kwargs/exceptions handling v1 — properties + mutate v1.x — MCP server mode, bench, stateful testing
Out of scope: sandboxing, non-Python, greenfield code with nothing to diff against.
Status
diff-test v0 implemented. Design spec: docs/superpowers/specs/2026-07-24-diff-test-design.md
Quickstart
uv sync
uv run goalie diff-test
Report written to .goalie/latest.json and .goalie/reports/. To waive an
intentional behavior change:
uv run goalie waive path/to/file.py::function_name --reason "<why>"
Running tests
Agent-verifiable suite (green):
uv run pytest --ignore=tests/human -q
Gated suite — red until the maintainer implements the human-owned modules
(src/goalie/discovery.py, src/goalie/orchestrator.py):
uv run pytest tests/human -v
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file goalie-0.1.0.tar.gz.
File metadata
- Download URL: goalie-0.1.0.tar.gz
- Upload date:
- Size: 58.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec515a3b8e1be22f47e324c6721f7f4e99cd6d70ef829095e0181591096f7bc9
|
|
| MD5 |
165603843479f06e3d20518417e1eb8c
|
|
| BLAKE2b-256 |
04c9cbc464711aa4490a17e5b532f399a283b0c9d94c50c6b503efd51665e65d
|
File details
Details for the file goalie-0.1.0-py3-none-any.whl.
File metadata
- Download URL: goalie-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f36b35f108efe072fb05c8fd9387fc5165eed1654e87bd91072e269c8ab4cf1c
|
|
| MD5 |
d276688b3bf348e04a7655a6243aa0a0
|
|
| BLAKE2b-256 |
355b0c7199083068dcc3a2546bfcbfa7e15cf4a8c6d761e57de7a615e92f1015
|