Skill Wiki v0.1.0
principle @android-compose/principle-state-driven-ui

State Driven Ui

Treat every screen as a pure projection of a State object onto pixels. Inputs (clicks, text, gestures) update the State; the State drives the projection; the projection is the UI.…

Skill
@android-compose
Domain
android-compose
Version
0.1.0
Quality
4.0
Edges
4 out · 5 in
Tokens
196/333/333
$ prime install @android-compose/principle-state-driven-ui

Projection

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

StateDrivenUi [principle] v0.1.0

The UI is a function of state: UI = f(state). The composable tree describes what the screen looks like for the current state value; it does not imperatively mutate views to reach that state. To change the screen, mutate the state and let Compose re-derive the tree. The agent never holds a reference to a Button and calls setEnabled(false) on it — instead, enabled is a piece of state that the button reads at composition time.

Treat every screen as a pure projection of a State object onto pixels. Inputs (clicks, text, gestures) update the State; the State drives the projection; the projection is the UI. There is no in-between mutable handle to a view — there are no views, only the latest description of one.

Source

prime-system/examples/android-compose/primes/compiled/@android-compose/principle-state-driven-ui/atom.yaml

Compiled at 2026-05-10