Boundary Discipline Place validation, type narrowing, and error handling at system boundaries. Trust internal code unconditionally. Business logic lives in pure functions; the shell is thin and mechanical. Why: Scattered validation is noisy, redundant, and gives a false sense of safety. Validate data once at the boundary. Keep logic out of framework wiring so it can be tested without the framework. The pattern: - At boundaries (CLI args, config files, external APIs, network protocols): validate, return errors, handle defensively. - Inside the system: typed data, error propagation, no re-valid…