ワンクリックで
corvus-review-r0
PR Review Phase R0 - Intake, triage, PR metadata fetching, config loading
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
PR Review Phase R0 - Intake, triage, PR metadata fetching, config loading
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Planning (Phase 2), User Approval (Phase 3), and optional High Accuracy Plan Review (Phase 3.5)
Implementation loop - per-phase execution with quality gates
Final validation - comprehensive objective and subjective checks
Completion - success extraction and final summary
Follow-up triage - handling requests after feature completion
PR Review Phase R2 - Multi-pass review orchestration (architecture, correctness, security, conventions)
| name | corvus-review-r0 |
| description | PR Review Phase R0 - Intake, triage, PR metadata fetching, config loading |
Goal: Parse PR reference, fetch metadata, load config, run triage checks.
Executor: Corvus-Review direct (no subagent delegation).
Input: User-provided PR reference (URL, #number, or owner/repo#number).
Output: PR_CONTEXT object (see corvus-review-extras for schema).
Extract the PR identifier from the user's input. Supported formats:
| Format | Example | Parsing |
|---|---|---|
| Full URL | https://github.com/owner/repo/pull/123 | Extract owner, repo, number from URL |
| Hash-number | #123 | Use current repo (from gh repo view --json nameWithOwner) |
| Repo#number | owner/repo#123 | Extract owner, repo, number |
| Just a number | 123 | Use current repo |
If no PR reference is provided:
## PR Reference Required
Please provide a PR to review. Supported formats:
- `#123` (current repo)
- `owner/repo#123`
- `https://github.com/owner/repo/pull/123`
- Or just the number: `123`
Validation: After parsing, verify the PR exists:
gh pr view <number> --repo <owner/repo> --json number,title --jq '.number' 2>&1
If this fails, abort with a clear error (see corvus-review-extras error handling).
Run the following gh commands to populate PR_CONTEXT fields:
gh pr view <number> --repo <owner/repo> --json \
number,url,title,body,author,baseRefName,headRefName,\
labels,reviewRequests,isDraft,mergeable,\
additions,deletions,changedFiles,files
Field Mapping:
pr_number ← numberpr_url ← urltitle ← titledescription ← body (set to null if empty string or missing)author ← author.loginbase_branch ← baseRefNamehead_branch ← headRefNamelabels ← labels[].namereviewers_requested ← reviewRequests[].loginis_draft ← isDraftmergeable ← mergeable (map: "MERGEABLE" → true, "CONFLICTING" → false, else → null)additions ← additionsdeletions ← deletionsfiles_changed ← changedFileschanged_files ← files[].pathgh pr checks <number> --repo <owner/repo> --json name,state,detailsUrl 2>&1
Field Mapping:
{ name, status: state_to_status(state), url: detailsUrl }state_to_status: "SUCCESS" / "NEUTRAL" / "SKIPPED" → "pass", "FAILURE" / "ERROR" → "fail", "PENDING" / "QUEUED" / "IN_PROGRESS" → "pending"ci_status (aggregate): if any "fail" → "fail", else if any "pending" → "pending", else if all "pass" → "pass", else "none" (no checks)Parse linked issues from:
fixes #N, closes #N, resolves #N (case-insensitive)gh pr view --json closingIssuesReferencesDeduplicate and store as linked_issues: ["#N", "#M"].
gh repo view --json nameWithOwner --jq '.nameWithOwner'
Store as repo.
cat .opencode/review-config.yaml 2>/dev/null
If the file exists:
corvus-review-extras)If the file does not exist:
corvus-review-extras for default values)If the file has a YAML parse error:
config_parse_error: true (included in review summary later)Store the validated config as PR_CONTEXT.config.
Evaluate the PR against triage checks and set flags in PR_CONTEXT.flags:
flags.is_draft = PR_CONTEXT.is_draft
If draft:
## Draft PR Detected
PR #[number] is marked as draft. Proceeding with review, but findings
will be posted as COMMENT_ONLY (not REQUEST_CHANGES) regardless of severity.
Set config.action_override = "COMMENT_ONLY" if draft and no explicit override exists.
flags.is_large_pr = (PR_CONTEXT.files_changed > config.large_pr_threshold)
If large PR, apply config.large_pr_strategy:
| Strategy | Action |
|---|---|
"warn" | Add warning to review output, proceed normally |
"split-suggestion" | Suggest splitting PR, then proceed with full review |
"proceed" | No special handling |
For "warn" and "split-suggestion", display:
## Large PR Warning
This PR changes **[N] files** (threshold: [T]).
[If split-suggestion: Consider splitting this into smaller, focused PRs for easier review.]
Proceeding with review.
flags.missing_description = (PR_CONTEXT.description == null or PR_CONTEXT.description.trim() == "")
If missing:
note finding to be included in the review: "PR has no description. Consider adding context for reviewers."flags.has_ci_failures = (PR_CONTEXT.ci_status == "fail")
If CI is failing:
flags.has_breaking_labels = labels.any(l =>
["breaking-change", "breaking", "semver-major"].includes(l.toLowerCase())
)
If breaking labels found:
Assemble the complete PR_CONTEXT object from all gathered data.
Present a summary to the user:
## PR Review: #[number] — [title]
| Field | Value |
|-------|-------|
| Author | @[author] |
| Branch | [head_branch] → [base_branch] |
| Changes | +[additions] / -[deletions] across [files_changed] files |
| CI | [ci_status_emoji] [ci_status] |
| Draft | [yes/no] |
### Triage Flags
[List any active flags with their implications]
### Config
- Severity threshold: [threshold]
- Max nits: [max_nits]
- Passes enabled: [list]
- Autonomous: [yes/no]
**Proceeding to context gathering (R1)...**
Status emojis for CI: pass = [PASS], fail = [FAIL], pending = [PENDING], none = [NONE]
PR_CONTEXT is VALID when ALL of the following are true:
If PR_CONTEXT cannot be produced (PR not found, auth error): → ABORT with clear error message. Do NOT proceed to R1.
If PR has empty diff: → SKIP review entirely. Display "Review Skipped" message.
gh pr view works for fork PRs. No special handling needed.ci_status: "none" gracefully.config.action_override = "COMMENT_ONLY" for merged PRs.files_changed > 100, warn that review quality may degrade.changed_files list from gh pr view may be truncated. Use gh pr diff --name-only as fallback:
gh pr diff <number> --repo <owner/repo> --name-only
gh commands fail with rate limiting errors, wait and retry once.