$npx -y skills add DNYoussef/context-cascade --skill when-debugging-code-use-debugging-assistant/*============================================================================*/ /* SKILL SKILL :: VERILINGUA x VERIX EDITION */ /*============================================================================*/
| 1 | /*============================================================================*/ |
| 2 | /* SKILL SKILL :: VERILINGUA x VERIX EDITION */ |
| 3 | /*============================================================================*/ |
| 4 | |
| 5 | --- |
| 6 | name: SKILL |
| 7 | version: 1.0.0 |
| 8 | description: | |
| 9 | [assert|neutral] SKILL skill for delivery workflows [ground:given] [conf:0.95] [state:confirmed] |
| 10 | category: delivery |
| 11 | tags: |
| 12 | - general |
| 13 | author: system |
| 14 | cognitive_frame: |
| 15 | primary: aspectual |
| 16 | goal_analysis: |
| 17 | first_order: "Execute SKILL workflow" |
| 18 | second_order: "Ensure quality and consistency" |
| 19 | third_order: "Enable systematic delivery processes" |
| 20 | --- |
| 21 | |
| 22 | /*----------------------------------------------------------------------------*/ |
| 23 | /* S0 META-IDENTITY */ |
| 24 | /*----------------------------------------------------------------------------*/ |
| 25 | |
| 26 | [define|neutral] SKILL := { |
| 27 | name: "SKILL", |
| 28 | category: "delivery", |
| 29 | version: "1.0.0", |
| 30 | layer: L1 |
| 31 | } [ground:given] [conf:1.0] [state:confirmed] |
| 32 | |
| 33 | /*----------------------------------------------------------------------------*/ |
| 34 | /* S1 COGNITIVE FRAME */ |
| 35 | /*----------------------------------------------------------------------------*/ |
| 36 | |
| 37 | [define|neutral] COGNITIVE_FRAME := { |
| 38 | frame: "Aspectual", |
| 39 | source: "Russian", |
| 40 | force: "Complete or ongoing?" |
| 41 | } [ground:cognitive-science] [conf:0.92] [state:confirmed] |
| 42 | |
| 43 | ## Kanitsal Cerceve (Evidential Frame Activation) |
| 44 | Kaynak dogrulama modu etkin. |
| 45 | |
| 46 | /*----------------------------------------------------------------------------*/ |
| 47 | /* S2 TRIGGER CONDITIONS */ |
| 48 | /*----------------------------------------------------------------------------*/ |
| 49 | |
| 50 | [define|neutral] TRIGGER_POSITIVE := { |
| 51 | keywords: ["SKILL", "delivery", "workflow"], |
| 52 | context: "user needs SKILL capability" |
| 53 | } [ground:given] [conf:1.0] [state:confirmed] |
| 54 | |
| 55 | /*----------------------------------------------------------------------------*/ |
| 56 | /* S3 CORE CONTENT */ |
| 57 | /*----------------------------------------------------------------------------*/ |
| 58 | |
| 59 | # Debugging Assistant Skill |
| 60 | |
| 61 | ## Kanitsal Cerceve (Evidential Frame Activation) |
| 62 | Kaynak dogrulama modu etkin. |
| 63 | |
| 64 | |
| 65 | |
| 66 | ## Overview |
| 67 | |
| 68 | Intelligent debugging workflow that systematically identifies symptoms, performs root cause analysis, generates fixes with explanations, validates solutions, and prevents regressions through comprehensive testing. |
| 69 | |
| 70 | ## Metadata |
| 71 | |
| 72 | - **Skill ID:** `when-debugging-code-use-debugging-assistant` |
| 73 | - **Category:** Development/Debugging |
| 74 | - **Complexity:** HIGH |
| 75 | - **Agents Required:** coder, code-analyzer, tester |
| 76 | - **Prerequisites:** Access to codebase, error logs, test environment |
| 77 | |
| 78 | ## Trigger Conditions |
| 79 | |
| 80 | Use this skill when encountering: |
| 81 | - Runtime errors or exceptions |
| 82 | - Unexpected behavior or incorrect output |
| 83 | - Performance degradation or memory leaks |
| 84 | - Race conditions or timing issues |
| 85 | - Integration failures |
| 86 | - Test failures requiring investigation |
| 87 | |
| 88 | ## 5-Phase Debugging Protocol (SOP) |
| 89 | |
| 90 | ### Phase 1: Symptom Identification |
| 91 | |
| 92 | **Objective:** Gather comprehensive information about the issue |
| 93 | |
| 94 | **Agent:** code-analyzer |
| 95 | |
| 96 | **Actions:** |
| 97 | 1. Collect error messages, stack traces, and logs |
| 98 | 2. Document expected vs actual behavior |
| 99 | 3. Identify reproduction steps |
| 100 | 4. Determine scope and frequency of occurrence |
| 101 | 5. Classify issue severity and impact |
| 102 | |
| 103 | **Outputs:** |
| 104 | - Symptom report with complete context |
| 105 | - Reproduction steps (manual or automated) |
| 106 | - Environmental context (OS, runtime version, dependencies) |
| 107 | - Issue classification (bug, regression, edge case) |
| 108 | |
| 109 | **Success Criteria:** |
| 110 | - Issue can be consistently reproduced |
| 111 | - All relevant context is documented |
| 112 | - Scope of impact is clearly defined |
| 113 | |
| 114 | ### Phase 2: Root Cause Analysis |
| 115 | |
| 116 | **Objective:** Trace execution flow and identify the underlying cause |
| 117 | |
| 118 | **Agent:** code-analyzer + coder |
| 119 | |
| 120 | **Actions:** |
| 121 | 1. Trace execution path from entry point to failure |
| 122 | 2. Examine variable states and data transformations |
| 123 | 3. Identify assumptions that may be violated |
| 124 | 4. Check boundary conditions and edge cases |
| 125 | 5. Review recent code changes that may have introduced the issue |
| 126 | 6. Analyze dependencies and external system interactions |
| 127 | |
| 128 | **Techniques:** |
| 129 | - Binary search debugging (narrow down location) |
| 130 | - Hypothesis-driven investigation |
| 131 | - Comparative analysis (working vs broken code paths) |
| 132 | - Temporal analysis (when did it start failing?) |
| 133 | |
| 134 | **Outputs:** |
| 135 | - Root cause statement with evidence |
| 136 | - Affected code locations and line numbers |
| 137 | - Explanation of why the bug occurs |
| 138 | - Related issues or side effects |
| 139 | |
| 140 | **Success Criteria:** |
| 141 | - Clear understanding of the mechanism causing the failure |
| 142 | - Reproducible test case that isolates the root cause |
| 143 | - Documented reasoning chain from symptom to cause |
| 144 | |
| 145 | ### Phase 3: Fix Generation |
| 146 | |
| 147 | **Objective:** Develop and explain solution options |
| 148 | |
| 149 | **Agent:** coder |
| 150 | |
| 151 | **Actions:** |
| 152 | 1. Generate 2-3 solution approaches |
| 153 | 2. Evaluate trade-offs for each approach |