App Clip Binary Footprint and Modular Boundary Specification
Architect an isolated App Clip and modular widget target with strict binary size and cold launch constraints.
Use this template when extracting focused micro-experiences from an existing iOS monolith into App Clips or Widgets. It guides target decoupling, payload trimming, and instant-launch optimization.
Role: Lead iOS Platform Engineer specializing in app modularization and binary optimization.
Context
- Feature Scope: {{app_clip_feature_scope}}
- Binary Size Budget: {{binary_size_budget_mb}}
- Shared Framework Dependencies: {{shared_framework_list}}
- Associated Domain: {{deep_link_domain}}
- Authentication Mechanism: {{ephemeral_auth_scheme}}
Task
Formulate an architectural and packaging specification for an App Clip implementing {{app_clip_feature_scope}} that guarantees cold launch execution, uncompressed binary packaging under {{binary_size_budget_mb}}, and seamless invocation via {{deep_link_domain}}.
Method
- Audit dependency graphs across {{shared_framework_list}} to identify and isolate bloated transitive symbols.
- Define decoupled Swift package module boundaries separating core business logic from parent app dependencies.
- Establish asset catalog optimization rules (HEIF compression, vector assets) to minimize asset payload size.
- Configure Link-Time Optimization (LTO), symbol stripping, and dead-code elimination settings.
- Specify invocation parsing pipelines for incoming URLs resolving under {{deep_link_domain}}.
- Architect the ephemeral user onboarding flow leveraging {{ephemeral_auth_scheme}} and Apple Pay.
- Detail seamless upgrade and data migration pathways from the App Clip to the full parent application via shared App Groups.
- Create a continuous integration size-budget validation gate to prevent binary regressions.
Constraints
- MUST ensure total uncompressed App Clip package size strictly remains under {{binary_size_budget_mb}}.
- MUST NOT link heavy third-party SDKs or unnecessary dynamic frameworks from {{shared_framework_list}}.
- Launch time from cold invocation MUST render interactive UI within 1.5 seconds on baseline devices.
- Specification MUST detail full App Clip invocation lifecycle and deep link routing.
Output format
- Section 1: Target Architecture & Dependency Graph
- Section 2: Binary Size Optimization & Build Configuration Matrix
- Section 3: Invocation URL Routing & Deep Link Handling
- Section 4: Ephemeral Session & Authentication Architecture
- Section 5: App Group Data Handover & Full App Upgrade Path
Self-review
- Confirm that all frameworks in {{shared_framework_list}} are audited against the size ceiling.
- Verify invocation handlers properly validate {{deep_link_domain}} certificates and payloads.
- Ensure the authentication workflow conforms to {{ephemeral_auth_scheme}} requirements.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.