Tests green ≠ done. A tiny harness that blocks “finished” until acceptance criteria actually pass.
For coding agents that “optimize the wrong thing for 20 minutes” with all checks green.
pip install -e .
done-gate init
done-gate check
# FAIL until criteria.md + evidence satisfiedgit clone https://github.com/LLMpsycho/agent-done-gate.git
cd agent-done-gate
pip install -e ".[dev]"cd your-project
done-gate init
# edit .done-gate/criteria.yaml and criteria.md
done-gate checkExit codes:
0— allowed to say done1— not done (missing criteria / failed commands / missing evidence)2— config error
.done-gate/criteria.yaml:
name: my-feature
require:
# shell commands that must exit 0
commands:
- pytest -q
- ruff check .
# files that must exist (agent writes proof)
evidence:
- path: .done-gate/evidence/manual.md
min_chars: 40
# checklist items that must be marked [x] in criteria.md
markdown_checks: .done-gate/criteria.md
deny_phrases:
# fail if agent "done" text contains these without evidence
- "seems to work"
- "should be fine"
- "LGTM".done-gate/criteria.md:
# Done when
- [x] User can log in with email magic link
- [x] Error states do not leak stack traces
- [ ] Analytics event `signup_completed` fires oncedone-gate check --done-text "Feature complete, seems to work"
# FAIL deny phrase + unchecked boxAdd to agent instructions / skill:
Before claiming done:
1. Update .done-gate/criteria.md checkboxes only when truly true
2. Write evidence notes to .done-gate/evidence/
3. Run: done-gate check
4. Only say done if exit code 0
Skill file: skills/done-gate/SKILL.md
done-gate init # scaffold config
done-gate check # run gate
done-gate check --json # machine readable
done-gate check --done-text "..."
done-gate watch --cmd "pytest -q" # rerun commands onlyfrom agent_done_gate import load_project, run_gate
project = load_project(".")
result = run_gate(project, done_text="all good")
assert result.okSame model, different agent quality:
Fancy model, zero verification = expensive vibes.
Hard-stop “done” until tests and acceptance criteria pass.
MIT © @LLMpsycho