In the age of software engineering with AI agents, it’s more important than ever to structure code so that it’s easy to reason about and test:

https://cyrusradfar.com/thoughts/functional-programming-is-the-only-way-to-scale-with-ai

What used to be called functional core / imperative shell (2012) has now been dubbed SUPER:

  • Side Effects at the Edge
  • Uncoupled Logic
  • Pure & Total Functions
  • Explicit Data Flow
  • Replaceable by Value

Sample CLAUDE.md section :

# Design Principles
SUPER: Side effects at edge, Uncoupled logic, Pure functions, Explicit data flow, Replaceable by value.

In practice:

- Side effects (I/O, SQLite, OS APIs) at boundaries; core logic pure
- Small, focused, composable functions
- Result<T, E> everywhere; no unwrap() outside tests
- Newtype wrappers for domain concepts (ContentHash, SnapshotId)