jettypod 4.4.70 → 4.4.72
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.
- package/apps/dashboard/app/api/work/[id]/status/route.ts +21 -0
- package/apps/dashboard/app/api/work/[id]/title/route.ts +21 -0
- package/apps/dashboard/components/CardMenu.tsx +120 -0
- package/apps/dashboard/components/EditableTitle.tsx +102 -0
- package/apps/dashboard/components/KanbanBoard.tsx +97 -38
- package/apps/dashboard/components/RealTimeKanbanWrapper.tsx +51 -0
- package/apps/dashboard/lib/db.ts +30 -0
- package/claude-hooks/global-guardrails.js +29 -1
- package/docs/jetty-development-guide/shapeup.md +0 -0
- package/jettypod.js +14 -7
- package/lib/work-commands/index.js +62 -15
- package/lib/work-tracking/index.js +28 -2
- package/package.json +1 -1
- package/skills-templates/bug-mode/SKILL.md +392 -0
- package/skills-templates/bug-planning/SKILL.md +387 -0
- package/skills-templates/speed-mode/SKILL.md +29 -2
- package/skills-templates/stable-mode/SKILL.md +25 -2
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bug-planning
|
|
3
|
+
description: Guide structured bug investigation with symptom capture, hypothesis testing, and root cause identification. Creates bug work item with fix chore and regression tests. Use when user reports a bug, mentions unexpected behavior, or says "investigate bug".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Bug Planning Skill
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
10
|
+
│ Bug Planning Flow │
|
|
11
|
+
│ │
|
|
12
|
+
│ Symptom → Hypothesis → Evidence → Root Cause → Chore → Tests │
|
|
13
|
+
│ │
|
|
14
|
+
│ Output: Bug work item, fix chore with breadcrumbs, regression test │
|
|
15
|
+
└─────────────────────────────────────────────────────────────────────┘
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Guides Claude through systematic bug investigation. Produces actionable fix chores with clear breadcrumbs.
|
|
19
|
+
|
|
20
|
+
## Instructions
|
|
21
|
+
|
|
22
|
+
When this skill is activated, you are investigating a bug to identify root cause and plan the fix.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Phase 1: Symptom Capture
|
|
27
|
+
|
|
28
|
+
**Goal:** Understand exactly what's happening before investigating.
|
|
29
|
+
|
|
30
|
+
**Gather from user:**
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
🐛 Bug Investigation
|
|
34
|
+
|
|
35
|
+
I need to understand the bug before we investigate.
|
|
36
|
+
|
|
37
|
+
**What's happening?**
|
|
38
|
+
> [User describes the problem]
|
|
39
|
+
|
|
40
|
+
**What should happen instead?**
|
|
41
|
+
> [Expected behavior]
|
|
42
|
+
|
|
43
|
+
**Reproduction steps?**
|
|
44
|
+
> [How to trigger the bug]
|
|
45
|
+
|
|
46
|
+
**Any error messages?**
|
|
47
|
+
> [Exact error text, stack traces]
|
|
48
|
+
|
|
49
|
+
**When did it start?**
|
|
50
|
+
> [ ] Always been broken
|
|
51
|
+
> [ ] After a specific change (which?)
|
|
52
|
+
> [ ] Not sure
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**If user provides partial info**, ask follow-up questions. Don't proceed until you have:
|
|
56
|
+
- Clear actual vs expected behavior
|
|
57
|
+
- Reproduction steps (or acknowledgment it's intermittent)
|
|
58
|
+
- Error messages if any
|
|
59
|
+
|
|
60
|
+
**Document symptoms:**
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
64
|
+
📋 Bug Report
|
|
65
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
66
|
+
|
|
67
|
+
**Symptom:** [What's happening]
|
|
68
|
+
**Expected:** [What should happen]
|
|
69
|
+
**Reproduction:** [Steps]
|
|
70
|
+
**Error:** [Error message if any]
|
|
71
|
+
**Context:** [When it started, related changes]
|
|
72
|
+
|
|
73
|
+
Proceeding to hypothesis formation...
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Proceed to Phase 2.**
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Phase 2: Hypothesis Formation
|
|
81
|
+
|
|
82
|
+
**Goal:** Form testable theories about what might cause the bug.
|
|
83
|
+
|
|
84
|
+
**CRITICAL:** Execute autonomously - no user input needed.
|
|
85
|
+
|
|
86
|
+
**Your task:**
|
|
87
|
+
1. Analyze symptoms for clues
|
|
88
|
+
2. Search codebase for relevant code
|
|
89
|
+
3. Check recent changes (git log)
|
|
90
|
+
4. Form 2-4 testable hypotheses
|
|
91
|
+
5. Rank by likelihood
|
|
92
|
+
|
|
93
|
+
**Codebase analysis:**
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Search for code related to the failing functionality
|
|
97
|
+
# Use Glob/Grep based on keywords from symptoms
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Check recent changes to relevant files
|
|
102
|
+
git log --oneline -10 -- <relevant-files>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Display hypotheses:**
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
🔍 Hypotheses
|
|
109
|
+
|
|
110
|
+
Based on symptoms and codebase analysis:
|
|
111
|
+
|
|
112
|
+
**H1 (Most Likely): [Title]**
|
|
113
|
+
- Theory: [What might be wrong]
|
|
114
|
+
- Test: [How to confirm/eliminate]
|
|
115
|
+
- Files: [Specific files to check]
|
|
116
|
+
|
|
117
|
+
**H2: [Title]**
|
|
118
|
+
- Theory: [What might be wrong]
|
|
119
|
+
- Test: [How to confirm/eliminate]
|
|
120
|
+
- Files: [Specific files to check]
|
|
121
|
+
|
|
122
|
+
**H3: [Title]**
|
|
123
|
+
- Theory: [What might be wrong]
|
|
124
|
+
- Test: [How to confirm/eliminate]
|
|
125
|
+
- Files: [Specific files to check]
|
|
126
|
+
|
|
127
|
+
Starting evidence gathering with H1...
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Proceed to Phase 3.**
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Phase 3: Evidence Gathering
|
|
135
|
+
|
|
136
|
+
**Goal:** Test hypotheses systematically until root cause is found.
|
|
137
|
+
|
|
138
|
+
**CRITICAL:** Test one hypothesis at a time. Document findings.
|
|
139
|
+
|
|
140
|
+
**For each hypothesis:**
|
|
141
|
+
|
|
142
|
+
1. **Read relevant code** (Read tool)
|
|
143
|
+
2. **Add diagnostics if needed** (temporary logging)
|
|
144
|
+
3. **Evaluate evidence** - supports, refutes, or partial?
|
|
145
|
+
|
|
146
|
+
**Display progress:**
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
━━━ Testing H1: [Title] ━━━
|
|
150
|
+
|
|
151
|
+
📂 Reading: [file:lines]
|
|
152
|
+
🔎 Looking for: [specific issue]
|
|
153
|
+
|
|
154
|
+
**Finding:** [What you discovered]
|
|
155
|
+
|
|
156
|
+
**Verdict:** ✅ CONFIRMED / ❌ ELIMINATED / ⚠️ PARTIAL
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**If ELIMINATED:** Move to next hypothesis.
|
|
160
|
+
**If PARTIAL:** Gather more evidence.
|
|
161
|
+
**If CONFIRMED:** Proceed to Phase 4.
|
|
162
|
+
|
|
163
|
+
**If all hypotheses eliminated:**
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
⚠️ Initial hypotheses eliminated
|
|
167
|
+
|
|
168
|
+
What we learned:
|
|
169
|
+
- H1: Eliminated because [reason]
|
|
170
|
+
- H2: Eliminated because [reason]
|
|
171
|
+
|
|
172
|
+
Forming new hypotheses...
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Loop back to Phase 2 with new information.
|
|
176
|
+
|
|
177
|
+
**Proceed to Phase 4 when root cause confirmed.**
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Phase 4: Root Cause Confirmation
|
|
182
|
+
|
|
183
|
+
**Goal:** Confirm root cause with user before creating work items.
|
|
184
|
+
|
|
185
|
+
**⚡ ASYNC BOUNDARY - Wait for user confirmation**
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
189
|
+
🎯 Root Cause Identified
|
|
190
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
191
|
+
|
|
192
|
+
**What's broken:** [Specific code/logic]
|
|
193
|
+
**Why:** [The actual cause]
|
|
194
|
+
**Location:** [file:line]
|
|
195
|
+
**Evidence:** [What confirmed this]
|
|
196
|
+
|
|
197
|
+
**Proposed fix:**
|
|
198
|
+
[Brief description of how to fix it]
|
|
199
|
+
|
|
200
|
+
Does this match your understanding? Ready to create the fix chore?
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**WAIT for user confirmation.**
|
|
204
|
+
|
|
205
|
+
If user disagrees or adds context, revise understanding and confirm again.
|
|
206
|
+
|
|
207
|
+
**Proceed to Phase 5.**
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Phase 5: Create Bug Work Item and Chore
|
|
212
|
+
|
|
213
|
+
**Goal:** Create tracked work items for the fix.
|
|
214
|
+
|
|
215
|
+
**Check for parent context:**
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# If bug is related to a feature/epic, user may specify parent
|
|
219
|
+
# Otherwise create standalone bug
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Create bug work item:**
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Standalone bug
|
|
226
|
+
jettypod work create bug "[Bug title - brief description]"
|
|
227
|
+
|
|
228
|
+
# OR with parent
|
|
229
|
+
jettypod work create bug "[Bug title]" --parent=<feature-or-epic-id>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Capture the bug ID from output.**
|
|
233
|
+
|
|
234
|
+
**Create fix chore with breadcrumbs:**
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
jettypod work create chore "Fix: [brief description]" "[Full description with breadcrumbs]" --parent=<bug-id>
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Chore description must include:**
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
Root cause: [What's broken and why]
|
|
244
|
+
Location: [file:line]
|
|
245
|
+
|
|
246
|
+
Fix approach:
|
|
247
|
+
- [Step 1]
|
|
248
|
+
- [Step 2]
|
|
249
|
+
|
|
250
|
+
Files to modify:
|
|
251
|
+
- [file1]: [what to change]
|
|
252
|
+
- [file2]: [what to change]
|
|
253
|
+
|
|
254
|
+
Verification:
|
|
255
|
+
- Regression test passes
|
|
256
|
+
- Original bug no longer reproduces
|
|
257
|
+
- [Any other checks]
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**Proceed to Phase 6.**
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Phase 6: Write Regression Test
|
|
265
|
+
|
|
266
|
+
**Goal:** Create BDD scenario that fails now, passes after fix.
|
|
267
|
+
|
|
268
|
+
**🚫 FORBIDDEN: Writing directly to main**
|
|
269
|
+
```
|
|
270
|
+
❌ Write to features/*.feature on main
|
|
271
|
+
❌ Manual git commands for worktrees
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**Create test worktree:**
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
jettypod work tests start <bug-id>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
**Capture worktree path from output.**
|
|
281
|
+
|
|
282
|
+
**Derive feature slug** from bug title (lowercase, hyphens, no special chars).
|
|
283
|
+
|
|
284
|
+
**Write regression test in worktree:**
|
|
285
|
+
|
|
286
|
+
Feature file at `<worktree>/features/<bug-slug>.feature`:
|
|
287
|
+
|
|
288
|
+
```gherkin
|
|
289
|
+
Feature: [Bug title] - Regression Test
|
|
290
|
+
Prevents regression of bug #<bug-id>
|
|
291
|
+
|
|
292
|
+
Root cause: [Brief description]
|
|
293
|
+
|
|
294
|
+
Scenario: [Description of correct behavior]
|
|
295
|
+
Given [setup that triggers the bug condition]
|
|
296
|
+
When [action that previously caused the bug]
|
|
297
|
+
Then [expected correct behavior]
|
|
298
|
+
And [additional verifications]
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
Step definitions at `<worktree>/features/step_definitions/<bug-slug>.steps.js`
|
|
302
|
+
|
|
303
|
+
**Validate with dry-run:**
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
cd <worktree> && npx cucumber-js --dry-run features/<bug-slug>.feature
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Fix any undefined steps or syntax errors.
|
|
310
|
+
|
|
311
|
+
**Merge tests:**
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
# Commit
|
|
315
|
+
cd <worktree> && git add features/ && git commit -m "test: Add regression test for bug #<bug-id>"
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
# Merge (from worktree is OK)
|
|
320
|
+
jettypod work tests merge <bug-id>
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
# cd to main repo
|
|
325
|
+
cd <main-repo-path>
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
# Cleanup worktree
|
|
330
|
+
jettypod work cleanup <bug-id>
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
**Proceed to Phase 7.**
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## Phase 7: Hand Off to Bug Mode
|
|
338
|
+
|
|
339
|
+
**Display completion:**
|
|
340
|
+
|
|
341
|
+
```
|
|
342
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
343
|
+
✅ Bug Planning Complete
|
|
344
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
345
|
+
|
|
346
|
+
📋 Bug: #<bug-id> [title]
|
|
347
|
+
🔧 Fix chore: #<chore-id> [title]
|
|
348
|
+
🧪 Regression test: features/<bug-slug>.feature
|
|
349
|
+
|
|
350
|
+
Ready to implement the fix?
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
**WAIT for user response.**
|
|
354
|
+
|
|
355
|
+
**If user confirms:**
|
|
356
|
+
|
|
357
|
+
```bash
|
|
358
|
+
jettypod work start <chore-id>
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
**Verify worktree created:**
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
sqlite3 .jettypod/work.db "SELECT worktree_path FROM worktrees WHERE work_item_id = <chore-id> AND status = 'active'"
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
**Then invoke bug-mode:**
|
|
368
|
+
|
|
369
|
+
```
|
|
370
|
+
Use the Skill tool with skill: "bug-mode"
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
**Bug-planning skill complete.**
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## Validation Checklist
|
|
378
|
+
|
|
379
|
+
Before completing bug-planning:
|
|
380
|
+
- [ ] Symptoms clearly documented
|
|
381
|
+
- [ ] Root cause confirmed with evidence
|
|
382
|
+
- [ ] User confirmed root cause
|
|
383
|
+
- [ ] Bug work item created
|
|
384
|
+
- [ ] Fix chore created with breadcrumbs
|
|
385
|
+
- [ ] Regression test written and merged
|
|
386
|
+
- [ ] Fix chore started with `work start`
|
|
387
|
+
- [ ] bug-mode skill invoked
|
|
@@ -651,9 +651,36 @@ If the query returns no remaining chores, proceed to Step 7.
|
|
|
651
651
|
|
|
652
652
|
This is the transition from speed mode to stable mode. Follow these phases in order.
|
|
653
653
|
|
|
654
|
-
#### Step 7A: Verify Integration
|
|
654
|
+
#### Step 7A: Validate BDD Infrastructure and Verify Integration
|
|
655
655
|
|
|
656
|
-
**CRITICAL: Before transitioning,
|
|
656
|
+
**CRITICAL: Before transitioning, validate BDD infrastructure and verify integration.**
|
|
657
|
+
|
|
658
|
+
**1. Run dry-run validation to catch step definition conflicts:**
|
|
659
|
+
|
|
660
|
+
```bash
|
|
661
|
+
node -e "
|
|
662
|
+
const { validateBddInfrastructure } = require('./lib/skills/feature-planning/dry-run-validator');
|
|
663
|
+
validateBddInfrastructure('<scenario-file-path>').then(result => {
|
|
664
|
+
console.log(JSON.stringify(result, null, 2));
|
|
665
|
+
process.exit(result.success ? 0 : 1);
|
|
666
|
+
});
|
|
667
|
+
"
|
|
668
|
+
```
|
|
669
|
+
|
|
670
|
+
**If validation FAILS with `duplicate_step` error:**
|
|
671
|
+
- Two step definition files define the same step pattern
|
|
672
|
+
- The error shows which files conflict
|
|
673
|
+
- **STOP** - create a chore to fix the step definition conflict before proceeding
|
|
674
|
+
- This is a test infrastructure bug, not a feature implementation issue
|
|
675
|
+
|
|
676
|
+
**If validation FAILS with other errors:**
|
|
677
|
+
- Check for `undefined_step` (missing step definitions)
|
|
678
|
+
- Check for `syntax_error` (malformed Gherkin)
|
|
679
|
+
- Fix the specific issue before proceeding
|
|
680
|
+
|
|
681
|
+
**If validation PASSES:** Continue to run integration scenario.
|
|
682
|
+
|
|
683
|
+
**2. Run the integration scenario:**
|
|
657
684
|
|
|
658
685
|
```bash
|
|
659
686
|
# Run ONLY the integration scenario (first scenario in the feature file)
|
|
@@ -428,13 +428,36 @@ If user adjusts: revise proposal and confirm again before proceeding.
|
|
|
428
428
|
|
|
429
429
|
**CRITICAL:** After user confirms (or skips confirmation), execute autonomously - no permission needed for code changes.
|
|
430
430
|
|
|
431
|
-
Before writing any implementation code, run tests to establish the RED state:
|
|
431
|
+
Before writing any implementation code, validate BDD infrastructure and run tests to establish the RED state:
|
|
432
432
|
|
|
433
433
|
```bash
|
|
434
434
|
# Get current work and parent feature's scenario file
|
|
435
435
|
sqlite3 .jettypod/work.db "SELECT wi.id, wi.parent_id, parent.scenario_file FROM work_items wi LEFT JOIN work_items parent ON wi.parent_id = parent.id WHERE wi.status = 'in_progress'"
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
**1. Run dry-run validation to catch step definition conflicts:**
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
node -e "
|
|
442
|
+
const { validateBddInfrastructure } = require('./lib/skills/feature-planning/dry-run-validator');
|
|
443
|
+
validateBddInfrastructure('<scenario-file-path>').then(result => {
|
|
444
|
+
console.log(JSON.stringify(result, null, 2));
|
|
445
|
+
process.exit(result.success ? 0 : 1);
|
|
446
|
+
});
|
|
447
|
+
"
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
**If validation FAILS with `duplicate_step` error:**
|
|
451
|
+
- Two step definition files define the same step pattern
|
|
452
|
+
- The error shows which files conflict
|
|
453
|
+
- **STOP** - fix the step definition conflict before proceeding
|
|
454
|
+
- Common cause: stable mode step definitions duplicating existing steps
|
|
455
|
+
|
|
456
|
+
**If validation PASSES:** Continue to establish RED baseline.
|
|
436
457
|
|
|
437
|
-
|
|
458
|
+
**2. Run BDD tests to establish RED baseline:**
|
|
459
|
+
|
|
460
|
+
```bash
|
|
438
461
|
npx cucumber-js <scenario-file-path> --format progress
|
|
439
462
|
```
|
|
440
463
|
|