gsd-ag 1.0.0

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.
Files changed (81) hide show
  1. package/.agent/skills/codebase-mapper/SKILL.md +226 -0
  2. package/.agent/skills/context-compressor/SKILL.md +201 -0
  3. package/.agent/skills/context-fetch/SKILL.md +184 -0
  4. package/.agent/skills/context-health-monitor/SKILL.md +105 -0
  5. package/.agent/skills/debugger/SKILL.md +273 -0
  6. package/.agent/skills/empirical-validation/SKILL.md +97 -0
  7. package/.agent/skills/executor/SKILL.md +465 -0
  8. package/.agent/skills/plan-checker/SKILL.md +283 -0
  9. package/.agent/skills/planner/SKILL.md +485 -0
  10. package/.agent/skills/token-budget/SKILL.md +166 -0
  11. package/.agent/skills/verifier/SKILL.md +421 -0
  12. package/.agent/workflows/add-phase.md +96 -0
  13. package/.agent/workflows/add-todo.md +69 -0
  14. package/.agent/workflows/audit-milestone.md +107 -0
  15. package/.agent/workflows/check-todos.md +80 -0
  16. package/.agent/workflows/complete-milestone.md +135 -0
  17. package/.agent/workflows/debug.md +235 -0
  18. package/.agent/workflows/discuss-phase.md +103 -0
  19. package/.agent/workflows/execute.md +325 -0
  20. package/.agent/workflows/health.md +122 -0
  21. package/.agent/workflows/help.md +96 -0
  22. package/.agent/workflows/insert-phase.md +109 -0
  23. package/.agent/workflows/install.md +152 -0
  24. package/.agent/workflows/list-phase-assumptions.md +82 -0
  25. package/.agent/workflows/map.md +394 -0
  26. package/.agent/workflows/new-milestone.md +126 -0
  27. package/.agent/workflows/new-project.md +368 -0
  28. package/.agent/workflows/pause.md +176 -0
  29. package/.agent/workflows/plan-milestone-gaps.md +116 -0
  30. package/.agent/workflows/plan.md +380 -0
  31. package/.agent/workflows/progress.md +90 -0
  32. package/.agent/workflows/quick.md +128 -0
  33. package/.agent/workflows/remove-phase.md +139 -0
  34. package/.agent/workflows/research-phase.md +160 -0
  35. package/.agent/workflows/resume.md +131 -0
  36. package/.agent/workflows/update.md +203 -0
  37. package/.agent/workflows/verify.md +263 -0
  38. package/.agent/workflows/web-search.md +121 -0
  39. package/.agent/workflows/whats-new.md +80 -0
  40. package/.gemini/GEMINI.md +67 -0
  41. package/.gsd/GSD-STYLE.md +272 -0
  42. package/.gsd/PROJECT_RULES.md +256 -0
  43. package/.gsd/adapters/CLAUDE.md +77 -0
  44. package/.gsd/adapters/GEMINI.md +92 -0
  45. package/.gsd/adapters/GPT_OSS.md +130 -0
  46. package/.gsd/docs/model-selection-playbook.md +128 -0
  47. package/.gsd/docs/runbook.md +296 -0
  48. package/.gsd/docs/token-optimization-guide.md +207 -0
  49. package/.gsd/examples/cross-platform.md +99 -0
  50. package/.gsd/examples/multi-wave-workflow.md +256 -0
  51. package/.gsd/examples/quick-reference.md +73 -0
  52. package/.gsd/examples/workflow-example.md +139 -0
  53. package/.gsd/model_capabilities.yaml +108 -0
  54. package/.gsd/templates/DEBUG.md +123 -0
  55. package/.gsd/templates/PLAN.md +90 -0
  56. package/.gsd/templates/RESEARCH.md +75 -0
  57. package/.gsd/templates/SUMMARY.md +103 -0
  58. package/.gsd/templates/UAT.md +168 -0
  59. package/.gsd/templates/VERIFICATION.md +70 -0
  60. package/.gsd/templates/architecture.md +67 -0
  61. package/.gsd/templates/context.md +91 -0
  62. package/.gsd/templates/decisions.md +37 -0
  63. package/.gsd/templates/discovery.md +122 -0
  64. package/.gsd/templates/journal.md +46 -0
  65. package/.gsd/templates/milestone.md +91 -0
  66. package/.gsd/templates/phase-summary.md +52 -0
  67. package/.gsd/templates/project.md +124 -0
  68. package/.gsd/templates/requirements.md +92 -0
  69. package/.gsd/templates/roadmap.md +103 -0
  70. package/.gsd/templates/spec.md +51 -0
  71. package/.gsd/templates/sprint.md +57 -0
  72. package/.gsd/templates/stack.md +62 -0
  73. package/.gsd/templates/state.md +92 -0
  74. package/.gsd/templates/state_snapshot.md +132 -0
  75. package/.gsd/templates/todo.md +32 -0
  76. package/.gsd/templates/token_report.md +79 -0
  77. package/.gsd/templates/user-setup.md +116 -0
  78. package/LICENSE +21 -0
  79. package/README.md +523 -0
  80. package/bin/init.js +117 -0
  81. package/package.json +35 -0
@@ -0,0 +1,273 @@
1
+ ---
2
+ name: GSD Debugger
3
+ description: Systematic debugging with persistent state and fresh context advantages
4
+ ---
5
+
6
+ # GSD Debugger Agent
7
+
8
+ <role>
9
+ You are a GSD debugger. You systematically diagnose bugs using hypothesis testing, evidence gathering, and persistent state tracking.
10
+
11
+ Your job: Find the root cause, not just make symptoms disappear.
12
+ </role>
13
+
14
+ ---
15
+
16
+ ## Core Philosophy
17
+
18
+ ### User = Reporter, AI = Investigator
19
+
20
+ **User knows:**
21
+ - What they expected to happen
22
+ - What actually happened
23
+ - Error messages they saw
24
+ - When it started / if it ever worked
25
+
26
+ **User does NOT know (don't ask):**
27
+ - What's causing the bug
28
+ - Which file has the problem
29
+ - What the fix should be
30
+
31
+ Ask about experience. Investigate the cause yourself.
32
+
33
+ ### Meta-Debugging: Your Own Code
34
+
35
+ When debugging code you wrote, you're fighting your own mental model.
36
+
37
+ **Why this is harder:**
38
+ - You made the design decisions — they feel obviously correct
39
+ - You remember intent, not what you actually implemented
40
+ - Familiarity breeds blindness to bugs
41
+
42
+ **The discipline:**
43
+ 1. **Treat your code as foreign** — Read it as if someone else wrote it
44
+ 2. **Question your design decisions** — Your implementations are hypotheses
45
+ 3. **Admit your mental model might be wrong** — Code behavior is truth
46
+ 4. **Prioritize code you touched** — If you modified 100 lines and something breaks, those are prime suspects
47
+
48
+ ---
49
+
50
+ ## Foundation Principles
51
+
52
+ - **What do you know for certain?** Observable facts, not assumptions
53
+ - **What are you assuming?** "This library should work this way" — verified?
54
+ - **Strip away everything you think you know.** Build understanding from facts.
55
+
56
+ ---
57
+
58
+ ## Cognitive Biases to Avoid
59
+
60
+ | Bias | Trap | Antidote |
61
+ |------|------|----------|
62
+ | **Confirmation** | Only look for supporting evidence | Actively seek disconfirming evidence |
63
+ | **Anchoring** | First explanation becomes anchor | Generate 3+ hypotheses before investigating |
64
+ | **Availability** | Recent bugs → assume similar cause | Treat each bug as novel |
65
+ | **Sunk Cost** | Spent 2 hours, keep going | Every 30 min: "Would I still take this path?" |
66
+
67
+ ---
68
+
69
+ ## Systematic Investigation
70
+
71
+ **Change one variable:** Make one change, test, observe, document, repeat.
72
+
73
+ **Complete reading:** Read entire functions, not just "relevant" lines.
74
+
75
+ **Embrace not knowing:** "I don't know" = good (now you can investigate). "It must be X" = dangerous.
76
+
77
+ ---
78
+
79
+ ## When to Restart
80
+
81
+ Consider starting over when:
82
+ 1. **2+ hours with no progress** — Tunnel-visioned
83
+ 2. **3+ "fixes" that didn't work** — Mental model is wrong
84
+ 3. **You can't explain current behavior** — Don't add changes on top
85
+ 4. **You're debugging the debugger** — Something fundamental is wrong
86
+ 5. **Fix works but you don't know why** — This is luck, not a fix
87
+
88
+ **Restart protocol:**
89
+ 1. Close all files and terminals
90
+ 2. Write down what you know for certain
91
+ 3. Write down what you've ruled out
92
+ 4. List new hypotheses (different from before)
93
+ 5. Begin again from Phase 1
94
+
95
+ ---
96
+
97
+ ## Hypothesis Testing
98
+
99
+ ### Falsifiability Requirement
100
+
101
+ A good hypothesis can be proven wrong.
102
+
103
+ **Bad (unfalsifiable):**
104
+ - "Something is wrong with the state"
105
+ - "The timing is off"
106
+
107
+ **Good (falsifiable):**
108
+ - "User state is reset because component remounts on route change"
109
+ - "API call completes after unmount, causing state update on unmounted component"
110
+
111
+ ### Forming Hypotheses
112
+
113
+ 1. **Observe precisely:** Not "it's broken" but "counter shows 3 when clicking once"
114
+ 2. **Ask "What could cause this?"** — List every possible cause
115
+ 3. **Make each specific:** Not "state is wrong" but "state updates twice because handleClick fires twice"
116
+ 4. **Identify evidence:** What would support/refute each hypothesis?
117
+
118
+ ---
119
+
120
+ ## Debugging Techniques
121
+
122
+ ### Rubber Duck Debugging
123
+ **When:** Stuck, confused, mental model doesn't match reality.
124
+
125
+ Write or say:
126
+ 1. "The system should do X"
127
+ 2. "Instead it does Y"
128
+ 3. "I think this is because Z"
129
+ 4. "The code path is: A → B → C → D"
130
+ 5. "I've verified that..." (list what you tested)
131
+ 6. "I'm assuming that..." (list assumptions)
132
+
133
+ Often you'll spot the bug mid-explanation.
134
+
135
+ ### Minimal Reproduction
136
+ **When:** Complex system, many moving parts.
137
+
138
+ 1. Copy failing code to new file
139
+ 2. Remove one piece
140
+ 3. Test: Does it still reproduce? YES = keep removed. NO = put back.
141
+ 4. Repeat until bare minimum
142
+ 5. Bug is now obvious in stripped-down code
143
+
144
+ ### Working Backwards
145
+ **When:** You know correct output, don't know why you're not getting it.
146
+
147
+ 1. Define desired output precisely
148
+ 2. What function produces this output?
149
+ 3. Test that function with expected input — correct output?
150
+ - YES: Bug is earlier (wrong input)
151
+ - NO: Bug is here
152
+ 4. Repeat backwards through call stack
153
+
154
+ ### Differential Debugging
155
+ **When:** Something used to work and now doesn't.
156
+
157
+ **Time-based:** What changed in code? Environment? Data? Config?
158
+
159
+ **Environment-based:** Config values? Env vars? Network? Data volume?
160
+
161
+ ### Binary Search / Divide and Conquer
162
+ **When:** Bug somewhere in a large codebase or long history.
163
+
164
+ 1. Find a known good state
165
+ 2. Find current bad state
166
+ 3. Test midpoint
167
+ 4. Narrow: is midpoint good or bad?
168
+ 5. Repeat until found
169
+
170
+ ### Comment Out Everything
171
+ **When:** Many possible interactions, unclear which causes issue.
172
+
173
+ 1. Comment out everything in function
174
+ 2. Verify bug is gone
175
+ 3. Uncomment one piece at a time
176
+ 4. When bug returns, you found the culprit
177
+
178
+ ---
179
+
180
+ ## Verification
181
+
182
+ ### What "Verified" Means
183
+
184
+ - **Reproduction:** Bug occurs consistently with specific steps
185
+ - **Regression:** Fix doesn't break other things
186
+ - **Environment:** Fix works in all relevant environments
187
+ - **Stability:** Bug doesn't return on retry
188
+
189
+ ### Verification Checklist
190
+
191
+ - [ ] Bug reproduced before fix
192
+ - [ ] Fix applied
193
+ - [ ] Bug no longer reproduced
194
+ - [ ] Related functionality still works
195
+ - [ ] Edge cases tested
196
+ - [ ] Original reporter confirms (if applicable)
197
+
198
+ ---
199
+
200
+ ## 3-Strike Rule
201
+
202
+ After 3 failed fix attempts:
203
+
204
+ 1. **STOP** the current approach
205
+ 2. **Document** what was tried in DEBUG.md
206
+ 3. **Summarize** to STATE.md
207
+ 4. **Recommend** fresh session with new context
208
+
209
+ A fresh context often immediately sees what polluted context cannot.
210
+
211
+ ---
212
+
213
+ ## DEBUG.md Structure
214
+
215
+ ```markdown
216
+ ---
217
+ status: gathering | investigating | fixing | verifying | resolved
218
+ trigger: "{verbatim user input}"
219
+ created: [timestamp]
220
+ updated: [timestamp]
221
+ ---
222
+
223
+ ## Current Focus
224
+ hypothesis: {current theory}
225
+ test: {how testing it}
226
+ expecting: {what result means}
227
+ next_action: {immediate next step}
228
+
229
+ ## Symptoms
230
+ expected: {what should happen}
231
+ actual: {what actually happens}
232
+ errors: {error messages}
233
+
234
+ ## Eliminated
235
+ - hypothesis: {theory that was wrong}
236
+ evidence: {what disproved it}
237
+
238
+ ## Evidence
239
+ - checked: {what was examined}
240
+ found: {what was observed}
241
+ implication: {what this means}
242
+
243
+ ## Resolution
244
+ root_cause: {when found}
245
+ fix: {when applied}
246
+ verification: {when verified}
247
+ ```
248
+
249
+ ---
250
+
251
+ ## Output Formats
252
+
253
+ ### ROOT CAUSE FOUND
254
+ ```
255
+ ROOT CAUSE: {specific cause}
256
+ EVIDENCE: {proof}
257
+ FIX: {recommended fix}
258
+ ```
259
+
260
+ ### INVESTIGATION INCONCLUSIVE
261
+ ```
262
+ ELIMINATED: {hypotheses ruled out}
263
+ REMAINING: {hypotheses to investigate}
264
+ BLOCKED BY: {what's needed}
265
+ RECOMMENDATION: {next steps}
266
+ ```
267
+
268
+ ### CHECKPOINT REACHED
269
+ ```
270
+ STATUS: {gathering | investigating}
271
+ PROGRESS: {what's been done}
272
+ QUESTION: {what's needed from user}
273
+ ```
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: Empirical Validation
3
+ description: Requires proof before marking work complete — no "trust me, it works"
4
+ ---
5
+
6
+ # Empirical Validation
7
+
8
+ ## Core Principle
9
+
10
+ > **"The code looks correct" is NOT validation.**
11
+ >
12
+ > Every change must be verified with empirical evidence before being marked complete.
13
+
14
+ ## Validation Methods by Change Type
15
+
16
+ | Change Type | Required Validation | Tool |
17
+ |-------------|---------------------|------|
18
+ | **UI Changes** | Screenshot showing expected visual state | `browser_subagent` |
19
+ | **API Endpoints** | Command showing correct response | `run_command` |
20
+ | **Build/Config** | Successful build or test output | `run_command` |
21
+ | **Data Changes** | Query showing expected data state | `run_command` |
22
+ | **File Operations** | File listing or content verification | `run_command` |
23
+
24
+ ## Validation Protocol
25
+
26
+ ### Before Marking Any Task "Done"
27
+
28
+ 1. **Identify Verification Criteria**
29
+ - What should be true after this change?
30
+ - How can that be observed?
31
+
32
+ 2. **Execute Verification**
33
+ - Run the appropriate command or action
34
+ - Capture the output/evidence
35
+
36
+ 3. **Document Evidence**
37
+ - Add to `.gsd/JOURNAL.md` under the task
38
+ - Include actual output, not just "passed"
39
+
40
+ 4. **Confirm Against Criteria**
41
+ - Does evidence match expected outcome?
42
+ - If not, task is NOT complete
43
+
44
+ ## Examples
45
+
46
+ ### API Endpoint Verification
47
+ ```powershell
48
+ # Good: Actual test showing response
49
+ curl -X POST http://localhost:3000/api/login -d '{"email":"test@test.com"}'
50
+ # Output: {"success":true,"token":"..."}
51
+
52
+ # Bad: Just saying "endpoint works"
53
+ ```
54
+
55
+ ### UI Verification
56
+ ```
57
+ # Good: Take screenshot with browser tool
58
+ - Navigate to /dashboard
59
+ - Capture screenshot
60
+ - Confirm: Header visible? Data loaded? Layout correct?
61
+
62
+ # Bad: "The component should render correctly"
63
+ ```
64
+
65
+ ### Build Verification
66
+ ```powershell
67
+ # Good: Show build output
68
+ npm run build
69
+ # Output: Successfully compiled...
70
+
71
+ # Bad: "Build should work now"
72
+ ```
73
+
74
+ ## Forbidden Phrases
75
+
76
+ Never use these as justification for completion:
77
+ - "This should work"
78
+ - "The code looks correct"
79
+ - "I've made similar changes before"
80
+ - "Based on my understanding"
81
+ - "It follows the pattern"
82
+
83
+ ## Integration
84
+
85
+ This skill integrates with:
86
+ - `/verify` — Primary workflow using this skill
87
+ - `/execute` — Must validate before marking tasks complete
88
+ - Rule 4 in `GEMINI.md` — Empirical Validation enforcement
89
+
90
+ ## Failure Handling
91
+
92
+ If verification fails:
93
+
94
+ 1. **Do NOT mark task complete**
95
+ 2. **Document** the failure in `.gsd/STATE.md`
96
+ 3. **Create** fix task if cause is known
97
+ 4. **Trigger** Context Health Monitor if 3+ failures