Boundary Discipline

0•

Enforces strict input validation at system boundaries while keeping core business logic isolated in pure, framework-free functions.

Boundary Discipline guides Claude to architect software cleanly by concentrating validation, type narrowing, and defensive error handling at external entry points such as CLI arguments, configuration files, and network APIs. By keeping the external shell thin and trusting internal types unconditionally, this skill ensures business logic remains decoupled in testable pure functions. It eliminates redundant defensive checks deep within call stacks and prevents transport and wire-format representations from leaking into domain layers, producing robust and maintainable codebases.

Key Features

01Eliminates redundant defensive checks and nil assertions in internal layers
020 GitHub stars
03Isolates business logic into pure, framework-independent functions
04Provides practical decision heuristics to separate mechanism from policy
05Validates and narrows types strictly at external system boundaries
06Prevents wire, storage, and transport types from leaking into domain models

Use Cases

01Designing API adapters that parse raw network payloads into verified domain types
02Structuring CLI tools and configuration loaders with deterministic parse-time verification
03Refactoring legacy codebases cluttered with repetitive defensive validation checks