rigour

v7.1.0
io.github.rigour-labs/rigour Checked 6 hours ago Published 1 day ago

Lets coding agents review their change, find an existing helper, and recall the team's lessons.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

rigour_check

Run quality gate checks on the project. MUST be called before declaring any coding task complete. By default it judges your change as the stop hook and push gate will: FAIL means something in it must be fixed. **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 what to fix, with exact file:line.

ParameterTypeDescription
cwd *stringAbsolute path to the project root.
apiBaseUrlstringCustom API base URL for self-hosted/proxy deep endpoints.
apiKeystringOptional cloud API key for deep analysis.
deepstringDeep mode: 'off' (default), 'quick' (deep enabled with lite model), 'full' (deep enabled, combine with pro=true for full deep model).
filesarrayOptional file paths (relative to cwd) to limit scan scope for both deterministic and deep checks.
modelNamestringOverride cloud model name for deep analysis.
probooleanUse full deep model (Qwen2.5-Coder-1.5B) instead of lite (Qwen2.5-Coder-0.5B) when deep is enabled.
providerstringCloud provider for deep analysis (claude, openai, gemini, groq, mistral, together, deepseek, ollama, etc.).
scopestring'change' (default): your change, as the stop hook judges it. 'repo': the whole repository, for an audit, not a fix loop.

rigour_get_fix_packet

After rigour_check FAILs: your change's must-fix items (they block you), then optional notes, paged, each with file:line and the fix. Stay in your change unless a must-fix item names a file. Page with next_offset; re-run rigour_check.

ParameterTypeDescription
cwd *stringAbsolute path to the project root.
limitintegerViolations per page (default 5, maximum 10).
offsetintegerZero-based violation offset. Start at 0, then use the next offset in the response.

rigour_remember

Store an instruction or convention to remember across sessions. Provide 'key' (short snake_case) and 'value' (the full text). scope: 'repo' (default, this repository), 'user' (all your repositories), or 'team' (this repository, and shared as a team candidate that teammates' agents receive once a person promotes it). Values containing credentials are refused.

ParameterTypeDescription
cwd *stringAbsolute path to the project root.
key *stringA short snake_case identifier for this memory, e.g. 'api_response_format', 'naming_convention', 'testing_strategy'. This is used to retrieve the memory later.
value *stringThe full instruction or convention text to persist. This is the content that will be recalled in future sessions.
scopestringWhere the memory applies. Default: repo.

rigour_brief

Before writing: with goal, the team's rules, lessons and settled points for the task (max 10, cited); with only files, its word on each file you will edit. A [must] you break blocks at review.

ParameterTypeDescription
cwd *stringAbsolute path to the project root.
filesarrayOptional. Files the task will touch.
goalstringWhat the task is for: the request or the ticket summary.

rigour_recall

Load stored conventions. At the START of a task, call it with 'query' describing the task to get the few memories that match by meaning, plus promoted team knowledge when team mode is on. With 'key' it returns that memory; with neither, every repository and user memory.

ParameterTypeDescription
cwd *stringAbsolute path to the project root.
keystringOptional. Key of specific memory to retrieve.
querystringOptional. What you are about to do, e.g. 'add retry to the payments client'. Returns the closest memories by meaning.

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.

ParameterTypeDescription
cwd *stringAbsolute path to the project root.
name *stringThe name of the function, class, or component you want to create.
filestringTarget file path (relative to cwd) where the code will be written. Used to enforce protected path rules — writes to .github/, rigour.yml, etc. will be BLOCKED.
intentstringWhat the code is for (e.g., 'format dates', 'user authentication').
keywordsarrayOptional. Words for what it does, e.g. ['retry', 'backoff'].
signaturestringOptional. The signature you plan to write, e.g. '(items: T[], size: number) => T[][]'. Matches existing code by shape, not only by name.
typestringThe type of pattern (e.g., 'function', 'component', 'hook', 'type').

rigour_review

Review the change you just made before calling it done: runs Rigour's gates and keeps only findings on changed lines, each with file, line and a suggested fix. With no diff it reads your uncommitted work from git (new files included); pass base to review the whole branch (e.g. 'main'). Same verdict as `rigour review` in CI.

ParameterTypeDescription
cwd *stringAbsolute path to the project root.
basestringReview this branch against a base ref instead of uncommitted work, e.g. 'main'.
diffstringA unified diff to review instead of reading git. Rarely needed.
filesarrayReview exactly these files instead of the ones the change touches.
modestring"agent": also return review_task, the risky changed functions for you to review yourself, with what to check in each. No model is called by Rigour.

rigour_reviewer_verdict

What the model reviewer last decided for this branch: the confirmed items to fix (with id, file:line, consequence and evidence), the disputed ones that are not work, which mode ran, and whether the verdict is for the current commit. Read-only: never runs a model, never dismisses.

ParameterTypeDescription
cwd *stringAbsolute path to the project root.

rigour_review_ack

Record that you reviewed a function from rigour_review's review_task: verdict "fixed" (you fixed a defect) or "no_issue", with a note saying what you checked. Covers the function's current code only; editing it later puts it back in the task.

ParameterTypeDescription
cwd *stringAbsolute path to the project root.
file *stringRepository-relative path, as in review_task.
function *stringFunction name, as in review_task.
note *stringWhat you checked, e.g. 'callers pass a non-empty cursor; upsert conflict key matches the unique index'.
verdict *string

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, embedded locally so rigour_check_pattern can match by intent; semantic=false skips the embeddings.

ParameterTypeDescription
cwd *stringAbsolute path to the project root.
forcebooleanForce a full rebuild instead of incremental update. Default: false.
outputstringCustom path for the index file.
semanticbooleanEmbed patterns so an intent can find them (local Transformers.js model). Default: true; false records an explicit opt-out.

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.

ParameterTypeDescription
cwd *stringAbsolute path to the project root.
query *stringNatural-language description of what you need to work on (e.g. 'add priority field to task service').
agentIdstringOptional agent ID for context telemetry attribution.
limitnumberMaximum number of pattern matches to return (default: 10).
taskIdstringOptional task ID for context telemetry attribution.