@dreki-gg/pi-code-reviewer 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -50,8 +50,8 @@ Evaluates changes for correctness and adherence to project standards.
|
|
|
50
50
|
- Does the change follow naming conventions?
|
|
51
51
|
|
|
52
52
|
## Tools
|
|
53
|
-
- `
|
|
54
|
-
- `
|
|
53
|
+
- `npm run typecheck`
|
|
54
|
+
- `npm run lint`
|
|
55
55
|
|
|
56
56
|
## Severity
|
|
57
57
|
- blocker: Type errors, unresolved imports
|
|
@@ -67,8 +67,8 @@ The package ships with four example lenses:
|
|
|
67
67
|
| --- | --- |
|
|
68
68
|
| `code-quality` | Correctness, lint, types, dead code |
|
|
69
69
|
| `maintainability` | Coupling, complexity, readability |
|
|
70
|
-
| `product-vision` |
|
|
71
|
-
| `
|
|
70
|
+
| `product-vision` | Traces changes back to their originating issue or design doc, checks goal alignment |
|
|
71
|
+
| `accessibility` | Semantic HTML, keyboard navigation, ARIA, screen reader compatibility |
|
|
72
72
|
|
|
73
73
|
Run `/review-init` to scaffold these (customized for your project's tools) into `.code-review/lenses/`.
|
|
74
74
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-review
|
|
3
|
-
description: Multi-lens code review against working directory changes. Evaluates diffs through configurable criteria like code-quality, maintainability, product-vision, and
|
|
3
|
+
description: Multi-lens code review against working directory changes. Evaluates diffs through configurable criteria like code-quality, maintainability, product-vision, and accessibility. Use when user says "review my changes", "review this code", "check before committing", or "code review".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Code Review
|
|
@@ -36,8 +36,8 @@ Description of what this lens evaluates.
|
|
|
36
36
|
- Evaluation point 2
|
|
37
37
|
|
|
38
38
|
## Tools
|
|
39
|
-
- `
|
|
40
|
-
- `
|
|
39
|
+
- `npm run typecheck`
|
|
40
|
+
- `npm run lint`
|
|
41
41
|
|
|
42
42
|
## Severity
|
|
43
43
|
- blocker: What constitutes a blocking issue
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Accessibility
|
|
2
|
+
|
|
3
|
+
Evaluates UI changes for accessibility compliance — semantic markup, keyboard support, screen reader compatibility, and inclusive design patterns.
|
|
4
|
+
|
|
5
|
+
## Criteria
|
|
6
|
+
- Are interactive elements accessible via keyboard (tab order, Enter/Space activation, Escape to dismiss)?
|
|
7
|
+
- Do custom components use appropriate ARIA roles, states, and properties?
|
|
8
|
+
- Are images and icons accompanied by meaningful alt text or aria-label?
|
|
9
|
+
- Are form inputs associated with visible labels (not just placeholder text)?
|
|
10
|
+
- Does the change use semantic HTML elements (button, nav, main, dialog) instead of generic divs with click handlers?
|
|
11
|
+
- Is focus managed correctly after dynamic content changes (modals, route transitions, toast notifications)?
|
|
12
|
+
- Are error and validation messages announced to screen readers (aria-live, role="alert")?
|
|
13
|
+
- Does the color usage rely solely on color to convey meaning, or is there a secondary indicator (icon, text)?
|
|
14
|
+
|
|
15
|
+
## Tools
|
|
16
|
+
|
|
17
|
+
## Severity
|
|
18
|
+
- blocker: Interactive elements unreachable by keyboard, missing labels on form inputs, click handlers on non-interactive elements without ARIA roles
|
|
19
|
+
- warning: Missing alt text, placeholder-only labels, missing aria-live on dynamic content, focus not managed after modals
|
|
20
|
+
- note: Semantic HTML improvements, ARIA attribute refinements, color contrast suggestions
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# Product Vision
|
|
2
2
|
|
|
3
|
-
Evaluates whether changes
|
|
3
|
+
Evaluates whether changes fulfill the intent behind the work — traces the diff back to its originating issue, PR description, or design doc and checks alignment.
|
|
4
4
|
|
|
5
5
|
## Criteria
|
|
6
|
-
-
|
|
7
|
-
- Does
|
|
8
|
-
-
|
|
9
|
-
- Does
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
6
|
+
- Is there a linked issue, PR description, or design document that explains why this change was requested?
|
|
7
|
+
- Does the diff actually accomplish the stated goal, or does it drift into unrelated concerns?
|
|
8
|
+
- Are there parts of the requirement left unaddressed by the change?
|
|
9
|
+
- Does the change introduce scope creep beyond what was requested?
|
|
10
|
+
- Does it follow the project's domain language (check CONTEXT.md, glossary, or naming conventions)?
|
|
11
|
+
- Are user-facing strings consistent with the existing product vocabulary?
|
|
12
|
+
- If the change modifies a public API or user flow, is that justified by the original request?
|
|
13
13
|
|
|
14
14
|
## Tools
|
|
15
15
|
|
|
16
16
|
## Severity
|
|
17
|
-
- blocker:
|
|
18
|
-
- warning:
|
|
19
|
-
- note: Opportunities to better align with
|
|
17
|
+
- blocker: Change does not accomplish the stated goal, or contradicts the originating requirement
|
|
18
|
+
- warning: Scope creep beyond the request, unaddressed requirements, inconsistent domain language
|
|
19
|
+
- note: Opportunities to better align naming or structure with the stated intent
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# UX Design
|
|
2
|
-
|
|
3
|
-
Evaluates the user experience quality of UI changes — accessibility, responsiveness, and interaction design.
|
|
4
|
-
|
|
5
|
-
## Criteria
|
|
6
|
-
- Are interactive elements accessible (keyboard navigation, ARIA labels, focus management)?
|
|
7
|
-
- Are loading and error states handled visually?
|
|
8
|
-
- Is the layout responsive or does it break at common viewport sizes?
|
|
9
|
-
- Are animations purposeful and not distracting (100-200ms, no bouncy effects)?
|
|
10
|
-
- Is text readable (minimum 12px body, sufficient contrast)?
|
|
11
|
-
- Are form inputs properly labeled with clear validation feedback?
|
|
12
|
-
- Does the change follow the project's existing component patterns?
|
|
13
|
-
- Are click targets large enough for touch (minimum 44px)?
|
|
14
|
-
|
|
15
|
-
## Tools
|
|
16
|
-
|
|
17
|
-
## Severity
|
|
18
|
-
- blocker: Missing keyboard accessibility on interactive elements, broken layout, no error states on data-fetching UI
|
|
19
|
-
- warning: Missing ARIA labels, tiny text (<12px), missing loading states, non-responsive layout
|
|
20
|
-
- note: Animation polish, spacing consistency, component reuse opportunities
|