Enable risk assessment
- Open Code review → Risk assessment.
- Turn on Risk assessment and click Save settings.
Results
- Risk found: the PR falls under at least one enabled risk rule. Risk-conditioned agents may run, Routing uses its risk-found mode, and automatic approval is blocked. The approval comment names the rules.
- No risk found: Routing uses its no-risk mode. Approval still needs a clean review and a matching policy.
- Unavailable: Routing uses the configured default review mode. Automatic approval is blocked, and agents that require confirmed risk do not run automatically. The approval comment says why, for example when the Git provider did not return the diff of a code file.
Preview on a PR
Preview on a PR opens a side panel. Choose a connected repository and PR number to try the current rules, including unsaved edits. It uses the configured risk-assessment model and does not publish a comment or approve the PR.Risk rules
Kody finds risk when a PR falls under an enabled rule. Kodus ships these rules, all on:kodus-securitySecurity and permissions: authentication, authorization, permissions, tenant isolation, input validation, or any check that protects data or actions, including a new endpoint, handler or job that reads or changes data without the guard its neighbours have.kodus-moneyMoney, billing and licensing: payments, prices, charges, credits, invoices, subscriptions or licensing.kodus-dataStored data and migrations: data or schema migrations, deleting or rewriting stored data, or the shape of persisted data and the queries that read or write it.kodus-infrastructureSecrets and infrastructure: secrets, credentials, infrastructure, networking or the runtime environment.kodus-ci-buildCI, build, release and dependencies: CI, build, release or deploy configuration, or a dependency or tool version.kodus-shared-contractShared contracts and public interfaces: what other code, users or integrations rely on, such as the results of a public API, library function or CLI.kodus-concurrencyConcurrency, retries, queues and caching.kodus-ai-behaviorProduction prompts and model behavior: the prompts, model choice or model settings a production feature runs with.kodus-broad-changeBroad or mixed changes: a broad rewrite of core paths, or one PR that mixes several consequential changes.
id must be unique. A rule with file filters applies only to the changes in matching files; Kody still assesses the rest of the PR against the other rules. When no enabled rule applies to the changed files, Kody finds no risk without calling the model, so a clean review can approve.
Risk instructions saved before risk rules existed appear as Team context. Kody reads them as context rather than as a rule: they can say that a change needs a person or that it does not. When they ask for a person, the approval comment names Team context.
The assessment reads the diff, the PR title and description, and the bug-fix history of the changed areas. Missing history is unknown information, not evidence of safety.
YAML
Turn on Prefer kodus-config.yml settings in Code review → General (repository scope) before using repository configuration files.id with only what you change. An entry whose id matches no Kodus rule needs a name and instructions. riskCriteria: [] applies Kodus’s rules as shipped. A repository or directory that sets riskCriteria replaces the list it inherits, so list there every change it needs, including the organization’s own rules. kodus config remote risk-rules . lists the rules in effect, with their ids. To stop assessment, set riskAssessmentActive: false.
A configuration that never set Risk assessment keeps its existing approval risk behavior until you change this setting. Turning automatic approval on or off does not change the Risk assessment switch.