My Learn Site
Back to sessions

04

Hooks

Cross-cutting behavior belongs around the loop, not tangled inside it.

Logging, metrics, and policy are cross-cutting. Implement them as hooks that run before or after each loop step.

This keeps the core loop readable and lets you add observability without touching it.

Next session: Planning