From cortexloop
Performs deep boundary and state-machine analysis for correctness (pass 1), test coverage (pass 3), and error handling (pass 4) reviews. Finds non-obvious trigger paths like race conditions, idempotency gaps, concurrency bugs, and authorization timing flaws.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cortexloop:edge-case-and-state-analysisThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Auxiliary depth skill for passes **1 (correctness)**, **3 (tests)**, **4 (errorHandling)**. Pair with the pass domain skill.
Auxiliary depth skill for passes 1 (correctness), 3 (tests), 4 (errorHandling). Pair with the pass domain skill.
Go deep on triggers and state. This skill finds how bugs happen — your pass contract decides how to score them (logic bug vs missing test vs silent failure).
| Class | Examples to trace |
|---|---|
| Empty | [], {}, "", no rows, first page empty |
| Extremes | max length, max int, zero quantity, negative where unsigned expected |
| Missing | optional field absent vs null vs undefined vs wrong type |
| Duplicate | double click, replayed idempotency key, duplicate message |
| Malformed | parse succeeds but semantic garbage reaches logic |
Respect validation: don't invent states ruled out upstream unless you prove validator bypass.
Score within your category:
Other categories → deferToLaterPasses.
Trigger: [concrete input/event sequence]
Path: [A → branch B → state C → outcome D]
Impact: [in YOUR pass category vocabulary]
Example (pass 1):
Trigger: double POST /checkout with same Idempotency-Key within 200ms
Path: handler1 read none → create; handler2 read none → create (race)
Impact: duplicate charge records (correctness)
Example (pass 3):
Trigger: (same)
Path: no test uses parallel requests with same key
Impact: regression class untested (tests)
T0 user clicks Pay
T1 request A in flight
T2 user clicks Cancel
T3 A completes, C completes — final state?
"What must never happen?" — hunt for path that violates it.
When A and B each have 2 outcomes, consider combinations (especially async).
npx claudepluginhub whitequeen306/code-cortex-loop --plugin cortexloopDeep correctness and architecture analysis: traces control flow, state, invariants, and module boundaries. Use for bug fixes, refactors, async paths, and domain logic reviews.
Automatically triggered correctness review lens that evaluates logical validity, boundary conditions, invariant preservation, concurrency correctness, and state management.
Documents edge cases, error states, boundary conditions, race conditions, and recovery paths for a feature to ensure comprehensive coverage during specification and QA planning.