Cursor Rules for Kotlin: Android and Backend Patterns That Ship

Dev.to AI
Generative AI

Cursor Rules for Kotlin: Android and Backend Patterns That Ship If you ship Kotlin in production - Android app, Ktor service, Spring Boot backend - you have probably watched Cursor or Claude Code generate code that looks fine in a tutorial and falls apart on review. Suspend functions that block the main thread. ViewModels that expose MutableStateFlow to the UI. runBlocking inside coroutines! operators sprinkled like seasoning. Sealed when expressions saved by an else -> Unit that quietly swallows new variants. The fix is not better prompting.