Skip to content

← Back to Quality Gate Pipeline

SKILL.md

v1.0.0 · 1949 B · text/markdown

---
name: quality-gate-pipeline
description: Use as a hard checkpoint before declaring any task complete - runs typecheck, lint, and tests in sequence and blocks completion if any gate fails
---

# Quality Gate Pipeline

A task isn't done because the code was written — it's done when it passes
its verification gates. This skill defines the sequence and the rule for
what "done" means.

## The gate sequence

1. **Typecheck.** If the language is typed, this runs first — a type error
   usually indicates a more fundamental mistake than a lint or test issue,
   and there's no point running the rest if this fails.
2. **Lint.** Catches style and correctness issues typechecking doesn't
   (unused variables, unreachable code, common bug patterns).
3. **Tests.** Runs last because it's usually the most expensive gate, and
   there's no reason to pay that cost if the cheaper gates already failed.

Run each gate to completion and report its actual result — don't stop at
the first warning if the tool would otherwise continue and report more
issues; get the full picture from each gate before moving to the next.

## The rule

A task is not complete while any gate is red. "Mostly passing" is not
passing. If a gate fails:

1. Read the actual failure, not just its category.
2. Fix the root cause — not by loosening the gate itself (disabling a lint
   rule, weakening a type, deleting or skipping a failing test) unless
   there's a specific, stated reason the gate itself is wrong for this
   case.
3. Re-run the full sequence from the start after fixing, not just the gate
   that failed — a fix can introduce a new type error or lint issue that
   wasn't there before.

## Reporting

State clearly which gates passed and which didn't, with the actual error
output for any failure — not just "tests failed," but which test and why.
A task marked complete with an unstated failing gate is worse than one
honestly reported as blocked.