assess_change_risk
Classify code changes as low, medium, or high risk to prevent data loss, auth failures, and breaking changes. Get structured risk metadata and actionable advice for safe deployment.
Instructions
Classify code change risk. Return JSON only.
CLASSIFY (single-pass, no explanation):
HIGH: data deletion, auth changes, schema mutations, infra changes, breaking contracts
MEDIUM: behavior changes, config updates, unclear test coverage
LOW: comments, formatting, renames, tests only, pure refactors
OUTPUT (strict limits): { "risk_level": "low|medium|high", "risk_types": ["data_loss","auth","perf","breaking_change","infra","unknown"], "confidence": 0.0-1.0, "reasoning": "max 8 words, fragments only, no sentences", "agent_advice": "max 10 words, imperative only" }
REASONING examples:
"auth logic changed, rollback unclear"
"schema mutation, irreversible"
"refactor only, no behavior delta"
"config change, no tests"
ADVICE examples:
"run full test suite before deploy"
"verify rollback plan exists"
"standard review, check build"
FORBIDDEN in reasoning/advice:
describing files or code
repeating diff content
full sentences
context repetition
explanations
Classify immediately. Be conservative.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diff | No | Unified diff of changes | |
| language | No | Programming language | |
| context_hint | No | Context such as pre-commit or pre-deploy | |
| files_changed | No | List of changed file paths |