--- name: "Sequential Thinking" description: "Establishes a deep, step-by-step reasoning cycle for complex logic validation and edge-case prevention." --- # Skill: Sequential Thinking ## 1. Purpose Solve complex bugs or write high-level logic by decomposing problems into structured, sequential hypotheses and verifying them one step at a time. ## 2. When to Use Trigger during planning and plan execution for complex math, algorithm design, auth validations, or structural refactoring. ## 3. Step-by-Step Checklist 1. **Deconstruct**: Break the problem into small, independent sub-problems. 2. **Hypothesize**: Formulate a hypothesis for each sub-problem (e.g. "If X middleware runs first, Y header is preserved"). 3. **Trace**: Dry-run or trace the code path for standard inputs. 4. **Identify Edge Cases**: Analyze boundary conditions (e.g. empty lists, null values, rapid successive clicks). 5. **Verify**: Write down local checks or test scripts to prove/disprove each hypothesis. 6. **Iterate**: If a test fails, adjust the hypothesis and repeat.