Files
pbakaus_impeccable/skill/reference/adapt.native.md
T
c11cc7b58c Route native projects to native command variants (audit, adapt) (#357)
* Route native projects to native command variants for audit and adapt

Follow-up to #269. The web audit.md and adapt.md carried "translate this
yourself" Platform notes, so a native invocation paid for the full web
file (~1.8k / ~2.6k tokens, mostly inapplicable) and did error-prone
run-time translation. Authored with AI assistance (Claude Code) under
maintainer direction.

- New reference/audit.native.md and reference/adapt.native.md: authored
  native content (VoiceOver/TalkBack, platform conformance, adaptivity
  dimensions; phone-to-tablet, platform-to-platform, web-to-native
  strategies). One variant per command covers ios, android, and
  adaptive; per-OS specifics stay in the platform refs Setup loads
  regardless.
- SKILL.src.md: Commands table lists the variants; Setup step 2 reads
  the variant instead of the web file when the platform is native.
- audit.md / adapt.md: Platform sections replaced with a one-line
  web-only guard pointing at the variant.
- animate.md / layout.md: Platform sections deleted; the Motion and
  Layout sections of the already-loaded platform refs carry that
  content. Web users now pay zero tokens for the platform axis in
  these files.
- Skill-behavior scenario 15 pins the route-instead behavior (passes
  live on claude-sonnet-4-6); CLAUDE.md documents the variant
  convention.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Phrase command-reference routing as one rule, not rule-plus-exception

Copilot review catch: step 2 said "MUST read reference/<command>.md"
and then carved out the native variant, which invites loading both
files. Now a single rule: read the web reference or the table's native
variant, one file, not both. Scenario 15 re-verified live. Applied with
AI assistance (Claude Code) under maintainer direction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Anchor native runs in animate/layout, drop loaded-refs assumption

Review-thread fixes, applied with AI assistance (Claude Code) under
maintainer direction:

- Greptile: deleting the animate/layout Platform sections left native
  runs alone with web tooling instructions (CSS keyframes, GSAP, Grid,
  clamp()). Restore a one-line anchor in each pointing at the loaded
  platform reference's Motion / Layout section (~20 tokens, not the old
  restatements).
- Bugbot: audit.native.md and adapt.native.md asserted the platform
  refs were "already loaded in Setup", but the command reference loads
  at step 2, before step 5. Now they instruct: read the platform
  reference first if Setup hasn't already.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Carry the native-variant rule into routing rules 2 and 3

Bugbot catch: Setup step 2 routed native projects to the variant, but
routing rules 2 and 3 (the operative text at command time) still said
to load the generic reference file. Both now reference the same
one-file variant rule. Applied with AI assistance (Claude Code) under
maintainer direction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Point animate/layout native anchors at the files, not "loaded" refs

Bugbot catch, same class as the variant wording fix: the anchor lines
said "the loaded platform reference" but command files load at step 2,
before the platform refs at step 5. Both anchors now name the files and
instruct reading them first if Setup hasn't already. Applied with AI
assistance (Claude Code) under maintainer direction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 07:30:49 -07:00

3.8 KiB

Additional context needed: target platforms/devices and usage contexts.

Adapt an existing native design (ios / android / adaptive) to a different context: another device class, orientation, platform, or origin. The trap is treating adaptation as scaling. The job is rethinking the experience for the new context, inside the platform conventions of ios.md / android.md; read the target platform's reference before planning if Setup hasn't already.

Assess Adaptation Challenge

  1. Source context: what was it designed for, and what assumptions did it make? (Phone-only? Portrait-only? One platform's idioms? A website?)
  2. Target context: which device class (phone, tablet, foldable), orientation, platform, and usage posture (one-handed on the go vs two-handed at rest)?
  3. What breaks: navigation that doesn't fit the target, layouts that stretch instead of restructure, gestures or controls that don't exist there?

Adaptation Strategies

Phone → Tablet (iPad / large screens)

  • Restructure, don't stretch. A scaled-up phone UI on a tablet is the failure mode. Use size classes (iOS) / window size classes (Android) to switch structure.
  • Navigation changes shape: tab bar stays or becomes a sidebar on iPad; Android navigation bar becomes a rail or drawer on expanded width.
  • Use the width: split view / master-detail (list + detail side by side), multi-column grids, popovers where phones used sheets.
  • Multitasking is a size, not an edge case: iPad Split View and Android multi-window can hand you a phone-width window on a tablet; size-class-driven layout handles both for free.

Orientation & foldables

  • Landscape restructures (side-by-side panes, repositioned controls); never clip or letterbox. Lock orientation only when the task truly demands it.
  • Foldables (Android): react to posture and hinge via window size classes; test folded, unfolded, and tabletop.

Platform → platform (iOS ↔ Android)

Translate idioms; never transplant them:

iOS Android
Tab bar Navigation bar / rail / drawer
Edge-swipe back, back chevron Predictive Back gesture / button
Switch, segmented control, system pickers Material switch, chips, Material pickers
Action sheet Bottom sheet / Material dialog
SF Symbols, SF Pro, Dynamic Type Material Symbols, Roboto, sp scaling
Semantic system colors, materials Material color roles, tonal elevation
System push/sheet transitions Container transform, shared-axis, fade-through

Rebuild navigation and controls in the target's vocabulary; carry over the brand's expressive layer (palette intent, type accent, motion personality) through the target's theming system.

Web → native (porting a website or web app)

Reconform, don't reflow. Replace web navigation with the platform's model, HTML-shaped controls with platform controls, hover affordances with touch-first ones, and px-based type with Dynamic Type / sp. Then treat the result to the full platform reference; the slop test there is the acceptance bar.

Implement & Verify

  • Drive structure from size classes / window size classes, never from device-model checks.
  • Respect safe areas and window insets in every new configuration (notch, hinge, status bar, keyboard).
  • Test on simulators for breadth, then real hardware for truth: at least one phone and one tablet per shipped platform, both orientations, split-screen where supported.

When the adaptation feels native to each context, hand off to {{command_prefix}}impeccable polish for the final pass.

NEVER:

  • Ship a stretched phone layout on a tablet
  • Port one platform's controls or navigation onto the other
  • Hide core functionality on smaller devices (if it matters, make it work)
  • Lock orientation to dodge a layout bug
  • Trust simulators alone (posture, gestures, and performance need hardware)