Config / Schema Overview
.river-review.json (Runtime Config)
Place .river-review.json in the repository root to customize review model settings and exclusion conditions. Verified by Zod schema in src/config/schema.mjs. Defaults to src/config/default.mjs if missing.
Support Items and Defaults
-
modelprovider:openai(Default). The config schema also acceptsgoogle/anthropic, but the current review pipeline is OpenAI-only (see #490).modelName:gpt-4o-mini(Default)temperature:0maxTokens:600
-
reviewlanguage:ja(Japanese) /en(English). Switches prompt body and output language.severity:normal(Default) /strict/relaxedadditionalInstructions: Additional review policies (array). Listed at the end of the prompt.specDirs: Extra spec/ADR directories (repo-relative paths, array) scanned when linking changed files to related design docs. Merged with the built-in defaults (docs/adr/pages/explanation/specs).walkthrough: Whentrue, asks the prompt to add a per-file walkthrough section (summary, risk, suggested reading order) to the review output (defaultfalse).agentHandoff: Whentrue, asks the prompt to emit a provider-agnostic Agent Handoff section (goal / target files / constraints / steps / tests / done criteria) so another AI agent can act on blocking findings (defaultfalse).
-
excludefiles: Glob patterns to exclude from change diffs.prLabelsToIgnore: Skips review if Pull Request label contains target keywords. Matches partial case-insensitive againstRIVER_PR_LABELS(comma separated) or GitHub ActionsGITHUB_EVENT_PATH.
-
security(#692)redact.enabled:true(default). Redacts secrets in repo-wide context and prompts before sending to the LLM.redact.categories: Toggle individual categories. Keys:- Keys:
githubToken/openaiKey/anthropicKey/googleApiKey/awsAccessKey/awsSecretKey/privateKey - Auth:
bearerToken/databaseUrl/webhookUrl/oauthSecret/envAssignment - Fallback:
highEntropy
- Keys:
redact.extraPatterns: Additional regex ({ id, pattern, replacement? }) for project-specific key formats.redact.allowlist: Tokens matching these strings are not redacted (useful for protecting test fixtures).redact.denyFiles: Globs added to the path-level deny list (on top of the built-in.env*/*.pem/*.key/secrets.*).redact.entropyThreshold:3.0–6.0(default4.5). Threshold for the Shannon-entropy fallback detector.redact.entropyMinLength: Default24. Minimum substring length the fallback detector considers.
-
memory(#687)suppressionEnabled:true(default). Applies suppression entries from Riverbed Memory. Set tofalseto bypass the gate (emergency override).
-
context(#689)reviewMode:tiny/medium/large. Whenbudgetis omitted, the preset fromsrc/lib/context-presets.mjsis applied. An explicitbudgetalways wins.budget.maxTokens:256–64000.budget.maxChars:1024–200000. Both char and token caps apply simultaneously.budget.perSectionCaps: Per-section char caps forfullFile/tests/usages/config.ranking.enabled:trueto enable proximity-based reordering of context candidates.ranking.weights: Per-signal weights forpathProximity/symbolUsage/siblingTest/commitRecency, each in0.0–1.0. Equal weighting if omitted.tokenizer: Onlyheuristicis accepted (reserved for future expansion).
-
artifacts- Declares paths to input artifacts. Accepts these 12 IDs:
pbi-input/plan/todo/test-cases/review-self/review-external/diff/junit/coverage/lint/typecheck/findings-pool. - Each value is a string path, or an object
{ "path": "...", "optional": <boolean> }(optionalis a boolean). - Unknown keys are accepted for forward compatibility (catchall). See the Artifact Input Contract for the resolution order and per-artifact contract.
- Declares paths to input artifacts. Accepts these 12 IDs:
-
selection(skill pack adoption)packs: array of pack ids to adopt (e.g.[typescript, ddd]). Multiple packs are set-unioned by skill id so each skill runs at most once.tags: cross-cutting additions; skills carrying any listed tag join the selection.skills.include/skills.exclude: add or drop individual skills. Precedence:exclude > include > union(packs, tags).minTier:official/community/experimental. Explicitly listedpacksbelow minTier still run (warning only).- When
--skill-setis passed on the CLI it overrides the config selection. See examples/selection/ for samples.
Configuration Example
{
"model": { "provider": "openai", "modelName": "gpt-4o", "temperature": 0.2 },
"review": {
"language": "en",
"severity": "strict",
"additionalInstructions": ["Focus on security", "Prefer readable variable names"]
},
"exclude": {
"files": ["**/*.md", "docs/**"],
"prLabelsToIgnore": ["no-review", "wip"]
}
}
Operational Tips
- List labels to skip in CI in
prLabelsToIgnoreand ensure they can be read fromRIVER_PR_LABELS(e.g.,RIVER_PR_LABELS=no-review,wip) or GitHub event payload. - Verify schema integrity and behavior with
npm testornpm run lintafter changing settings.
JSON Schema (Skill / Output)
River Review defines skills and outputs using JSON Schema. Skills assume YAML frontmatter, outputs assume JSON.
-
schemas/skill.schema.json- Required:
id/name/description/category(plus one ofphase/category/trigger, and one ofapplyTo/files/path_patterns/trigger) - Optional:
tags/severity/inputContext/outputKind/modelHint/dependencies categoryis one ofcore/upstream/midstream/downstreamand is the primary routing key.phaseis kept for backward compatibility.
- Required:
-
schemas/output.schema.json- Required:
issue/rationale/impact/suggestion/priority/skill_id priority:P0toP3
- Required:
Skills are placed as Markdown files in skills/{category}/ and can be schema-validated with npm run skills:validate.