Gemini in Android Studio is no longer autocomplete with a chat window — Agent Mode plans and executes multi-file changes, Compose-specific assists live in the editor, and you can bring your own model. The teams that win with it are the ones with explicit rules for what agent output must pass before merge.
Tier: Core · Workflow area: Mobile engineering & release
This playbook sets up the daily operating rhythm: which mode for which job, how to scope Agent Mode so it helps instead of thrashing, and the acceptance bar every AI-authored change must clear.
Skip Agent Mode for one-line edits — inline completion and Transform are faster — and for architecture decisions, which stay human.
Map the three modes to the three job sizes. Make this deliberate, not vibes:
Scope Agent Mode like a ticket, not a wish. Agent Mode plans, edits multiple files, and iterates on compile errors. Its failure mode is over-scoping. Prompt with boundaries:
Add a notification-preferences screen to :feature-settings.
Constraints:
- Compose only, using our DesignSystem components (see ui/theme and
ui/components for the canon).
- Persist via the existing UserPrefsRepository (DataStore) - do not
add a new persistence mechanism.
- Follow the ViewModel + UiState pattern used in SettingsViewModel.
- Do not touch Gradle files or any module outside :feature-settings.
Show me the plan before executing.
Review the plan, trim it, then let it run. Reject any step that edits files outside the stated boundary.
Use the Compose-specific assists where they are strongest. Ask Gemini to generate @Preview variants for the states you have not rendered (loading, error, empty, dark theme, large font); use the preview-generation assist on composables missing previews entirely; and when a recomposition feels heavy, paste the composable and ask for stability problems — unstable lambdas, missing remember, lists without keys — then verify with Layout Inspector's recomposition counts, not the model's word.
Wire the feedback loop the agent iterates against. Agent Mode fixes what it can see. Make it see more: keep the build fast enough to run per iteration, and end every agent task with the same closing instruction:
Before declaring done: build the project, run the unit tests for the
touched module, and fix anything that fails. List every file you
changed and why in one line each.
Adopt team rules for what agent output must pass. Write them down in the repo (for example docs/ai-rules.md) and enforce in review:
Color(0xFF...) or ad-hoc padding scales are an automatic change request.Agent Mode is a fast junior with perfect stamina: give it ticket-sized scope, a build-and-test loop to iterate against, and a written acceptance bar. The rules file — not the model choice — is what makes AI output mergeable.
Where policy blocks Google-hosted inference: use the bring-your-own-model path with a local endpoint for chat and Transform-sized work, keep Agent Mode off, and run multi-file changes as a human-driven sequence of scoped Transforms. The team rules file applies unchanged — it governs output, not provider.
The assistant's data-handling terms differ between the free tier, paid tiers and enterprise agreements. Confirm which one your team is actually on before the first proprietary prompt — not after.