agentleFS
Vimalk0703Vimalk0703/shipworthy/skills/quality/quality-gates/SKILL.md

quality-gates

Skill6 starsChanged 8 months agoMITView on GitHub

Graduated pre-commit quality checks that scale with project complexity and user tier. Level 0 for Builder-tier small projects, up to Level 4 for enterprise codebases. Thresholds configurable in architecture.md.

11 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When graduation happens, inform the user: "Your project is growing — I'm going to start checking for a few more things before commits to …

    line 26
  2. Distinctive:

    Every project that's past the prototype stage:

    line 29
  3. Distinctive:

    When this skill activates:

    line 92
  4. Distinctive:

    Check user tier (Builder-tier can be Level 0.

    line 94
  5. Distinctive:

    Run through the applicable checklist

    line 95

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “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

Quality Gates

Graduated Levels

Quality checks scale with project maturity and user tier. The plugin detects the project's current level based on file count and user tier, then adjusts expectations accordingly.

Level 0: Just Ship It (Builder-Tier, <5 Source Files)

For Builder-tier users with small projects. The goal is momentum, not perfection. Two checks:

  • Build succeeds (the code runs without crashing)
  • No hardcoded secrets, API keys, or credentials in source files

That's it. No lint rules, no coverage thresholds, no architectural purity tests. The project has 4 files — it doesn't need governance, it needs to exist.

Automatic Graduation: Level 0 automatically graduates to Level 1 when either condition is met:

  • The project has its first successful deployment (it's real now, treat it that way)
  • The project reaches 5+ source files (complexity is emerging, basic hygiene matters)

When graduation happens, inform the user: "Your project is growing — I'm going to start checking for a few more things before commits to keep things solid. Nothing heavy, just making sure tests pass and the code is clean."

Level 1: Foundation (5+ Source Files, Always Active for Engineer-Tier)

Every project that's past the prototype stage:

  • All existing tests pass
  • No TypeScript/lint errors (if applicable)
  • No console.log in production code — use a structured logger (pino, winston). Install one if none exists.
  • No hardcoded secrets, API keys, or credentials
  • New code has corresponding tests
  • Build completes successfully
  • Linter configured and passing — set up ESLint (TypeScript/JS), Ruff (Python), or golangci-lint (Go) if not present
  • Input validation uses a schema library (Zod, Pydantic) — not manual if/else
  • Test coverage tooling configured (vitest --coverage, pytest-cov, go test -cover)

Level 2: Growing (10+ Source Files)

Building discipline:

  • All Level 1 checks
  • Test coverage for new code above threshold (default: 70%)
  • No TODO without a ticket number or date
  • No any type in TypeScript strict mode projects
  • No unused imports or variables
  • Error handling on all async operations

Level 3: Maturing (50+ Source Files)

Architectural integrity:

  • All Level 2 checks
  • No circular imports (verify with dependency analysis)
  • Bundle size within budget (if frontend)
  • API contracts validated against types
  • Database migrations are reversible
  • No direct database queries outside the data layer
  • All public functions have JSDoc/docstrings

Level 4: Production (100+ Source Files)

Enterprise readiness:

  • All Level 3 checks
  • Performance benchmarks pass
  • Accessibility audit passes (if frontend)
  • Security scan clean (no known vulnerabilities in dependencies)
  • API documentation synchronized with implementation
  • Error tracking integration verified
  • Health check endpoints respond correctly

Level Selection Logic

if user_tier == "Builder" AND source_files < 5:
    level = 0
elif source_files < 10:
    level = 1
elif source_files < 50:
    level = 2
elif source_files < 100:
    level = 3
else:
    level = 4

# Override: Engineer-tier always starts at Level 1 minimum
if user_tier == "Engineer" AND level == 0:
    level = 1

How to Run

When this skill activates:

  1. Count source files to determine the project's level
  2. Check user tier (Builder-tier can be Level 0; Engineer-tier starts at Level 1)
  3. Run through the applicable checklist
  4. Report results as: PASS / FAIL / ADVISORY
  5. FAIL = must fix before committing
  6. ADVISORY = should fix, but non-blocking

For Builder-tier users at Level 0-1: Report simply. "Everything looks good, ready to commit" or "Found a potential API key in the code — let me move that to an environment variable first."

For Engineer-tier users or Level 2+: Report the full checklist with details on any failures.

Configuration

Quality gate thresholds can be customized in .shipworthy/architecture.md:

## Quality Gate Levels
Level 0 (builder, <5 files): [build, no secrets]
Level 1 (always): [custom checks]
Level 2 (15+ files): [custom threshold]
Level 3 (75+ files): [custom checks]
Level 4 (150+ files): [custom checks]
Coverage threshold: 80%
Bundle size limit: 250KB

Rationalization Pressure Test

These are excuses you might generate to skip quality gates. Each one is wrong.

RationalizationWhy It's WrongWhat To Do Instead
"The user just wants to commit quickly"A fast commit with bugs is slower than a 2-minute quality checkRun the gates. They take less time than fixing a broken deploy
"This is a WIP commit"WIP commits become permanent commits. Standards apply alwaysAt minimum, run Level 0 (build + no secrets). Always
"Quality gates are too strict for this project"The gates are graduated — Level 0 has only 2 checks. That's not strictApply the level that matches the project. Don't skip entirely
"I already checked manually"Manual checks miss things. That's why automated gates existRun the automated checks. Trust the output over your memory
"This is just documentation"Docs can contain secrets, broken links, and incorrect informationRun Level 0 at minimum. Secrets scanners catch credentials in any file

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.