agentleFS
HeyEddi-comHeyEddi-com/heyeddi-skills/skills/pre-merge-gate/SKILL.md

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.

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
  1. Very specific:

    Run gate via Task shell subagent: pre_merge_gate.py.

    line 14
  2. Very specific:

    Before merging to main / dev

    line 19
  3. Distinctive:

    After addressing review feedback: confirm all gates pass

    line 20
  4. Very specific:

    Read the markdown report: each check shows PASS/FAIL/SKIP.

    line 29
  5. Very specific:

    Eval / harness turns: When the eval harness captures Playwright proof separately, run with --skip-visual-audit so the gate does not invoke …

    line 32
  6. Distinctive:

    When you have finished the user's request for this skill (not after every tool call or subagent phase), suggest what to run next:

    line 55
  7. Very specific:

    Add --route /path if you worked a specific route.

    line 63

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Run python .agents/skills/pre-merge-gate/scripts/pre_merge_gate.py --project-root <root>.
  2. Read the markdown report: each check shows PASS/FAIL/SKIP.
  3. 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-setup verify_setup --check: incomplete prefs fail)
  • npm test + production build (package.json)
  • vue-tsc --noEmit when node_modules is present (FAIL if frontend exists but toolchain missing)
  • backend pytest (backend/tests, prefers backend/.venv)
  • ruff F821 on backend/app (undefined names / dropped imports)
  • engineering audit (@engineering-excellence audit_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-design verify_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:

  1. Run:

    python .agents/skills/heyeddi/scripts/suggest_next_skill.py --current-skill pre-merge-gate --project-root .

    Add --route /path if you worked a specific route.

  2. Include the script's ### Next step block 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.