Comprehensive quality gate before declaring work done.
When package.json declares a verify script, the repo owns the gate. Skip steps 1 and 2:
- Run
npm run verifyonce in the foreground with a 600000ms timeout. It takes minutes. Run it alone: no pipe,;or||. - Do not read workflow YAML or run individual checks.
verifymirrors CI and prints what it skips. - On success with a clean tree, the
post-verify-stamp.shhook writes HEAD to<git-dir>/verify-passed. The PR-open hook reads that stamp. A background run never stamps. - Continue at step 3.
Otherwise:
- Discover CI steps: read
.github/workflows/*.yml(or.gitlab-ci.yml,Jenkinsfile, etc.) andpackage.jsonscripts to find the actual checks CI runs. Only run what CI actually runs - do not guess or add extra steps. - Run each CI step in order: execute the discovered commands (lint, typecheck, test, build, etc.) in the same order as CI. Stop at the first failure.
- Git status: show uncommitted changes and untracked files.
- Diff review: summarize what changed in this session (files, lines added/removed).
- Spec check: if a spec in
.claude/state/specs/hasbranch: <current branch>, spawn theSpec Verifierand include its verdict. Any automated criterion not PASS at HEAD fails the gate.
If all CI steps pass and git status is clean: output "READY - all quality gates passed." If any step fails: list failures and stop. Do NOT declare work done. If no CI configuration is found, say so and ask the user what checks to run.


