Skill Wiki v0.1.0
rule @android-compose/rule-single-source-of-truth

Single Source Of Truth

Every value that drives the UI lives in exactly one place — a ViewModel, a remembered state holder, or a state-hoisted parameter. Composables read it and emit it.…

Skill
@android-compose
Domain
android-compose
Version
0.1.0
Quality
4.0
Edges
3 out · 2 in
Tokens
119/277/297
$ prime install @android-compose/rule-single-source-of-truth

Projection

Always in _index.xml · the agent never has to ask for this.

SingleSourceOfTruth [rule] v0.1.0

Every value that drives the UI lives in exactly one place — a ViewModel, a remembered state holder, or a state-hoisted parameter. Composables read it and emit it. They do NOT copy it into a second remember { mutableStateOf(...) } they then keep in sync with the original via LaunchedEffect. Two copies of the same fact will drift the moment the synchronisation code has a bug, and you cannot tell which is correct.

Source

prime-system/examples/android-compose/primes/compiled/@android-compose/rule-single-source-of-truth/atom.yaml

Compiled at 2026-05-10