← ClaudeAtlas

reliabilitylisted

This skill should be used when reviewing code for unbounded loops, missing assertions, excessive allocation, or deep indirection.
dean0x/devflow · ★ 17 · Code & Development · score 76
Install: claude install-skill dean0x/devflow
# Reliability Patterns Domain expertise for runtime reliability and defensive bounds analysis. Use alongside `devflow:review-methodology` for complete reliability reviews. ## Iron Law > **EVERY OPERATION MUST TERMINATE AND EVERY RESOURCE MUST BE BOUNDED** > > Adapted from NASA/JPL's "Power of Ten" rules for safety-critical code [1]: every loop must > have a fixed upper bound, every resource must have a known lifetime, and every assumption > must be checked by an assertion. Unbounded operations are latent outages. --- ## Reliability Categories ### 1. Bounded Iteration [1] All loops, retries, and pagination must terminate after a known maximum. **Violation**: Unbounded retry loop ```typescript while (true) { const res = await fetch(url); if (res.ok) break; await sleep(1000); } ``` **Solution**: Fixed upper bound with explicit failure ```typescript const MAX_RETRIES = 5; for (let attempt = 0; attempt < MAX_RETRIES; attempt++) { const res = await fetch(url); if (res.ok) return res; await sleep(1000 * 2 ** attempt); } throw new Error(`Failed after ${MAX_RETRIES} attempts`); ``` ### 2. Assertion Density [1] Assert preconditions and invariants in production code, not just tests. **Violation**: Silent assumption ```typescript function processPayment(order: Order) { const total = order.items.reduce((sum, i) => sum + i.price, 0); chargeCard(order.paymentMethod, total); } ``` **Solution**: Explicit precondition checks ```typescript function processPayment(or