# Rat Stack lore

Short, source-grounded notes on the ideas and decisions behind rat-stack.

- [A clean playground](/lore/a-clean-playground) — rat-stack is a place to do real work with pieces that stay easy to add and remove.
- [An MCP your users want](/lore/an-mcp-your-users-want) — Rhys Sullivan's practical guide gives rat-stack a checklist for useful MCP tools.
- [Cartridges](/lore/cartridges) — A cartridge owns one job and brings the infrastructure its service needs.
- [Worker init runs twice](/lore/init-runs-twice) — Alchemy Worker initialization runs in deploy and runtime contexts, so resource declarations need a boundary.
- [Lifecycles are machines](/lore/lifecycles-are-machines) — XState owns finite lifecycle states while declared Effect actors own side effects.
- [No comments](/lore/no-comments) — Code comments are banned because names, types, tests, and boundaries should carry the meaning.
- [One capability, every surface](/lore/one-capability-every-surface) — A schema-typed contract and one handler feed every interface rat-stack keeps.
- [Tests that earn their place](/lore/tests-that-earn-their-place) — A test earns its place by covering behavior the existing suite does not prove.
- [The fence](/lore/the-fence) — The fence makes the safe path enforceable and makes bypasses fail loudly.
