# `BB.Dsl.StateTransformer`
[🔗](https://github.com/beam-bots/bb/blob/main/lib/bb/dsl/state_transformer.ex#L5)

Collects state definitions and injects state-related functions.

This transformer:
- Collects all states defined in the `states` section
- Adds the built-in `:idle` state if not explicitly defined
- Injects `__bb_states__/0` and `__bb_initial_state__/0` functions

# `after_compile?`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
