Skip to content

chore(ocr): add multi-agent code review skill - #413

Open
adietish wants to merge 2 commits into
redhat-developer:mainfrom
adietish:add_ocr_review
Open

adietish wants to merge 2 commits into
redhat-developer:mainfrom
adietish:add_ocr_review

Conversation

@adietish

@adietish adietish commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Why the change

Make /ocr:review work on every clone of main — skill, agent instructions, pinned installer, and PR review step all ship with the repository.

Special things to note

  • Vendored .ocr/ assets are pinned to CLI 2.5.1. Upgrading means ocr update → ./gen-agents-md.sh → commit both; CI fails when AGENTS.md is stale.
  • The review step is advisory (PR checklist only). ocr review has no headless mode, so it cannot run as a CI gate.
  • Reviews send the diff and any reviewed files to the model configured in the contributor's AI CLI; /ocr:post publishes the synthesized review as a public PR comment.

Change outline

What lands in the repository:

.ocr/
├── skills/            # 8-phase review workflow, reviewer personas
├── commands/          # central command definitions
├── config.yaml        # team composition + project context
└── .gitignore         # sessions/ and data/ stay local
.claude/commands/ocr/  # host shims — same layout for .cursor/, .opencode/
rules/ocr.md           # agent instruction: review after detektBranch
scripts/setup-ocr.sh   # installs the pinned CLI, verifies with `ocr doctor`

The change to the contributor flow:

 generate or change code
   run ./gradlew detektBranch
+  request review from the agent prompt: /ocr:review
+  fix confirmed findings
+  re-run detektBranch
+  re-run /ocr:review only if fixes changed logic
+  publish review to the PR: /ocr:post

Install decision — never replaces a different global CLI:

setup-ocr.sh
  version   := cli-config.json.cliVersion        # 2.5.1
  installed := `ocr --version`
  if installed == version    → verify assets with `ocr doctor`
  if installed is empty      → npm install -g pinned
  if installed is different  → stop, print both options
                               (--keep-installed accepts the drift warning)

How a review runs:

sequenceDiagram
    participant Dev as Developer
    participant Agent as AI agent
    participant OCR as ocr CLI
    participant Rev as Reviewers
    Dev->>Agent: /ocr:review
    Agent->>OCR: state begin, team resolve
    Agent->>Rev: spawn principal + quality
    Rev-->>Agent: findings
    Agent->>OCR: complete-round, finish
    Agent-->>Dev: prioritized review
    Dev->>Agent: /ocr:post
    Agent-->>Dev: PR comment
Loading

Reviewer team trimmed for routine changes:

 default_team:
-  principal: 2
-  quality: 2
+  principal: 1
+  quality: 1

- .ocr skill, commands, config (pinned CLI 2.5.1)
- host shims: opencode, claude, cursor
- rules/ocr.md; review step after detektBranch
- setup-ocr.sh: pinned install, no forced downgrade
- CI: AGENTS.md drift check
- docs: PR checklist, /ocr:post, privacy note
- team: principal x1, quality x1

Assisted-by: opencode v2 (DeepSeek V4.1 Flash)
Assisted-by: opencode v2 (GLM 5.3)
Signed-off-by: Andre Dietisheim <adietish@redhat.com>
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 104 files, which is 4 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Check out review usage here.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 70e54d5f-48fb-429f-8ff3-86f070a737d4
Commits

Reviewing files that changed from the base of the PR and between 5807ae4 and ea304eb.

Files selected for processing: 104

  • .claude/commands/ocr/address.md
  • .claude/commands/ocr/create-reviewer.md
  • .claude/commands/ocr/doctor.md
  • .claude/commands/ocr/history.md
  • .claude/commands/ocr/map.md
  • .claude/commands/ocr/post.md
  • .claude/commands/ocr/review.md
  • .claude/commands/ocr/reviewers.md
  • .claude/commands/ocr/show.md
  • .claude/commands/ocr/sync-reviewers.md
  • .claude/commands/ocr/translate-review-to-single-human.md
  • .cursor/commands/ocr/address.md
  • .cursor/commands/ocr/create-reviewer.md
  • .cursor/commands/ocr/doctor.md
  • .cursor/commands/ocr/history.md
  • .cursor/commands/ocr/map.md
  • .cursor/commands/ocr/post.md
  • .cursor/commands/ocr/review.md
  • .cursor/commands/ocr/reviewers.md
  • .cursor/commands/ocr/show.md
  • .cursor/commands/ocr/sync-reviewers.md
  • .cursor/commands/ocr/translate-review-to-single-human.md
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/build.yml
  • .gitignore
  • .ocr/.gitignore
  • .ocr/cli-config.json
  • .ocr/commands/address.md
  • .ocr/commands/create-reviewer.md
  • .ocr/commands/doctor.md
  • .ocr/commands/history.md
  • .ocr/commands/map.md
  • .ocr/commands/post.md
  • .ocr/commands/review.md
  • .ocr/commands/reviewers.md
  • .ocr/commands/show.md
  • .ocr/commands/sync-reviewers.md
  • .ocr/commands/translate-review-to-single-human.md
  • .ocr/config.yaml
  • .ocr/reviewers-meta.json
  • .ocr/skills/AGENTS.md
  • .ocr/skills/SKILL.md
  • .ocr/skills/assets/ocr-gitignore
  • .ocr/skills/assets/reviewer-template.md
  • .ocr/skills/references/context-discovery.md
  • .ocr/skills/references/discourse.md
  • .ocr/skills/references/final-template.md
  • .ocr/skills/references/map-agent-task.md
  • .ocr/skills/references/map-personas/architect.md
  • .ocr/skills/references/map-personas/flow-analyst.md
  • .ocr/skills/references/map-personas/requirements-mapper.md
  • .ocr/skills/references/map-template.md
  • .ocr/skills/references/map-workflow.md
  • .ocr/skills/references/reviewer-task.md
  • .ocr/skills/references/reviewers/accessibility.md
  • .ocr/skills/references/reviewers/ai.md
  • .ocr/skills/references/reviewers/anders-hejlsberg.md
  • .ocr/skills/references/reviewers/architect.md
  • .ocr/skills/references/reviewers/backend.md
  • .ocr/skills/references/reviewers/data.md
  • .ocr/skills/references/reviewers/devops.md
  • .ocr/skills/references/reviewers/docs-writer.md
  • .ocr/skills/references/reviewers/dx.md
  • .ocr/skills/references/reviewers/frontend.md
  • .ocr/skills/references/reviewers/fullstack.md
  • .ocr/skills/references/reviewers/infrastructure.md
  • .ocr/skills/references/reviewers/john-ousterhout.md
  • .ocr/skills/references/reviewers/kamil-mysliwiec.md
  • .ocr/skills/references/reviewers/kent-beck.md
  • .ocr/skills/references/reviewers/kent-dodds.md
  • .ocr/skills/references/reviewers/martin-fowler.md
  • .ocr/skills/references/reviewers/mobile.md
  • .ocr/skills/references/reviewers/performance.md
  • .ocr/skills/references/reviewers/principal.md
  • .ocr/skills/references/reviewers/quality.md
  • .ocr/skills/references/reviewers/reliability.md
  • .ocr/skills/references/reviewers/rich-hickey.md
  • .ocr/skills/references/reviewers/sandi-metz.md
  • .ocr/skills/references/reviewers/security.md
  • .ocr/skills/references/reviewers/staff-engineer.md
  • .ocr/skills/references/reviewers/tanner-linsley.md
  • .ocr/skills/references/reviewers/testing.md
  • .ocr/skills/references/reviewers/vladimir-khorikov.md
  • .ocr/skills/references/session-files.md
  • .ocr/skills/references/session-state.md
  • .ocr/skills/references/setup-guard.md
  • .ocr/skills/references/workflow.md
  • .opencode/commands/ocr/address.md
  • .opencode/commands/ocr/create-reviewer.md
  • .opencode/commands/ocr/doctor.md
  • .opencode/commands/ocr/history.md
  • .opencode/commands/ocr/map.md
  • .opencode/commands/ocr/post.md
  • .opencode/commands/ocr/review.md
  • .opencode/commands/ocr/reviewers.md
  • .opencode/commands/ocr/show.md
  • .opencode/commands/ocr/sync-reviewers.md
  • .opencode/commands/ocr/translate-review-to-single-human.md
  • AGENTS.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • README.md
  • rules/ocr.md
  • scripts/setup-ocr.sh

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

@codecov-commenter

codecov-commenter commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.56%. Comparing base (5807ae4) to head (ea304eb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #413      +/-   ##
==========================================
+ Coverage   48.53%   48.56%   +0.03%     
==========================================
  Files         143      143              
  Lines        6297     6297              
  Branches     1226     1226              
==========================================
+ Hits         3056     3058       +2     
+ Misses       2887     2885       -2     
  Partials      354      354              
Flag Coverage Δ
unit-tests 48.56% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adietish adietish self-assigned this Nov 22, 2026
@adietish
adietish marked this pull request as draft November 22, 2026 12:36
@adietish
adietish marked this pull request as ready for review December 1, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants