Metadata-Version: 2.4
Name: dunnit
Version: 0.1.0
Summary: Did the agent actually do it? Tamper-evident verification of AI agent work: definition-of-done as code.
Project-URL: Homepage, https://github.com/palasht75/dunnit
Project-URL: Issues, https://github.com/palasht75/dunnit/issues
Project-URL: Changelog, https://github.com/palasht75/dunnit/blob/main/CHANGELOG.md
Author-email: Palash <palasht75@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ai-agents,claude-code,cursor,definition-of-done,reward-hacking,testing,verification
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/markdown

# dunnit

**Did the agent actually do it?**

AI coding agents claim completion when work isn't done: they delete failing
tests, add `skip` markers, hardcode expected outputs, stub functions and
declare victory. Research calls it reward hacking. You call it Tuesday.

`dunnit` is a tamper-evident verifier for agent work. You declare your
definition of done in `dod.yaml`; `dunnit verify` re-runs the proof itself
and inspects the diff for test-gaming. **It never trusts the transcript.**

```bash
pip install dunnit
dunnit init      # write dod.yaml
dunnit verify    # ✓ or ✗, exit code for CI
```

## What it checks (v0.1)

- **Commands** — declared proof commands (tests, lint, build) must exit 0,
  executed by dunnit, not quoted from the agent's chat log.
- **Tamper** — git diff of test files: deleted tests, added skip markers,
  net-removed assertions → hard FAIL.
- **Stubs** — changed code scanned for `TODO`/`FIXME`, `NotImplementedError`,
  swallowed exceptions → WARN.

## dod.yaml

```yaml
version: 1
base: origin/main        # diff against this ref (default: HEAD, i.e. uncommitted work)
checks:
  - name: tests
    run: pytest -q
  - name: lint
    run: ruff check .
tamper: true
stubs: true
```

## Use it everywhere agents work

- **CI** — `dunnit verify` exits non-zero on FAIL; `--json` for machines.
- **Claude Code stop-hook / Cursor rules** — make the agent run
  `dunnit verify` before it's allowed to say "done".
- **Python** — `from dunnit import verify; verify("dod.yaml").passed`

## Roadmap

pytest plugin · coverage non-regression · hardcoded-output detection ·
optional LLM judge · MCP server (agents self-verify) · signed verdict
attestations · JS/Go check packs.

MIT licensed.
