Scope-focused PR code review that validates against original requirements and routes out-of-scope findings to GitHub issues. Triggers: PR review, pull request review, scope validation, requirement compliance, backlog triage, code review, blocking issues Use when: reviewing PRs, validating against requirements, triaging findings to backlog, preventing overengineering DO NOT use when: preparing PRs - use pr-prep instead. DO NOT use when: deep code review - use pensive:unified-review. Use this skill for scope-focused PR reviews.
/plugin marketplace add athola/claude-night-market/plugin install pensive@claude-night-marketThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Review pull requests with discipline: validate against original requirements, prevent scope creep, and route out-of-scope findings to GitHub issues.
A PR review validates scope compliance, not code perfection.
The goal is to ensure the implementation meets its stated requirements without introducing regressions. Improvements beyond the scope belong in future PRs.
Every finding must be classified:
| Category | Definition | Action |
|---|---|---|
| BLOCKING | Bug, security issue, or regression introduced by this change | Must fix before merge |
| IN-SCOPE | Issue directly related to stated requirements | Should address in this PR |
| SUGGESTION | Improvement within changed code, not required | Author decides |
| BACKLOG | Good idea but outside PR scope | Create GitHub issue |
| IGNORE | Nitpick, style preference, or not worth tracking | Skip entirely |
BLOCKING:
IN-SCOPE:
SUGGESTION:
BACKLOG:
IGNORE:
Before looking at ANY code, understand what this PR is supposed to accomplish.
Search for scope artifacts in order:
Plan file: Most authoritative
ls docs/plans/ 2>/dev/null
cat plan.md 2>/dev/null | head -100
Spec file: Requirements definition
cat spec.md 2>/dev/null | head -100
Tasks file: Implementation checklist
cat tasks.md 2>/dev/null
PR description: Author's intent
gh pr view <number> --json body --jq '.body'
Commit messages: Incremental decisions
gh pr view <number> --json commits --jq '.commits[].messageHeadline'
Output: A clear statement of scope:
"This PR implements [feature X] as specified in plan.md. The requirements are:
- [requirement]
- [requirement]
- [requirement]"
If no scope artifacts exist, flag this as a process issue but continue with PR description as the baseline.
# Changed files list
gh pr diff <number> --name-only
# Full diff
gh pr diff <number>
# Statistics
gh pr view <number> --json additions,deletions,changedFiles,commits
Before detailed code review, check scope coverage:
Use pensive:unified-review on the changed files.
Critical: Evaluate each finding against the scope baseline:
Finding: "Function X lacks input validation"
Scope check: Is input validation mentioned in requirements?
- YES → IN-SCOPE
- NO, but it's a security issue → BLOCKING
- NO, and it's a nice-to-have → BACKLOG
For each BACKLOG item, create a GitHub issue:
gh issue create \
--title "[Tech Debt] Brief description" \
--body "## Context
Identified during PR #<number> review.
## Details
<what the improvement would address>
## Suggested Approach
<how to implement>
## Priority
Low - Improvement opportunity, not blocking
---
*Auto-created by pr-review*" \
--label "tech-debt"
Ask user before creating: "I found N backlog items. Create GitHub issues? [y/n/select]"
Structure the report by classification:
## PR #X: Title
### Scope Compliance
**Requirements:** (from plan/spec)
1. [x] Requirement A - Implemented
2. [x] Requirement B - Implemented
3. [ ] Requirement C - **Missing**
### Blocking (0)
None - no critical issues found.
### In-Scope (2)
1. [S1] Missing validation for edge case
- Location: api.py:45
- Requirement: "Handle empty input gracefully"
### Suggestions (1)
1. [G1] Consider extracting helper function
- Author's discretion
### Backlog → GitHub Issues (3)
1. #142 - Refactor authentication module
2. #143 - Add caching layer
3. #144 - Update deprecated dependency
### Recommendation
**APPROVE WITH CHANGES**
Address S1 (in-scope issue) before merge.
A PR should be approved when:
"While you're here, you should also refactor X, add feature Y, and fix Z in adjacent files."
Do: Create backlog issues, keep PR focused.
"This works but could be 5% more efficient with different approach."
Do: If it meets requirements and has no bugs, it's ready.
"I prefer tabs over spaces."
Do: Use linters for style, reserve review for logic.
"The file you imported from has some issues..."
Do: That's a separate PR. Create an issue if important.
/fix-pr: After review identifies issues, use this to address them/pr: To prepare a PR before reviewpensive:unified-review: For the actual code analysispensive:bug-review: For deeper bug hunting if neededThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.