rulebook-quality-gates

hivellm's avatarfrom hivellm

Automated quality checks and enforcement for code commits. Use when validating code quality, running pre-commit checks, ensuring test coverage, or enforcing coding standards before commits and pushes.

⭐5stars🔀0forks📁View on GitHub🕐Updated Dec 10, 2025

When & Why to Use This Skill

The rulebook-quality-gates skill is a comprehensive automation tool designed to enforce high code quality standards through rigorous pre-commit and pre-push validation. It integrates essential development checks—including type checking, linting, formatting, and unit testing—directly into the Git workflow to ensure that only code meeting specific quality thresholds (such as 95% test coverage) is committed and pushed.

Use Cases

  • Automated Pre-commit Validation: Automatically execute type-checks, linting, and formatting before every commit to maintain a clean, error-free codebase and reduce manual review effort.
  • Quality Threshold Enforcement: Set and maintain strict project standards, ensuring 100% test pass rates and high coverage requirements are met before code can be merged.
  • Git Hook Integration: Streamline the development lifecycle by initializing automated Git hooks that verify build stability and test integrity during the push process.
  • Preventing CI/CD Failures: Catch syntax errors, type mismatches, and broken tests locally to prevent unnecessary build failures in the continuous integration pipeline.
  • Standardizing Team Workflows: Enforce consistent coding styles and best practices across a distributed team using automated linting and formatting rules.
namerulebook-quality-gates
descriptionAutomated quality checks and enforcement for code commits. Use when validating code quality, running pre-commit checks, ensuring test coverage, or enforcing coding standards before commits and pushes.
version"1.0.0"
categorycore
author"HiveLLM"
tags["quality", "testing", "coverage", "linting", "pre-commit", "git-hooks"]
dependencies[]
conflicts[]

Quality Gates Enforcement

Pre-Commit Checklist

MUST run these checks before every commit:

npm run type-check    # Type check
npm run lint          # Lint (0 warnings)
npm run format        # Format check
npm test              # All tests (100% pass)
npm run build         # Build verification
npm run test:coverage # Coverage check (95%+)

If ANY fail, FIX before committing.

Quality Thresholds

Check Requirement
Type Check Zero errors
Lint Zero warnings
Tests 100% pass rate
Coverage 95%+
Build Must succeed

Git Hooks

Rulebook can install automated Git hooks:

rulebook init  # Prompts to install hooks

Pre-commit Hook

  • Format check
  • Lint check
  • Type check

Pre-push Hook

  • Build verification
  • All tests
  • Coverage threshold check

Fixing Common Issues

npm run type-check  # See type errors
npm run lint        # See lint warnings
npm run lint:fix    # Auto-fix lint issues
npm test            # Run all tests
npm run test:coverage  # See coverage report