← fstackCONTENT HISTORYWHAT CHANGED · RULE-BASED ANALYSIS
Update to fstack
Snapshot Sep 30, 2026 · 23:16 UTC · version 1.1.2
Collection source: not recorded for this historical snapshot.
First saved snapshot
No earlier snapshot is available to establish a change.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"description": "Apply when wiring validation, error handling, or framework adapters. Concentrate guards at system boundaries (CLI, config, network, external APIs); trust internal types and keep business logic in pure functions.",
"included_files": [],
"name": "principle-boundary-discipline",
"skill_md_contents": "---\r\nname: principle-boundary-discipline\r\ndescription: \"Apply when wiring validation, error handling, or framework adapters. Concentrate guards at system boundaries (CLI, config, network, external APIs); trust internal types and keep business logic in pure functions.\"\r\nuser-invocable: false\r\ndisable-model-invocation: true\r\n---\r\n\r\n# Boundary Discipline\r\n\r\nPlace 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.\r\n\r\n**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.\r\n\r\n**The pattern:**\r\n- **At boundaries** (CLI args, config files, external APIs, network protocols): validate, return errors, handle defensively.\r\n- **Inside the system:** typed data, error propagation, no re-validation. Trust the types.\r\n- **Across the boundary.** Expose domain concepts, not the boundary's private representation. Keep general-purpose mechanism inside and special-purpose policy at the edge.\r\n\r\n**Applications:**\r\n\r\nValidation and error handling:\r\n- Validate config at parse time (the boundary), not inside business logic\r\n- Parse raw data into domain types at the boundary\r\n- Do not re-export transport, storage, framework, or wire types through the public surface\r\n- No redundant nil checks deep in call chains if the boundary already validated\r\n\r\nCode organization:\r\n- Business logic in pure functions with no framework dependencies\r\n- Parse functions: pure transforms from raw bytes to typed state\r\n- Prompt construction: structured state in, string out\r\n- Scoring and assessment: pure transforms from state to results\r\n\r\n**The tests:**\r\n- \"Is this data crossing a system boundary right now?\" If not, validation is redundant.\r\n- \"Can this be a pure function that the shell just calls?\" If yes, extract it.\r\n"
}SHA-256 of public snapshot: d8b4b7c8d9982cf769ad350aef71cb09a01020e7a757ff6338e5314b795839b8