@techwavedev/agi-agent-kit 1.2.7 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,27 +9,32 @@ allowed-tools: Read, Glob, Grep
9
9
  > Source: obra/superpowers
10
10
 
11
11
  ## Overview
12
+
12
13
  This skill provides a framework for breaking down work into clear, actionable tasks with verification criteria.
13
14
 
14
15
  ## Task Breakdown Principles
15
16
 
16
17
  ### 1. Small, Focused Tasks
18
+
17
19
  - Each task should take 2-5 minutes
18
20
  - One clear outcome per task
19
21
  - Independently verifiable
20
22
 
21
23
  ### 2. Clear Verification
24
+
22
25
  - How do you know it's done?
23
26
  - What can you check/test?
24
27
  - What's the expected output?
25
28
 
26
29
  ### 3. Logical Ordering
30
+
27
31
  - Dependencies identified
28
32
  - Parallel work where possible
29
33
  - Critical path highlighted
30
34
  - **Phase X: Verification is always LAST**
31
35
 
32
36
  ### 4. Dynamic Naming in Project Root
37
+
33
38
  - Plan files are saved as `{task-slug}.md` in the PROJECT ROOT
34
39
  - Name derived from task (e.g., "add auth" → `auth-feature.md`)
35
40
  - **NEVER** inside `.claude/`, `docs/`, or temp folders
@@ -40,11 +45,11 @@ This skill provides a framework for breaking down work into clear, actionable ta
40
45
 
41
46
  ### Principle 1: Keep It SHORT
42
47
 
43
- | ❌ Wrong | ✅ Right |
44
- |----------|----------|
45
- | 50 tasks with sub-sub-tasks | 5-10 clear tasks max |
46
- | Every micro-step listed | Only actionable items |
47
- | Verbose descriptions | One-line per task |
48
+ | ❌ Wrong | ✅ Right |
49
+ | --------------------------- | --------------------- |
50
+ | 50 tasks with sub-sub-tasks | 5-10 clear tasks max |
51
+ | Every micro-step listed | Only actionable items |
52
+ | Verbose descriptions | One-line per task |
48
53
 
49
54
  > **Rule:** If plan is longer than 1 page, it's too long. Simplify.
50
55
 
@@ -52,11 +57,11 @@ This skill provides a framework for breaking down work into clear, actionable ta
52
57
 
53
58
  ### Principle 2: Be SPECIFIC, Not Generic
54
59
 
55
- | ❌ Wrong | ✅ Right |
56
- |----------|----------|
57
- | "Set up project" | "Run `npx create-next-app`" |
60
+ | ❌ Wrong | ✅ Right |
61
+ | -------------------- | -------------------------------------------------------- |
62
+ | "Set up project" | "Run `npx create-next-app`" |
58
63
  | "Add authentication" | "Install next-auth, create `/api/auth/[...nextauth].ts`" |
59
- | "Style the UI" | "Add Tailwind classes to `Header.tsx`" |
64
+ | "Style the UI" | "Add Tailwind classes to `Header.tsx`" |
60
65
 
61
66
  > **Rule:** Each task should have a clear, verifiable outcome.
62
67
 
@@ -65,16 +70,19 @@ This skill provides a framework for breaking down work into clear, actionable ta
65
70
  ### Principle 3: Dynamic Content Based on Project Type
66
71
 
67
72
  **For NEW PROJECT:**
73
+
68
74
  - What tech stack? (decide first)
69
75
  - What's the MVP? (minimal features)
70
76
  - What's the file structure?
71
77
 
72
78
  **For FEATURE ADDITION:**
79
+
73
80
  - Which files are affected?
74
81
  - What dependencies needed?
75
82
  - How to verify it works?
76
83
 
77
84
  **For BUG FIX:**
85
+
78
86
  - What's the root cause?
79
87
  - What file/line to change?
80
88
  - How to test the fix?
@@ -85,13 +93,13 @@ This skill provides a framework for breaking down work into clear, actionable ta
85
93
 
86
94
  > 🔴 **DO NOT copy-paste script commands. Choose based on project type.**
87
95
 
88
- | Project Type | Relevant Scripts |
89
- |--------------|------------------|
96
+ | Project Type | Relevant Scripts |
97
+ | -------------- | ----------------------------------------- |
90
98
  | Frontend/React | `ux_audit.py`, `accessibility_checker.py` |
91
- | Backend/API | `api_validator.py`, `security_scan.py` |
92
- | Mobile | `mobile_audit.py` |
93
- | Database | `schema_validator.py` |
94
- | Full-stack | Mix of above based on what you touched |
99
+ | Backend/API | `api_validator.py`, `security_scan.py` |
100
+ | Mobile | `mobile_audit.py` |
101
+ | Database | `schema_validator.py` |
102
+ | Full-stack | Mix of above based on what you touched |
95
103
 
96
104
  **Wrong:** Adding all scripts to every plan
97
105
  **Right:** Only scripts relevant to THIS task
@@ -100,11 +108,11 @@ This skill provides a framework for breaking down work into clear, actionable ta
100
108
 
101
109
  ### Principle 5: Verification is Simple
102
110
 
103
- | ❌ Wrong | ✅ Right |
104
- |----------|----------|
105
- | "Verify the component works correctly" | "Run `npm run dev`, click button, see toast" |
106
- | "Test the API" | "curl localhost:3000/api/users returns 200" |
107
- | "Check styles" | "Open browser, verify dark mode toggle works" |
111
+ | ❌ Wrong | ✅ Right |
112
+ | -------------------------------------- | --------------------------------------------- |
113
+ | "Verify the component works correctly" | "Run `npm run dev`, click button, see toast" |
114
+ | "Test the API" | "curl localhost:3000/api/users returns 200" |
115
+ | "Check styles" | "Open browser, verify dark mode toggle works" |
108
116
 
109
117
  ---
110
118
 
@@ -129,8 +137,62 @@ One sentence: What are we building/fixing?
129
137
  > Keep it minimal. Add complexity only when required.
130
138
 
131
139
  ## Notes
140
+
132
141
  [Any important considerations]
133
- ```
142
+
143
+ ````
144
+
145
+ ---
146
+
147
+ ## Bite-Sized Task Granularity (TDD Steps)
148
+
149
+ > Adapted from obra/superpowers — each step is one action (2-5 minutes).
150
+
151
+ When the project has testable code, structure each task with TDD steps:
152
+
153
+ ```markdown
154
+ ### Task N: [Component Name]
155
+
156
+ **Files:**
157
+ - Create: `exact/path/to/file.ext`
158
+ - Modify: `exact/path/to/existing.ext`
159
+ - Test: `tests/exact/path/to/test.ext`
160
+
161
+ **Step 1: Write the failing test**
162
+ [Complete test code]
163
+
164
+ **Step 2: Run test to verify it fails**
165
+ Run: [exact command]
166
+ Expected: FAIL with "[reason]"
167
+
168
+ **Step 3: Write minimal implementation**
169
+ [Complete implementation code]
170
+
171
+ **Step 4: Run test to verify it passes**
172
+ Run: [exact command]
173
+ Expected: PASS
174
+
175
+ **Step 5: Commit**
176
+ git add [files] && git commit -m "feat: [description]"
177
+ ````
178
+
179
+ > 🔴 **Not every task needs TDD steps.** Config changes, setup tasks, and non-code tasks can use simpler step structure.
180
+
181
+ ---
182
+
183
+ ## Execution Handoff
184
+
185
+ After saving the plan, offer execution choice:
186
+
187
+ **"Plan complete. Two execution options:**
188
+
189
+ **1. Subagent-Driven** — Fresh agent per task, two-stage review (spec compliance + code quality), fast iteration
190
+
191
+ **2. Batch Execution** — Execute 3 tasks at a time, report for human review between batches
192
+
193
+ **Which approach?"**
194
+
195
+ Both options use the `executing-plans` skill for structured execution.
134
196
 
135
197
  ---
136
198
 
@@ -141,6 +203,8 @@ One sentence: What are we building/fixing?
141
203
  3. **Each task verifiable** - Clear "done" criteria
142
204
  4. **Project-specific** - No copy-paste templates
143
205
  5. **Update as you go** - Mark `[x]` when complete
206
+ 6. **TDD when testable** - Use red-green-refactor step structure
207
+ 7. **Complete code in plan** - Not "add validation" but the actual code
144
208
 
145
209
  ---
146
210
 
@@ -150,3 +214,14 @@ One sentence: What are we building/fixing?
150
214
  - Adding a feature
151
215
  - Fixing a bug (if complex)
152
216
  - Refactoring multiple files
217
+
218
+ ---
219
+
220
+ ## Integration
221
+
222
+ | Skill | Relationship |
223
+ | -------------------------------- | ------------------------------------ |
224
+ | `brainstorming` | Design phase before plan creation |
225
+ | `executing-plans` | Executes the plan this skill creates |
226
+ | `test-driven-development` | TDD cycle referenced in task steps |
227
+ | `verification-before-completion` | Gate before marking plan complete |
@@ -1,109 +1,214 @@
1
1
  ---
2
2
  name: systematic-debugging
3
- description: 4-phase systematic debugging methodology with root cause analysis and evidence-based verification. Use when debugging complex issues.
4
- allowed-tools: Read, Glob, Grep
3
+ description: 4-phase root cause debugging process. Use for ANY technical issue test failures, bugs, unexpected behavior, performance problems. ALWAYS find root cause before attempting fixes.
4
+ version: 1.0.0
5
5
  ---
6
6
 
7
7
  # Systematic Debugging
8
8
 
9
- > Source: obra/superpowers
9
+ > Adapted from obra/superpowers — integrated with agi `debugger` agent.
10
10
 
11
11
  ## Overview
12
- This skill provides a structured approach to debugging that prevents random guessing and ensures problems are properly understood before solving.
13
12
 
14
- ## 4-Phase Debugging Process
13
+ Random fixes waste time and create new bugs. Quick patches mask underlying issues.
15
14
 
16
- ### Phase 1: Reproduce
17
- Before fixing, reliably reproduce the issue.
15
+ **Core principle:** ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
18
16
 
19
- ```markdown
20
- ## Reproduction Steps
21
- 1. [Exact step to reproduce]
22
- 2. [Next step]
23
- 3. [Expected vs actual result]
17
+ ---
18
+
19
+ ## The Iron Law
24
20
 
25
- ## Reproduction Rate
26
- - [ ] Always (100%)
27
- - [ ] Often (50-90%)
28
- - [ ] Sometimes (10-50%)
29
- - [ ] Rare (<10%)
21
+ ```
22
+ NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
30
23
  ```
31
24
 
32
- ### Phase 2: Isolate
33
- Narrow down the source.
25
+ If you haven't completed Phase 1, you cannot propose fixes.
34
26
 
35
- ```markdown
36
- ## Isolation Questions
37
- - When did this start happening?
38
- - What changed recently?
39
- - Does it happen in all environments?
40
- - Can we reproduce with minimal code?
41
- - What's the smallest change that triggers it?
42
- ```
27
+ ---
43
28
 
44
- ### Phase 3: Understand
45
- Find the root cause, not just symptoms.
46
-
47
- ```markdown
48
- ## Root Cause Analysis
49
- ### The 5 Whys
50
- 1. Why: [First observation]
51
- 2. Why: [Deeper reason]
52
- 3. Why: [Still deeper]
53
- 4. Why: [Getting closer]
54
- 5. Why: [Root cause]
55
- ```
29
+ ## When to Use
56
30
 
57
- ### Phase 4: Fix & Verify
58
- Fix and verify it's truly fixed.
31
+ Use for **ANY** technical issue:
59
32
 
60
- ```markdown
61
- ## Fix Verification
62
- - [ ] Bug no longer reproduces
63
- - [ ] Related functionality still works
64
- - [ ] No new issues introduced
65
- - [ ] Test added to prevent regression
66
- ```
33
+ - Test failures
34
+ - Bugs in production
35
+ - Unexpected behavior
36
+ - Performance problems
37
+ - Build failures
38
+ - Integration issues
67
39
 
68
- ## Debugging Checklist
69
-
70
- ```markdown
71
- ## Before Starting
72
- - [ ] Can reproduce consistently
73
- - [ ] Have minimal reproduction case
74
- - [ ] Understand expected behavior
75
-
76
- ## During Investigation
77
- - [ ] Check recent changes (git log)
78
- - [ ] Check logs for errors
79
- - [ ] Add logging if needed
80
- - [ ] Use debugger/breakpoints
81
-
82
- ## After Fix
83
- - [ ] Root cause documented
84
- - [ ] Fix verified
85
- - [ ] Regression test added
86
- - [ ] Similar code checked
87
- ```
40
+ **Use ESPECIALLY when:**
88
41
 
89
- ## Common Debugging Commands
42
+ - Under time pressure (emergencies make guessing tempting)
43
+ - "Just one quick fix" seems obvious
44
+ - You've already tried multiple fixes
45
+ - Previous fix didn't work
90
46
 
91
- ```bash
92
- # Recent changes
93
- git log --oneline -20
94
- git diff HEAD~5
47
+ **Don't skip when:**
95
48
 
96
- # Search for pattern
97
- grep -r "errorPattern" --include="*.ts"
49
+ - Issue seems simple (simple bugs have root causes too)
50
+ - You're in a hurry (systematic is faster than thrashing)
98
51
 
99
- # Check logs
100
- pm2 logs app-name --err --lines 100
101
- ```
52
+ ---
53
+
54
+ ## The Four Phases
55
+
56
+ You MUST complete each phase before proceeding to the next.
57
+
58
+ ### Phase 1: Root Cause Investigation
59
+
60
+ **BEFORE attempting ANY fix:**
61
+
62
+ 1. **Read Error Messages Carefully**
63
+ - Don't skip past errors or warnings
64
+ - Read stack traces completely
65
+ - Note line numbers, file paths, error codes
66
+
67
+ 2. **Reproduce Consistently**
68
+ - Can you trigger it reliably?
69
+ - What are the exact steps?
70
+ - If not reproducible → gather more data, don't guess
71
+
72
+ 3. **Check Recent Changes**
73
+ - `git diff`, recent commits
74
+ - New dependencies, config changes
75
+ - Environmental differences
76
+
77
+ 4. **Gather Evidence in Multi-Component Systems**
78
+
79
+ When system has multiple components:
80
+
81
+ ```
82
+ For EACH component boundary:
83
+ - Log what data enters component
84
+ - Log what data exits component
85
+ - Verify environment/config propagation
86
+ - Check state at each layer
87
+
88
+ Run once → analyze evidence → identify failing component
89
+ ```
90
+
91
+ 5. **Trace Data Flow**
92
+ - Where does the bad value originate?
93
+ - What called this with the bad value?
94
+ - Keep tracing up until you find the source
95
+ - Fix at source, not at symptom
96
+
97
+ ### Phase 2: Pattern Analysis
98
+
99
+ 1. **Find Working Examples**
100
+ - Locate similar working code in the same codebase
101
+ - What works that's similar to what's broken?
102
+
103
+ 2. **Compare Against References**
104
+ - Read reference implementation COMPLETELY (don't skim)
105
+ - Understand the pattern fully before applying
106
+
107
+ 3. **Identify Differences**
108
+ - What's different between working and broken?
109
+ - List every difference, however small
110
+ - Don't assume "that can't matter"
111
+
112
+ 4. **Understand Dependencies**
113
+ - What other components does this need?
114
+ - What settings, config, environment?
115
+
116
+ ### Phase 3: Hypothesis and Testing
117
+
118
+ 1. **Form Single Hypothesis**
119
+ - State clearly: "I think X is the root cause because Y"
120
+ - Be specific, not vague
121
+
122
+ 2. **Test Minimally**
123
+ - Make the SMALLEST possible change to test hypothesis
124
+ - One variable at a time
125
+ - Don't fix multiple things at once
126
+
127
+ 3. **Verify**
128
+ - Did it work? Yes → Phase 4
129
+ - Didn't work? Form NEW hypothesis
130
+ - DON'T add more fixes on top
131
+
132
+ ### Phase 4: Implementation
133
+
134
+ 1. **Create Failing Test Case**
135
+ - Simplest possible reproduction
136
+ - Use `test-driven-development` skill
137
+ - MUST exist before fixing
138
+
139
+ 2. **Implement Single Fix**
140
+ - Address the root cause identified
141
+ - ONE change at a time
142
+ - No "while I'm here" improvements
143
+
144
+ 3. **Verify Fix**
145
+ - Test passes now?
146
+ - No other tests broken?
147
+ - Issue actually resolved?
148
+
149
+ 4. **If 3+ Fixes Failed: Question Architecture**
150
+
151
+ **Pattern indicating architectural problem:**
152
+ - Each fix reveals new coupling in different place
153
+ - Fixes require "massive refactoring"
154
+ - Each fix creates new symptoms elsewhere
155
+
156
+ **STOP and discuss with the user before more fix attempts.**
157
+
158
+ ---
159
+
160
+ ## Quick Reference
161
+
162
+ | Phase | Key Activities | Success Criteria |
163
+ | --------------------- | ------------------------------------------------------ | --------------------------- |
164
+ | **1. Root Cause** | Read errors, reproduce, check changes, gather evidence | Understand WHAT and WHY |
165
+ | **2. Pattern** | Find working examples, compare | Identify differences |
166
+ | **3. Hypothesis** | Form theory, test minimally | Confirmed or new hypothesis |
167
+ | **4. Implementation** | Create test, fix, verify | Bug resolved, tests pass |
168
+
169
+ ---
170
+
171
+ ## Red Flags — STOP and Return to Phase 1
172
+
173
+ If you catch yourself thinking:
174
+
175
+ - "Quick fix for now, investigate later"
176
+ - "Just try changing X and see if it works"
177
+ - "Add multiple changes, run tests"
178
+ - "It's probably X, let me fix that"
179
+ - "I don't fully understand but this might work"
180
+ - Proposing solutions before tracing data flow
181
+ - "One more fix attempt" (when already tried 2+)
182
+
183
+ ---
184
+
185
+ ## Common Rationalizations
186
+
187
+ | Excuse | Reality |
188
+ | -------------------------------------------- | ------------------------------------------------------------------- |
189
+ | "Issue is simple, don't need process" | Simple issues have root causes too. Process is fast for simple bugs |
190
+ | "Emergency, no time for process" | Systematic debugging is FASTER than guess-and-check thrashing |
191
+ | "Just try this first, then investigate" | First fix sets the pattern. Do it right from the start |
192
+ | "I'll write test after confirming fix works" | Untested fixes don't stick. Test first proves it |
193
+ | "Multiple fixes at once saves time" | Can't isolate what worked. Causes new bugs |
194
+ | "I see the problem, let me fix it" | Seeing symptoms ≠ understanding root cause |
195
+
196
+ ---
197
+
198
+ ## Real-World Impact
199
+
200
+ | Approach | Time to Fix | First-Time Fix Rate | New Bugs |
201
+ | ------------ | ----------- | ------------------- | --------- |
202
+ | Systematic | 15-30 min | ~95% | Near zero |
203
+ | Random fixes | 2-3 hours | ~40% | Common |
204
+
205
+ ---
102
206
 
103
- ## Anti-Patterns
207
+ ## Integration
104
208
 
105
- **Random changes** - "Maybe if I change this..."
106
- **Ignoring evidence** - "That can't be the cause"
107
- **Assuming** - "It must be X" without proof
108
- **Not reproducing first** - Fixing blindly
109
- **Stopping at symptoms** - Not finding root cause
209
+ | Skill/Agent | Relationship |
210
+ | -------------------------------- | ----------------------------------------------------------------- |
211
+ | `debugger` agent | Domain expertise for investigation; use this skill as its process |
212
+ | `test-driven-development` | Phase 4: creating failing test case |
213
+ | `verification-before-completion` | Verify fix before claiming it works |
214
+ | `executing-plans` | When debugging blocks plan execution |