principle-boundary-discipline

Installation
SKILL.md

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-validation. Trust the types.

Applications:

Validation and error handling:

  • Validate config at parse time (the boundary), not inside business logic
  • Store raw data at boundaries; parse lazily at use-site
  • No redundant nil checks deep in call chains if the boundary already validated
Installs
213
Repository
cursor/plugins
GitHub Stars
2.2K
First Seen
May 24, 2026
principle-boundary-discipline — cursor/plugins