brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
kotlin-concurrency-and-flowUse when writing or reviewing Kotlin coroutine scope ownership, raw Thread or Executor work, init launches, non-suspending launch APIs, runBlocking, cancellation, StateFlow, SharedFlow, Channel, stateIn, SharingStarted, state updates, or one-shot events.
Independent GitHub snapshot · Automated classification · Original documentation governs
Give asynchronous work an explicit owner and lifetime, then model durable state and transient events with primitives whose delivery and replay semantics match the product contract.
launch, callback, or deferred wrapper merely for convenience.Channel hands each event to one consumer; a configured
SharedFlow broadcasts to active consumers. If that consumer contract is
unknown, state both options and the decision needed before choosing one.
For a one-consumer navigation handoff that must survive a collector gap,
choose a buffered Channel exposed as receiveAsFlow(); do not preserve a
replay-zero SharedFlow after identifying event loss as the defect.| Signal | Read |
|---|---|
Stored CoroutineScope, raw Thread or Executor work, init { launch }, fire-and-forget API, runBlocking, broad catch, or cancellation boundary | Structured concurrency |
StateFlow, SharedFlow, Channel, stateIn, SharingStarted, .value, state updates, sentinel values, or one-shot events | Flow state and events |
| Compose collection or UI effect handling | Compose state and effects |