← pstackCONTENT HISTORYWHAT CHANGED · RULE-BASED ANALYSIS
Update to pstack
Snapshot Sep 30, 2026 · 23:14 UTC · version 0.2.0
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": "---\nname: principle-boundary-discipline\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.\"\ndisable-model-invocation: true\n---\n\n# Boundary Discipline\n\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.\n\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.\n\n**The pattern:**\n- **At boundaries** (CLI args, config files, external APIs, network protocols): validate, return errors, handle defensively.\n- **Inside the system:** typed data, error propagation, no re-validation. Trust the types.\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.\n\n**Applications:**\n\nValidation and error handling:\n- Validate config at parse time (the boundary), not inside business logic\n- Parse raw data into domain types at the boundary\n- Do not re-export transport, storage, framework, or wire types through the public surface\n- No redundant nil checks deep in call chains if the boundary already validated\n\nCode organization:\n- Business logic in pure functions with no framework dependencies\n- Parse functions: pure transforms from raw bytes to typed state\n- Prompt construction: structured state in, string out\n- Scoring and assessment: pure transforms from state to results\n\n**The tests:**\n- \"Is this data crossing a system boundary right now?\" If not, validation is redundant.\n- \"Can this be a pure function that the shell just calls?\" If yes, extract it.\n"
}SHA-256 of public snapshot: ad723ad8c45ebf26773b46607e9208d3f5071bf454349099a3cd15384907a462