ワンクリックで
reliability
This skill should be used when reviewing code for unbounded loops, missing assertions, excessive allocation, or deep indirection.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
This skill should be used when reviewing code for unbounded loops, missing assertions, excessive allocation, or deep indirection.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Canonical algorithm for consuming DECISIONS_CONTEXT index — scan index, identify relevant entries, Read full bodies on demand, cite verbatim IDs inline.
This skill should be used when evaluating implementation quality before submission, checking correctness, security, and simplicity.
This skill should be used when performing a code review to apply the standard 6-step review process.
This skill should be used when the user asks to "add accessibility", "check ARIA", "handle keyboard navigation", "add focus management", or creates UI components, forms, or interactive elements. Provides WCAG 2.2 AA patterns for keyboard navigation, ARIA roles and states, focus management, color contrast, and screen reader support.
Consumption algorithm for FEATURE_KNOWLEDGE variable — pre-computed feature context
This skill should be used when reviewing code for SOLID violations, tight coupling, or layering issues.
| name | reliability |
| description | This skill should be used when reviewing code for unbounded loops, missing assertions, excessive allocation, or deep indirection. |
| user-invocable | false |
| allowed-tools | Read, Grep, Glob |
Domain expertise for runtime reliability and defensive bounds analysis. Use alongside devflow:review-methodology for complete reliability reviews.
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.
All loops, retries, and pagination must terminate after a known maximum.
Violation: Unbounded retry loop
while (true) {
const res = await fetch(url);
if (res.ok) break;
await sleep(1000);
}
Solution: Fixed upper bound with explicit failure
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`);
Assert preconditions and invariants in production code, not just tests.
Violation: Silent assumption
function processPayment(order: Order) {
const total = order.items.reduce((sum, i) => sum + i.price, 0);
chargeCard(order.paymentMethod, total);
}
Solution: Explicit precondition checks
function processPayment(order: Order) {
assert(order.items.length > 0, 'Cannot process empty order');
assert(order.paymentMethod != null, 'Missing payment method');
const total = order.items.reduce((sum, i) => sum + i.price, 0);
assert(total > 0, 'Order total must be positive');
chargeCard(order.paymentMethod, total);
}
Minimize allocation in hot paths — prefer pre-sized collections, pools, or arenas.
Violation: Allocation in tight loop
func processEvents(events []Event) []Result {
var results []Result
for _, e := range events {
buf := make([]byte, 4096) // alloc per iteration
results = append(results, process(e, buf))
}
return results
}
Solution: Pre-allocate outside loop
func processEvents(events []Event) []Result {
results := make([]Result, 0, len(events))
buf := make([]byte, 4096) // single allocation
for _, e := range events {
results = append(results, process(e, buf))
}
return results
}
Restrict pointer depth — no pointer-to-pointer, Box<Box<T>>, or triple-nested references.
Violation: Excessive indirection
fn update(data: &mut Box<Box<Vec<Item>>>) {
(***data).push(item);
}
Solution: Flatten indirection
fn update(data: &mut Vec<Item>) {
data.push(item);
}
Restrict to simple constructs — no reflection-heavy magic, multi-level macros, or recursive generics.
Violation: Recursive generic type
type DeepPartial<T> = T extends object
? { [K in keyof T]?: DeepPartial<T[K]> }
: T;
type Config = DeepPartial<DeepPartial<AppConfig>>; // unbounded recursion risk
Solution: Bounded, explicit type
type ShallowPartial<T> = { [K in keyof T]?: T[K] };
type ConfigOverrides = Pick<AppConfig, 'timeout' | 'retries'>;
| Reference | Content |
|---|---|
references/sources.md | Full bibliography |
references/patterns.md | Correct patterns with citations |
references/violations.md | Violation examples with citations |
references/detection.md | Grep patterns for automated scanning |
| Level | Criteria | Examples |
|---|---|---|
| CRITICAL | Unbounded operation on external I/O | Infinite retry on network call, allocation in tight loop processing unbounded input |
| HIGH | Implicit-only bounds, zero assertions in critical path | Retry with no max, validation function with no precondition checks |
| MEDIUM | Missing bound on bounded data, low assertion density | Pagination without page limit on known-finite dataset, sparse assertions |
| LOW | Style-level reliability improvement | Unnecessary indirection, overly complex generic type |