Review PR
Orchestrate a comprehensive code review of a pull request by running multiple review strategies in parallel, merging and deduplicating findings into a log file, verifying implementation coverage against the linked issue, and submitting the review to the PR.
Input
- PR number or URL (required): Accepts 123 , #123 , or full URL.
Procedure
- Resolve PR Identifier and Repository
Extract the PR number. Determine the repository name from git remote or the provided URL.
PR_NUMBER=<extracted number> REPO_NAME=<repository name, e.g. "my-app"> LOG_FILE=~/.agents/logs/arinhub-pr-review-${REPO_NAME}-${PR_NUMBER}.md
Create ~/.agents/logs/ directory if it does not exist.
- Initialize Log File
Create the log file with a header:
PR Review: ${REPO_NAME} #${PR_NUMBER}
Date: <current date> PR: <PR URL>
Issues
<!-- Issues from parallel review agents merged below. No duplicates. -->
- Launch Parallel Review Subagents
Spawn three subagents in parallel. Each agent performs an independent code review and returns a structured list of issues.
Spawn all three subagents in parallel (do not wait for one to finish before starting the next). Each subagent must return ONLY a structured list of issues using the format from the Issue Format Reference section below. No subagent may submit a review — they only return findings.
Subagent A: code-reviewer
Spawn a subagent to review PR ${PR_NUMBER} using the code-reviewer skill. Instruct it to return only the list of issues found — no review submission.
Subagent B: octocode-research
Spawn a subagent to review PR ${PR_NUMBER} using the octocode-research skill with the reviewPR prompt. Instruct it to return only the list of issues found — no review submission.
Subagent C: pr-review-toolkit
Spawn a subagent to review PR ${PR_NUMBER} using the pr-review-toolkit:review-pr command with all parallel mode. Instruct it to return only the list of issues found — no review submission.
- Merge and Deduplicate Issues
Collect issues from all three subagents and deduplicate:
-
Parse each subagent's response into individual issues.
-
For each issue, create a fingerprint from: file path
- line number range
- concern category .
-
Two issues are duplicates if they share the same file, overlapping line ranges (within ±5 lines), and address the same concern (use semantic comparison, not exact string matching).
-
When duplicates are found, keep the most detailed/actionable version.
-
Tag each kept issue with its source(s): [code-reviewer] , [octocode] , [pr-review-toolkit] , or combination if multiple agents found it.
- Write Issues to Log File
Append deduplicated issues to the log file, grouped by severity:
Critical
- [source]
path/to/file.ts:42— Description of the issue.Suggested fix: ...
Improvements
- [source]
path/to/file.ts:88-95— Description of the issue.
Nitpicks
- [source]
path/to/file.ts:12— Description of the issue.
Total issues: N (X critical, Y improvements, Z nitpicks) Sources: code-reviewer, octocode, pr-review-toolkit
- Verify PR Implementation Coverage
After writing issues, spawn a subagent to verify PR ${PR_NUMBER} using the arinhub-verify-pr-implementation skill. The subagent must return the full PR Coverage report in markdown format.
Append the returned coverage report to the end of the log file under a new section:
PR Coverage
<coverage report content from arinhub-verify-pr-implementation>
- Submit PR Review
Spawn a subagent to submit the review for PR ${PR_NUMBER} using the arinhub-submit-pr-review skill. Pass the log file path (${LOG_FILE} ) so the subagent reads issues from it. The subagent must follow the arinhub-submit-pr-review procedure for deduplication against existing PR comments before submission.
- Report to User
Present a summary:
-
Path to the log file
-
Total issues found (by severity)
-
PR coverage percentage
-
Whether the review was submitted successfully
-
The PR URL for reference
Issue Format Reference
Each issue in a subagent response must follow this structure:
- Severity: critical | improvement | nitpick File: path/to/file.ts Line(s): 42 (or 42-50) Description: Clear explanation of the problem. Suggestion: Optional concrete fix.
Important Notes
-
All three review subagents run in parallel to minimize total review time.
-
The log file is the single source of truth — all findings are merged there before submission.
-
Deduplication uses semantic comparison: if two agents flag the same concern on the same code, only one entry is kept.
-
The log file persists at ~/.agents/logs/ for future reference and audit.
-
If a subagent fails or times out, proceed with results from the remaining agents and note the failure in the log file.