pre-merge-gate
Skill0 starsChanged 3 months agoMITView on GitHub
Runs pre-merge checks (setup prefs + backend + frontend + engineering excellence + optional UI audit). Any FAIL exits 1 (hard stop). Use when QA approves a PR or before merge to main.
In this repository51 other files it gives its agents.
- .cursor/rules/skill-authoring.mdcCursor rule
- backend-type-bridgerSkill
- composable-patternsSkill
- dart-type-bridgerSkill
- design-handoff-flutterSkill
- design-system-generalizerSkill
- engineering-excellenceSkill
- flutter-engineeringSkill
- flutter-patternsSkill
- heyeddi-designSkill
- heyeddi-handoffSkill
- heyeddi-intakeSkill
- heyeddi-orchestratorSkill
- heyeddi-productSkill
- heyeddi-pr-respondSkill
- heyeddi-pr-reviewSkill
- no-duplicate-uiSkill
- pre-merge-gateSkill
- primevue-openprops-architectSkill
- project-engineeringSkill
- ux-flow-auditorSkill
- verify-buildSkill
- visual-auditorSkill
- backend-type-bridgerSkill
- composable-patternsSkill
- dart-type-bridgerSkill
- design-handoff-flutterSkill
- design-system-generalizerSkill
- engineering-excellenceSkill
- flutter-engineeringSkill
- flutter-patternsSkill
- heyeddi-ci-configSkill
- heyeddi-ci-failsSkill
- heyeddi-ci-guideSkill
- heyeddi-ci-runnersSkill
- heyeddi-designSkill
- heyeddi-handoffSkill
- heyeddi-intakeSkill
- heyeddi-orchestratorSkill
- heyeddi-productSkill
- heyeddi-pr-respondSkill
- heyeddi-pr-reviewSkill
- heyeddi-setupSkill
- heyeddiSkill
- no-duplicate-uiSkill
- primevue-openprops-architectSkill
- project-engineeringSkill
- taste-penpotSkill
- ux-flow-auditorSkill
- verify-buildSkill
- visual-auditorSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Run gate via Task shell subagent: pre_merge_gate.py.
- Very specific: line 19
Before merging to main / dev
- Distinctive: line 20
After addressing review feedback: confirm all gates pass
- Very specific: line 29
Read the markdown report: each check shows PASS/FAIL/SKIP.
- Very specific: line 32
Eval / harness turns: When the eval harness captures Playwright proof separately, run with --skip-visual-audit so the gate does not invoke …
- Distinctive: line 55
When you have finished the user's request for this skill (not after every tool call or subagent phase), suggest what to run next:
- Very specific: line 63
Add --route /path if you worked a specific route.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- setup audit (
@heyeddi-setupverify_setup --check: incomplete prefs fail) - 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) - engineering audit (
@engineering-excellenceaudit_engineering --check: errors fail; warns advisory)
Optional (SKIP allowed if skill/tool missing; FAIL still hard-stops)
- duplicate UI scan (
no-duplicate-ui) - prose audit (
heyeddi-designverify_prose.py) — always-on for copy; skip only in emergency - contrast audit on product routes (
visual-auditor; SKIP if Playwright missing)
Flags: --skip-duplicate-ui, --skip-prose-audit, --skip-engineering-audit, --skip-setup-audit, --skip-visual-audit. --skip-backend, --skip-engineering-audit, and --skip-setup-audit are 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/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 → reference/next-skill-handoff.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

