free-pi-cli 0.6.3 → 0.6.6

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.
@@ -0,0 +1,174 @@
1
+ # UX Audit Rubric
2
+
3
+ Used by ux-walker to evaluate every page state encountered during story walks.
4
+
5
+ ## Scoring
6
+
7
+ Each criterion is scored: `pass` | `warn` | `fail`
8
+ - **pass**: Meets expectations, no action needed
9
+ - **warn**: Minor issue, worth noting (medium/low severity finding)
10
+ - **fail**: Clear problem, must be addressed (high/critical severity finding)
11
+
12
+ ## 1. Simplicity
13
+
14
+ **Question**: Is the user overwhelmed?
15
+
16
+ | Check | Pass | Warn | Fail |
17
+ |-------|------|------|------|
18
+ | Visible action count | ≤5 primary actions visible | 6-8 primary actions | >8 primary actions competing for attention |
19
+ | Information density | Appropriate for the task | Some unnecessary info visible | Wall of text or data overload |
20
+ | Decision complexity | Clear next step | Requires scanning | User must read everything to know what to do |
21
+ | Advanced options | Hidden behind toggle/menu | Visible but de-emphasized | Mixed with primary actions |
22
+
23
+ **"Take Away" Test**: For each visible element, ask: "If I removed this, would the user still succeed?" If yes, it should be hidden, collapsed, or moved to an advanced section.
24
+
25
+ ## 2. Progressive Disclosure
26
+
27
+ **Question**: Does information appear when needed, not before?
28
+
29
+ | Check | Pass | Warn | Fail |
30
+ |-------|------|------|------|
31
+ | Form fields | Show only what's needed for current step | All fields visible but grouped | Long scrolling form with everything at once |
32
+ | Error messages | Appear on interaction/submission | Pre-shown but dimmed | Error states visible before user acts |
33
+ | Help text | Available on hover/click | Inline but concise | Paragraphs of instructions before the action |
34
+ | Secondary features | Revealed after primary task | Visible but clearly secondary | Competing with primary workflow |
35
+
36
+ ## 3. Layout Quality
37
+
38
+ **Question**: Does the page use space effectively?
39
+
40
+ | Check | Pass | Warn | Fail |
41
+ |-------|------|------|------|
42
+ | Viewport usage | Content fills viewport appropriately | Minor whitespace gaps | Large empty areas or content crammed in corner |
43
+ | Scroll necessity | No unnecessary scrolling for primary task | Slight scroll needed | Must scroll to find primary action |
44
+ | Content width | Readable line lengths (45-75 chars for text) | Slightly wide/narrow | Full-width text or extremely narrow columns |
45
+ | Spacing consistency | Uniform spacing rhythm | Minor inconsistencies | Noticeably uneven spacing |
46
+ | Responsive behavior | Elements reflow gracefully | Minor alignment issues at edges | Broken layout, overlapping elements |
47
+
48
+ ## 4. Visual Correctness
49
+
50
+ **Question**: Is the page visually sound?
51
+
52
+ | Check | Pass | Warn | Fail |
53
+ |-------|------|------|------|
54
+ | Overflow | No content overflow | Slight text truncation with ellipsis | Content spilling out of containers |
55
+ | Alignment | Elements properly aligned | 1-2px misalignment | Visibly misaligned elements |
56
+ | Theme consistency | Colors/fonts match design system | Minor deviation | Clashing styles, mixed themes |
57
+ | Broken elements | All elements render correctly | Minor rendering artifact | Missing images, broken layouts, empty containers |
58
+ | Z-index/layering | Proper stacking | Minor overlap on edge cases | Modals behind content, dropdowns clipped |
59
+
60
+ ## 5. Happy Path Clarity
61
+
62
+ **Question**: Can a naive user accomplish the goal without help?
63
+
64
+ | Check | Pass | Warn | Fail |
65
+ |-------|------|------|------|
66
+ | Primary CTA | Obviously the next step | Identifiable with scanning | Buried or ambiguous |
67
+ | Labels/copy | Self-explanatory | Requires domain knowledge | Jargon, abbreviations, or misleading text |
68
+ | Navigation | User always knows where they are | Breadcrumbs/back available but not prominent | Lost/disoriented after action |
69
+ | Feedback | Clear success/error indication | Subtle feedback | No feedback after action |
70
+ | Recovery | Easy to undo or go back | Can go back but not obvious | Destructive action with no undo |
71
+
72
+ ## 6. Accessibility Basics
73
+
74
+ **Question**: Are basic accessibility needs met?
75
+
76
+ | Check | Pass | Warn | Fail |
77
+ |-------|------|------|------|
78
+ | Color contrast | Meets WCAG AA (4.5:1 text, 3:1 large) | Close to threshold | Clearly insufficient contrast |
79
+ | Interactive sizing | Touch targets ≥44x44px | 32-44px | <32px targets |
80
+ | Focus indicators | Visible focus ring on tab | Focus visible but faint | No visible focus indicator |
81
+ | Alt text | Images have meaningful alt text | Generic alt text | Missing alt text on informative images |
82
+ | Keyboard nav | All actions reachable via keyboard | Most actions reachable | Key actions require mouse only |
83
+
84
+ ## 7. Error Handling & Edge Cases
85
+
86
+ **Question**: Does the app handle problems gracefully?
87
+
88
+ | Check | Pass | Warn | Fail |
89
+ |-------|------|------|------|
90
+ | Empty states | Helpful message with action suggestion | Generic "no data" message | Blank/broken appearance |
91
+ | Loading states | Skeleton or spinner with context | Generic spinner | No loading indication, appears frozen |
92
+ | Error messages | Specific, actionable, non-technical | Generic but polite | Technical jargon, stack traces, or cryptic codes |
93
+ | Form validation | Inline, immediate, helpful | On submit only, but clear | Unclear what went wrong or how to fix |
94
+ | Network failure | Retry option, data preserved | Error shown, manual refresh needed | Silent failure, data lost |
95
+
96
+ ## 8. Visual Consistency & Rhythm
97
+
98
+ **Question**: Do repeated elements look like siblings, and does spacing follow a rhythm?
99
+
100
+ Verify with the screenshot AND `geometry-audit.js` (see `visual-inspection.md`) — measured pixel numbers, not impressions.
101
+
102
+ | Check | Pass | Warn | Fail |
103
+ |-------|------|------|------|
104
+ | Sibling uniformity | Cards/tiles/rows in a group share height, width, padding, radius | ≤8px drift, or one deliberate feature member | Visibly different shapes in the same row/grid |
105
+ | Edge alignment | Left edges and tops align across sections | 2-8px drift | Visibly misaligned columns, rows, or label/input pairs |
106
+ | Spacing scale | Gaps come from one consistent scale (4/8px-based) | Occasional off-scale gap | Random gaps; same-level siblings spaced differently |
107
+ | Indentation | Nested content indents uniformly, one width per level | Slight inconsistency | Mixed indent widths; nesting unreadable from indent |
108
+ | Component consistency | The same control looks identical everywhere it appears | Minor variants (size only) | Same control styled differently across screens |
109
+
110
+ ## 9. Text Fit & Wrap
111
+
112
+ **Question**: Does real content fit the layout without breaking it?
113
+
114
+ | Check | Pass | Warn | Fail |
115
+ |-------|------|------|------|
116
+ | Control labels | Buttons/tabs/chips/nav items stay on one line | Wraps only at extreme viewport | Wrapped control label at default viewport |
117
+ | Overflow/clipping | Text fits, or truncates with ellipsis + full value available (title/tooltip) | Tight fit, no breathing room | Clipped mid-letter, spills over container, overlaps neighbors |
118
+ | Long content | Layout absorbs the longest realistic value (name, email, title) | Minor push | Long value blows apart a row, card, or table |
119
+ | Wrap quality | Breaks at word boundaries; headings avoid orphan single words | — | Mid-word breaks without hyphenation |
120
+
121
+ ## 10. Visual Hierarchy & Redundancy
122
+
123
+ **Question**: Does visual weight match importance — and is each thing said once?
124
+
125
+ | Check | Pass | Warn | Fail |
126
+ |-------|------|------|------|
127
+ | Primary action | Exactly one visually dominant action per screen | Primary findable but not dominant | Multiple competing primaries, or none |
128
+ | Importance encoding | Size/weight/color/position track importance | Mostly consistent | Key info visually quieter than trivia |
129
+ | Heading structure | Logical levels, one page title | Skipped level | Flat or scrambled heading hierarchy |
130
+ | Information stated once | Each fact appears once per screen | Duplicated in header + body | Same info shown 3+ times; same control duplicated on one screen |
131
+ | Emphasis budget | Bold/color/badges used sparingly | Some over-emphasis | Everything emphasized — nothing stands out |
132
+
133
+ ## 11. Flow Economy
134
+
135
+ **Question**: Is this the shortest sensible path to the user's goal?
136
+
137
+ Score per story (using the Flow Log), not per page. Compare against the story's **Ideal path** from the catalog when present.
138
+
139
+ | Check | Pass | Warn | Fail |
140
+ |-------|------|------|------|
141
+ | Step count | Actual ≈ minimal conceivable | 1-2 extra steps | 3+ extra steps or forced detours |
142
+ | Decision load | Defaults carry the user; choices only where they matter | Some unnecessary choices | User must decide things the app could infer |
143
+ | Data re-entry | Never re-enter data the app knows | Prefilled but must re-confirm | Re-typing known data |
144
+ | Confirmations | Only for destructive/irreversible actions | One superfluous confirm | Confirmation chains on safe actions |
145
+ | Dead ends | Every screen offers the obvious next step | Exit via back button only | User stranded; must restart from home |
146
+ | One way per task | One clear route (plus deliberate shortcuts) | Two unmarked equivalent routes | Multiple divergent routes with different results |
147
+
148
+ ## Finding Template
149
+
150
+ When a check results in `warn` or `fail`, create a finding:
151
+
152
+ ```json
153
+ {
154
+ "id": "F-{STORY_ID}-{SEQ}",
155
+ "severity": "critical|high|medium|low|suggestion",
156
+ "category": "simplicity|disclosure|layout|visual|consistency|hierarchy|flow|happy-path|a11y|error-handling",
157
+ "criterion": "Which specific check failed",
158
+ "score": "warn|fail",
159
+ "description": "What is wrong",
160
+ "expected": "What should happen",
161
+ "actual": "What actually happens",
162
+ "screenshot": "path/to/screenshot.png",
163
+ "suggested_fix": "How to fix it (if obvious)",
164
+ "files_likely_involved": ["src/components/Foo.tsx"]
165
+ }
166
+ ```
167
+
168
+ ## Severity Mapping
169
+
170
+ - **critical**: App crashes, data loss, completely blocked workflow, security issue
171
+ - **high**: User cannot complete primary goal, major visual breakage, misleading UI
172
+ - **medium**: Annoying but workaround exists, moderate visual issues, confusing copy
173
+ - **low**: Minor cosmetic issue, slight inconvenience, polish item
174
+ - **suggestion**: Enhancement idea, not a bug ("this would be even better if...")
@@ -0,0 +1,92 @@
1
+ # Visual inspection protocol
2
+
3
+ How to catch what an accessibility snapshot cannot: misalignment, uneven shapes,
4
+ bad spacing, broken wrapping. Use two instruments together.
5
+
6
+ - **Vision (look_at_image)**: judges the overall look. Is it balanced, intentional,
7
+ clear? It is poor at exact pixel values and can be wrong.
8
+ - **Geometry script (`geometry-audit.js`)**: measures exact heights, gaps, drift and
9
+ spill. Numbers are reliable, but they cannot tell whether a difference is intended.
10
+
11
+ A finding needs both: the script (or your own measurement) shows the defect, and the
12
+ screenshot shows a user would notice it. Prefer the script for anything measurable.
13
+
14
+ ## Budget
15
+
16
+ Each look_at_image call uses part of the user's daily allowance. Make one call per
17
+ distinct page state (a new page or a major layout change), not per click. Ask one
18
+ specific question per call. Never ask about the same image twice. The mobile check
19
+ gets one call per story at most. If an answer disagrees with the measurements, trust
20
+ the measurements.
21
+
22
+ ## The look pass
23
+
24
+ Save the screenshot inside the project folder, then:
25
+
26
+ ```
27
+ look_at_image(path="docs/ux-walker/shots/STORY-007/step-3.png",
28
+ question="List what you see on this screen, then answer yes/no with the element names: (1) Do repeated cards, tiles or rows differ in height, width, radius or padding? (2) Do left edges and tops that should line up actually line up? (3) Are gaps between siblings equal? (4) Is any button, tab or chip label wrapped onto two lines, cut off, or overflowing its container? (5) Which single element looks like the primary action, and is it clearly the most prominent? (6) Is any fact shown more than once?")
29
+ ```
30
+
31
+ Adapt the question to the screen. Keep it under about 100 words and make it concrete.
32
+ Record one sentence per screenshot in walk-report.md: what the screen shows, and what
33
+ failed the look pass.
34
+
35
+ ## The measure pass
36
+
37
+ Run at each distinct page state:
38
+
39
+ ```bash
40
+ agent-browser --session $S eval --stdin < "$SKILL_DIR/references/geometry-audit.js"
41
+ ```
42
+
43
+ Output is JSON:
44
+
45
+ | Field | Meaning | Typical finding |
46
+ |-------|---------|-----------------|
47
+ | `pageOverflowX` | px of horizontal page scroll | `layout`: something is wider than the viewport |
48
+ | `unevenRows[]` | similar siblings in one row with mismatched `heights`, `widths`, `gaps` or `topDriftPx` | `consistency`: cards with different shapes, uneven gutters |
49
+ | `overflowSpills[]` | content escaping a container with `overflow: visible` | `layout`: text or element spilling out |
50
+ | `wrappedControls[]` | short control labels forced onto 2+ lines | `layout`: wrapped button or tab labels |
51
+
52
+ Rules:
53
+ - Confirm each script hit in the screenshot (or with `get box`) before logging it.
54
+ Skip it if the variance is deliberate, such as a featured card.
55
+ - Thresholds already skip small noise (more than 8px shape variance, 4px gap variance,
56
+ 3px top drift). Do not report smaller differences.
57
+ - One systemic defect is one finding. If the same card is uneven on five screens, log
58
+ one finding that lists all five.
59
+
60
+ ## Ad-hoc measurements
61
+
62
+ ```bash
63
+ agent-browser --session $S get box "<selector>"
64
+ agent-browser --session $S get styles "<selector>"
65
+ ```
66
+
67
+ Compare two boxes to prove a misalignment. Findings with numbers ("left edges differ
68
+ by 7px: 24px vs 31px") get fixed; "looks slightly off" gets ignored.
69
+
70
+ ## Responsive spot-check
71
+
72
+ Once per story, on its main screen:
73
+
74
+ ```bash
75
+ agent-browser --session $S set viewport 390 844
76
+ agent-browser --session $S screenshot docs/ux-walker/shots/<story>/mobile-check.png
77
+ agent-browser --session $S eval --stdin < "$SKILL_DIR/references/geometry-audit.js"
78
+ agent-browser --session $S set viewport 1280 800
79
+ ```
80
+
81
+ The script usually finds wrap and overflow problems at narrow width first. Use the one
82
+ look_at_image call only if the script reports something or the page looks unusual.
83
+
84
+ ## Theme spot-check (only if the app has dark and light modes)
85
+
86
+ ```bash
87
+ agent-browser --session $S set media dark
88
+ agent-browser --session $S screenshot docs/ux-walker/shots/<story>/dark-check.png
89
+ agent-browser --session $S set media light
90
+ ```
91
+
92
+ Look for unreadable text, hard-coded light backgrounds and invisible borders.
@@ -0,0 +1,139 @@
1
+ # UX Walker Run Report — Template
2
+
3
+ This template is used in the report step to generate `docs/ux-walker/latest-report.md`.
4
+
5
+ ---
6
+
7
+ ```markdown
8
+ # UX Walker Report — {DATE}
9
+
10
+ ## Run Summary
11
+
12
+ | Metric | Value |
13
+ |--------|-------|
14
+ | **Target URL** | {URL} |
15
+ | **Run mode** | {full / incremental / focused on "{TOPIC}"} |
16
+ | **Stories in catalog** | {TOTAL} |
17
+ | **Stories walked** | {WALKED} |
18
+ | **Stories skipped** | {SKIPPED} (passed previously, no changes) |
19
+ | **Stories re-verified** | {REVERIFIED} |
20
+ | **Overall pass rate** | {PASSED}/{WALKED} ({PERCENT}%) |
21
+ | **Duration** | {DURATION} |
22
+
23
+ ## Findings Summary
24
+
25
+ ### By Severity
26
+
27
+ | Severity | Count | Quick Fixed | Issue Filed | Deferred |
28
+ |----------|-------|-------------|-------------|----------|
29
+ | Critical | {N} | {N} | {N} | {N} |
30
+ | High | {N} | {N} | {N} | {N} |
31
+ | Medium | {N} | {N} | {N} | {N} |
32
+ | Low | {N} | {N} | {N} | {N} |
33
+ | Suggestion | {N} | — | — | {N} |
34
+ | **Total** | **{N}** | **{N}** | **{N}** | **{N}** |
35
+
36
+ ### By Category
37
+
38
+ | Category | Count | Examples |
39
+ |----------|-------|---------|
40
+ | Simplicity | {N} | {brief example} |
41
+ | Disclosure | {N} | {brief example} |
42
+ | Layout | {N} | {brief example} |
43
+ | Visual | {N} | {brief example} |
44
+ | Happy Path | {N} | {brief example} |
45
+ | Accessibility | {N} | {brief example} |
46
+ | Error Handling | {N} | {brief example} |
47
+
48
+ ## Quick Fixes Applied
49
+
50
+ {For each fix:}
51
+
52
+ ### {FINDING_ID}: {Short Description}
53
+ - **Story**: STORY-{ID} — "{Title}"
54
+ - **What was wrong**: {description}
55
+ - **Fix**: {what was changed}
56
+ - **Files**: {file paths}
57
+ - **Verified**: {yes/no — did re-walk confirm fix?}
58
+
59
+ ---
60
+
61
+ ## Issues Filed
62
+
63
+ | # | Issue | Severity | Story | Status |
64
+ |---|-------|----------|-------|--------|
65
+ | 1 | [{TITLE}]({ISSUE_URL}) | {severity} | STORY-{ID} | Open |
66
+ | 2 | [{TITLE}]({ISSUE_URL}) | {severity} | STORY-{ID} | Open |
67
+
68
+ ## UX Audit Summary
69
+
70
+ ### Common Patterns
71
+
72
+ {Identify recurring themes across all walked stories. Examples:}
73
+
74
+ - **Pattern**: {description of pattern seen across multiple stories}
75
+ - Affected stories: STORY-{X}, STORY-{Y}, STORY-{Z}
76
+ - Root cause: {likely root cause}
77
+ - Recommendation: {what to do about it}
78
+
79
+ ### Systemic Issues
80
+
81
+ {Issues that aren't tied to one story but affect the whole app:}
82
+
83
+ 1. **{Issue title}**: {description}. Affects {N} stories.
84
+ 2. **{Issue title}**: {description}. Affects {N} stories.
85
+
86
+ ## Top 5 Recommendations
87
+
88
+ {Ordered by impact — what would improve the most stories:}
89
+
90
+ 1. **{Recommendation}** — Would improve {N} stories. {1-2 sentence explanation.}
91
+ 2. **{Recommendation}** — Would improve {N} stories. {1-2 sentence explanation.}
92
+ 3. **{Recommendation}** — Would improve {N} stories. {1-2 sentence explanation.}
93
+ 4. **{Recommendation}** — Would improve {N} stories. {1-2 sentence explanation.}
94
+ 5. **{Recommendation}** — Would improve {N} stories. {1-2 sentence explanation.}
95
+
96
+ ## Still Failing
97
+
98
+ {Stories that failed this run and were not fixed:}
99
+
100
+ | Story | Failure Point | Reason | Blocked By |
101
+ |-------|---------------|--------|------------|
102
+ | STORY-{ID} | Step {N} | {reason} | {issue link or "not filed"} |
103
+
104
+ ## Story Results Detail
105
+
106
+ {Compact table of all walked stories:}
107
+
108
+ | Story | Status | Findings | Fixed | Issues | Notes |
109
+ |-------|--------|----------|-------|--------|-------|
110
+ | STORY-{001} | Pass | 0 | — | — | Clean walk |
111
+ | STORY-{002} | Pass | 2 | 2 | 0 | Fixed: spacing, typo |
112
+ | STORY-{003} | Fail | 3 | 1 | 2 | Blocked on nav redesign |
113
+
114
+ ## Run History
115
+
116
+ | Run | Date | Walked | Passed | Failed | Fixes | Issues |
117
+ |-----|------|--------|--------|--------|-------|--------|
118
+ | {N} | {DATE} | {N} | {N} | {N} | {N} | {N} |
119
+ | {N-1} | {DATE} | {N} | {N} | {N} | {N} | {N} |
120
+
121
+ ---
122
+
123
+ *Generated by ux-walker — {ISO_TIMESTAMP}*
124
+ ```
125
+
126
+ ## Instructions for the report step
127
+
128
+ When generating the report from this template, read one file at a time and keep only counts and one-line notes in context:
129
+
130
+ 1. **Read all walk reports**: `docs/ux-walker/stories/STORY-*/walk-report.md`
131
+ 2. **Read all findings**: `docs/ux-walker/stories/STORY-*/findings.json`
132
+ 3. **Read fix reports**: `docs/ux-walker/fixes/*.md`
133
+ 4. **Read issues-filed.md**: `docs/ux-walker/issues-filed.md`
134
+ 5. **Read run-history.json**: `docs/ux-walker/run-history.json`
135
+ 6. **Aggregate** findings by severity and category
136
+ 7. **Identify patterns** — look for the same rubric criterion failing across multiple stories
137
+ 8. **Rank recommendations** by how many stories they would improve
138
+ 9. **Write** the filled template to `docs/ux-walker/latest-report.md`
139
+ 10. **Update run-history.json** with this run's summary