mobile-ai-agents 1.0.33 → 1.0.34

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
@@ -316,7 +316,7 @@ Not sure where to begin? Pick your situation:
316
316
  | `/store-listing` | Conversation → ASO-optimized listing copy |
317
317
  | `/feature-slice` | Epic → independently shippable tickets |
318
318
  | `/release-prep` | Full release checklist from freeze to store |
319
- | `/accessibility-audit` | WCAG 2.1 AA + platform accessibility review |
319
+ | `/accessibility-audit` | WCAG 2.1 AA, reskin contrast, and semantic color-token migration review |
320
320
  | `/api-versioning` | API deprecation strategy for mobile clients |
321
321
  | `/deeplink-debug` | Diagnoses broken deep links across Android and iOS |
322
322
  | `/mobile-mcp-qa` | Run AI-assisted QA on iOS/Android devices, simulators, and emulators |
package/docs/wiki.md CHANGED
@@ -384,6 +384,16 @@ Full guide: [`docs/vscode-copilot-integration.md`](vscode-copilot-integration.md
384
384
 
385
385
  **Specify the exact platform:** `Android-Compose`, `Android-XML`, `iOS-SwiftUI`, `iOS-UIKit`, `Flutter`, or `React-Native`. The fixes differ significantly between frameworks.
386
386
 
387
+ For a reskin or theme migration, run `/accessibility-audit` with the supported themes, theme/token source, affected screens, and resolved foreground/background pairs. It maps by semantic role rather than old hex value, computes WCAG AA contrast for light and dark modes, and reports role collisions where one palette value was incorrectly reused for text, borders, fills, disabled content, or status states. Pair it with `/mobile-app-design` before implementation and `/mobile-mcp-qa` for device screenshots afterward.
388
+
389
+ ```text
390
+ /accessibility-audit
391
+ PLATFORM: React Native
392
+ SUPPORTED_THEMES: light, dark
393
+ Audit the Settings reskin and token migration. Report failed pairs with their ratio,
394
+ required ratio, semantic role, theme/state, and recommended token.
395
+ ```
396
+
387
397
  ---
388
398
 
389
399
  ## 7. How Skills Work
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobile-ai-agents",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
4
4
  "description": "AI agents, skills, and Loop Engineering workflows for building, testing, auditing, and releasing mobile apps.",
5
5
  "bin": {
6
6
  "mobile-ai-agents": "cli/index.js",
@@ -7,7 +7,27 @@
7
7
 
8
8
  ## Purpose
9
9
 
10
- Reviews any mobile screen for WCAG 2.1 AA compliance and platform accessibility standards. Increasingly required by law (EU Accessibility Act 2025, ADA).
10
+ Reviews mobile UI for WCAG 2.1 AA and platform accessibility requirements. It also verifies app reskins and color-token migrations by semantic role so palette replacements do not create invisible text, controls, or status states.
11
+
12
+ ## When to Use
13
+
14
+ - Before releasing a new or redesigned mobile screen.
15
+ - After `/mobile-app-design` changes themes, tokens, components, or navigation.
16
+ - When a reskin replaces hardcoded colors or consolidates competing palettes.
17
+ - When `/mobile-mcp-qa` finds unreadable content or a theme-specific regression.
18
+
19
+ ## Inputs
20
+
21
+ Provide as much of this evidence as is available:
22
+
23
+ ```text
24
+ PLATFORM: Android | iOS | Flutter | React Native
25
+ SUPPORTED_THEMES: light, dark, or named themes
26
+ UI_SOURCE: screen/component and theme/token source files
27
+ COLOR_PAIRS: optional resolved foreground/background pairs by role, theme, and state
28
+ SCREENSHOTS: optional device evidence; never a substitute for computed colors
29
+ RESKIN_PLAN: optional /mobile-app-design screen inventory and token migration plan
30
+ ```
11
31
 
12
32
  ---
13
33
 
@@ -59,5 +79,135 @@ React Native:
59
79
  - accessibilityHint for non-obvious actions.
60
80
  - accessible={false} for decorative elements.
61
81
 
62
- For each issue: element, requirement violated, WCAG criterion, and concrete fix.
82
+ RESKIN AND TOKEN MIGRATION:
83
+ 1. Build a usage inventory before changing or approving tokens. Inspect each occurrence as
84
+ body text, large text, muted/secondary text, icon, border, fill/surface, disabled content,
85
+ disabled fill, status content, status fill, or fixed-tone content/fill.
86
+ 2. Map colors by semantic role, never by old hex value. If one old hex is used for text,
87
+ borders, and fills, those usages require separate destination tokens. Flag a single
88
+ replacement token across different roles as ROLE_COLLISION.
89
+ 3. Resolve the actual foreground and background after aliases, theme selection, state layers,
90
+ opacity, and alpha compositing. Do not infer contrast from token names or visual judgment.
91
+ 4. Compute WCAG relative luminance and contrast ratio for every supported theme and relevant
92
+ state. Use (Llighter + 0.05) / (Ldarker + 0.05).
93
+ 5. Require at least 4.5:1 for body/normal text and 3:1 for large text, icons, borders,
94
+ focus indicators, and other meaningful non-text UI. Large text is at least 18pt regular
95
+ or 14pt bold. Decorative borders and inactive controls do not need 3:1, but enabled
96
+ control boundaries and state indicators do.
97
+ 6. Test these pairs separately in every theme:
98
+ - body text on each surface it appears on
99
+ - muted/secondary text on each surface it appears on
100
+ - icons and meaningful borders against adjacent colors
101
+ - status chips/badges: content on container and container against its surroundings when
102
+ the boundary communicates status
103
+ - disabled content on disabled fill and surrounding surface; disabled state must not rely
104
+ on low contrast or color alone
105
+ - error, success, warning, and info content/containers
106
+ - fixed-tone content on fixed-tone fills, without allowing system theme substitution
107
+ 7. Detect invisible-text risks: foreground and background resolving to the same token/value,
108
+ on-color paired with the wrong container, transparent content composited onto a matching
109
+ surface, fixed-tone content replaced by a theme-dependent token, or a missing dark token
110
+ falling back to a light-theme value.
111
+ 8. Screenshots may reveal where to inspect, but sampled pixels are not sufficient when text
112
+ has antialiasing, transparency, imagery, or gradients. Use resolved source/runtime colors
113
+ for the computed result and mark unavailable pairs UNVERIFIED.
114
+
115
+ For each accessibility issue include the element, requirement, WCAG criterion, severity,
116
+ evidence, and concrete fix. For color failures, recommend a semantic token, not only a hex.
117
+
118
+ OUTPUT FORMAT:
119
+ ACCESSIBILITY AUDIT
120
+ ===================
121
+ Platform:
122
+ Themes audited:
123
+ Evidence:
124
+ Result: PASS | FAIL | PARTIAL | BLOCKED
125
+
126
+ Summary:
127
+ - Critical:
128
+ - High:
129
+ - Medium:
130
+ - Low:
131
+ - Unverified:
132
+
133
+ Role Collision Audit:
134
+ | Old Color/Token | Source Usages | Incorrect Mapping | Required Role Tokens | Result |
135
+ |---|---|---|---|---|
136
+
137
+ Contrast Results:
138
+ | Element/Pair | Role | Theme/State | Foreground | Background | Ratio | Required | Recommended Token | Result |
139
+ |---|---|---|---|---|---:|---:|---|---|
140
+
141
+ Other Findings:
142
+ | Severity | Element | Requirement/WCAG | Evidence | Fix |
143
+ |---|---|---|---|---|
144
+
145
+ Unverified Evidence:
146
+ - Pair or behavior, missing evidence, and exact verification needed.
147
+
148
+ Decision:
149
+ - PASS only when all in-scope themes and states have computed passing pairs and no blocking
150
+ semantic, focus, label, target-size, or announcement failures remain.
151
+ - PARTIAL when available checks pass but required evidence is missing.
152
+ - FAIL when any required pair or accessibility behavior fails.
153
+ ```
154
+
155
+ ## Example
156
+
157
+ **Input:**
158
+
159
+ ```text
160
+ PLATFORM: React Native
161
+ SUPPORTED_THEMES: light, dark
162
+ RESKIN_PLAN: Replace legacy #6B7280 usages with the new secondary token.
163
+ UI_SOURCE:
164
+ - Settings helper text used #6B7280.
165
+ - Card borders used #6B7280.
166
+ - Dark theme maps secondary to #334155 on surface #0F172A.
63
167
  ```
168
+
169
+ **Output:**
170
+
171
+ ```text
172
+ ACCESSIBILITY AUDIT
173
+ ===================
174
+ Platform: React Native
175
+ Themes audited: light, dark
176
+ Evidence: resolved theme tokens and Settings source
177
+ Result: FAIL
178
+
179
+ Summary:
180
+ - Critical: 0
181
+ - High: 1
182
+ - Medium: 1
183
+ - Low: 0
184
+ - Unverified: 0
185
+
186
+ Role Collision Audit:
187
+ | Old Color/Token | Source Usages | Incorrect Mapping | Required Role Tokens | Result |
188
+ |---|---|---|---|---|
189
+ | #6B7280 | helper text, card border | color.secondary | color.onSurfaceVariant, color.outline | ROLE_COLLISION |
190
+
191
+ Contrast Results:
192
+ | Element/Pair | Role | Theme/State | Foreground | Background | Ratio | Required | Recommended Token | Result |
193
+ |---|---|---|---|---|---:|---:|---|---|
194
+ | Settings helper/surface | muted text | dark/default | #334155 | #0F172A | 1.72:1 | 4.5:1 | color.onSurfaceVariant | FAIL |
195
+ | Settings card edge/surface | meaningful border | dark/default | #334155 | #0F172A | 1.72:1 | 3:1 | color.outline | FAIL |
196
+
197
+ Other Findings:
198
+ | Severity | Element | Requirement/WCAG | Evidence | Fix |
199
+ |---|---|---|---|---|
200
+ | HIGH | Settings helper | 1.4.3 contrast | Dark token migration makes text nearly invisible | Map text to color.onSurfaceVariant and verify >= 4.5:1 |
201
+ | MEDIUM | Settings card | 1.4.11 non-text contrast | Border no longer communicates grouping | Map border to color.outline and verify >= 3:1 |
202
+
203
+ Unverified Evidence:
204
+ - None.
205
+
206
+ Decision:
207
+ - FAIL. Split the legacy value by semantic role, recompute both dark-mode pairs, and rerun
208
+ `/mobile-mcp-qa` for Settings in light and dark themes.
209
+ ```
210
+
211
+ ## Composition
212
+
213
+ Use `/mobile-app-design` to define the reskin and token plan, this skill to compute accessibility results, and `/mobile-mcp-qa` to capture device evidence in every supported theme.