Runbook: Use Delegation Mode
Owner: Any developer already running a coding agent (Claude Code / Codex / Cursor) Frequency: Per change | Last Updated: 2026-08-14
Purpose
Get an OCR-quality review — deterministic file selection, rule matching, structured findings — without ever giving OCR its own LLM API key. The review itself runs inside a coding agent you already have configured and trust.
Prerequisites
- [ ] A coding agent already set up with its own model access (Claude Code, Codex, or
Cursor) — see
plugins/open-code-review/README.mdin the pinned source for platform-specific install steps. - [ ]
ocrinstalled (no LLM provider configuration needed for this mode).
Procedure
Step 1: Preview what would be reviewed
ocr delegate preview
Expected result: OCR runs its normal deterministic file-selection and rule-resolution
logic (the same engine review/scan use internally — see module doc: delegate)
and shows what it would hand off — no LLM call happens.
If it fails: shows no files — same rule/allowlist filtering as review/scan; see
Troubleshooting below.
Step 2: Get rule text for specific files
ocr delegate rule src/main.go src/handler.go
Expected result: Markdown-rendered rule groups for exactly those files — this is what your coding agent's OCR plugin/skill consumes to know which review rules apply. If it fails: confirm the file paths are correct relative to the repo root; a typo'd path silently returns no rule text rather than an error.
Step 3: Let your coding agent perform the review
Follow your platform's plugin setup (Claude Code: install a plugin with review slash
commands; Codex: callable review skills; Cursor: portable review skills — links in
plugins/open-code-review/README.md).
The agent calls into OCR's deterministic layer for file selection and rules, then performs
the actual review with its own model.
Expected result: the same category of structured comments as ocr review, produced by
your agent's model — not sent to any OCR-configured provider.
If it fails: the coding agent doesn't pick up the rule groups — re-check the
platform-specific plugin install steps linked above.
Verification
- [ ]
ocr delegate previewruns successfully with no LLM provider configured — if it asks for an API key, something is misconfigured (delegation mode should never need one).
Troubleshooting
| Symptom | Likely Cause | Fix |
|---|---|---|
ocr delegate preview shows no files |
Same rule/allowlist filtering as review/scan | ocr rules check <file-path> to debug, same as Run a Review or Scan. |
| Coding agent doesn't pick up the rule groups | Plugin not installed for your platform | Re-check the platform-specific plugin install steps linked above. |
Rollback
No LLM call and no repository write happens anywhere in this mode's OCR-owned steps — nothing to roll back on OCR's side. Whatever your coding agent does with its own model is governed by that agent's own tooling, not OCR.
Escalation
| Situation | Contact | Method |
|---|---|---|
| Plugin/skill install issue for your platform | That platform's OCR plugin maintainers | Repo's plugins/open-code-review/ READMEs |
| OCR delegation-mode bug | OCR maintainers | github.com/alibaba/open-code-review/issues |
History
| Date | Run By | Notes |
|---|---|---|
| 2026-08-14 | Onboarding kit build | Verified against cmd/opencodereview/delegate_cmd.go and internal/delegate/. |