Pre-merge Gate
Subagents (default)
Run gate via Task shell subagent: pre_merge_gate.py. Main chat triages FAIL lines and re-delegates fixes. See reference/subagents.md.
When to use
- QA wants a single green/red report before approving a PR
- Before merging to
main/dev - After addressing review feedback: confirm all gates pass
Hard stop
The script exits 1 if any check is FAIL. Do not treat a markdown BLOCKED report with exit 0 as merge-ready — that bug is fixed. Agents must not merge (or say merge-ready) unless the process exits 0.
Instructions
- Run
python .agents/skills/pre-merge-gate/scripts/pre_merge_gate.py --project-root <root>. - Read the markdown report: each check shows PASS/FAIL/SKIP.
- Fix failing checks and re-run until exit code is 0.
Eval / harness turns: When the eval harness captures Playwright proof separately, run with --skip-visual-audit so the gate does not invoke contrast audit (no Playwright in agent turn).
Checks
Required when the tree exists
- npm test + production build (
package.json) vue-tsc --noEmitwhennode_modulesis present (FAIL if frontend exists but toolchain missing)backendpytest (backend/tests, prefersbackend/.venv)- ruff F821 on
backend/app(undefined names / dropped imports)
Optional (SKIP allowed if skill/tool missing; FAIL still hard-stops)
- duplicate UI scan (
no-duplicate-ui) - prose audit (
heyeddi-designverify_prose.py) - contrast audit on product routes (
visual-auditor; SKIP if Playwright missing)
Flags: --skip-duplicate-ui, --skip-prose-audit, --skip-visual-audit. --skip-backend is emergency-only and must not be used for merge sign-off.
When the task is complete: suggest next skills
When you have finished the user's request for this skill (not after every tool call or subagent phase), suggest what to run next:
Run:
python .agents/skills/heyeddi-orchestrator/scripts/suggest_next_skill.py --current-skill pre-merge-gate --project-root .Add
--route /pathif you worked a specific route.Include the script's
### Next stepblock in your final reply. The user copies the Prompt line into chat (e.g.@heyeddi-design craft /settings).
Pass --mode shape (or craft, audit, etc.) when you know which sub-command just finished.
See @heyeddi-orchestrator → reference/next-skill-handoff.md.