{"data":{"slug":"discovered-97e8f0ac6ed1ff95d0f9b7cccaea7fbf4f493728f6831c34","title":"Principle Boundary Discipline","summary":"Apply validation, type narrowing, and error handling only at system boundaries such as CLI args, config files, and external APIs. Keep internal logic pure and free from framework dependencies.","url":"https:\/\/skillshunter.net\/skills\/discovered-97e8f0ac6ed1ff95d0f9b7cccaea7fbf4f493728f6831c34","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-97e8f0ac6ed1ff95d0f9b7cccaea7fbf4f493728f6831c34","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-97e8f0ac6ed1ff95d0f9b7cccaea7fbf4f493728f6831c34.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-97e8f0ac6ed1ff95d0f9b7cccaea7fbf4f493728f6831c34\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Ensure that validation occurs only at system boundaries and that internal logic remains free of framework dependencies. Prepare by identifying where data crosses system boundaries and extract pure functions for the shell to call.","instructions":"---\nname: principle-boundary-discipline\ndescription: When wiring validation or error handling, guard only at system boundaries.\ndisable-model-invocation: true\n---\n\n# Boundary Discipline\n\nValidate, narrow types, and handle errors where data crosses a system boundary (CLI args, config files, external APIs, network). Inside, trust the types: no re-validation and no redundant nil checks. Parse raw data into domain types at the boundary, and keep transport and framework types out of the public API. Business logic lives in pure functions with no framework dependencies. The shell that calls them is thin.\n\nTwo tests. Is this data crossing a boundary right now? If not, the validation is redundant. Can this be a pure function the shell just calls? If yes, extract it.\n","use_cases":["Validating CLI arguments before passing them to internal logic","Parsing external API responses into domain-specific types","Handling errors in config file parsing without involving business logic","Ensuring internal functions are pure and framework-agnostic"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/jueyi6\/empstack\/blob\/74181e31d2f00313f8683ba157966efcabbe109e\/skills\/principle-boundary-discipline\/SKILL.md","source_commit":"74181e31d2f00313f8683ba157966efcabbe109e","license":null,"version":null,"listing_approved_at":"2026-12-02","created_at":"2026-11-30T08:56:01.000000Z","updated_at":"2026-12-02T09:15:14.000000Z","seo_title":"Boundary Discipline in Software Development","seo_description":"Learn how to apply boundary discipline by validating and handling errors only at system boundaries, ensuring clean and maintainable internal logic.","seo_keywords":["boundary discipline","validation at system boundaries","pure functions","error handling","software development practices"]}}