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
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 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:
- Agent makes a change
- Agent claims "Task 100% complete"
- 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 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
| 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."