# Pure cores reduce timeline coupling

> For agents: start with the [agent guide](https://ratstack.sh/llms.txt). Every page is Markdown by default; add `Accept: text/html` for HTML.

Free workshop: [Build Agent Loops That Never Stop Shipping](/tokenmaxx#interested).

A functional core keeps domain rules independent of external interfaces and process machinery. Fewer shared timelines remove ordering problems before coordination is added.

> Our core doesn’t access external interfaces or use any process machinery your component might use.

Source: [Q14](/lore/durability-bibliography#q14); [B3](/lore/durability-bibliography#b3-designing-elixir-systems-with-otp), [B13](/lore/durability-bibliography#b13-grokking-simplicity).

## Failure it prevents

Rules change with hidden time or shared state and can only be tested through live integrations.

## Our Effect 4.0.0 reading

Keep pure rules as ordinary functions. `Context.Service` and `Layer` put [effectful dependencies](/lore/services-capture-dependencies) behind seams. Wrapping a callback in [Effect](/lore/effect-basics) does not make it pure.

Source: `packages/effect/src/Context.ts`, `packages/effect/src/Layer.ts`, `packages/effect/src/Effect.ts`.

## How to check

Run the same decision with the same explicit data. Check that it needs neither network nor process state. This check is our proposal. The books do not prescribe it.

Continue with [Replay needs stable inputs](/lore/replay-needs-stable-inputs), [Recovery needs model tests](/lore/recovery-needs-model-tests).

Connect this to [the existing rat-stack guidance](/lore/layers-make-dependencies-explicit).

Use [the durability skill](/skills/durability) for the full review. Return to [the durability index](/lore/durability).

## Sources

1. [Gray II, James Edward; Tate, Bruce A. Designing Elixir Systems with OTP. Pragmatic Bookshelf, 2019.](https://pragprog.com/titles/jgotp/designing-elixir-systems-with-otp/)
   Pragmatic Bookshelf. Build a Functional Core; Isolate Process Machinery in a Boundary; Customize Your Lifecycle; Big, Loud Worker-Bees; Add Persistence as a Boundary Service; Test the Boundary. Accessed 2026-10-23.

2. [Normand, Eric. Grokking Simplicity: Taming Complex Software with Functional Thinking. Manning, 2021.](https://www.manning.com/books/grokking-simplicity)
   Manning. Chapters 15–17: Isolating Timelines, Sharing Resources Between Timelines, Coordinating Timelines. Accessed 2026-10-23.

3. [Effect contributors. Effect 4.0.0. Context.ts](https://github.com/Effect-TS/effect/blob/67ba4e46a11ccda0b6761578bfd22c04ae00167d/packages/effect/src/Context.ts)
   Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.

4. [Effect contributors. Effect 4.0.0. Layer.ts](https://github.com/Effect-TS/effect/blob/67ba4e46a11ccda0b6761578bfd22c04ae00167d/packages/effect/src/Layer.ts)
   Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.

5. [Effect contributors. Effect 4.0.0. Effect.ts](https://github.com/Effect-TS/effect/blob/67ba4e46a11ccda0b6761578bfd22c04ae00167d/packages/effect/src/Effect.ts)
   Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.

## Linked from

- Agent guide → An Effect stack so pure (aspirational) Kit Langton will blush. → [Read page](https://ratstack.sh/llms.txt)

- Change log → What changed in the files served here, newest first. → [Read page](https://ratstack.sh/log)

- Durability bibliography → Books, checked short quotations, source limits, and Effect mapping provenance. → [Read page](https://ratstack.sh/lore/durability-bibliography)

- Durability starts with a recovery record → A reading order for storage, replay, worker ownership, overload, and recovery tests. → [Read page](https://ratstack.sh/lore/durability)

- Failures keep their meaning → Expected refusals, infrastructure faults, and defects need different policies. → [Read page](https://ratstack.sh/lore/failures-keep-their-meaning)

- Full agent guide → An Effect stack so pure (aspirational) Kit Langton will blush. → [Read page](https://ratstack.sh/llms-full.txt)

- Rat Stack lore | rat-stack → Short, source-grounded notes on the ideas and decisions behind rat-stack. → [Read page](https://ratstack.sh/lore)

- Replay needs stable inputs → Historical processing must not silently depend on today’s clock or external decisions. → [Read page](https://ratstack.sh/lore/replay-needs-stable-inputs)

- Source change history (log.md) → The generated change log as Markdown. → [Read page](https://ratstack.sh/log.md)
