Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Done Gate

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 satisfied

Install

git clone https://github.com/LLMpsycho/agent-done-gate.git
cd agent-done-gate
pip install -e ".[dev]"

Quick start

cd your-project
done-gate init
# edit .done-gate/criteria.yaml and criteria.md
done-gate check

Exit codes:

  • 0 — allowed to say done
  • 1 — not done (missing criteria / failed commands / missing evidence)
  • 2 — config error

How it works

.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 once
done-gate check --done-text "Feature complete, seems to work"
# FAIL deny phrase + unchecked box

Agent integration

Add 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

CLI

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 only

Library

from agent_done_gate import load_project, run_gate

project = load_project(".")
result = run_gate(project, done_text="all good")
assert result.ok

Why this exists

Same model, different agent quality:

Fancy model, zero verification = expensive vibes.
Hard-stop “done” until tests and acceptance criteria pass.

License

MIT © @LLMpsycho

About

Block coding agents from saying done until acceptance criteria pass

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages