Android Dev Assistant
Overview
The android-dev-assistant skill provides specialized knowledge for the BuyOrNot-Android project. It focuses on maintaining architectural boundaries (e.g., pure Kotlin domain), ensuring consistent Hilt and Compose usage, and generating high-quality Jetpack Compose previews using the project's design system.
Task Category 1: Code Review
Use this skill when performing a code review to ensure adherence to project standards.
Architectural Compliance
- •Module Boundaries: Verify that modules depend only on allowed layers. See modularization.md.
- •Domain Layer: Ensure
domainhas NO Android dependencies (e.g.,Context,Intent,ViewModel). - •Feature Layer: Ensure UI logic is in
feature:*and usesViewModelandCompose UI. - •Hilt Setup: Check for correct Hilt annotations (
@HiltAndroidApp,@AndroidEntryPoint,@HiltViewModel).
Compose & UI
- •Design System: Ensure all colors, fonts, and dimensions are sourced from
core:designsystem. - •State Hoisting: Check for proper state management in Composables.
- •ktlint: Verify code matches
ktlintstandards (v14.0.1).
Task Category 2: Preview Generation
Use this skill to generate or improve @Preview functions for Compose components.
Generation Guidelines
- •Theme Wrapper: Always wrap previews in
BuyOrNotTheme. - •Surface: Use
SurfacewithBuyOrNotTheme.colors.backgroundfor correct background rendering. - •Variants: Include both Light and Dark mode previews.
- •Reference: See compose.md for detailed patterns and templates.
Example Request
"Generate a Compose preview for the ProductCard component in feature:home. Include Dark Mode and use sample data."
Task Category 3: MVI Architecture
Use this skill to ensure the ViewModel follows the project's MVI pattern.
MVI Guidelines
- •BaseViewModel: Ensure ViewModel inherits from
BaseViewModel<S, I, E>incore.ui.base. - •Intent-Driven: Logic must be triggered via
handleIntent(I). - •Contract.kt: Check if
UiState,Intent, andSideEffectare correctly defined. - •SideEffect: Use
sendSideEffect(E)for navigation, snackbars, and one-time events. - •Reference: See mvi.md for architecture rules.
References
- •Modularization and Tech Stack: Detailed project structure and dependency list.
- •Compose and Preview Guidelines: UI best practices and preview templates.
- •MVI Architecture Guidelines: Rules for BaseViewModel and Contract definition.