@punks/cli 3.3.0 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: improve-mobile-frontend
3
+ description: Improve mobile-web frontend behavior across touch interactions, viewport sizing, safe areas, gesture ownership, browser chrome, and real-device validation. Use when building or reviewing phone-focused web UI, fixing behavior that works in desktop emulation but fails on a phone, or auditing hover, tap, input zoom, pull-to-refresh, carousel, notch, or theme-color defects.
4
+ ---
5
+
6
+ # Improve Mobile Frontend
7
+
8
+ Treat mobile behavior as an interaction contract, not a smaller desktop layout. Inspect the existing viewport metadata, global CSS, interactive controls, and gesture surfaces before changing code. Apply the narrowest rule that fixes the observed behavior and preserves keyboard focus, text selection, scrolling, zoom, and assistive technology.
9
+
10
+ ## Improvement loop
11
+
12
+ 1. Reproduce each defect on its actual interaction path: touch, scroll, focus, rotation, installed-app mode, or browser chrome transition. Record which browser and device state exposes it.
13
+ 2. Map the defect to the rules below. Check existing global and component rules first so the fix extends the current system.
14
+ 3. Implement the smallest scoped change. Global viewport or overscroll rules require a product-level reason; component behavior stays with the component.
15
+ 4. Verify keyboard focus, visible focus indicators, text selection where users need to copy or edit, pinch zoom, screen-reader semantics, vertical scrolling, and reduced-motion behavior remain intact.
16
+ 5. Test the affected path on real iOS and Android hardware when available. Emulation is useful preflight, never final proof. Report the exact devices and browsers tested; name missing hardware proof as a validation gap.
17
+
18
+ Completion means every observed defect has a scoped rule, its accessibility counterchecks pass, and real-device evidence or an explicit evidence gap is recorded.
19
+
20
+ ## Interaction rules
21
+
22
+ ### Hover belongs to hover-capable pointers
23
+
24
+ Touch browsers can synthesize `:hover` after a tap and leave the visual state stuck. Gate hover-only decoration and motion:
25
+
26
+ ```css
27
+ @media (hover: hover) and (pointer: fine) {
28
+ .control:hover {
29
+ /* hover-only feedback */
30
+ }
31
+ }
32
+ ```
33
+
34
+ Keep focus and active feedback outside that query. A keyboard user still needs `:focus-visible`; a touch user still needs immediate pressed feedback.
35
+
36
+ ### Tap feedback should be deliberate
37
+
38
+ Provide feedback on pointer down through `:active`, component state, or an equivalent immediate response. `touch-action: manipulation` suits ordinary buttons and links when double-tap gesture handling is unnecessary:
39
+
40
+ ```css
41
+ .control {
42
+ touch-action: manipulation;
43
+ }
44
+ ```
45
+
46
+ Remove `-webkit-tap-highlight-color` only when the component supplies an equally visible pressed state. Prefer a scoped transparent highlight on those controls; a blanket reset can erase the only tap acknowledgement.
47
+
48
+ ### Viewport height expresses intent
49
+
50
+ Use `100dvh` for app shells that must track the currently visible viewport as browser chrome expands and collapses. Use `100svh` for hero or landing sections that must fit without being hidden when browser chrome is fully visible. Prefer `min-height` over fixed `height` when content may grow, and retain a compatible fallback when the supported browser matrix requires it.
51
+
52
+ ### Inputs remain readable
53
+
54
+ Text inputs, textareas, and selects use a computed font size of at least `16px` on small screens to prevent focus zoom in iOS Safari. Do not disable user zoom to hide this symptom. Preserve labels, focus visibility, error association, and adequate touch targets.
55
+
56
+ ### Scroll ownership is explicit
57
+
58
+ Choose pull-to-refresh and scroll chaining behavior per surface. `overscroll-behavior: none` on `html, body` is appropriate only for an app-like experience that deliberately owns the root gesture and provides any needed refresh affordance. Prefer `contain` or a scoped scroll container when only a modal, sheet, map, or feed must stop chaining. Content sites normally retain native page scrolling and refresh.
59
+
60
+ For a horizontal carousel or swipe surface, declare vertical-page ownership explicitly:
61
+
62
+ ```css
63
+ .carousel-gesture-surface {
64
+ touch-action: pan-y;
65
+ }
66
+ ```
67
+
68
+ The gesture implementation then owns horizontal movement while the browser keeps vertical scrolling. Apply the rule only to the actual gesture surface, and keep controls inside it operable by keyboard and assistive technology.
69
+
70
+ ### Selection stays available where meaningful
71
+
72
+ `user-select: none` may prevent accidental long-press selection on button-like controls or drag handles. Scope it to those controls. Text, editable content, code, identifiers, and other copyable information retain selection; native semantic controls are preferred over making arbitrary text behave like a button.
73
+
74
+ ## Device integration
75
+
76
+ ### Safe areas
77
+
78
+ Use `viewport-fit=cover` only with safe-area compensation. Apply `env(safe-area-inset-top)`, `-right`, `-bottom`, and `-left` to the edge-owning shell or fixed chrome, usually in addition to its normal spacing:
79
+
80
+ ```css
81
+ .app-shell {
82
+ padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
83
+ }
84
+ ```
85
+
86
+ Do not add safe-area padding indiscriminately to every nested container. Verify portrait, landscape, keyboard-open, and installed-app states so content neither collides with a cutout nor receives doubled spacing.
87
+
88
+ ### Browser chrome color
89
+
90
+ Provide `theme-color` for each supported color scheme so browser chrome matches the page:
91
+
92
+ ```html
93
+ <meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
94
+ <meta name="theme-color" content="#0b0b0b" media="(prefers-color-scheme: dark)">
95
+ ```
96
+
97
+ Keep these values aligned with the actual surface colors and any framework metadata API. Verify browsers that ignore `media` still receive a sensible default.
98
+
99
+ ## Delivery evidence
100
+
101
+ Report:
102
+
103
+ - defects fixed and the scope chosen for each rule;
104
+ - preserved focus, zoom, selection, and scroll behavior;
105
+ - viewport, orientation, and browser-chrome states exercised;
106
+ - real device, OS, and browser versions tested;
107
+ - remaining device or browser coverage gaps.
108
+
109
+ See [UPSTREAM.md](UPSTREAM.md) for source attribution.
@@ -0,0 +1,5 @@
1
+ # Source attribution
2
+
3
+ This skill is an original, implementation-focused adaptation of mobile-web guidance attributed to Emil Kowalski in an image supplied by the user on 2026-08-19. The supplied image pairs common phone-browser defects with remedies covering hover capability queries, tap highlighting, dynamic and small viewport units, input font sizing, touch feedback, overscroll, safe areas, selection, carousel gesture ownership, theme colors, and real-hardware testing.
4
+
5
+ No canonical publication URL or source repository was supplied. The guidance was rewritten, expanded with accessibility and scoping constraints, and is not represented as a byte-identical upstream work.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punks/cli",
3
- "version": "3.3.0",
3
+ "version": "3.3.2",
4
4
  "description": "Harness Intelligence scaffolding CLI",
5
5
  "homepage": "https://github.com/wearedevpunks/harness-intelligence/tree/main/apps/cli#readme",
6
6
  "bugs": {