Run all 10 Definition of Done gates and report pass/fail.
Run all gates for task: $ARGUMENTS
grep -rn "TODO\|FIXME\|HACK" src/ --include="*.py" --include="*.ts" --include="*.js"
FAIL if any TODO/FIXME/HACK found without issue reference. (Exit code 1 = matches found = FAIL. Exit code 1 with no output = no matches = PASS.)
pre-commit run --all-files
FAIL if any hook fails.
pytest tests/unit/ -v --tb=short --cov=src --cov-report=term-missing --cov-fail-under=90
FAIL if any test fails or coverage < 90%.
pytest tests/integration/ -v --tb=short
FAIL if any test fails. SKIP if no integration tests exist.
npx playwright test
SKIP if no e2e tests exist.
gitleaks detect --source . --no-banner
FAIL if secrets detected.
Check for N+1 queries, unbounded loops, missing pagination. (Agent review)
Check public functions have docstrings, API endpoints documented.
9a. CI Status:
gh run list --branch $(git branch --show-current) --limit 1 --json status,conclusion --jq '.[0]' 2>/dev/null
FAIL if latest CI run is not successful. SKIP if no CI runs exist yet (tell user to push and re-run).
9b. PR Status (if branch is pushed):
gh pr view --json state,reviewDecision,statusCheckRollup --jq '{state: .state, review: .reviewDecision, checks: [(.statusCheckRollup // [])[].conclusion]}' 2>/dev/null
Check:
SKIP if no PR exists (not all workflows use PRs). FAIL if PR exists but has failing checks or CHANGES_REQUESTED review.
Launch an opus subagent for final review.
| Gate | Status | Details |
|---|---|---|
| 1. Implementation | ? | |
| 2. Linting | ? | |
| 3. Unit Tests | ? | |
| 4. Integration | ? | |
| 5. E2E | ? | |
| 6. Security | ? | |
| 7. Performance | ? | |
| 8. Documentation | ? | |
| 9. Pipeline | ? | |
| 10. Review | ? |
ALL pass → DONE. Any fail → list fixes.