From pow10
NASA Power of 10 Rule 2 — Every loop must have a statically determinable upper bound. Severity: blocker.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pow10:pow10-rule-02-bounded-loopsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Severity:** blocker
Severity: blocker
Every loop must carry an explicit, statically verifiable upper bound on its iteration count. The bound should be a compile-time constant where possible. When the bound depends on runtime input, assert it against a fixed maximum.
Bounded loops make termination trivial to prove and worst-case execution time analyzable — required for Rate Monotonic Analysis in real-time systems. Unbounded loops are the most common source of runaway behavior in embedded code.
while (condition) with no enclosing iteration capfor (;;) loops outside an annotated main event looptake(N) capWrap any potentially-unbounded loop with an explicit counter capped by a compile-time constant. Combine with cancellation context (timeout, channel close, signal) so the loop exits cleanly when work is done.
main() event loops sometimes must be infinite. Tag them:
// pow10: allow rule=2 until=2099-01-01 owner=fsw-team reason="main event loop, intentional"
npx claudepluginhub trevoredris/power-of-10-rulesCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.