jettypod 3.0.2 → 4.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.
@@ -1,8 +1,8 @@
1
1
  # ⚠️ CRITICAL: Skills Directory Protection
2
2
 
3
3
  The `.claude/skills/` directory contains essential skill files:
4
- - epic-discover
5
- - feature-discover
4
+ - epic-planning
5
+ - feature-planning
6
6
  - speed-mode
7
7
  - stable-mode
8
8
 
@@ -1,9 +1,9 @@
1
1
  ---
2
- name: epic-discover
2
+ name: epic-planning
3
3
  description: Guide epic planning with feature brainstorming and optional architectural decision prototyping. Use when user asks to plan an epic, mentions planning features for an epic, says "help me plan epic", or when they just created an epic and want to break it down into features.
4
4
  ---
5
5
 
6
- # Epic Discovery Skill
6
+ # Epic Planning Skill
7
7
 
8
8
  Guides Claude through comprehensive epic planning including feature identification and architectural decisions.
9
9
 
@@ -18,13 +18,20 @@ You'll receive context about the epic being planned. Review:
18
18
  - Project context
19
19
  - Any parent context
20
20
 
21
- ### Step 2: Check Existing Decisions
21
+ ### Step 2: Check Existing Features and Decisions
22
22
 
23
- **CRITICAL:** Before suggesting approaches, check if architectural decisions already exist for this epic:
23
+ **CRITICAL:** Before suggesting features or approaches, check what already exists:
24
24
 
25
- ```javascript
26
- const { getDecisionsForEpic } = require('../../lib/decisions-helpers');
27
- const epicDecisions = await getDecisionsForEpic(epicId);
25
+ **Check for existing features:**
26
+ ```bash
27
+ node jettypod.js backlog | grep -A 20 "Epic Name"
28
+ ```
29
+
30
+ If features already exist, acknowledge them and skip to Step 4 (Architectural Decision).
31
+
32
+ **Check for existing decisions:**
33
+ ```bash
34
+ node -e "const { showDecisionsForEpic } = require('./features/decisions/index.js'); showDecisionsForEpic(epicId)"
28
35
  ```
29
36
 
30
37
  If decisions exist, present them to the user:
@@ -48,7 +55,7 @@ Only proceed with suggesting new architectural options if:
48
55
  - User confirms decisions need to be revisited, OR
49
56
  - User identifies new aspects to decide
50
57
 
51
- ### Step 3: Brainstorm Features
58
+ ### Step 3: Brainstorm Features (Skip if Features Already Exist)
52
59
 
53
60
  Based on the epic's purpose, suggest features that belong in this epic:
54
61
 
@@ -148,37 +155,65 @@ Then record their decision.
148
155
 
149
156
  Once features are defined and architectural decision is made (if needed):
150
157
 
151
- ```
152
- I'll create these features now:
158
+ **CRITICAL: You must EXECUTE commands using the Bash tool. Do NOT just display them as text.**
153
159
 
154
- [Run commands to create features]
160
+ #### Step 6A: Create Features
155
161
 
156
- jettypod work create feature "[Feature 1]" "[Description]" --parent=[epic-id]
157
- jettypod work create feature "[Feature 2]" "[Description]" --parent=[epic-id]
158
- ...
162
+ Use the Bash tool to create each feature:
159
163
 
160
- [If architectural decision was made, confirm rationale first]
164
+ ```javascript
165
+ // For each feature, use Bash tool to execute:
166
+ node jettypod.js work create feature "[Feature 1]" "[Description]" --parent=[epic-id]
167
+ node jettypod.js work create feature "[Feature 2]" "[Description]" --parent=[epic-id]
168
+ // etc.
169
+ ```
161
170
 
162
- **Propose the rationale to the user:**
171
+ Display to user as you create each one:
172
+ ```
173
+ Creating features...
174
+ ✅ Created Feature #123: [Feature 1]
175
+ ✅ Created Feature #456: [Feature 2]
176
+ ```
163
177
 
164
- "I'm going to record this architectural decision:
178
+ #### Step 6B: Record Architectural Decision (if applicable)
179
+
180
+ If an architectural decision was made, propose the rationale to the user:
181
+
182
+ ```
183
+ I'm going to record this architectural decision:
165
184
 
166
185
  Aspect: Architecture
167
186
  Decision: [architectural approach chosen]
168
187
  Rationale: [why this approach was selected]
169
188
 
170
- Does this rationale capture why you chose this approach? (You can edit it if needed)"
189
+ Does this rationale capture why you chose this approach? (You can edit it if needed)
190
+ ```
171
191
 
172
- WAIT for user to confirm or provide edited rationale.
192
+ **WAIT for user to confirm or provide edited rationale.**
173
193
 
174
- **Then record with final rationale:**
194
+ **CRITICAL: After user confirms, use Bash tool to EXECUTE the epic-implement command:**
175
195
 
176
- jettypod work epic-implement [epic-id] \
196
+ ```javascript
197
+ // Use Bash tool to execute:
198
+ node jettypod.js work epic-implement [epic-id] \
177
199
  --aspect="Architecture" \
178
200
  --decision="[architectural approach chosen]" \
179
201
  --rationale="[user's confirmed/edited rationale]"
202
+ ```
203
+
204
+ **DO NOT display this as example text. EXECUTE IT using the Bash tool.**
205
+
206
+ After execution succeeds, verify the decision was recorded and display:
207
+
208
+ ```
209
+ ✅ Architectural decision recorded
210
+
211
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
212
+ 🎯 Epic Planning Complete!
213
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
180
214
 
181
- Epic planning complete!
215
+ Features created: [count]
216
+ Architectural decision: Recorded
182
217
 
183
218
  **Next step:** Plan your first feature
184
219
  Run: jettypod work discover [feature-id]
@@ -1,11 +1,11 @@
1
1
  ---
2
- name: feature-discover
3
- description: Guide feature discovery with UX approach exploration and BDD scenario generation. Use when user asks to plan a feature, mentions designing/implementing a feature, says "help me plan feature", or wants to explore UX approaches for a specific feature.
2
+ name: feature-planning
3
+ description: Guide feature planning with UX approach exploration and BDD scenario generation. Use when user asks to plan a feature, mentions designing/implementing a feature, says "help me plan feature", or wants to explore UX approaches for a specific feature.
4
4
  ---
5
5
 
6
- # Feature Discovery Skill
6
+ # Feature Planning Skill
7
7
 
8
- Guides Claude through feature discovery including UX approach exploration, optional prototyping, and BDD scenario generation.
8
+ Guides Claude through feature planning including UX approach exploration, optional prototyping, and BDD scenario generation.
9
9
 
10
10
  ## Instructions
11
11
 
@@ -294,39 +294,55 @@ Ready to start implementation: jettypod work start [first-chore-id]
294
294
 
295
295
  ### Step 8: Transition to Implementation
296
296
 
297
- Complete the discovery phase:
297
+ Complete the discovery phase by transitioning the feature from discovery to implementation.
298
298
 
299
- ```
300
- I'll archive the prototypes and transition to implementation.
299
+ **CRITICAL: You must EXECUTE the transition command using the Bash tool. Do NOT just display it as text.**
300
+
301
+ #### Step 8A: Propose Rationale
301
302
 
302
- First, let me propose the rationale:
303
+ Display to user:
303
304
 
304
- "I'm going to record this decision:
305
+ ```
306
+ I'm going to record this decision:
305
307
 
306
- Winner: prototypes/[winner-file] (or approach name if no prototypes)
308
+ Winner: [approach name or prototypes/winner-file]
307
309
  Rationale: [Why this approach was chosen]
308
310
 
309
- Does this rationale capture why you chose this approach? (You can edit it if needed)"
311
+ Does this rationale capture why you chose this approach? (You can edit it if needed)
310
312
  ```
311
313
 
312
- WAIT for user to confirm or provide edited rationale.
314
+ **WAIT for user to confirm or provide edited rationale.**
313
315
 
314
- **Then record with final rationale:**
316
+ #### Step 8B: Execute Transition
315
317
 
316
- ```
317
- jettypod work implement [feature-id] \
318
- --winner="prototypes/[winner-file]" \
318
+ **CRITICAL: After user confirms, use Bash tool to EXECUTE the work implement command:**
319
+
320
+ ```javascript
321
+ // Use Bash tool to execute:
322
+ node jettypod.js work implement [feature-id] \
323
+ --winner="[approach-name or prototypes/winner-file]" \
319
324
  --rationale="[user's confirmed/edited rationale]"
325
+ ```
326
+
327
+ **DO NOT display this as example text. EXECUTE IT using the Bash tool.**
328
+
329
+ After execution succeeds, verify the feature transitioned to implementation phase and display:
330
+
331
+ ```
332
+ ✅ Feature transitioned to implementation phase
320
333
 
321
- ✅ Feature discovery complete!
334
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
335
+ 🎯 Feature Discovery Complete!
336
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
322
337
 
323
- 📋 BDD scenarios written: features/[feature-slug].feature
324
- 💾 Scenario file tracked in database
338
+ 📋 BDD scenarios: features/[feature-slug].feature
339
+ 🧪 Step definitions: features/step_definitions/[feature-slug].steps.js
340
+ ✅ Feature phase: Implementation
341
+ 🚀 Feature mode: Speed
325
342
 
326
- **Next step:** Start implementing
327
- Run: jettypod work start [feature-id]
343
+ **Next step:** Start implementing the first chore
344
+ Run: jettypod work start [first-chore-id]
328
345
 
329
- The feature is now in implementation phase (speed mode).
330
346
  Build code that passes the happy path scenarios we just wrote.
331
347
  ```
332
348
 
@@ -50,7 +50,7 @@ const path = require('path');
50
50
 
51
51
  const currentWork = getCurrentWork();
52
52
 
53
- // Check if description has breadcrumbs from feature-discover
53
+ // Check if description has breadcrumbs from feature-planning
54
54
  const hasBreadcrumbs = currentWork.description &&
55
55
  currentWork.description.includes('Scenario steps addressed:') &&
56
56
  currentWork.description.includes('Implementation guidance:') &&
@@ -141,7 +141,7 @@ db.get('SELECT epic_id FROM work_items WHERE id = ?', [currentWork.parent_id], a
141
141
  });
142
142
  ```
143
143
 
144
- **If breadcrumbs exist (from feature-discover):**
144
+ **If breadcrumbs exist (from feature-planning):**
145
145
  - Parse "Files to create/modify" section - these are your target files
146
146
  - Parse "Patterns to follow" section - read these reference files first
147
147
  - Parse "Key functions/components needed" - these guide your implementation
@@ -376,20 +376,91 @@ Chores created:
376
376
  • #[ID]: [Title]
377
377
  • #[ID]: [Title]
378
378
  • #[ID]: [Title]
379
+ ```
380
+
381
+ #### Phase 4: Auto-Elevate to Stable Mode (If All Speed Chores Done)
382
+
383
+ **CRITICAL: Check if ALL speed mode chores are complete. If yes, auto-elevate to stable mode.**
384
+
385
+ ```javascript
386
+ // Check if all speed chores for this feature are done
387
+ const { getDb } = require('../../lib/database');
388
+ const { getCurrentWork } = require('../../lib/current-work');
389
+
390
+ const currentWork = getCurrentWork();
391
+ const featureId = currentWork.parent_id;
379
392
 
393
+ const db = getDb();
394
+ db.get(`
395
+ SELECT COUNT(*) as incomplete_count
396
+ FROM work_items
397
+ WHERE parent_id = ?
398
+ AND type = 'chore'
399
+ AND mode = 'speed'
400
+ AND status != 'done'
401
+ `, [featureId], async (err, result) => {
402
+ if (err) {
403
+ console.error('Error checking speed chores:', err.message);
404
+ db.close();
405
+ return;
406
+ }
407
+
408
+ if (result.incomplete_count === 0) {
409
+ // All speed chores done - auto-elevate to stable
410
+ console.log('\n✅ All speed mode chores complete!');
411
+ console.log('Auto-elevating feature to stable mode...\n');
412
+
413
+ // Use Bash tool to execute elevation
414
+ // DO NOT display as text - EXECUTE IT
415
+ } else {
416
+ console.log(`\n📋 ${result.incomplete_count} speed mode chores remaining`);
417
+ }
418
+
419
+ db.close();
420
+ });
421
+ ```
422
+
423
+ **If all speed chores are done, use Bash tool to EXECUTE elevation:**
424
+
425
+ ```javascript
426
+ // Use Bash tool to execute:
427
+ node jettypod.js work elevate [feature-id] stable
428
+ ```
429
+
430
+ **DO NOT display this as example text. EXECUTE IT using the Bash tool.**
431
+
432
+ After execution, display:
433
+
434
+ ```
380
435
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
381
- 🎯 Speed Mode Complete!
436
+ 🎯 Speed Mode Complete! Feature Elevated to Stable Mode
382
437
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
383
438
 
384
439
  What we accomplished:
385
440
  ✅ Happy path scenario passes
386
- Stable mode chores ready
441
+ All speed mode chores complete
442
+ ✅ Feature elevated to stable mode
443
+ ✅ Stable mode chores created and ready
444
+
445
+ **Next step:** Start the first stable mode chore
446
+ jettypod work start [first-stable-chore-id]
447
+ ```
448
+
449
+ **If speed chores remain, display:**
450
+
451
+ ```
452
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
453
+ 🎯 Speed Mode Chore Complete!
454
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
455
+
456
+ What we accomplished:
457
+ ✅ Happy path scenario passes for this chore
458
+ ✅ Stable mode chores created
387
459
 
388
- Next step: Elevate to stable mode
389
- jettypod work elevate [feature-id] stable
460
+ Remaining speed mode chores: [count]
390
461
 
391
- Then start the first stable mode chore:
392
- jettypod work start [chore-id]
462
+ **Next step:** Continue with next speed mode chore
463
+ jettypod work start [next-speed-chore-id]
393
464
  ```
394
465
 
395
466
  **Mark current chore as done and end skill.**
@@ -578,12 +578,94 @@ Implementation complete:
578
578
  • Error handling: ✅ Comprehensive
579
579
  • Validation: ✅ Complete
580
580
  • All scenarios: ✅ Passing
581
+ ```
582
+
583
+ ### Step 4: Check for Stable Mode Completion and Auto-Elevate
584
+
585
+ **CRITICAL: After completing a stable mode chore, check if ALL stable chores are done. If yes, trigger production chore generation or elevate to production mode.**
586
+
587
+ ```javascript
588
+ // Check if all stable chores for this feature are done
589
+ const { getDb } = require('../../lib/database');
590
+ const { getCurrentWork } = require('../../lib/current-work');
591
+
592
+ const currentWork = getCurrentWork();
593
+ const featureId = currentWork.parent_id;
594
+
595
+ const db = getDb();
596
+ db.get(`
597
+ SELECT COUNT(*) as incomplete_count
598
+ FROM work_items
599
+ WHERE parent_id = ?
600
+ AND type = 'chore'
601
+ AND mode = 'stable'
602
+ AND status != 'done'
603
+ `, [featureId], async (err, result) => {
604
+ if (err) {
605
+ console.error('Error checking stable chores:', err.message);
606
+ db.close();
607
+ return;
608
+ }
609
+
610
+ if (result.incomplete_count === 0) {
611
+ // All stable chores done!
612
+ console.log('\n✅ ALL STABLE MODE CHORES COMPLETE!');
613
+ console.log('Checking project state for production chore generation...\n');
614
+
615
+ // NOTE: The production chore generation logic is now handled by
616
+ // features/work-commands/index.js in the stopWork() function
617
+ // when a stable mode chore is marked as done.
618
+ //
619
+ // This will trigger automatically - no action needed here.
620
+ // The system will:
621
+ // 1. Analyze implementation files
622
+ // 2. Propose production chores
623
+ // 3. Ask for confirmation
624
+ // 4. Create production chores
625
+ // 5. Elevate feature to production mode
626
+ } else {
627
+ console.log(`\n📋 ${result.incomplete_count} stable mode chores remaining`);
628
+ }
629
+
630
+ db.close();
631
+ });
632
+ ```
633
+
634
+ **Display based on completion status:**
635
+
636
+ **If all stable chores done:**
637
+
638
+ ```
639
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
640
+ 🎯 Stable Mode Complete!
641
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
581
642
 
643
+ What we accomplished:
644
+ ✅ All BDD scenarios passing (happy path + error handling + edge cases)
645
+ ✅ Comprehensive error handling
646
+ ✅ Input validation
647
+ ✅ All stable mode chores complete
648
+
649
+ The system will now analyze the implementation and propose production chores.
650
+ This happens automatically via the work tracking system.
651
+ ```
652
+
653
+ **If stable chores remain:**
654
+
655
+ ```
582
656
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
583
657
  🎯 Stable Mode Chore Complete!
584
658
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
585
659
 
586
- This chore is done. Continue with remaining stable mode chores or elevate to production mode when all are complete.
660
+ What we accomplished:
661
+ ✅ Scenario passes with proper error handling
662
+ ✅ Input validation added
663
+ ✅ Edge cases handled
664
+
665
+ Remaining stable mode chores: [count]
666
+
667
+ **Next step:** Continue with next stable mode chore
668
+ jettypod work start [next-stable-chore-id]
587
669
  ```
588
670
 
589
671
  **Mark current chore as done and end skill.**