error-handling-typed-results
Installation
SKILL.md
Error Handling — Typed Results
Recoverable failures are typed values that flow through the layers and are switched on exhaustively; only genuine bugs and unrecoverable states throw, and those are caught once by a global net. Wrapped around both, never-lose-data — transactions, autosave drafts, soft-delete/Undo — is a first-class subsystem, not plumbing. Two tiers, no middle ground.
Read the reference for the task at hand:
references/result-failure-spine.md— theResult/Failuresource, the per-boundary taxonomy, convert-at-boundary, the global net, isolate re-wrapping, and local logging.references/mechanism-selection.md— throw vsassertvsExceptionvs sealed outcome,@useResult, and the runZonedGuarded decision.references/never-lose-data.md— one transaction per mutation, debounced autosave drafts, optimistic soft-delete / Trash / Undo behind one filter.
Run scripts/check-swallowed-catch.sh and scripts/check-softdelete-parity.sh before a PR.