Use this scenario for a pull request, commit range, staged change, or named file set. A useful review is tied to an exact base and head revision, puts actionable findings first, and separates verified evidence from degraded or unsupported analysis.
OpenCode workflow
In an installed client, run:
/review
The maintained command performs this portable sequence:
codegraph_project_context_statusestablishes project and graph readiness.codegraph_context_session_openopens or reuses the explicit session.codegraph_context_retrieval_diff_previewbinds review to the requested base or files.- Targeted
codegraph_context_retrieval_file_readand fused search explain only high-risk findings. codegraph_digital_employee_code_quality_review_reportproduces code-quality evidence when that lane is in scope.codegraph_digital_employee_architecture_impact_review_reportproduces architecture-impact evidence when that lane is in scope.codegraph_task_context_used_context_recordrecords the evidence actually used.
Memory commit is a separate mutation. It is attempted only when the task authorizes it and must be checked asynchronously; a read-only review does not imply memory publication.
If the graph is stale or unavailable, the command returns a bounded deferral or an explicitly labelled graph-only review. Record the reduced coverage with the result and refresh the graph before a complete verdict.
CLI review
For a reproducible local report, provide the graph and base explicitly:
python -m src.cli review --db PATH --base-ref <git-ref> --format json
Alternative scopes supported by the same command are:
python -m src.cli review --db PATH --staged --format markdown
python -m src.cli review --db PATH --files <file1> <file2> --format sarif --sarif-file <results.sarif>
Use --output-file for a caller-owned report. --no-security deliberately removes the security scan from the CLI pipeline and must be disclosed in the review evidence.
Review order
- Confirm base, head, changed files and task scope.
- Check behavior and acceptance-criterion mismatches before style.
- Inspect public interfaces, serialization, persistence, authorization and failure paths.
- Follow changed symbols to high-risk callers and cross-boundary dependencies.
- Check tests for both the intended behavior and important negative paths.
- Record each finding with severity, location, evidence, consequence and smallest safe correction.
- Re-run focused checks after corrections and keep unresolved items explicit.
An empty report records no findings for the configured scope. Record approval after confirming scope, readiness, enabled checks, and the accountable review decision.
Authority boundary
Structural and code-quality review covers its own findings. AppSec, QA, deployment, and release owners record their decisions in separate evidence; the review report can reference those decisions.
Maintained source contracts
- OpenCode workflow:
.opencode/commands/review.md - CLI registration and formats:
src/cli/analysis_commands/review_command.py - Reviewer scenario policy:
src/digital_employees/runtime/scenarios/employee_scenario_invocation.py
This page is the concise scenario. For the full review model, findings and integrations, use the canonical Code Review Guide.