Rigour
About
Deterministic quality gates for AI coding agents. Rigour runs 23 automated checks on every file AI writes — structural analysis, security scanning, AI-drift detection, and agent governance.
Details
- Author
- rigour-labs
- Downloads
- 348
- Categories
- Other, Developer Tools, Security, AI
Jump to
- 23 automated quality checks per file
- Two-score system: AI Health and Structural scores
- Detects structural issues (complexity, nesting, long functions)
- Scans for security vulnerabilities (SQL injection, hardcoded secrets)
- Identifies AI-drift patterns (hallucinated imports, duplicated functions)
- Supports TypeScript, JavaScript, Python, Go, Ruby, C#
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
RigourCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Add Rigour to your Claude Desktop or Cursor config by inserting the JSON snippet under mcpServers with "command": "npx" and "args": ["-y", "@rigour-labs/mcp"]. It runs automatically when the agent writes a file.
rigour_check
Run quality gate checks on the project. MUST be called before declaring any coding task complete. Checks code complexity, file size, required docs, security patterns, and more. Returns PASS or FAIL with details. **Always show the user the headline summary from this tool's output** — it tells them what Rigour caught. If FAIL, call rigour_get_fix_packet for structured fix instructions with exact file locations and step-by-step remediation.
rigour_explain
Explain WHY quality gates failed in human-readable language. Use this to understand the reasoning behind each violation before fixing. For machine-readable fix instructions, use rigour_get_fix_packet instead.
rigour_get_fix_packet
Call this after rigour_check returns FAIL. Returns a prioritized Fix Packet with exact violations, file locations, and step-by-step fix instructions. Apply fixes in severity order (critical first), then re-run rigour_check to verify. Repeat until PASS. **After applying all fixes, tell the user what Rigour caught and that fixes were applied.**
rigour_remember
Store a persistent instruction or context that the AI should remember across sessions. Use this to persist user preferences, project conventions, or critical instructions. IMPORTANT: You must provide both 'key' (a short snake_case identifier) and 'value' (the full text to remember).
rigour_recall
Load project memory and stored conventions. CALL THIS at the START of every coding task (before reading files) to restore team decisions, naming conventions, and architectural preferences. Returns index health status and uses semantic cache on repeat calls — second recall with the same key is served from cache.
rigour_forget
Remove a stored memory by key.
rigour_check_pattern
CALL THIS BEFORE creating any new function, component, hook, or class. Checks if it already exists in the codebase (prevents duplication), checks for known security vulnerabilities, and BLOCKS writes to protected paths (.github/, CI/CD configs, rigour.yml). Always pass the target file path.
rigour_security_audit
Runs a live security audit (CVE check) on the project dependencies.
rigour_run
Execute a command under Rigour supervision. This tool can be INTERCEPTED and ARBITRATED by the Governance Studio.
rigour_run_supervised
Run a command under FULL Supervisor Mode. Iteratively executes the command, checks quality gates, and returns fix packets until PASS or max retries reached. Use this for self-healing agent loops.
rigour_agent_register
Register an agent in a multi-agent session. Use this at the START of agent execution to claim task scope and enable cross-agent conflict detection. Required for Agent Team Governance.
rigour_checkpoint
Record a quality checkpoint during long-running agent execution. Use periodically (every 15-30 min) to enable drift detection, quality monitoring, and compact subagent handoffs. Triggers incremental pattern index refresh when filesChanged is provided. Essential for GPT-5.3 coworking mode — call BEFORE rigour_handoff to compress context under 2K tokens.
rigour_handoff
Handoff task to another agent in a multi-agent workflow. Use when delegating a subtask or completing your scope. Enables verified handoff governance.
rigour_agent_deregister
Deregister an agent from the multi-agent session. Use when an agent completes its work or needs to release its scope for another agent.
rigour_handoff_accept
Accept a pending handoff from another agent. Use to formally acknowledge receipt of a task and verify you are the intended recipient.
rigour_hooks_check
Run the fast hook checker on specific files. Same checks that run inside IDE hooks (Claude, Cursor, Cline, Windsurf). Catches: hardcoded secrets, hallucinated imports, command injection, file size. Completes in <100ms. NEW: Pass 'text' param for DLP mode — scans user input for credentials (AWS keys, API tokens, database URLs, private keys, JWTs) before agent processing.
rigour_hooks_init
Generate hook configs for AI coding tools (Claude, Cursor, Cline, Windsurf). Installs real-time quality checks and non-blocking DLP credential warnings by default. Pass dlp=false to disable DLP hooks only.
rigour_review
Perform a high-fidelity code review on a pull request diff. Analyzes changed files using all active quality gates.
rigour_context_stats
Returns context retrieval efficiency, candidate tokens vs returned tokens, potential avoided tokens, cache hit rate, and repeated reads prevented.
rigour_task_cost
Returns both verified actual model usage/cost (from Cursor Admin API or imported CSV) and Rigour estimated avoided context/cost USD.
rigour_cache_stats
Returns detailed performance stats across all 4 cache layers (exact hits, semantic hits, partial hits, misses, hit rate, tokens served from cache).
rigour_context_explain
Audits why specific files/services were included or excluded, cache hit/miss status, invalidation reasons, and prior agent requests.
rigour_index
Build or update the Rigour pattern index (.rigour/patterns.json). CALL THIS when the index is missing or stale — before rigour_context_scope or rigour_check_pattern. One AST pass extracts functions, classes, routes, and signatures for reuse. Use semantic=true for embedding-based search.
rigour_context_scope
CALL THIS BEFORE reading source files. Returns a minimal editScope (3-10 files) with signatures from the pattern index instead of full file bodies. Uses semantic search when embeddings are available. If index is missing, instructs to call rigour_index first. Highest-impact token saver in the Rigour protocol.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"rigour": {
"rigour": {
"command": "npx",
"args": [
"-y",
"@rigour-labs/mcp"
]
}
}
}
}
McpServers
{
"rigour": {
"command": "npx",
"args": [
"-y",
"@rigour-labs/mcp"
]
}
}
Rigour — Deterministic Quality Gates for AI Coding Agents
Rigour is an MCP server that forces AI agents to write production-grade code. It runs 23 automated quality checks on every file the agent writes, returning PASS/FAIL results that the agent must address before proceeding.Why Rigour?
AI coding agents (Claude, GPT, Copilot) generate code fast — but without quality enforcement. Rigour acts as a leash, not a suggestion. Every file gets scanned for: - Structural issues: file size, cyclomatic complexity, deep nesting, long functions - Security vulnerabilities: SQL injection, XSS, hardcoded secrets, command injection, path traversal - AI-drift patterns: duplicated functions across files, hallucinated imports, context window quality degradation, inconsistent error handling - Agent governance: retry loop breaking, checkpoint enforcement, environment alignmentTwo-Score System
Every scan produces: - AI Health Score — measures AI-specific code quality (drift, hallucinations, async safety) - Structural Score — measures traditional code quality (complexity, size, patterns) Both scores use severity-weighted deductions: critical issues cost 20 points, high costs 10, medium costs 5.Quick Start
Add to your Claude Desktop or Cursor config: ``json
{
"mcpServers": {
"rigour": {
"command": "npx",
"args": ["-y", "@rigour-labs/mcp"]
}
}
}
`
Supported Languages
TypeScript, JavaScript, Python, Go, Ruby, C#
Links
- GitHub: https://github.com/rigour-labs/rigour
- npm: @rigour-labs/cli, @rigour-labs/core, @rigour-labs/mcp
- Website: https://rigour.run
``Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





