mir-backend-beamlisted
Install: claude install-skill anantbhandarkar/make-it-right
# /mir-backend-beam · Make It Right (BEAM runtime)
The middle tier. `mir-backend` decides **what is correct** (any language). The framework module (e.g. `mir-backend-beam-phoenix`) knows the **library's mechanics**. This tier owns what's true for **all BEAM backends because they run on the Erlang VM** — the process model, message-passing concurrency, and fault-tolerance primitives that Phoenix, Nerves, and plain Erlang all inherit.
**Runtime assumed:** Elixir 1.16+ on OTP 26+ (the notes hold for Erlang directly; syntax examples are Elixir). Load order: `mir-backend` → `mir-backend-beam` → `<framework module>`.
## The BEAM footguns AI walks into (framework-agnostic)
### 1. Let-it-crash + supervision — design the tree, don't rescue everything
The BEAM's fault-tolerance story is built on supervision: a crashed worker process is restarted by its supervisor without taking down the rest of the system. AI frequently undermines this by wrapping every operation in `try/rescue` or `try/catch`, converting clean crashes into silently swallowed errors that leave the process in a corrupt-but-alive state.
- **Let unexpected errors crash the process.** A supervisor restart resets state cleanly. A rescued exception that continues execution with invalid state is harder to detect and recover from.
- **Design supervision trees intentionally.** Choose the right restart strategy: `one_for_one` (worker failures are independent), `one_for_rest` (failure in one cascades to later-started sibling