JSPM

  • Created
  • Published
  • Downloads 232
  • Score
    100M100P100Q91172F
  • License MIT

CLI quality gates for AI-generated code. Forces AI agents (Claude, Cursor, Copilot) to meet strict engineering standards with PASS/FAIL enforcement.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rigour-labs/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @rigour-labs/cli

    npm version npm downloads License: MIT

    Local-first quality gates for AI-generated code.
    Rigour forces AI agents to meet strict engineering standards before marking tasks "Done".

    Zero cloud. Zero telemetry. PASS/FAIL is always free.

    πŸš€ Quick Start

    npx rigour scan     # Zero-config scan (auto-detect stack)
    npx rigour init     # Initialize quality gates
    npx rigour check    # Verify code quality
    npx rigour run -- claude "Build feature X"  # Agent loop

    πŸ›‘ The Problem

    AI agents often fall into **"Vibe Coding"**β€”claiming success based on narrative, not execution:

    1. Agent makes a change
    2. Agent claims "Task 100% complete"
    3. CI Fails with type errors, lint failures, or broken tests

    Rigour breaks this cycle by forcing agents to face the same verification tools (ruff, mypy, vitest) that CI runsβ€”locally and immediately.

    πŸ”„ How It Works

    Agent writes code β†’ Rigour checks β†’ FAIL? β†’ Fix Packet β†’ Agent retries β†’ PASS βœ“

    βš™οΈ Quality Gates

    Structural & Security Gates

    Gate Description
    File Size Max lines per file (default: 300-500)
    Hygiene No TODO/FIXME comments allowed
    Complexity Cyclomatic complexity limits (AST-based)
    Required Docs SPEC.md, ARCH.md, README must exist
    File Guard Protected paths, max files changed
    Security Patterns XSS, SQL injection, hardcoded secrets, command injection
    Context Alignment Prevents drift by anchoring on project patterns

    AI-Native Drift Detection (v2.16+)

    Gate Description
    Duplication Drift Near-identical functions across files β€” AI re-invents what it forgot
    Hallucinated Imports Imports referencing modules that don't exist (JS/TS, Python, Go, Ruby, C#)
    Inconsistent Error Handling Same error type handled differently across agent sessions
    Context Window Artifacts Quality degradation within a file β€” clean top, messy bottom
    Async & Error Safety Unsafe async/promise patterns, unhandled errors across 6 languages

    Multi-Language Support

    All gates support TypeScript, JavaScript, Python, Go, Ruby, and C#/.NET.

    πŸ› οΈ Commands

    Command Purpose
    rigour scan Zero-config stack-aware scan using existing gates
    rigour init Setup Rigour in your project
    rigour check Validate code against quality gates
    rigour check --ci CI mode with appropriate output
    rigour explain Detailed explanation of validation results
    rigour run Supervisor loop for iterative refinement
    rigour studio Dashboard for monitoring
    rigour index Build semantic index of codebase patterns

    πŸ€– Works With

    • Claude Code: rigour run -- claude "..."
    • Cursor / Cline / Gemini: Via MCP server (rigour_check, rigour_explain)

    πŸ“– Documentation

    πŸ“š Full Documentation β†’

    Quick Links
    Getting Started Install and run in 60 seconds
    CLI Reference All commands and options
    Configuration Customize quality gates
    MCP Integration AI agent setup

    πŸ§ͺ CI Integration

    - run: npx rigour check --ci

    πŸ“œ License

    MIT Β© Rigour Labs

    "Rigour adds the engineering."