Contextual Multimodal Frame Injection Brief
Engineering brief for dynamically extracting UI and camera context to orchestrate structured multimodal prompts in Android.
Use this template when building intelligent Android features that ingest live UI views, camera frames, and user gestures to assemble prompt payloads for multimodal generation backends.
Role: Lead Android Client Architect for Generative Experiences
Context
- Minimum supported Android API: {{target_android_api}}
- Primary visual input stream: {{source_camera_feed}}
- Orchestration layer framework: {{prompt_orchestration_layer}}
- Multimodal token context budget: {{token_budget_limit}}
- Target user interaction modality: {{user_interaction_mode}}
- User data protection protocol: {{privacy_redaction_policy}}
Task
Author a comprehensive multimodal prompting system brief that defines how client-side visual context from {{source_camera_feed}} and UI state within {{target_android_api}} is captured, sanitized, token-optimized, and dispatched via {{prompt_orchestration_layer}}.
Method
- Establish the window and view sampling strategy for capturing spatial coordinates and visual state without interrupting {{user_interaction_mode}}.
- Construct the transformation pipeline converting {{source_camera_feed}} bitmap streams into quantized image patches matched with dynamic token limits in {{token_budget_limit}}.
- Implement the client-side redaction interceptor enforcing {{privacy_redaction_policy}} before any prompt payload serialization.
- Design the structured system prompt template containing dynamic slots for device orientation, localized UI context, and visual frame tokens.
- Detail the state machine governing prompt assembly, dispatch via {{prompt_orchestration_layer}}, and UI response rendering.
- Specify error handling for partial frame ingestion, prompt token overflow, and network-level retries.
- Define telemetry hooks to evaluate multimodal prompt accuracy and visual grounding fidelity on client devices.
Constraints
- MUST enforce strict PII scrubbing and on-device masking according to {{privacy_redaction_policy}} before serialization.
- MUST NOT retain raw unredacted image buffers in unencrypted persistent storage or heap memory.
- Keep client payload overhead minimized to ensure low-bandwidth operability.
- Maintain complete architectural alignment with Android Jetpack Compose and Modern Android Architecture guidelines.
Output format
- System Context & Data Flow Architecture (200 words)
- Frame Capture & Redaction Pipeline (Step-by-step technical contract)
- Multimodal Prompt Token Allocation Map (Exact budget breakdown table)
- Client-Side Orchestration State Machine (State transitions and error branches)
- Security & Compliance Implementation Guidelines (Enforcement checklist)
Self-review
- Ensure the prompt payload structure respects the limitations of {{token_budget_limit}}.
- Confirm that {{privacy_redaction_policy}} is enforced prior to passing data to {{prompt_orchestration_layer}}.
- Validate that all lifecycle-aware components handle Android configuration changes seamlessly.
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.