$npx -y skills add DNYoussef/context-cascade --skill debugging/*============================================================================*/ /* DEBUGGING SKILL :: VERILINGUA x VERIX EDITION */ /*============================================================================*/
| 1 | /*============================================================================*/ |
| 2 | /* DEBUGGING SKILL :: VERILINGUA x VERIX EDITION */ |
| 3 | /*============================================================================*/ |
| 4 | |
| 5 | --- |
| 6 | name: debugging |
| 7 | version: 1.0.0 |
| 8 | description: | |
| 9 | [assert|neutral] Systematic debugging methodology using a 5-phase protocol. Use when troubleshooting code failures, investigating bugs, or analyzing unexpected behavior. Applies 10 proven debugging techniques includin [ground:given] [conf:0.95] [state:confirmed] |
| 10 | category: delivery |
| 11 | tags: |
| 12 | - delivery |
| 13 | - development |
| 14 | - workflow |
| 15 | author: ruv |
| 16 | cognitive_frame: |
| 17 | primary: aspectual |
| 18 | goal_analysis: |
| 19 | first_order: "Execute debugging workflow" |
| 20 | second_order: "Ensure quality and consistency" |
| 21 | third_order: "Enable systematic delivery processes" |
| 22 | --- |
| 23 | |
| 24 | /*----------------------------------------------------------------------------*/ |
| 25 | /* S0 META-IDENTITY */ |
| 26 | /*----------------------------------------------------------------------------*/ |
| 27 | |
| 28 | [define|neutral] SKILL := { |
| 29 | name: "debugging", |
| 30 | category: "delivery", |
| 31 | version: "1.0.0", |
| 32 | layer: L1 |
| 33 | } [ground:given] [conf:1.0] [state:confirmed] |
| 34 | |
| 35 | /*----------------------------------------------------------------------------*/ |
| 36 | /* S1 COGNITIVE FRAME */ |
| 37 | /*----------------------------------------------------------------------------*/ |
| 38 | |
| 39 | [define|neutral] COGNITIVE_FRAME := { |
| 40 | frame: "Aspectual", |
| 41 | source: "Russian", |
| 42 | force: "Complete or ongoing?" |
| 43 | } [ground:cognitive-science] [conf:0.92] [state:confirmed] |
| 44 | |
| 45 | ## Kanitsal Cerceve (Evidential Frame Activation) |
| 46 | Kaynak dogrulama modu etkin. |
| 47 | |
| 48 | /*----------------------------------------------------------------------------*/ |
| 49 | /* S2 TRIGGER CONDITIONS */ |
| 50 | /*----------------------------------------------------------------------------*/ |
| 51 | |
| 52 | [define|neutral] TRIGGER_POSITIVE := { |
| 53 | keywords: ["debugging", "delivery", "workflow"], |
| 54 | context: "user needs debugging capability" |
| 55 | } [ground:given] [conf:1.0] [state:confirmed] |
| 56 | |
| 57 | /*----------------------------------------------------------------------------*/ |
| 58 | /* S3 CORE CONTENT */ |
| 59 | /*----------------------------------------------------------------------------*/ |
| 60 | |
| 61 | # Debugging - Systematic Code Investigation |
| 62 | |
| 63 | ## Kanitsal Cerceve (Evidential Frame Activation) |
| 64 | Kaynak dogrulama modu etkin. |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | ## When to Use This Skill |
| 70 | |
| 71 | - **Production Incidents**: Critical bugs affecting live users requiring rapid diagnosis |
| 72 | - **Intermittent Failures**: Flaky tests, race conditions, or timing-dependent bugs |
| 73 | - **Performance Issues**: Slow endpoints, memory leaks, or CPU spikes |
| 74 | - **Integration Failures**: Third-party API errors, database connectivity issues |
| 75 | - **Regression Analysis**: New bugs introduced by recent changes |
| 76 | - **Complex Stack Traces**: Multi-layered errors spanning multiple services |
| 77 | |
| 78 | ## When NOT to Use This Skill |
| 79 | |
| 80 | - **Feature Development**: Building new functionality (use feature-dev-complete instead) |
| 81 | - **Code Reviews**: Reviewing code quality or architecture (use code-review-assistant) |
| 82 | - **Refactoring**: Restructuring code without fixing bugs (use refactoring skills) |
| 83 | - **Known Issues**: Bugs with clear root cause already identified |
| 84 | |
| 85 | ## Success Criteria |
| 86 | |
| 87 | - [ ] Root cause identified with supporting evidence |
| 88 | - [ ] Fix implemented and tested |
| 89 | - [ ] Regression test added to prevent recurrence |
| 90 | - [ ] All related test suites passing |
| 91 | - [ ] Fix validated in production-like environment |
| 92 | - [ ] Documentation updated with troubleshooting notes |
| 93 | - [ ] Monitoring/alerting adjusted if needed |
| 94 | |
| 95 | ## Edge Cases to Handle |
| 96 | |
| 97 | - **Heisenbugs**: Bugs that disappear when debugger attached |
| 98 | - **Multi-Service Failures**: Cascading errors across microservices |
| 99 | - **Data Corruption**: State inconsistencies requiring rollback |
| 100 | - **Timezone Issues**: Date/time bugs across regions |
| 101 | - **Concurrency Bugs**: Race conditions, deadlocks, or thread safety |
| 102 | - **Memory Corruption**: Pointer errors, buffer overflows in native code |
| 103 | |
| 104 | ## Guardrails |
| 105 | |
| 106 | - **NEVER** deploy debug code or verbose logging to production |
| 107 | - **ALWAYS** reproduce bugs locally before proposing fixes |
| 108 | - **NEVER** fix symptoms without understanding root cause |
| 109 | - **ALWAYS** add regression tests for fixed bugs |
| 110 | - **NEVER** disable tests to make CI pass |
| 111 | - **ALWAYS** verify fixes do not introduce new bugs |
| 112 | - **NEVER** modify production data without backup |
| 113 | |
| 114 | ## Evidence-Based Validation |
| 115 | |
| 116 | - [ ] Bug reproduced consistently with minimal test case |
| 117 | - [ ] Stack traces analyzed with error tracking tools (Sentry, Rollbar) |
| 118 | - [ ] Performance profiled with appropriate tools (Chrome DevTools, py-spy) |
| 119 | - [ ] Fix verified with automated tests |
| 120 | - [ ] Integration tests passing |
| 121 | - [ ] No new errors in application logs |
| 122 | - [ ] Memory/CPU usage within normal bounds |
| 123 | |
| 124 | Systematic debugging through proven methodologies and comprehensive error an |