squad-skills 0.1.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.
- package/LICENSE +21 -0
- package/README.md +184 -0
- package/bin/cli.mjs +13 -0
- package/dist/cli/cli.d.mts +1 -0
- package/dist/cli/cli.mjs +450 -0
- package/package.json +70 -0
- package/skills/squad-backend/SKILL.md +128 -0
- package/skills/squad-backend/references/backend-api-data-and-messaging.md +67 -0
- package/skills/squad-backend/references/backend-performance-reliability-and-observability.md +49 -0
- package/skills/squad-backend/references/backend-security-auth-and-privacy.md +62 -0
- package/skills/squad-backend/references/backend-stack-and-runtime-matrix.md +68 -0
- package/skills/squad-backend/references/backend-system-design-and-distributed-systems.md +61 -0
- package/skills/squad-backend/references/backend-testing-debugging-and-mindset.md +48 -0
- package/skills/squad-backend/references/backend-worked-decisions.md +63 -0
- package/skills/squad-backend/references/official-sources.md +56 -0
- package/skills/squad-backend/references/quality-bar-and-preflight.md +54 -0
- package/skills/squad-backend/references/runtime-capability-fallbacks.md +46 -0
- package/skills/squad-code-review/SKILL.md +112 -0
- package/skills/squad-code-review/references/code-review-worked-decisions.md +58 -0
- package/skills/squad-code-review/references/cross-stack-review-dimensions.md +55 -0
- package/skills/squad-code-review/references/language-runtime-review-signatures.md +37 -0
- package/skills/squad-code-review/references/official-sources.md +24 -0
- package/skills/squad-code-review/references/quality-bar-and-preflight.md +48 -0
- package/skills/squad-code-review/references/review-methodology-debugging-and-mindset.md +53 -0
- package/skills/squad-code-review/references/review-runtime-and-verdict.md +69 -0
- package/skills/squad-code-review/references/security-architecture-data-and-operations-review.md +47 -0
- package/skills/squad-designer/SKILL.md +134 -0
- package/skills/squad-designer/references/anti-slop-quality-review.md +106 -0
- package/skills/squad-designer/references/codebase-first-examples.md +121 -0
- package/skills/squad-designer/references/design-system-ux-accessibility-and-handoff.md +109 -0
- package/skills/squad-designer/references/official-sources.md +85 -0
- package/skills/squad-designer/references/platform-adaptive-layout-and-input.md +40 -0
- package/skills/squad-designer/references/platform-native-apple-android.md +54 -0
- package/skills/squad-designer/references/platform-native-cross-platform.md +59 -0
- package/skills/squad-designer/references/platform-web-foundations-and-motion.md +104 -0
- package/skills/squad-designer/references/task-specific-ui-ux-research.md +91 -0
- package/skills/squad-devops/SKILL.md +131 -0
- package/skills/squad-devops/references/devops-testing-debugging-and-mindset.md +51 -0
- package/skills/squad-devops/references/devops-worked-decisions.md +70 -0
- package/skills/squad-devops/references/official-sources.md +58 -0
- package/skills/squad-devops/references/platform-iac-and-delivery-matrix.md +71 -0
- package/skills/squad-devops/references/quality-bar-and-preflight.md +52 -0
- package/skills/squad-devops/references/runtime-and-safe-delivery-fallbacks.md +49 -0
- package/skills/squad-devops/references/security-networking-secrets-and-supply-chain.md +54 -0
- package/skills/squad-devops/references/self-hosted-vps-and-reverse-proxy.md +124 -0
- package/skills/squad-devops/references/sre-observability-resilience-and-cost.md +52 -0
- package/skills/squad-fix/SKILL.md +143 -0
- package/skills/squad-fix/references/bug-routing-and-ownership.md +57 -0
- package/skills/squad-fix/references/diagnosis-root-cause-and-fix-loop.md +69 -0
- package/skills/squad-fix/references/official-sources.md +57 -0
- package/skills/squad-fix/references/quality-bar-and-preflight.md +47 -0
- package/skills/squad-fix/references/runtime-capability-fallbacks.md +65 -0
- package/skills/squad-fix/references/verification-qa-review-and-reporting.md +61 -0
- package/skills/squad-fix/references/worked-bugfix-examples.md +65 -0
- package/skills/squad-frontend/SKILL.md +134 -0
- package/skills/squad-frontend/references/designer-gate-and-design-intake.md +71 -0
- package/skills/squad-frontend/references/frontend-architecture-state-data-and-forms.md +68 -0
- package/skills/squad-frontend/references/frontend-security-accessibility-and-performance.md +55 -0
- package/skills/squad-frontend/references/frontend-stack-and-motion-selection.md +99 -0
- package/skills/squad-frontend/references/frontend-testing-debugging-and-mindset.md +51 -0
- package/skills/squad-frontend/references/frontend-worked-decisions.md +71 -0
- package/skills/squad-frontend/references/official-sources.md +52 -0
- package/skills/squad-frontend/references/quality-bar-and-preflight.md +49 -0
- package/skills/squad-frontend/references/runtime-capability-fallbacks.md +49 -0
- package/skills/squad-mobile/SKILL.md +120 -0
- package/skills/squad-mobile/references/design-platform-and-lifecycle-gates.md +50 -0
- package/skills/squad-mobile/references/mobile-debugging-and-mindset.md +40 -0
- package/skills/squad-mobile/references/mobile-security-performance-testing-and-release.md +61 -0
- package/skills/squad-mobile/references/mobile-stack-architecture-and-data.md +65 -0
- package/skills/squad-mobile/references/mobile-worked-decisions.md +53 -0
- package/skills/squad-mobile/references/official-sources.md +45 -0
- package/skills/squad-mobile/references/quality-bar-and-preflight.md +50 -0
- package/skills/squad-mobile/references/runtime-capability-fallbacks.md +42 -0
- package/skills/squad-product/SKILL.md +132 -0
- package/skills/squad-product/references/framing-and-acceptance-criteria.md +60 -0
- package/skills/squad-product/references/official-sources.md +42 -0
- package/skills/squad-product/references/plan-document-contract.md +53 -0
- package/skills/squad-product/references/product-worked-decisions.md +66 -0
- package/skills/squad-product/references/quality-bar-and-preflight.md +54 -0
- package/skills/squad-product/references/requirements-and-unknowns.md +68 -0
- package/skills/squad-product/references/scope-phasing-and-sequencing.md +55 -0
- package/skills/squad-qa/SKILL.md +112 -0
- package/skills/squad-qa/references/official-sources.md +42 -0
- package/skills/squad-qa/references/qa-debugging-and-mindset.md +45 -0
- package/skills/squad-qa/references/qa-worked-decisions.md +63 -0
- package/skills/squad-qa/references/quality-bar-and-preflight.md +48 -0
- package/skills/squad-qa/references/security-accessibility-performance-and-release.md +49 -0
- package/skills/squad-qa/references/test-architecture-data-flakiness-and-ci.md +66 -0
- package/skills/squad-qa/references/test-strategy-runtime-and-verdict.md +81 -0
- package/skills/squad-qa/references/testing-domains-and-tooling-matrix.md +57 -0
- package/skills/squads-team/SKILL.md +121 -0
- package/skills/squads-team/references/coordination-contract.md +115 -0
- package/skills/squads-team/references/coordination-worked-decisions.md +60 -0
- package/skills/squads-team/references/delivery-pipeline-and-roster.md +119 -0
- package/skills/squads-team/references/domain-coverage-contracts.md +82 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Frontend security, accessibility, and performance
|
|
2
|
+
|
|
3
|
+
Use for every user-facing change; increase depth for auth, rich text, uploads, third-party scripts,
|
|
4
|
+
payments, multi-tenant data, complex widgets and performance-sensitive routes.
|
|
5
|
+
|
|
6
|
+
## Browser security and privacy
|
|
7
|
+
|
|
8
|
+
- Prevent XSS by preserving framework escaping, sanitizing allowed rich HTML with a maintained policy, and
|
|
9
|
+
avoiding unsafe DOM sinks/dynamic script execution.
|
|
10
|
+
- Treat URL, storage, postMessage, clipboard, deep-link and server payloads as untrusted.
|
|
11
|
+
- Use CSRF protection appropriate to cookie/session design; SameSite alone may not cover every topology.
|
|
12
|
+
- Never put secrets or privileged credentials in client code, public env variables, source maps or logs.
|
|
13
|
+
- Validate postMessage origin/source; constrain iframes; review CSP, Trusted Types and third-party scripts
|
|
14
|
+
according to threat model.
|
|
15
|
+
- Avoid storing long-lived tokens in script-readable storage when safer session architecture exists.
|
|
16
|
+
- Prevent tenant/object data leakage in cache keys, prefetch, SSR payloads, analytics and error reports.
|
|
17
|
+
- Dependency/registry code is source code: inspect install scripts, generated components and bundle impact.
|
|
18
|
+
|
|
19
|
+
## Accessibility
|
|
20
|
+
|
|
21
|
+
Use semantic HTML and native controls before ARIA. Follow WCAG 2.2 and WAI-ARIA Authoring Practices for
|
|
22
|
+
custom widgets. Verify keyboard order, visible focus, names/roles/states, announcements, error association,
|
|
23
|
+
touch targets, contrast, zoom/reflow, text scaling, reduced motion and forced/high contrast where relevant.
|
|
24
|
+
|
|
25
|
+
Manage focus after dialogs, route transitions, deletion, validation and asynchronous content. Avoid
|
|
26
|
+
positive tabindex and hover-only behavior. Test with accessibility tree plus at least one realistic
|
|
27
|
+
keyboard/screen-reader path for critical flows; automated checks are incomplete.
|
|
28
|
+
|
|
29
|
+
## Internationalization and content
|
|
30
|
+
|
|
31
|
+
Support long/short translations, pluralization, locale formatting, RTL, Unicode and timezone/calendar
|
|
32
|
+
semantics. Do not concatenate translatable fragments. Layout must survive realistic content, zoom and
|
|
33
|
+
dynamic font sizes.
|
|
34
|
+
|
|
35
|
+
## Performance model
|
|
36
|
+
|
|
37
|
+
Measure route/user journey using field data when available and lab profiles otherwise. Optimize the actual
|
|
38
|
+
bottleneck:
|
|
39
|
+
|
|
40
|
+
- rendering: avoid unnecessary reactive work, unstable identity and expensive synchronous computation;
|
|
41
|
+
- network: reduce request waterfalls, payloads, duplicate fetches and third-party cost;
|
|
42
|
+
- bundle: route/component split heavy optional code; inspect source maps/analyzer; avoid duplicate libs;
|
|
43
|
+
- images/fonts: correct dimensions/formats, responsive sources, preload only critical assets and control
|
|
44
|
+
font shifts;
|
|
45
|
+
- hydration/server rendering: minimize client boundary and serialized data; avoid hydration mismatch;
|
|
46
|
+
- lists/charts/editors: virtualize or progressively render only when measured and accessible;
|
|
47
|
+
- memory: clean subscriptions, observers, timers, object URLs, workers and animation contexts.
|
|
48
|
+
|
|
49
|
+
Protect Core Web Vitals/interaction latency and layout stability, but use project budgets/SLOs rather than
|
|
50
|
+
universal magic thresholds. Animation must not block input or create persistent compositing/memory cost.
|
|
51
|
+
|
|
52
|
+
## Evidence
|
|
53
|
+
|
|
54
|
+
Report browser/device/network, build mode, route, measurement tool, baseline/change and limitations.
|
|
55
|
+
Separate static bundle reasoning, local lab, automated browser, installed app and deployed field evidence.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Frontend stack and motion selection
|
|
2
|
+
|
|
3
|
+
Read this reference when classifying an existing versus greenfield project, proposing a UI dependency,
|
|
4
|
+
porting a design across frameworks, or implementing non-trivial animation.
|
|
5
|
+
|
|
6
|
+
## 1. Existing codebase
|
|
7
|
+
|
|
8
|
+
Preserve the repository's framework, components, tokens, CSS strategy, motion utilities, API/state
|
|
9
|
+
patterns, accessibility semantics, and interaction language. Reuse or extend local primitives. Do not add
|
|
10
|
+
the preferred greenfield stack merely to standardize the project.
|
|
11
|
+
|
|
12
|
+
A new UI or motion dependency requires a concrete gap, compatibility/performance assessment, and user
|
|
13
|
+
approval.
|
|
14
|
+
|
|
15
|
+
## 2. Greenfield React/Next.js
|
|
16
|
+
|
|
17
|
+
- Establish semantic tokens and reusable variants before feature composition.
|
|
18
|
+
- Prefer shadcn/ui for open-code components.
|
|
19
|
+
- Use selected beUI source/patterns when their interaction directly supports the design.
|
|
20
|
+
- Use Motion for React for component-state, enter/exit, layout, gesture, and ordinary scroll-linked motion.
|
|
21
|
+
- Use GSAP only for complex timelines, precise multi-target choreography, ScrollTrigger, or specialized
|
|
22
|
+
SVG/canvas animation.
|
|
23
|
+
|
|
24
|
+
## 3. Greenfield Vue/Nuxt
|
|
25
|
+
|
|
26
|
+
- Establish the same semantic token and variant foundation.
|
|
27
|
+
- Prefer Reka UI for accessible headless primitives.
|
|
28
|
+
- Use the selected CSS/Tailwind token layer for styling.
|
|
29
|
+
- Use shadcn-vue when a shadcn-like styled open-code layer powered by Reka UI is desired.
|
|
30
|
+
- Use Motion for Vue (`motion-v`) for component-state, enter/exit, layout, gesture, and ordinary
|
|
31
|
+
scroll-linked motion.
|
|
32
|
+
- Use GSAP only for complex timelines, ScrollTrigger, precise choreography, or specialized SVG/canvas.
|
|
33
|
+
|
|
34
|
+
## 4. Other established web stacks
|
|
35
|
+
|
|
36
|
+
Preserve these when present; do not rewrite them into React/Vue:
|
|
37
|
+
|
|
38
|
+
- **Svelte/SvelteKit:** use runes/store conventions matching the project, load/actions/hooks, SSR/client
|
|
39
|
+
boundaries, progressive enhancement and Svelte transitions where appropriate.
|
|
40
|
+
- **Angular:** preserve standalone/module choice, signals/RxJS boundaries, dependency injection, router,
|
|
41
|
+
forms and Angular CDK/Material or local design system.
|
|
42
|
+
- **TanStack Start/Router/Query:** respect type-safe routes, loaders/server functions, cache ownership,
|
|
43
|
+
SSR/dehydration and framework adapter differences.
|
|
44
|
+
- **Solid/SolidStart:** preserve fine-grained reactivity, resources, control-flow primitives and server/client
|
|
45
|
+
boundaries; do not apply React memoization rules mechanically.
|
|
46
|
+
- **Astro:** keep islands and client directives minimal; prefer server/static HTML and framework components
|
|
47
|
+
only where interactivity requires them.
|
|
48
|
+
- **Qwik, Lit/Web Components, Preact, Ember or other stacks:** follow repository conventions and official
|
|
49
|
+
versioned docs; apply the same state, security, accessibility, performance and test contracts.
|
|
50
|
+
|
|
51
|
+
Framework choice follows rendering/deployment/product needs and team capability—not trend ranking.
|
|
52
|
+
|
|
53
|
+
## 5. Rendering model
|
|
54
|
+
|
|
55
|
+
Identify CSR, SPA, SSR, SSG, ISR, streaming, resumability/islands, React Server Components or hybrid
|
|
56
|
+
behavior before choosing data boundaries. Keep secrets/server-only modules outside client graphs. Define
|
|
57
|
+
cache/freshness, hydration, auth, SEO/metadata and failure behavior for each route.
|
|
58
|
+
|
|
59
|
+
Do not force SSR for authenticated app surfaces without measurable value; do not force SPA-only rendering
|
|
60
|
+
when crawlability, first response, sharing metadata or edge delivery require server/static output.
|
|
61
|
+
|
|
62
|
+
## 6. Animation implementation
|
|
63
|
+
|
|
64
|
+
Choose the lightest suitable tool:
|
|
65
|
+
|
|
66
|
+
- **CSS:** local hover, color, opacity, and small transform transitions.
|
|
67
|
+
- **Motion:** declarative component-state, layout, gesture, enter/exit, and ordinary scroll behavior.
|
|
68
|
+
- **GSAP:** timeline, pin/scrub/snap, multi-target choreography, or advanced SVG/canvas requirements.
|
|
69
|
+
|
|
70
|
+
Do not let Motion and GSAP control the same elements. Scope selectors to the component. Create animation
|
|
71
|
+
inside the framework lifecycle; revert/kill timelines, contexts, listeners, and ScrollTriggers on teardown.
|
|
72
|
+
Honor responsive variants and reduced motion. Verify that animation does not block input, cause layout
|
|
73
|
+
shift, retain detached DOM, or violate the performance budget.
|
|
74
|
+
|
|
75
|
+
Use CSS instead of adding Motion or GSAP for an effect CSS already handles cleanly.
|
|
76
|
+
|
|
77
|
+
### Cross-role ownership
|
|
78
|
+
|
|
79
|
+
Motion ownership follows authorship: whoever writes the animation code owns its lifecycle scoping,
|
|
80
|
+
teardown, and reduced-motion fallback. Motion arriving inside designer-authored presentational components
|
|
81
|
+
is already scoped and cleaned up there — verify it, do not re-own it. Frontend owns the motion it writes
|
|
82
|
+
while wiring behavior, such as route transitions and data-driven animation, plus dependency approval and
|
|
83
|
+
bundle/performance verification of the whole app.
|
|
84
|
+
|
|
85
|
+
The shared greenfield baseline is intentionally repeated for standalone operation; keep it aligned with
|
|
86
|
+
Designer's `platform-web-foundations-and-motion.md`, and resolve conflicts through accepted design first,
|
|
87
|
+
then the repository's existing system.
|
|
88
|
+
|
|
89
|
+
## 7. Cross-framework port
|
|
90
|
+
|
|
91
|
+
Port the UX contract, component state, keyboard/focus behavior, layout continuity, timing, reduced motion,
|
|
92
|
+
and tokens through the target framework's native composition model. Never paste React components into Vue
|
|
93
|
+
or Vue components into React.
|
|
94
|
+
|
|
95
|
+
## 8. Selection output
|
|
96
|
+
|
|
97
|
+
Record the framework and rendering model chosen or preserved, each UI or motion dependency added with
|
|
98
|
+
the gap it closes, the alternatives rejected, and the constraint that decided each. A decision another
|
|
99
|
+
role implements records what would reopen it, not only what was chosen.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Frontend testing, debugging, and mindset
|
|
2
|
+
|
|
3
|
+
Use for validation strategy, UI failures, rendering/hydration bugs, performance diagnosis and maintainable
|
|
4
|
+
frontend decisions.
|
|
5
|
+
|
|
6
|
+
## Testing by boundary
|
|
7
|
+
|
|
8
|
+
- pure unit/property tests for domain utilities, formatters and state transitions;
|
|
9
|
+
- component tests for semantics, interaction, keyboard, forms and state rendering;
|
|
10
|
+
- integration tests for router/query/store/API adapter boundaries with realistic fixtures;
|
|
11
|
+
- contract tests against published Backend schemas/error shapes;
|
|
12
|
+
- browser E2E for critical user journeys, auth/permissions and cross-route behavior;
|
|
13
|
+
- accessibility, visual regression and performance checks where regression risk exists;
|
|
14
|
+
- cross-browser/device matrix derived from supported audience, not every engine mechanically.
|
|
15
|
+
|
|
16
|
+
Prefer user-visible queries and deterministic events over implementation selectors/sleeps. Mock at network
|
|
17
|
+
or external boundaries; do not mock the component behavior under test. Test error, stale, offline,
|
|
18
|
+
permission and race paths, not only happy loading/success.
|
|
19
|
+
|
|
20
|
+
## Debugging method
|
|
21
|
+
|
|
22
|
+
1. Reproduce in the real route, build mode, viewport, browser and account/permission path.
|
|
23
|
+
2. Capture console, network timing/payload shape, DOM/accessibility tree, state/query devtools and traces.
|
|
24
|
+
3. Determine whether source is render, state ownership, stale async result, router, CSS/layout, hydration,
|
|
25
|
+
browser API, service worker/cache, animation lifecycle or Backend contract.
|
|
26
|
+
4. Reduce to the earliest incorrect state/DOM/network event; form and test a falsifiable hypothesis.
|
|
27
|
+
5. Fix cause, add regression evidence and recheck neighboring states/responsive/a11y/performance.
|
|
28
|
+
|
|
29
|
+
Hydration debugging compares server markup/data/environment with first client render; do not hide mismatch
|
|
30
|
+
with client-only rendering unless the feature truly requires it. Memory issues require listener/timer/
|
|
31
|
+
observer/subscription/object URL/GSAP/Motion cleanup inspection.
|
|
32
|
+
|
|
33
|
+
## Code quality
|
|
34
|
+
|
|
35
|
+
Prefer repository-native patterns, clear ownership and small composable components. Extract hooks/
|
|
36
|
+
composables/services for cohesive behavior, not to satisfy arbitrary line counts. Keep effect dependencies
|
|
37
|
+
honest, avoid derived-state duplication and premature memoization, and preserve framework-specific
|
|
38
|
+
reactivity rules.
|
|
39
|
+
|
|
40
|
+
## Frontend mindset
|
|
41
|
+
|
|
42
|
+
- Model user intent and recovery, not screenshots alone.
|
|
43
|
+
- Treat loading/error/permission/offline and long content as product states.
|
|
44
|
+
- Keep URL, server cache and client state ownership explicit.
|
|
45
|
+
- Respect web platform semantics before replacing them with JavaScript.
|
|
46
|
+
- Progressive enhancement and resilience matter where product context supports them.
|
|
47
|
+
- Measure performance and accessibility; do not infer them from clean code.
|
|
48
|
+
- Visual quality, logic, security and operability form one feature—not separate polish phases.
|
|
49
|
+
|
|
50
|
+
Completion requires fresh type/lint/build/test plus browser evidence proportional to risk and a precise
|
|
51
|
+
statement of what was not tested.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Frontend worked decisions
|
|
2
|
+
|
|
3
|
+
Read when a motion, cascade, accessibility or scope decision is ambiguous. Adapt the reasoning to the
|
|
4
|
+
repository in front of you; these are not templates.
|
|
5
|
+
|
|
6
|
+
Each example carries its provenance. **Observed** happened in a run this catalog's maintainers recorded;
|
|
7
|
+
**constructed** is derived from documentation and was not measured. Weigh them accordingly.
|
|
8
|
+
|
|
9
|
+
## 1. Smooth scroll and scroll-driven animation drift apart
|
|
10
|
+
|
|
11
|
+
**Context:** A page ships a smooth-scroll library and a scroll-driven timeline. Nothing errors, the page
|
|
12
|
+
scrolls, and pinned sections desync from the eased curve under load.
|
|
13
|
+
|
|
14
|
+
**Decision:** Give both one clock. Forward the smooth-scroll position into the timeline library's update
|
|
15
|
+
and drive the library from the timeline's ticker, never from a private `requestAnimationFrame` loop. Check
|
|
16
|
+
this integration first when reviewing a scroll-driven page.
|
|
17
|
+
|
|
18
|
+
**Observed:** the catalog's recorded design runs — the most consequential defect across eight builds of
|
|
19
|
+
one brief, and the one finding a blind judge caught in both reading orders.
|
|
20
|
+
|
|
21
|
+
## 2. A reduced-motion path is a layout, not a property
|
|
22
|
+
|
|
23
|
+
**Context:** A horizontal track is revealed by a transform inside a tall pinned section. The obvious
|
|
24
|
+
fallback sets `transform: none` under `prefers-reduced-motion`.
|
|
25
|
+
|
|
26
|
+
**Decision:** Design the still layout. Re-lay-out those sections as ordinary static scrollers, subscribe to
|
|
27
|
+
mid-session preference changes, and load the page with the preference on to confirm every panel is
|
|
28
|
+
reachable. Removing motion is not the requirement; reaching the content is.
|
|
29
|
+
|
|
30
|
+
**Observed:** the recorded reduced-motion check asks whether motion was removed and passes on that question
|
|
31
|
+
alone; nothing asks the follow-up. **Constructed:** no run measured a build failing this way — a track laid
|
|
32
|
+
out as `width: max-content` with no `overflow-x` is unreachable under the preference by construction.
|
|
33
|
+
|
|
34
|
+
## 3. The CSS that wins is not the CSS in the markup
|
|
35
|
+
|
|
36
|
+
**Context:** A utility class sits in the markup and does nothing; separately, scroll-driven animation stops
|
|
37
|
+
firing after a layout fix.
|
|
38
|
+
|
|
39
|
+
**Decision:** Put component rules in a cascade layer: an unlayered rule outranks every layered utility. Use
|
|
40
|
+
`overflow-x: clip` rather than `hidden`, which forces the other axis to `auto` and makes `body` its own
|
|
41
|
+
scroll container. Confirm both in the browser, not in the source.
|
|
42
|
+
|
|
43
|
+
**Observed:** the same runs, verified by reading the computed overflow and `scrollY` before and after.
|
|
44
|
+
|
|
45
|
+
## 4. A horizontally scrolling region needs a tab stop
|
|
46
|
+
|
|
47
|
+
**Decision:** An `overflow-x: auto` track with no focusable child gets `tabIndex={0}` and an accessible
|
|
48
|
+
name. Making each card focusable instead also clears the finding, and costs a tab stop per card — prefer it
|
|
49
|
+
only when the cards are interactive anyway. Treat the track as a default review item rather than something
|
|
50
|
+
a brief must request.
|
|
51
|
+
|
|
52
|
+
**Observed:** the same runs — reported by axe on the mobile viewport of three of four builds.
|
|
53
|
+
|
|
54
|
+
## 5. Render it and read the numbers
|
|
55
|
+
|
|
56
|
+
**Decision:** Contrast, hit area and layout overflow are measurements. Build, serve and check the running
|
|
57
|
+
page before handing over; a build that reads its own numbers beats one that was told the rules. The cost is
|
|
58
|
+
real — a measure-fix-remeasure loop took two thirds of one build's time — so spend it on the checks that
|
|
59
|
+
have a number, and leave taste to review.
|
|
60
|
+
|
|
61
|
+
**Observed:** the same runs, as their widest-reaching finding. Those builds also differed in sandbox
|
|
62
|
+
access, so it is evidence for verifying rather than a measured effect of any instruction.
|
|
63
|
+
|
|
64
|
+
## 6. One screen's state does not need a store
|
|
65
|
+
|
|
66
|
+
**Context:** A single screen needs cross-component state and the repository has no global store.
|
|
67
|
+
|
|
68
|
+
**Decision:** Use the framework's own composition and the existing server-state client. Introduce a store
|
|
69
|
+
when a second consumer or a cross-route requirement exists, not to avoid passing a value.
|
|
70
|
+
|
|
71
|
+
**Constructed:** the scope rule this role already applies; no recorded run behind it.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Frontend official sources
|
|
2
|
+
|
|
3
|
+
Use primary documentation for the repository's exact versions. Do not upgrade because a newer guide exists.
|
|
4
|
+
|
|
5
|
+
## Frameworks and rendering
|
|
6
|
+
|
|
7
|
+
- Web platform/MDN: https://developer.mozilla.org/docs/Web
|
|
8
|
+
- React: https://react.dev/
|
|
9
|
+
- Next.js: https://nextjs.org/docs
|
|
10
|
+
- React Router: https://reactrouter.com/
|
|
11
|
+
- Vue: https://vuejs.org/guide/
|
|
12
|
+
- Nuxt: https://nuxt.com/docs
|
|
13
|
+
- Svelte/SvelteKit: https://svelte.dev/docs
|
|
14
|
+
- Angular: https://angular.dev/
|
|
15
|
+
- TanStack: https://tanstack.com/, React Query https://tanstack.com/query/latest/docs/framework/react/overview,
|
|
16
|
+
and Vue Query https://tanstack.com/query/latest/docs/framework/vue/overview
|
|
17
|
+
- Solid: https://docs.solidjs.com/
|
|
18
|
+
- Astro: https://docs.astro.build/
|
|
19
|
+
- Qwik: https://qwik.dev/docs/
|
|
20
|
+
- Lit: https://lit.dev/docs/
|
|
21
|
+
|
|
22
|
+
## UI, forms, motion, and styling
|
|
23
|
+
|
|
24
|
+
- shadcn/ui: https://ui.shadcn.com/docs
|
|
25
|
+
- Reka UI: https://reka-ui.com/docs/overview/introduction
|
|
26
|
+
- shadcn-vue: https://www.shadcn-vue.com/docs/introduction
|
|
27
|
+
- beUI (preferred optional source; verify live source/dependencies): https://beui.dev/docs/ai-agents and
|
|
28
|
+
https://beui.dev/components/motion
|
|
29
|
+
- Motion: https://motion.dev/docs
|
|
30
|
+
- GSAP: https://gsap.com/docs/v3/
|
|
31
|
+
- Tailwind CSS: https://tailwindcss.com/docs
|
|
32
|
+
- React Hook Form: https://react-hook-form.com/get-started
|
|
33
|
+
- Zod: https://zod.dev/
|
|
34
|
+
|
|
35
|
+
## Security, accessibility, and performance
|
|
36
|
+
|
|
37
|
+
- HTML/CSS/HTTP standards: https://html.spec.whatwg.org/ , https://www.w3.org/TR/css/ , https://httpwg.org/specs/
|
|
38
|
+
- WCAG 2.2: https://www.w3.org/TR/WCAG22/
|
|
39
|
+
- WAI-ARIA APG: https://www.w3.org/WAI/ARIA/apg/
|
|
40
|
+
- OWASP Cheat Sheets: https://cheatsheetseries.owasp.org/
|
|
41
|
+
- web.dev performance: https://web.dev/performance/
|
|
42
|
+
- Core Web Vitals: https://web.dev/articles/vitals
|
|
43
|
+
|
|
44
|
+
## Testing
|
|
45
|
+
|
|
46
|
+
- Vitest: https://vitest.dev/guide/
|
|
47
|
+
- Playwright: https://playwright.dev/docs/intro
|
|
48
|
+
- Testing Library: https://testing-library.com/docs/
|
|
49
|
+
- axe-core: https://github.com/dequelabs/axe-core
|
|
50
|
+
|
|
51
|
+
When behavior is framework-adapter-specific, read that adapter's docs rather than transferring React rules
|
|
52
|
+
to Vue/Svelte/Angular or vice versa.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Quality bar and pre-flight
|
|
2
|
+
|
|
3
|
+
Read before handing a slice to QA, Code Review or the next role. Every check runs in the repository's own
|
|
4
|
+
browser, test and build tooling, so the pass holds with no other skill installed.
|
|
5
|
+
|
|
6
|
+
## What weak frontend output looks like
|
|
7
|
+
|
|
8
|
+
- A screen that renders one state. Loading, empty, error, stale, offline, permission-denied and long-content
|
|
9
|
+
paths exist in the product but not in the component.
|
|
10
|
+
- Tests bound to the implementation: internal selectors, a mocked child that is the behavior under test, a
|
|
11
|
+
fixed sleep standing in for a deterministic event.
|
|
12
|
+
- A hydration mismatch hidden behind client-only rendering instead of reconciled with the server data.
|
|
13
|
+
- Effects that never clean up — listeners, timers, observers, subscriptions, object URLs, animation
|
|
14
|
+
instances — so a second mount leaks or double-fires.
|
|
15
|
+
- Derived state duplicated into a store, dishonest effect dependencies, memoization added before any
|
|
16
|
+
measurement asked for it.
|
|
17
|
+
- Motion with no lifecycle: nothing cancels on unmount, interruption is undefined, and the reduced-motion
|
|
18
|
+
path removes the transform that was the only thing bringing content into view.
|
|
19
|
+
- Accessibility and performance asserted from clean code. A scrollable track with no tab stop and a 3.4:1
|
|
20
|
+
label both read fine in review and fail a measurement.
|
|
21
|
+
- A server defect absorbed by the client: a longer timeout, a shape-tolerant parser, a retry that hides the
|
|
22
|
+
contract break instead of routing it to Backend.
|
|
23
|
+
|
|
24
|
+
## Pre-flight
|
|
25
|
+
|
|
26
|
+
Pass every applicable check honestly.
|
|
27
|
+
|
|
28
|
+
### Behavior and data
|
|
29
|
+
|
|
30
|
+
- Every state the API, permissions and navigation can produce is reachable and rendered.
|
|
31
|
+
- Fetch, mutate, cache, cancel and retry behavior follows the published contract, not one observed response.
|
|
32
|
+
- URL, server cache and client state each have one owner, and the flow agrees with the logic it renders.
|
|
33
|
+
|
|
34
|
+
### Platform and accessibility
|
|
35
|
+
|
|
36
|
+
- Semantic HTML first; keyboard path, focus order and visible focus work across the changed surface.
|
|
37
|
+
- Contrast, labels, announcements and hit areas are measured on the built page, not inferred from tokens.
|
|
38
|
+
- Responsive layout and reduced motion are both exercised, and all content stays reachable under each.
|
|
39
|
+
|
|
40
|
+
### Code and tests
|
|
41
|
+
|
|
42
|
+
- Repository patterns preserved; components composed from existing primitives rather than duplicated.
|
|
43
|
+
- Tests query what a user sees, await real events, and cover at least one failure path.
|
|
44
|
+
|
|
45
|
+
## Proof to hand over
|
|
46
|
+
|
|
47
|
+
Name the checks that ran — type, lint, build, tests, browser, accessibility, performance — the route,
|
|
48
|
+
viewport and build mode they ran in, and what was not tested. A check that could not run is reported as
|
|
49
|
+
not run, never as a pass.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Runtime capability pairing and fallbacks
|
|
2
|
+
|
|
3
|
+
Read this reference before selecting tools for a phase, and whenever specialist skills, named squad
|
|
4
|
+
gates, Figma MCP, browser inspection, or test infrastructure is in question.
|
|
5
|
+
|
|
6
|
+
## Specialist skill pairing
|
|
7
|
+
|
|
8
|
+
Detect specialist skills once per task by inspecting the live skill catalog for the capabilities
|
|
9
|
+
below.
|
|
10
|
+
|
|
11
|
+
- **Installed** — read this skill's task-relevant references first, then pair the phase-matched
|
|
12
|
+
specialist skill with this role's contract so it accelerates the phase. This role's boundary, gates,
|
|
13
|
+
and evidence rules stay authoritative wherever the two disagree.
|
|
14
|
+
- **Absent** — run the native fallback for the same phase at the same standard.
|
|
15
|
+
|
|
16
|
+
Never auto-install a specialist skill, and never report a skill as run when it does not exist.
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
|
|
20
|
+
- Inspect live capabilities before invoking anything.
|
|
21
|
+
- Never invoke a missing command, claim an unavailable gate ran, or weaken verification silently.
|
|
22
|
+
- Never auto-install a skill, MCP server, plugin, or package.
|
|
23
|
+
- Follow project instructions when present. Otherwise infer commands and conventions from README,
|
|
24
|
+
manifests, framework config, nearby code, and tests.
|
|
25
|
+
- Report only gaps that limit evidence or the requested outcome.
|
|
26
|
+
|
|
27
|
+
## Capability mapping
|
|
28
|
+
|
|
29
|
+
| Phase | Pair when installed | Native fallback |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| Frame/plan | Brainstorm/plan skills | State acceptance criteria and make a proportional plan |
|
|
32
|
+
| Scout | Repository search skill | Search routing, components, API clients, configs, and tests directly |
|
|
33
|
+
| Figma | Figma specialist skills | Use available Figma MCP or user-provided structured exports |
|
|
34
|
+
| Design | `squad-designer`; `ui-ux-pro-max` as reference data only | Run the bounded inline Designer contract |
|
|
35
|
+
| Build/style | Frontend specialist skills | Implement with repository framework, components, and CSS system |
|
|
36
|
+
| API/state | Frontend data/state skill | Follow repository fetch, cache, form, validation, and state patterns |
|
|
37
|
+
| Docs/contract | Docs specialist, `squad-backend` | Inspect contract and current official docs; report Backend mismatch |
|
|
38
|
+
| Debug | Debug/fix skill | Reproduce from logs/browser/tests, isolate cause, and fix directly |
|
|
39
|
+
| Verify | Test/web/a11y skills | Run repository tests, lint, type, build, browser, and manual a11y checks |
|
|
40
|
+
| Review | `squad-qa`, `squad-code-review` | Run equivalent QA and diff-review checklists directly |
|
|
41
|
+
| Commit | Git skill | Use native Git only when the user requests a commit |
|
|
42
|
+
|
|
43
|
+
## Evidence gaps
|
|
44
|
+
|
|
45
|
+
If no tool can access required Figma, an API contract, browser state, or test environment, state the exact
|
|
46
|
+
limit and request the smallest accessible artifact. Do not invent verification.
|
|
47
|
+
|
|
48
|
+
When named QA/Review gates are unavailable, report the native checks that actually ran and any unverified
|
|
49
|
+
area. Their absence does not remove the quality requirement.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: squad-mobile
|
|
3
|
+
description: "Operate as the squad's Mobile Engineer — build React Native/Expo, Flutter, SwiftUI, or Kotlin/Compose UI; integrate Backend APIs; implement app logic, offline/sync, navigation, secure storage, and platform-native UX. Preserve the existing app stack, pair with installed specialist skills, and fall back to native capabilities when they are absent."
|
|
4
|
+
user-invocable: true
|
|
5
|
+
when_to_use: "Invoke to build a mobile screen or flow with client logic and API integration, or to run the Mobile role solo. Material UI/UX work requires a Designer contract first."
|
|
6
|
+
category: mobile
|
|
7
|
+
keywords: [mobile, react-native, expo, flutter, swiftui, compose, api-integration, offline, sync, ux-flow]
|
|
8
|
+
argument-hint: "[mobile feature or screen]"
|
|
9
|
+
metadata:
|
|
10
|
+
author: Harry Nguyen
|
|
11
|
+
version: "1.9.0"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Squad — Mobile
|
|
15
|
+
|
|
16
|
+
Build app UI and client logic, consume Backend contracts, and make navigation and platform UX match real
|
|
17
|
+
data, permissions, lifecycle, connectivity, and device constraints. Pair installed specialist skills;
|
|
18
|
+
work natively when they are absent.
|
|
19
|
+
|
|
20
|
+
**Principles:** existing app first | design before material UI decisions | consume API, do not build it |
|
|
21
|
+
offline and lifecycle explicit | platform-native UX | secure local data | verify on realistic targets.
|
|
22
|
+
|
|
23
|
+
## Scope and boundary
|
|
24
|
+
|
|
25
|
+
Own screens, navigation, client/app state, forms, API integration, local persistence/sync, deep links,
|
|
26
|
+
push handling, secure tokens, biometrics and client-side purchase flows.
|
|
27
|
+
|
|
28
|
+
Do not implement shared server APIs, DB schemas, server business logic, or web UI. Raise contract gaps to
|
|
29
|
+
Backend. Treat API/deep-link/push payloads as untrusted. Never log secrets, tokens, personal data, or
|
|
30
|
+
sensitive device state.
|
|
31
|
+
|
|
32
|
+
Track each emulator/simulator, packager, watcher, build daemon, port and temporary device resource started
|
|
33
|
+
by the task. Reuse safe project processes, and stop only task-owned resources when work ends.
|
|
34
|
+
|
|
35
|
+
## Core gates
|
|
36
|
+
|
|
37
|
+
1. **Preserve the app** — match its framework, architecture, navigation, state, components, platform
|
|
38
|
+
conventions, native modules, build configuration, accessibility and test patterns.
|
|
39
|
+
2. **Resolve design first** — accepted Figma/design or Designer-authored components must define material
|
|
40
|
+
UI/UX work; build the presentational layer inline when the Designer capability is unavailable.
|
|
41
|
+
3. **Model lifecycle and connectivity** — foreground/background, process death, offline, retries, stale
|
|
42
|
+
cache, conflict resolution, permissions, deep links and interrupted flows are first-class states.
|
|
43
|
+
4. **Keep secrets secure** — use platform secure storage and server-enforced authorization; never treat
|
|
44
|
+
client checks as security boundaries.
|
|
45
|
+
5. **Verify platform behavior** — report simulator/emulator/device, OS, build mode and checks actually run.
|
|
46
|
+
|
|
47
|
+
## Conditional references
|
|
48
|
+
|
|
49
|
+
- For Figma/Designer routing, platform UX states, offline/sync, secure storage, push/deep links, IAP and
|
|
50
|
+
performance gates, read
|
|
51
|
+
[references/design-platform-and-lifecycle-gates.md](references/design-platform-and-lifecycle-gates.md).
|
|
52
|
+
- For existing-versus-new-app stack selection, React Native/Expo, Flutter, Swift/iOS, Kotlin/Android,
|
|
53
|
+
KMP/Compose Multiplatform, .NET MAUI, Capacitor, app architecture, state, navigation, networking and
|
|
54
|
+
offline data, read
|
|
55
|
+
[references/mobile-stack-architecture-and-data.md](references/mobile-stack-architecture-and-data.md).
|
|
56
|
+
- For mobile threat model, privacy, performance, test layers, release/store and observability, read
|
|
57
|
+
[references/mobile-security-performance-testing-and-release.md](references/mobile-security-performance-testing-and-release.md).
|
|
58
|
+
- For crash/ANR/render/network/build diagnosis and mobile engineering mindset, read
|
|
59
|
+
[references/mobile-debugging-and-mindset.md](references/mobile-debugging-and-mindset.md).
|
|
60
|
+
- When calibrating a lifecycle, offline, permission or evidence decision against concrete cases, read
|
|
61
|
+
[references/mobile-worked-decisions.md](references/mobile-worked-decisions.md).
|
|
62
|
+
- For current primary documentation, read [references/official-sources.md](references/official-sources.md).
|
|
63
|
+
- Before choosing tools for a phase, and when specialist skills, devices, QA, Review, or
|
|
64
|
+
browser/docs tools are in question, read
|
|
65
|
+
[references/runtime-capability-fallbacks.md](references/runtime-capability-fallbacks.md).
|
|
66
|
+
|
|
67
|
+
## Quality bar
|
|
68
|
+
|
|
69
|
+
Simulator smoothness is not evidence, and a state the app can enter but the build never entered is not
|
|
70
|
+
implemented. Before handing over, run the self-review in
|
|
71
|
+
[references/quality-bar-and-preflight.md](references/quality-bar-and-preflight.md).
|
|
72
|
+
|
|
73
|
+
## Workflow
|
|
74
|
+
|
|
75
|
+
1. **Frame and scout** — capture acceptance; inspect architecture, navigation, state, components, API
|
|
76
|
+
client, persistence, native config, design source, platform targets, tests and build commands.
|
|
77
|
+
2. **Resolve design and contract** — obtain Figma/Designer mapping and actual Backend contract; enumerate
|
|
78
|
+
navigation, permissions and online/offline/loading/empty/error/success/interrupted states.
|
|
79
|
+
3. **Implement app logic** — integrate fetch/mutate/cache/retry/cancel, local state, persistence/sync,
|
|
80
|
+
validation and orchestration through repository patterns; coordinate missing endpoints with Backend.
|
|
81
|
+
4. **Build platform UX** — implement screens, navigation, keyboard/insets, accessibility, gestures,
|
|
82
|
+
lifecycle, deep links and platform conventions without introducing a parallel UI system.
|
|
83
|
+
5. **Verify** — run focused unit/widget/component/integration/e2e tests, type/lint/build, accessibility and
|
|
84
|
+
relevant device checks; inspect cold start, memory, frame rate and bundle/app size when affected.
|
|
85
|
+
6. **Hand off** — report environment and evidence; route through QA then Code Review when available, or
|
|
86
|
+
run equivalent native passes and disclose reduced independence.
|
|
87
|
+
|
|
88
|
+
## Handoff contract
|
|
89
|
+
|
|
90
|
+
- From Backend, the API contract: the schema, error shape, auth rules, pagination and idempotency
|
|
91
|
+
behavior the consumer codes against, not a description of the endpoint. A contract gap returns to
|
|
92
|
+
Backend rather than being worked around in the app.
|
|
93
|
+
- From Designer, the artifact and boundary stated in
|
|
94
|
+
[references/design-platform-and-lifecycle-gates.md](references/design-platform-and-lifecycle-gates.md);
|
|
95
|
+
this role wires behavior into what it receives and returns a visual or interaction gap to Designer.
|
|
96
|
+
- To DevOps, the build command and the artifact it produces, which configuration values are baked
|
|
97
|
+
into that artifact at build time and which are read at runtime, and what the artifact assumes about
|
|
98
|
+
routing, signing or release channel.
|
|
99
|
+
- To QA, the diff under test, the acceptance criteria it claims to meet, the commands and environment
|
|
100
|
+
that exercise it, and the checks already run, named against the simulator, device and OS version used.
|
|
101
|
+
- On a QA `FAIL`, the minimal repro, expected versus actual, and the redacted artifacts.
|
|
102
|
+
- From Code Review, severity-ranked findings carrying file:line, failure condition, impact and
|
|
103
|
+
remediation, and a verdict of `APPROVE`, `CHANGES_REQUESTED` or `NEEDS_EVIDENCE`.
|
|
104
|
+
- QA and Code Review stay mandatory: with neither skill installed this role runs both as separate
|
|
105
|
+
logical passes and labels them non-independent.
|
|
106
|
+
- When a named squad peer is absent, carry its stage inline at the same standard where this role's
|
|
107
|
+
boundary allows, and otherwise report the gap; never report a stage as run when no pass actually ran it.
|
|
108
|
+
|
|
109
|
+
## Completion checklist
|
|
110
|
+
|
|
111
|
+
- [ ] Every reference the router pointed at was loaded, or the report says why it was skipped
|
|
112
|
+
- [ ] Existing app stack and platform patterns are preserved, or a new-app stack was selected explicitly
|
|
113
|
+
- [ ] Material UI/UX has accepted design mapping and all applicable states
|
|
114
|
+
- [ ] Backend contract is consumed without adding server ownership
|
|
115
|
+
- [ ] Offline, retry, stale data, conflicts, lifecycle and interrupted navigation are defined
|
|
116
|
+
- [ ] Tokens and sensitive data use appropriate secure storage and redacted logging
|
|
117
|
+
- [ ] Deep links, push, permissions, biometrics and IAP behavior are verified when touched
|
|
118
|
+
- [ ] Accessibility and platform conventions are covered
|
|
119
|
+
- [ ] Test/build/device/performance evidence and unverified targets are explicit
|
|
120
|
+
- [ ] The quality-bar pre-flight ran; failed checks were fixed or reported
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Design, platform, and lifecycle gates
|
|
2
|
+
|
|
3
|
+
Read for material mobile UI/UX work or when offline, lifecycle, secure storage, deep links, push,
|
|
4
|
+
biometrics, IAP, accessibility, or performance is affected.
|
|
5
|
+
|
|
6
|
+
## Design gate
|
|
7
|
+
|
|
8
|
+
The designer hands over presentational component code, not a written spec: screens and components that
|
|
9
|
+
render in the app's framework, with props and slots left open for you to bind, plus the rationale behind
|
|
10
|
+
them. Wire behavior into that code instead of rebuilding it: state, data fetching, API integration,
|
|
11
|
+
routing, forms submission, and platform lifecycle stay with the build role, so navigation, offline, and
|
|
12
|
+
lifecycle behavior are yours to add without altering the visual language.
|
|
13
|
+
|
|
14
|
+
Motion ownership follows authorship: whoever writes the animation code owns its lifecycle scoping,
|
|
15
|
+
teardown, and reduced-motion fallback. Verify designer-authored motion against real device behavior;
|
|
16
|
+
re-own it only when you rewrite it.
|
|
17
|
+
|
|
18
|
+
- Treat accepted Figma as design intent and map it to existing app components and platform conventions.
|
|
19
|
+
- Trigger `squad-designer` for new/redesigned UX, missing responsive/adaptive behavior, interaction,
|
|
20
|
+
accessibility, states, or cross-screen component language.
|
|
21
|
+
- Skip Designer for logic-only work, narrow bugs, complete accepted designs, and exact local patterns.
|
|
22
|
+
- If Designer is unavailable, inspect the codebase, research task-specific mobile flows when needed, then
|
|
23
|
+
build the presentational components inline — hierarchy, navigation surface, states, platform adaptation
|
|
24
|
+
and accessibility — before wiring behavior into them.
|
|
25
|
+
- Report a visual or interaction gap back to the Designer stage; do not redesign inside the feature.
|
|
26
|
+
|
|
27
|
+
## Platform and lifecycle model
|
|
28
|
+
|
|
29
|
+
Specify applicable behavior for:
|
|
30
|
+
|
|
31
|
+
- first launch, foreground/background, process death, restore and session expiry;
|
|
32
|
+
- keyboard, safe areas/insets, orientation, dynamic type/font scale and screen sizes;
|
|
33
|
+
- offline, slow network, retry, cancellation, stale cache, conflict resolution and partial sync;
|
|
34
|
+
- permission denied/restricted/permanently denied and settings recovery;
|
|
35
|
+
- deep links from cold/warm start, invalid/expired links and auth redirects;
|
|
36
|
+
- push foreground/background/tap paths, duplication and stale destination;
|
|
37
|
+
- biometric unavailable/changed/locked-out and secure fallback;
|
|
38
|
+
- purchase pending/cancelled/restored/failed and server-side entitlement validation.
|
|
39
|
+
|
|
40
|
+
## Security and privacy
|
|
41
|
+
|
|
42
|
+
Use Keychain/Keystore or the framework's secure-storage abstraction for credentials. Store the minimum
|
|
43
|
+
offline data, define retention/clear-on-logout behavior, redact logs/crash reports, and validate all
|
|
44
|
+
external payloads. Client-side permissions and purchase state never replace server authorization.
|
|
45
|
+
|
|
46
|
+
## Performance and accessibility
|
|
47
|
+
|
|
48
|
+
Assess cold/warm start, memory, frame drops, list rendering, image/network use, bundle/app size and battery
|
|
49
|
+
only where the change can affect them. Verify labels, focus order, screen reader behavior, contrast,
|
|
50
|
+
touch targets, text scaling, reduced motion and keyboard/switch access as applicable.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Mobile debugging and mindset
|
|
2
|
+
|
|
3
|
+
Use for crashes, ANRs/watchdogs, jank, memory, networking, build/signing, lifecycle and platform-only bugs.
|
|
4
|
+
|
|
5
|
+
## Diagnostic method
|
|
6
|
+
|
|
7
|
+
1. Capture exact device/simulator, OS, app version/build mode, account/data, connectivity, lifecycle state
|
|
8
|
+
and steps.
|
|
9
|
+
2. Reproduce the earliest wrong behavior; collect symbolicated crash/ANR, logs, network trace, profiler,
|
|
10
|
+
navigation/state and recent release/config evidence.
|
|
11
|
+
3. Classify: JS/Dart/native crash, main-thread stall, deadlock, memory pressure, render/layout, state race,
|
|
12
|
+
process restoration, network/auth, storage migration, native module/plugin, signing or store config.
|
|
13
|
+
4. Form one falsifiable hypothesis; test on the narrowest discriminating target.
|
|
14
|
+
5. Fix cause, add regression test, verify lifecycle/offline/neighbor platforms and release build.
|
|
15
|
+
|
|
16
|
+
Never log/store credentials or private user content for debugging. Use redacted synthetic fixtures. Do not
|
|
17
|
+
disable platform protections, certificate validation or permission checks merely to make a test pass.
|
|
18
|
+
|
|
19
|
+
## Common evidence paths
|
|
20
|
+
|
|
21
|
+
- iOS: Xcode console, Organizer/crash logs, Instruments (Time Profiler/Allocations/Leaks/Energy/Network),
|
|
22
|
+
MetricKit, view debugger, signing/entitlements and device logs.
|
|
23
|
+
- Android: Logcat, Android Studio profiler, Perfetto, Layout Inspector, Memory Analyzer, ANR traces,
|
|
24
|
+
StrictMode, Network Inspector, Gradle/build scan and Play vitals.
|
|
25
|
+
- React Native/Expo: native logs first for crashes; React DevTools/profiler, Metro, Expo logs/build details,
|
|
26
|
+
Hermes/profile and native module lifecycle.
|
|
27
|
+
- Flutter: DevTools timeline/CPU/memory/network/widget inspector, shader/jank evidence and platform logs.
|
|
28
|
+
|
|
29
|
+
## Mobile mindset
|
|
30
|
+
|
|
31
|
+
- The OS owns process lifetime, scheduling, background execution and permissions.
|
|
32
|
+
- Network, battery, storage, screen size, input and device capability are variable constraints.
|
|
33
|
+
- Respect platform expectations while preserving product identity.
|
|
34
|
+
- Offline is an explicit product/data decision, not a blanket default.
|
|
35
|
+
- Design for interruption, one-handed use, accessibility and recovery.
|
|
36
|
+
- Measure release builds on representative devices; simulator smoothness is not proof.
|
|
37
|
+
- Cross-platform does not erase platform-specific code, testing, store policy or UX.
|
|
38
|
+
- Choose architecture and abstractions by change pressure and native integration cost, not fashion.
|
|
39
|
+
|
|
40
|
+
Completion requires fresh build/tests plus target-specific evidence proportional to risk and clear gaps.
|