Rseng Defensive Coding

Covers defenses against silently wrong research results: validating data at boundaries (schemas, assertions, sanity checks), explicit physical units and quantities in code (pint/astropy-style), disciplined randomness (explicit seeded generators, parallel streams), and fail-loud handling of NaN and missing data. Use PROACTIVELY when code ingests external or instrument data, when values carry physical units, when randomness enters simulations or sampling, or when NaN or missing-data handling is implicit; also when the user mentions data validation, unit errors, seeds or silent bugs, or reviews analysis code whose failure would be invisible. For floating-point behavior and tolerances see rseng-numerical-accuracy; for diagnosing an existing bug see rseng-debugging.

fdiblen 5d64564 2 files · 6.4 KB Updated

File contents

fdiblen/rseng-agent-skills/tree/main/skills/rseng-defensive-coding commit 5d64564630

Frequently asked questions

npx skillmds@latest add fdiblen/rseng-defensive-coding