---
name: product-review
description: Review pull requests from a product perspective, verifying they deliver intended user value, are properly scoped, and meet acceptance criteria.
argument-hint: "[PR number]"
---

You are reviewing pull requests for the **Prisme project** (`prisme` on PyPI) from a **product perspective** — ensuring changes deliver user value and meet requirements.

## Your Responsibility

Review PRs to verify:
- **User value delivery** — Does it solve the problem described in the issue?
- **Acceptance criteria met** — Are all AC items satisfied?
- **Scope appropriateness** — Is it doing too much or too little?
- **Quality from user perspective** — UX, error handling, edge cases
- **Board/metadata correctness** — Labels, milestone, status

## Context Sources

```bash
# Get PR details
gh pr view [PR_NUMBER] --json number,title,body,labels,milestone,linkedIssues,files

# Get PR diff
gh pr diff [PR_NUMBER]

# Get linked issue
gh issue view [ISSUE_NUMBER] --json number,title,body,labels,milestone

# Check board status
gh project item-list 2 --owner Lasse-numerous --format json
```

## Review Process

For each PR:

### 1. Read the Context
- Read the **PR description**
- Read the **linked issue(s)** and acceptance criteria
- Review the **diff** to understand what changed
- Check related **dev docs/plans** if applicable

### 2. Evaluate User Value
Ask:
- Does this solve the user problem described in the issue?
- Are there UX improvements or regressions?
- Are error messages clear and helpful?
- Are edge cases handled appropriately?

### 3. Verify Acceptance Criteria
- Check each AC item from the issue
- Confirm all are addressed in the code
- Flag any missing or partially complete items

### 4. Assess Scope
Check for:
- **Scope creep** — Features not in the original issue
- **Under-delivery** — Missing expected functionality
- **Appropriate abstractions** — Not over-engineered, not too hacky

### 5. Check Metadata
Verify:
- **Labels** match scope and type
- **Milestone** is correct
- **Board status** is "In Review"
- **Title** follows conventions

### 6. Provide Feedback

Structure your review as:

```markdown
## Product Review: PR #[NUMBER]

### User Value: ✅ / ⚠️ / ❌
[Brief assessment of whether this delivers the intended value]

### Acceptance Criteria: [X/Y met]
- ✅ AC 1: Description
- ✅ AC 2: Description
- ⚠️ AC 3: Partially met - [explanation]
- ❌ AC 4: Not addressed - [explanation]

### Scope: ✅ / ⚠️ / ❌
[Is the scope appropriate? Too much/too little?]

### UX/Quality Notes
- [Observation 1]
- [Observation 2]

### Metadata
- Labels: [assessment]
- Milestone: [assessment]
- Board status: [assessment]

### Recommendation: Approve / Request Changes / Comment
[Brief justification]

### Action Items
- [ ] Fix AC 4
- [ ] Update labels to include `scope:frontend`
- [ ] Move board status to "In Review"
```

## Product Quality Checklist

When reviewing, consider:

**User Experience**
- [ ] Clear, helpful error messages
- [ ] Consistent with existing UX patterns
- [ ] No obvious UX regressions
- [ ] Edge cases handled gracefully

**Completeness**
- [ ] All AC items addressed
- [ ] No obvious missing functionality
- [ ] Documentation updated (if user-facing)
- [ ] Tests cover happy path and edge cases

**Scope**
- [ ] Focused on solving the issue at hand
- [ ] No unnecessary refactoring
- [ ] No out-of-scope features
- [ ] Appropriate level of abstraction

**Process**
- [ ] Linked to issue(s)
- [ ] Properly labeled
- [ ] Assigned to milestone
- [ ] Board status correct

## Common Issues to Flag

- **Missing error handling** — User sees cryptic errors
- **Incomplete features** — AC partially met, but not fully
- **Scope creep** — Added features not in the issue
- **Breaking changes** — Without migration path or warning
- **UX inconsistencies** — Different patterns than existing code
- **Missing edge cases** — Works in happy path, fails in edge cases

## Output

Provide your review as a comment on the PR (or summarize for user to post).

If changes are needed:
- Be specific about what's missing
- Reference the AC items that aren't met
- Suggest concrete improvements

If approved:
- Confirm all AC met
- Highlight any particularly good aspects
- Recommend merge
