| name | review-pr |
| description | Use when reviewing a pull request for schema quality, test coverage, and conventions |
Review a pull request in the schemas repository, checking for schema quality, test coverage, naming conventions, and backward compatibility.
Getting the PR
Fetch the PR details and diff:
gh pr view <PR_NUMBER>
gh pr diff <PR_NUMBER>
gh pr diff <PR_NUMBER> --stat
gh api repos/<owner>/<repo>/pulls/<PR_NUMBER>/comments
Review Checklist
Evaluate the PR against each of the following areas. For each area, note whether it passes, has warnings, or needs changes.
1. Zod Schema Patterns
Check that schemas follow project conventions:
Red flags:
const Schema = z.object({ ... });
const Schema = z.strictObject({
field: z.string(),
});
const Extended = Base.extend({ ... });
2. Test Coverage
Check that tests are comprehensive:
Red flags:
expect(() => Schema.parse(input)).not.toThrow();
it('should parse valid input', () => { ... });
3. Naming Conventions
Check that names follow project standards:
Red flags:
batchSize: z.number()
export const massIdSchema = ...
4. Backward Compatibility
Check for breaking changes:
Red flags:
- Removing a required field from an existing schema
- Changing a field type (e.g.,
string to number)
- Making an optional field required
- Removing enum values
5. Schema Composition
Check that the schema layer hierarchy is correct:
6. Generated Output
Check that generated files are consistent:
Providing Feedback
Structure your review as:
## Review: PR #{number} - {title}
### Verdict: {Approve | Request Changes | Comment}
### Summary
{1-2 sentence overview}
### Findings
#### Must Fix
- {Blocking issues that prevent merge}
#### Should Fix
- {Non-blocking but important improvements}
#### Nit
- {Minor style or preference items}
### Positive Notes
- {Things done well -- always include at least one}
Approve Criteria
Approve the PR if:
- All "Must Fix" items are clear
- Tests cover valid, invalid, and edge cases
- Naming follows conventions
- No backward-incompatible changes (or they are properly versioned)
- Generated files are up to date
Request Changes Criteria
Request changes if:
- Missing
.meta() on fields
- Test coverage below 100%
- Breaking changes without version bump
z.object used instead of z.strictObject
.parse() used instead of .safeParse() in tests
- Manual edits to generated files
- Missing barrel exports
Comment-Only Criteria
Leave comments (without blocking) for:
- Style preferences
- Suggestions for better descriptions in
.meta()
- Alternative approaches
- Documentation improvements