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".
Core gates run locally. Deep analysis can run local or cloud provider mode.
π Quick Start
npx @rigour-labs/cli scan # Zero-config scan (auto-detect stack)
npx @rigour-labs/cli init # Initialize quality gates
npx @rigour-labs/cli check # Verify code quality
npx @rigour-labs/cli run -- claude "Build feature X" # Agent loopπΊ Homebrew
brew tap rigour-labs/tap
brew install rigourπ 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 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 hooks init |
Install real-time hooks for supported tools |
rigour hooks check --files ... |
Run fast hook gates on specific files |
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-labs/cli check --ciπ License
MIT Β© Rigour Labs
"Rigour adds the engineering."