wize-dev-kit 0.1.4 → 0.2.0

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +78 -1
  2. package/README.md +64 -0
  3. package/package.json +1 -1
  4. package/src/app-overlay/playbooks/apple-hig.md +112 -0
  5. package/src/app-overlay/playbooks/detox-maestro.md +179 -0
  6. package/src/app-overlay/playbooks/device-matrix.md +121 -0
  7. package/src/app-overlay/playbooks/material-design-3.md +135 -0
  8. package/src/app-overlay/playbooks/mobile-perf-budgets.md +145 -0
  9. package/src/app-overlay/playbooks/permissions-ux.md +147 -0
  10. package/src/app-overlay/playbooks/touch-targets-and-gestures.md +127 -0
  11. package/src/app-overlay/stack-catalog.md +178 -0
  12. package/src/method-skills/1-analysis/wize-document-project/workflow.md +147 -20
  13. package/src/method-skills/1-analysis/wize-prfaq/workflow.md +150 -11
  14. package/src/method-skills/1-analysis/wize-product-brief/workflow.md +90 -19
  15. package/src/method-skills/1-analysis/wize-research/workflow.md +101 -9
  16. package/src/method-skills/1-analysis/wize-trigger-map/workflow.md +80 -16
  17. package/src/method-skills/2-plan-workflows/wize-create-prd/workflow.md +132 -23
  18. package/src/method-skills/2-plan-workflows/wize-ux-design/workflow.md +132 -28
  19. package/src/method-skills/2-plan-workflows/wize-ux-scenarios/workflow.md +91 -15
  20. package/src/method-skills/2-plan-workflows/wize-validate-prd/workflow.md +106 -12
  21. package/src/method-skills/3-solutioning/wize-check-implementation-readiness/workflow.md +101 -11
  22. package/src/method-skills/3-solutioning/wize-create-architecture/workflow.md +197 -29
  23. package/src/method-skills/3-solutioning/wize-create-epics-and-stories/workflow.md +127 -12
  24. package/src/method-skills/3-solutioning/wize-design-system/workflow.md +182 -22
  25. package/src/method-skills/3-solutioning/wize-nfr-principles/workflow.md +142 -16
  26. package/src/method-skills/3-solutioning/wize-tech-vision/workflow.md +127 -21
  27. package/src/method-skills/4-implementation/wize-code-review/workflow.md +105 -10
  28. package/src/method-skills/4-implementation/wize-create-story/workflow.md +131 -10
  29. package/src/method-skills/4-implementation/wize-dev-story/workflow.md +115 -17
  30. package/src/method-skills/4-implementation/wize-quick-dev/workflow.md +109 -18
  31. package/src/method-skills/4-implementation/wize-retrospective/workflow.md +112 -10
  32. package/src/method-skills/4-implementation/wize-sprint-planning/workflow.md +85 -10
  33. package/src/method-skills/4-implementation/wize-sprint-status/workflow.md +96 -11
  34. package/src/tea-skills/wize-tea-design/workflow.md +104 -13
  35. package/src/tea-skills/wize-tea-gate/workflow.md +108 -25
  36. package/src/tea-skills/wize-tea-nfr/workflow.md +104 -14
  37. package/src/tea-skills/wize-tea-review/workflow.md +107 -13
  38. package/src/tea-skills/wize-tea-risk/workflow.md +99 -10
  39. package/src/tea-skills/wize-tea-trace/workflow.md +83 -12
  40. package/src/web-overlay/playbooks/playwright-vitest.md +211 -0
  41. package/src/web-overlay/playbooks/responsive-breakpoints.md +104 -0
  42. package/src/web-overlay/playbooks/semantic-html.md +114 -0
  43. package/src/web-overlay/playbooks/wcag-aa.md +97 -0
  44. package/src/web-overlay/playbooks/web-perf-budgets.md +140 -0
  45. package/src/web-overlay/stack-catalog.md +208 -0
  46. package/tools/installer/commands/agent.js +197 -0
  47. package/tools/installer/commands/sync.js +45 -0
  48. package/tools/installer/commands/update.js +172 -0
  49. package/tools/installer/wize-cli.js +24 -8
package/CHANGELOG.md CHANGED
@@ -5,6 +5,81 @@ Format inspired by [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.2.0] — 2026-06-11
9
+
10
+ First release that delivers the lifecycle end-to-end. Workflows have real bodies; CLI commands work for real; the team has a Walkthrough to follow.
11
+
12
+ ### Added — CLI
13
+
14
+ - **`wize-dev-kit update`** — refreshes an installed kit to the version resolved by `node_modules/wize-dev-kit`. Re-runs every active IDE adapter, preserves `.wize/config/user.toml`, re-applies the suggested `.gitignore` block, and writes the new `kit_version` into `.wize/config/project.toml`. Prints the relevant CHANGELOG excerpt between the previous and current version.
15
+ - **`wize-dev-kit sync`** — re-renders adapter outputs for whatever `ide_targets` the project opted into. Cheap idempotent call after editing config or running `agent create`.
16
+ - **`wize-dev-kit agent list`** — lists every built-in agent (9) plus any custom or override agents the project added.
17
+ - **`wize-dev-kit agent create`** — interactive scaffold of a new custom agent. Validates `code` shape, checks for collisions with built-ins, does a dry-run write+read, then persists to `.wize/custom/agents/{code}/{agent.yaml, persona.md}`. Non-TTY callers can pass a spec via API (`fromSpec`).
18
+ - **`wize-dev-kit agent edit <code>`** — writes a `customize.toml` override for an existing built-in agent into `.wize/custom/agents/{code}/`.
19
+
20
+ ### Added — UX
21
+
22
+ - **End-of-install message** now ends with: "Restart your IDE — many harnesses load skills only at startup." plus a quick-reference to the new CLI commands (`update`, `sync`, `agent list`).
23
+ - **README walkthrough** — a complete end-to-end slash-command map from `/wize-orchestrator` through `/wize-tea-gate`, plus a new "CLI commands" reference section.
24
+
25
+ ### Changed — workflows now have real bodies
26
+
27
+ 22 workflows that were ≈ 30–50-line stubs in 0.1.x now ship 100–250 lines of working method, examples, anti-patterns, and YAML schemas. Tone aligned with the 0.1.5 playbooks (dense, opinionated, citable).
28
+
29
+ - **Analysis (Pepper):** `wize-product-brief`, `wize-trigger-map`, `wize-research`, `wize-prfaq`, `wize-document-project`.
30
+ - **Plan (Maria Hill + Mantis):** `wize-create-prd`, `wize-validate-prd`, `wize-ux-scenarios`, `wize-ux-design`.
31
+ - **Strategy + Solutioning (Fury + Tony + Mantis):** `wize-tech-vision`, `wize-nfr-principles`, `wize-create-architecture`, `wize-design-system`, `wize-create-epics-and-stories`, `wize-check-implementation-readiness`.
32
+ - **TEA gates (Hawkeye):** `wize-tea-risk`, `wize-tea-design`, `wize-tea-trace`, `wize-tea-nfr`, `wize-tea-review`, `wize-tea-gate` — each with canonical YAML frontmatter + concrete examples.
33
+ - **Implementation (Shuri + Hill + Wizer):** `wize-create-story`, `wize-dev-story`, `wize-quick-dev`, `wize-sprint-planning`, `wize-sprint-status`, `wize-retrospective`, `wize-code-review`.
34
+
35
+ ### Added — engineering
36
+
37
+ - `tools/installer/commands/{update,sync,agent}.js` — modular command implementations with a minimal TOML reader for the `project.toml` subset.
38
+ - `test/cli-commands.test.js` — coverage for update / sync / agent list / agent create / agent edit (10 tests).
39
+ - `test/workflow-bodies.test.js` — guards that every workflow.md has ≥ 1.5 KB body and ≥ 4 H2 sections, with an explicit allow-list for intentionally short workflows (overlay scaffolds, builder helpers, orchestrator helpers).
40
+ - Test count: **87 passing** (was 33).
41
+
42
+ ### Notes
43
+
44
+ This release closes JTBD backlog categories 3 (CLI commands real) and 2 (workflows with body) plus 4 (end-of-install UX, README walkthrough). Categories 5 (CI hygiene incl. smoke E2E) and 6 (monorepo routing, TEA enforcing helper) remain on the roadmap.
45
+
46
+ ## [0.1.5] — 2026-06-01
47
+
48
+ ### Added — promises kept
49
+
50
+ All files that previous releases declared in `module.yaml` but never shipped are now in the kit, with real content (not placeholders).
51
+
52
+ **Web overlay playbooks** (`src/web-overlay/playbooks/`):
53
+
54
+ - `wcag-aa.md` — WCAG 2.2 AA checklist for Mantis, with the newer SCs (2.4.11, 2.5.7, 2.5.8, 3.2.6, 3.3.7, 3.3.8) and an audit toolchain.
55
+ - `responsive-breakpoints.md` — mobile-first stack with container queries, fluid typography (`clamp`), layout primitives (Stack/Cluster/Switcher/Sidebar/Grid/Cover/Frame), image strategy.
56
+ - `semantic-html.md` — landmarks, headings, the 12 must-reach-first elements, ARIA rules, common widget patterns with minimum ARIA, anti-patterns.
57
+ - `playwright-vitest.md` — Hawkeye's split (70/20/10), Vitest + Testing Library + MSW setup, Playwright POM pattern, selector hierarchy (role → label → text → testid), CI sketch, anti-patterns.
58
+ - `web-perf-budgets.md` — Core Web Vitals targets, baseline budgets per resource class, image/font strategy, third-party audit checklist, critical rendering path snippet, lighthouse-ci config, field measurement via `web-vitals` beacon.
59
+
60
+ **App overlay playbooks** (`src/app-overlay/playbooks/`):
61
+
62
+ - `apple-hig.md` — POUR-equivalent four principles, layout (status bar/nav/tab/safe-area), navigation patterns, SF Symbols, Dynamic Type, motion, common idioms, iPad specifics, do-not list.
63
+ - `material-design-3.md` — pillars, color/type/shape tokens, elevation-by-color, component starter set, adaptive windows (Compact/Medium/Expanded/Large), motion + reduced motion, Material You theming.
64
+ - `touch-targets-and-gestures.md` — minimums per platform (iOS 44pt / Android 48dp / web 24px), hit-area snippets per stack, thumb reach zones, reserved gestures, multi-touch, drag-and-drop with keyboard fallback, haptics, reduce-motion.
65
+ - `permissions-ux.md` — the four states (not-determined/granted/denied/limited), pre-flight pattern, per-permission guidance (camera/photos/location/notifications/contacts/BLE/health/tracking), denied-state UI + Settings deep-link, copy template.
66
+ - `detox-maestro.md` — when to pick each, Maestro YAML + cloud, Detox config + `testID` discipline, cross-platform CI sketch, flakiness rules, critical journeys to cover.
67
+ - `mobile-perf-budgets.md` — cold/warm start, TTI, FPS, jank, app size, memory, battery; per-platform targets; size reductions that work; build-time + field measurement.
68
+ - `device-matrix.md` — three buckets (floor/volume/ceiling), 2026 iOS + Android matrices, cloud farm comparison, accessibility runs, network conditions, locale coverage.
69
+
70
+ **Stack catalogs**:
71
+
72
+ - `src/web-overlay/stack-catalog.md` — Tony's reference for the web architecture interview: frameworks (Next/Nuxt/SvelteKit/Astro/Remix/SPA/Laravel-Inertia), back-end (Supabase/PlanetScale/Drizzle/Prisma/tRPC/GraphQL), auth, hosting, styling, state, forms; ADR record path.
73
+ - `src/app-overlay/stack-catalog.md` — Tony's mobile architecture reference: frameworks (RN+Expo / RN bare / Flutter / SwiftUI / Compose / Compose-Multiplatform / Capacitor / native+KMP), build & release, auth, data/sync, state, storage, push, analytics, anti-patterns; ADR record path.
74
+
75
+ ### Added — tests
76
+
77
+ - `test/playbooks-and-catalogs.test.js`: guards that every playbook declared in an overlay `module.yaml` exists on disk, has frontmatter, and is non-trivial (> 400 chars). Stack catalog presence + size also asserted. Total tests now: **39** (was 33).
78
+
79
+ ### Notes
80
+
81
+ This release closes Category 1 of the backlog ("promessas vazias"). Categories 2–6 (workflow bodies, `update`/`sync`/`agent create` CLI, polish, Node-24 CI, OIDC return, monorepo & TEA-enforcing) remain on the roadmap.
82
+
8
83
  ## [0.1.4] — 2026-06-01
9
84
 
10
85
  ### Added
@@ -102,7 +177,9 @@ Ignore (handled by the suggested block): `.wize/config/user.toml`, `.wize/scratc
102
177
  - Inspired by [BMAD Method v6.8.0](https://github.com/bmad-code-org/BMAD-METHOD).
103
178
  - WDS module inspired by [bmad-method-wds-expansion](https://github.com/bmad-code-org/bmad-method-wds-expansion).
104
179
 
105
- [Unreleased]: https://github.com/qwize-br/wize-development-kit/compare/v0.1.4...HEAD
180
+ [Unreleased]: https://github.com/qwize-br/wize-development-kit/compare/v0.2.0...HEAD
181
+ [0.2.0]: https://github.com/qwize-br/wize-development-kit/compare/v0.1.5...v0.2.0
182
+ [0.1.5]: https://github.com/qwize-br/wize-development-kit/compare/v0.1.4...v0.1.5
106
183
  [0.1.4]: https://github.com/qwize-br/wize-development-kit/compare/v0.1.3...v0.1.4
107
184
  [0.1.3]: https://github.com/qwize-br/wize-development-kit/compare/v0.1.2...v0.1.3
108
185
  [0.1.2]: https://github.com/qwize-br/wize-development-kit/compare/v0.1.1...v0.1.2
package/README.md CHANGED
@@ -72,6 +72,55 @@ See [`ROSTER.md`](ROSTER.md) for personas, styles and BMAD equivalences.
72
72
 
73
73
  ---
74
74
 
75
+ ## Walkthrough — a full project, end to end
76
+
77
+ Below is the canonical flow Wizer drives in a real session. Each step is a slash command in your IDE; each persona reads the previous artifact before writing its own. Nothing is mocked.
78
+
79
+ ```
80
+ 1. /wize-orchestrator Wizer greets, reads .wize/config/{project,user}.toml.
81
+ Detects the project state and routes you.
82
+
83
+ 2. /wize-product-brief Pepper turns raw demand into brief.md.
84
+ /wize-trigger-map Pepper maps user psychology → business goals (WDS).
85
+ /wize-research Pepper synthesizes external evidence (optional).
86
+
87
+ 3. /wize-create-prd Maria Hill writes prd.md (goals, scope, ACs).
88
+ /wize-validate-prd Maria Hill (+ Mantis/Fury) signs off.
89
+
90
+ 4. /wize-ux-scenarios Mantis runs the 8-question WDS dialog.
91
+ /wize-ux-design Mantis writes page specs (one .md per screen).
92
+
93
+ 5. /wize-tech-vision Fury picks the stack family + non-negotiables.
94
+ /wize-nfr-principles Fury writes the NFR budget (perf, sec, a11y…).
95
+
96
+ 6. /wize-create-architecture Tony writes architecture.md + ADRs.
97
+ /wize-design-system Mantis writes design-system/ (tokens + components).
98
+ /wize-create-epics-and-stories
99
+ Tony slices epics → stories (each has ACs).
100
+
101
+ 7. /wize-tea-risk Hawkeye builds the global risk profile.
102
+ /wize-tea-design Hawkeye writes test design for the next story.
103
+ /wize-dev-story Shuri implements (TDD, AC IDs in commits).
104
+ /wize-tea-trace Hawkeye maps each AC → tests.
105
+ /wize-tea-review Hawkeye runs story review.
106
+ /wize-tea-gate Hawkeye emits PASS / CONCERNS / FAIL / WAIVED.
107
+
108
+ 8. /wize-sprint-status Maria Hill keeps the daily snapshot updated.
109
+ /wize-retrospective Wizer facilitates retro at end of each sprint.
110
+ /wize-tea-nfr Hawkeye assesses NFRs at epic boundary.
111
+
112
+ Cross-cutting:
113
+ /wize-help Wizer figures out where you are and proposes
114
+ the next step (use anytime).
115
+ /wize-quick-dev Shuri takes a small fix without the full ride.
116
+ /wize-party-mode Wizer convenes multi-persona for hard calls.
117
+ ```
118
+
119
+ > Use `/wize-help next` whenever you're unsure — it inspects `.wize/` and tells
120
+ > you the single next action.
121
+
122
+ ---
123
+
75
124
  ## Output layout (in the target repo)
76
125
 
77
126
  ```
@@ -86,6 +135,21 @@ See [`ROSTER.md`](ROSTER.md) for personas, styles and BMAD equivalences.
86
135
 
87
136
  ---
88
137
 
138
+ ## CLI commands
139
+
140
+ ```bash
141
+ npx wize-dev-kit install # interactive setup
142
+ npx wize-dev-kit update # bring an installed kit up to the current package version
143
+ npx wize-dev-kit sync # re-render IDE adapters after editing config
144
+ npx wize-dev-kit agent list # list built-in + custom agents
145
+ npx wize-dev-kit agent create # scaffold a new custom agent (validated + dry-run)
146
+ npx wize-dev-kit agent edit <code> # override a built-in via .wize/custom/agents/<code>/customize.toml
147
+ npx wize-dev-kit validate # structural checks on the kit assets
148
+ npx wize-dev-kit uninstall # remove .wize/ (your code is left untouched)
149
+ ```
150
+
151
+ ---
152
+
89
153
  ## Documentation
90
154
 
91
155
  - [`ARCH.md`](ARCH.md) — full architecture: distribution, fluxos, layout, installer.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "wize-dev-kit",
4
- "version": "0.1.4",
4
+ "version": "0.2.0",
5
5
  "description": "Full-lifecycle AI-assisted development kit with Test Architect and Whiteport Design Studio embedded. Inspired by BMAD Method and WDS.",
6
6
  "keywords": [
7
7
  "ai",
@@ -0,0 +1,112 @@
1
+ ---
2
+ playbook: apple-hig
3
+ owner: wize-agent-ux-designer # Mantis
4
+ applies_when: app-overlay active (iOS / iPadOS / macOS)
5
+ status: ready
6
+ ---
7
+
8
+ # Apple HIG — Mantis Playbook (iOS / iPadOS)
9
+
10
+ The HIG isn't a rulebook to memorize — it's a vocabulary. Design so the app feels native first, branded second.
11
+
12
+ ## 1. The four design principles to lead with
13
+
14
+ 1. **Hierarchy** — one primary action per screen. Demote everything else.
15
+ 2. **Harmony** — visual language aligned with the system: SF Symbols, system colors, dynamic type.
16
+ 3. **Consistency** — same gesture, same outcome, across the app.
17
+ 4. **Deference** — content over chrome; let the OS chrome breathe.
18
+
19
+ ## 2. Layout fundamentals
20
+
21
+ | Region | Rule |
22
+ |---|---|
23
+ | Status bar | Never overlap critical content. Match content scheme (light/dark). |
24
+ | Navigation bar | Use the system component. Title sits in `Large Title` on top, collapses on scroll. |
25
+ | Tab bar | 3–5 tabs. Each is a top-level destination, not a flow step. |
26
+ | Safe area | Always respect; never paint behind home indicator unless intentional. |
27
+ | Touch targets | **44×44 pt minimum** (HIG SC). Spacing ≥ 8 pt between adjacent targets. |
28
+
29
+ ## 3. Navigation patterns
30
+
31
+ | Pattern | Use when |
32
+ |---|---|
33
+ | **Tab bar** | 3–5 distinct content areas (Home/Search/Library/Profile). |
34
+ | **Navigation stack** | Hierarchical drill-down. Back gesture must work. |
35
+ | **Modal sheet** | Self-contained task (compose, settings detail). Dismissible with swipe-down. |
36
+ | **Full-screen modal** | Multi-step task that needs focus (onboarding, payment flow). |
37
+ | **Page sheet** (iPad) | Inspector-like UI alongside content. |
38
+ | **Popover** (iPad/Mac) | Contextual options anchored to a control. |
39
+
40
+ ## 4. SF Symbols (use them)
41
+
42
+ - 6000+ glyphs with weights, hierarchical variants, and palette modes.
43
+ - Match symbol weight to your text weight.
44
+ - Use multicolor sparingly — only when meaning depends on color.
45
+ - Never embed glyphs as PNG; SwiftUI/UIKit handle scaling.
46
+
47
+ ```swift
48
+ Image(systemName: "heart.fill")
49
+ .font(.system(size: 24, weight: .semibold))
50
+ .foregroundStyle(.tint)
51
+ ```
52
+
53
+ ## 5. Typography — Dynamic Type
54
+
55
+ - Use semantic text styles (`.title`, `.headline`, `.body`, `.callout`, `.footnote`). Never hardcode `font-size`.
56
+ - Support all 7 default text sizes and the 5 accessibility sizes (xxxL → A11Y_XXXL).
57
+ - Test at the largest accessibility size: critical UI must reflow, not clip.
58
+
59
+ ## 6. Color
60
+
61
+ - Start from **system colors** (`.label`, `.systemBackground`, `.systemBlue`). They handle light/dark/contrast.
62
+ - Brand color stays as a single accent (`tintColor`). Don't recolor system controls.
63
+ - Run in dark mode + Increase Contrast + Reduce Transparency at least once per epic.
64
+
65
+ ## 7. Motion
66
+
67
+ - Respect `Reduce Motion`. Replace `slide`/`scale` with `cross-fade`.
68
+ - Standard durations: 0.25s (transient), 0.35s (navigation), 0.4s (modal present).
69
+ - Springs over linear curves; physics > eased linear.
70
+
71
+ ## 8. Common idioms
72
+
73
+ | Idiom | When |
74
+ |---|---|
75
+ | **Pull-to-refresh** | Lists where freshness matters (mail, feed). |
76
+ | **Swipe actions** | Quick row actions (archive, delete). Always pair with a tap-reveal alternative. |
77
+ | **Context menu (long press)** | Secondary actions on a tile. Never the only path. |
78
+ | **Action sheet** | 2–6 mutually exclusive choices on a small screen. |
79
+ | **Confirmation dialog** | Destructive actions — always confirm; phrase the verb on the button. |
80
+
81
+ ## 9. Permissions
82
+
83
+ - Ask in context, not at launch. (See `permissions-ux.md`.)
84
+ - Provide a pre-flight UI explaining the *why* before the system prompt.
85
+
86
+ ## 10. Privacy nutrition + tracking
87
+
88
+ - `App Tracking Transparency` prompt is mandatory if you track across other apps/sites.
89
+ - Privacy nutrition label is required on the App Store.
90
+ - Mantis writes the user-facing explanations; Tony coordinates the technical entries.
91
+
92
+ ## 11. iPad specifics
93
+
94
+ - **Sidebar + content split** when content is hierarchical and lateral nav matters.
95
+ - Support Stage Manager + multitasking (responsive layout, no fixed pixel widths).
96
+ - Apple Pencil hover (iPad Pro) — design hover affordances even for touch-only apps.
97
+
98
+ ## 12. Don'ts
99
+
100
+ - Custom back arrows. Use the platform's.
101
+ - Hidden gestures as the only path to a feature. Provide a visible tap.
102
+ - Splash screen with branding for > 1 second. Use the launch screen, not a "loading" splash.
103
+ - Reinventing the share sheet. Use `UIActivityViewController` / `ShareLink`.
104
+ - Toast notifications. iOS doesn't have them; use sheets, banners, or system notifications.
105
+
106
+ ## 13. Cross-platform note
107
+
108
+ If the project also ships Android, **build to platform**, not lowest common denominator. Each idiom (back button vs back gesture, tab bar vs bottom nav, alert vs dialog) belongs to its OS. See `material-design-3.md`.
109
+
110
+ ## 14. Hand-off
111
+
112
+ Mantis annotates each screen spec with the Apple system component name (`UIKit` or `SwiftUI`), Dynamic Type style, system color tokens. Tony picks UIKit vs SwiftUI vs React Native; Shuri implements against the named components.
@@ -0,0 +1,179 @@
1
+ ---
2
+ playbook: detox-maestro
3
+ owner: wize-agent-test-architect # Hawkeye
4
+ applies_when: app-overlay active
5
+ status: ready
6
+ ---
7
+
8
+ # Mobile E2E — Detox + Maestro Playbook
9
+
10
+ Two tools, different angles. **Detox** integrates deep into RN/Expo with a real JS bridge and runs on real devices/simulators. **Maestro** is YAML-declarative, multi-platform (RN, Flutter, native), and exceptional for smoke + visual flows. Most teams want one of each, not both heavy.
11
+
12
+ ## 1. Pick one (or both, lean)
13
+
14
+ | Need | Pick |
15
+ |---|---|
16
+ | RN / Expo only, deep state introspection, fastest iteration | **Detox** |
17
+ | Native, Flutter, RN — mixed shop | **Maestro** |
18
+ | Smoke flow you run on every PR | **Maestro** |
19
+ | Detailed assertions on bridge state, mocks at JS layer | **Detox** |
20
+ | Cross-platform visual regression | **Maestro** snapshots (Cloud) |
21
+ | Tight CI matrix (iOS sim + Android emulator + cloud devices) | **Maestro Cloud** or **MagicPod / BrowserStack** |
22
+
23
+ Default split (Hawkeye `tea-design.md`):
24
+
25
+ - **Vitest / Jest** for unit + component (≥ 70%).
26
+ - **Maestro** for smoke (3–8 critical flows on every PR).
27
+ - **Detox** for RN-specific deep flows (auth, deep links, push handling).
28
+
29
+ ## 2. Maestro — getting started
30
+
31
+ ```yaml
32
+ # .maestro/flows/sign-in.yml
33
+ appId: com.qwize.app
34
+ ---
35
+ - launchApp
36
+ - assertVisible: "Sign in"
37
+ - tapOn:
38
+ text: "Email"
39
+ - inputText: "qa@qwize.io"
40
+ - tapOn:
41
+ text: "Password"
42
+ - inputText: "test1234"
43
+ - tapOn: "Sign in"
44
+ - assertVisible:
45
+ id: "home-tab"
46
+ timeout: 10000
47
+ ```
48
+
49
+ Run locally:
50
+
51
+ ```bash
52
+ maestro test .maestro/flows/sign-in.yml
53
+ maestro studio # record flows visually
54
+ maestro cloud .maestro/ # run on Maestro Cloud
55
+ ```
56
+
57
+ Tips:
58
+
59
+ - One flow per file. Compose with `runFlow` for shared steps (sign-in fixture).
60
+ - Prefer `id`-based selectors over text — text changes with locale.
61
+ - Wrap network-dependent waits in `extendedWaitUntil` so they fail loud, not flaky.
62
+ - Snapshots: `takeScreenshot` then commit baseline; Maestro Cloud handles diffing.
63
+
64
+ ## 3. Detox — getting started (RN / Expo)
65
+
66
+ ```bash
67
+ npx detox init -L jest
68
+ ```
69
+
70
+ ```jsonc
71
+ // .detoxrc.js (sketch)
72
+ module.exports = {
73
+ testRunner: 'jest',
74
+ apps: {
75
+ 'ios.debug': { type: 'ios.app', binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/App.app', build: 'xcodebuild ...' },
76
+ 'android.debug': { type: 'android.apk', binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk', build: 'cd android && ./gradlew assembleDebug assembleAndroidTest' }
77
+ },
78
+ devices: {
79
+ 'ios.sim': { type: 'ios.simulator', device: { type: 'iPhone 15 Pro' } },
80
+ 'android.emu': { type: 'android.emulator', device: { avdName: 'Pixel_7_API_34' } }
81
+ },
82
+ configurations: {
83
+ 'ios.debug': { device: 'ios.sim', app: 'ios.debug' },
84
+ 'android.debug': { device: 'android.emu', app: 'android.debug' }
85
+ }
86
+ };
87
+ ```
88
+
89
+ ```ts
90
+ // e2e/sign-in.test.ts
91
+ describe('Sign in', () => {
92
+ beforeAll(async () => { await device.launchApp(); });
93
+ beforeEach(async () => { await device.reloadReactNative(); });
94
+
95
+ it('lets a known user in', async () => {
96
+ await element(by.id('email')).typeText('qa@qwize.io');
97
+ await element(by.id('password')).typeText('test1234');
98
+ await element(by.id('signin-cta')).tap();
99
+ await expect(element(by.id('home-tab'))).toBeVisible();
100
+ });
101
+ });
102
+ ```
103
+
104
+ Hawkeye rules for Detox:
105
+
106
+ - Always use `testID`. Never text selectors.
107
+ - Reset state between tests (`device.reloadReactNative()`); never share login state silently.
108
+ - Network: prefer **MSW-RN** or in-app mock layer. Don't hit prod.
109
+ - Set `Detox.setReachability` to simulate offline scenarios.
110
+
111
+ ## 4. Cross-platform CI sketch
112
+
113
+ ```yaml
114
+ # .github/workflows/mobile-e2e.yml (sketch)
115
+ jobs:
116
+ maestro-ios:
117
+ runs-on: macos-14
118
+ steps:
119
+ - uses: actions/checkout@v4
120
+ - run: brew tap mobile-dev-inc/tap && brew install maestro
121
+ - run: yarn install --frozen-lockfile
122
+ - run: yarn build:ios
123
+ - run: maestro test .maestro/flows/
124
+ maestro-android:
125
+ runs-on: ubuntu-latest
126
+ steps:
127
+ - uses: actions/checkout@v4
128
+ - uses: reactivecircus/android-emulator-runner@v2
129
+ with:
130
+ api-level: 34
131
+ target: google_apis
132
+ arch: x86_64
133
+ profile: pixel_7
134
+ script: |
135
+ curl -Ls "https://get.maestro.mobile.dev" | bash
136
+ maestro test .maestro/flows/
137
+ detox-ios:
138
+ runs-on: macos-14
139
+ steps:
140
+ - uses: actions/checkout@v4
141
+ - run: yarn install --frozen-lockfile
142
+ - run: brew tap wix/brew && brew install applesimutils
143
+ - run: yarn detox build -c ios.debug && yarn detox test -c ios.debug --headless
144
+ ```
145
+
146
+ ## 5. Flakiness — non-negotiable rules
147
+
148
+ 1. **No `sleep(N)`.** Use built-in waits (`waitFor`, `extendedWaitUntil`).
149
+ 2. Tests must pass 50× in a row in CI before they're trusted.
150
+ 3. Reset app state between tests; don't share login.
151
+ 4. Don't depend on network for unit/component layer — mock at the boundary.
152
+ 5. If a test is flaky once, fix or quarantine it the same day. Don't `retries: 5`.
153
+
154
+ ## 6. Critical journeys to cover (always)
155
+
156
+ Even MVPs should ship E2E for:
157
+
158
+ - First-run onboarding through to the home tab.
159
+ - Sign-up + sign-in + sign-out.
160
+ - Primary "value moment" action (the one PRD success criterion exists for).
161
+ - Push notification deep link.
162
+ - Network-failure UX (offline mode, retry).
163
+
164
+ Everything else is nice-to-have until the team has signal that the critical flows are stable.
165
+
166
+ ## 7. Device matrix
167
+
168
+ See `device-matrix.md`. Maestro Cloud and BrowserStack expose matrices Hawkeye can declare in YAML and run weekly.
169
+
170
+ ## 8. Don'ts
171
+
172
+ - E2E tests in the same job as unit tests (slow, blocks faster signal).
173
+ - Selectors by visible text in a multilingual app.
174
+ - Running E2E only at release; broken paths get found at the worst time.
175
+ - "Manual smoke" replacing automated smoke. Maestro flows take a day to write and save weeks per year.
176
+
177
+ ## 9. Hand-off
178
+
179
+ Tony picks RN / native / Flutter; that decides the Detox feasibility. Hawkeye writes the Maestro flow files alongside the story `tea-design.md`. Shuri owns the `testID`s and accessibility identifiers and treats them as a public API of the app — renaming one is a contract change.
@@ -0,0 +1,121 @@
1
+ ---
2
+ playbook: device-matrix
3
+ owner: wize-agent-test-architect # Hawkeye
4
+ applies_when: app-overlay active
5
+ status: ready
6
+ ---
7
+
8
+ # Device Matrix — Hawkeye Playbook
9
+
10
+ You can't test on every device. You can test on the right ones. Decide the matrix once per release; rotate quarterly.
11
+
12
+ ## 1. The three buckets
13
+
14
+ Every release ships on three device classes:
15
+
16
+ | Bucket | Why |
17
+ |---|---|
18
+ | **Floor** (oldest supported / lowest-spec) | Performance & memory pressure catches regressions invisible on flagship. |
19
+ | **Volume** (most-used by your audience) | Where users actually live. Drive default UX decisions here. |
20
+ | **Ceiling** (latest flagship + newest OS) | New-feature opportunity (Live Activities, Predictive Back, etc.) + verify no flagship-only assumption breaks. |
21
+
22
+ ## 2. iOS matrix (2026, generic SaaS audience)
23
+
24
+ | Bucket | Device | iOS | Notes |
25
+ |---|---|---|---|
26
+ | Floor | iPhone SE (2nd gen, A13) | iOS 17 | 4.7" non-Retina XDR, no Dynamic Island. |
27
+ | Floor | iPhone 11 | iOS 17 | Wide audience tail. |
28
+ | Volume | iPhone 14 | iOS 18 | Mid-range volume sweet spot. |
29
+ | Volume | iPhone 15 | iOS 18 | Dynamic Island, USB-C. |
30
+ | Ceiling | iPhone 17 Pro | iOS 26 (current dev) | ProMotion, latest APIs. |
31
+ | iPad floor | iPad (10th gen) | iPadOS 17 | Non-ProMotion. |
32
+ | iPad ceiling | iPad Pro M4 | iPadOS 18 | Stage Manager, hover, Pencil hover. |
33
+
34
+ **Min OS:** iOS 17 (cuts ~5% of installed base; recovers a lot of API surface). Adjust per audience.
35
+
36
+ ## 3. Android matrix (2026, generic SaaS audience)
37
+
38
+ | Bucket | Device | OS | Notes |
39
+ |---|---|---|---|
40
+ | Floor | Pixel 6a or Samsung A14 | Android 13 | 4 GB RAM, Snapdragon 6-series. |
41
+ | Volume | Samsung Galaxy A55 | Android 14 | Mid-range. Big volume in emerging markets. |
42
+ | Volume | Pixel 8 | Android 14 / 15 | Reference device for API behavior. |
43
+ | Ceiling | Pixel 9 Pro / Galaxy S25 Ultra | Android 15 | Foldable / large-screen, edge gestures. |
44
+ | Foldable | Samsung Galaxy Z Fold 6 | Android 14 / 15 | Adaptive layout signal. |
45
+ | Tablet | Pixel Tablet | Android 14 | Window-size-class testing. |
46
+
47
+ **Min OS:** Android 13 (API 33) — covers ~85% of active devices. Verify via Play Console statistics for your audience.
48
+
49
+ ## 4. Hybrid / web-in-app matrix
50
+
51
+ If the app uses webviews (Capacitor, Ionic, embedded web docs):
52
+
53
+ - iOS: WKWebView (always system Safari engine).
54
+ - Android: System WebView (Chromium-based, updated separately). Test on **last 3 Chromium versions**.
55
+
56
+ ## 5. Choosing the volume tier
57
+
58
+ Don't guess. Pull from:
59
+
60
+ - **App Store Connect → Analytics → Sources → Devices** (after release).
61
+ - **Google Play Console → Statistics → Devices**.
62
+ - For pre-release: pick the top 3 devices in your target market via StatCounter / DeviceAtlas / Crashlytics-baseline market data.
63
+
64
+ Rotate volume devices every two quarters as field data shifts.
65
+
66
+ ## 6. How to run the matrix in CI
67
+
68
+ ### Cloud farms
69
+
70
+ | Provider | iOS | Android | Notes |
71
+ |---|---|---|---|
72
+ | BrowserStack App Live / Automate | ✓ | ✓ | Largest catalog; integrates Detox + Maestro. |
73
+ | Sauce Labs Mobile | ✓ | ✓ | Strong on Appium; price ladder. |
74
+ | Maestro Cloud | ✓ | ✓ | YAML-native; visual diff included. |
75
+ | Firebase Test Lab | (limited) | ✓ | Android-first; cheap, large. |
76
+ | AWS Device Farm | ✓ | ✓ | Real devices; AWS billing. |
77
+ | LambdaTest | ✓ | ✓ | Mid-tier price. |
78
+
79
+ ### Local
80
+
81
+ - iOS: Xcode simulators for development; **at least one real device per bucket** before release.
82
+ - Android: emulators (`avdmanager` + `system-images;android-34;google_apis;x86_64`); real device per bucket.
83
+
84
+ ### What runs where
85
+
86
+ - **Every PR:** smoke flow (Maestro) on emulator iOS + Android (volume bucket).
87
+ - **Every merge to main:** full smoke matrix (floor + volume + ceiling).
88
+ - **Nightly:** full E2E suite (Detox + Maestro) on real devices via cloud farm.
89
+ - **Weekly:** perf benchmark suite (cold start, memory, FPS) on the floor + volume buckets.
90
+
91
+ ## 7. Accessibility runs
92
+
93
+ Add to the device matrix:
94
+
95
+ - iOS: VoiceOver + Dynamic Type at largest accessibility size.
96
+ - Android: TalkBack + 130% font scale.
97
+ - Color contrast checks at the OS level (Smart Invert / Dark Mode forced).
98
+ - Switch Control (iOS) / Switch Access (Android) on the most-used flow.
99
+
100
+ ## 8. Network conditions
101
+
102
+ Hawkeye samples network at:
103
+
104
+ | Condition | Tool |
105
+ |---|---|
106
+ | Offline | Airplane mode flag in CI. |
107
+ | 3G slow | Charles / Proxyman / Maestro `setProxy` + bandwidth throttle. |
108
+ | Lossy WiFi | `tc qdisc` on Linux runner; Network Link Conditioner on Mac. |
109
+ | Captive portal | Manual on weekly cycle. |
110
+
111
+ A surprising % of production crashes come from network edge cases. Cover at least offline + slow.
112
+
113
+ ## 9. Locale
114
+
115
+ - Always test **English + the two largest non-English locales** for the audience.
116
+ - RTL (Arabic or Hebrew) at least once per release if the app ships in those markets.
117
+ - Date / number / currency formatting in the relevant locales.
118
+
119
+ ## 10. Hand-off
120
+
121
+ The device matrix lives at `.wize/planning/app/device-matrix.md` once Mantis + Tony agree on the audience. Hawkeye references it in every `tea-design.md`; CI configs (Maestro / Detox / BrowserStack) read the same matrix to avoid drift.