jettypod 4.4.94 → 4.4.96
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/jettypod.js +65 -0
- package/lib/work-commands/index.js +250 -1
- package/lib/worktree-manager.js +3 -2
- package/package.json +1 -1
- package/skills-templates/bug-mode/SKILL.md +2 -2
- package/skills-templates/chore-mode/SKILL.md +44 -0
- package/skills-templates/epic-planning/SKILL.md +38 -9
- package/skills-templates/feature-planning/SKILL.md +247 -185
- package/skills-templates/production-mode/SKILL.md +96 -0
- package/skills-templates/speed-mode/SKILL.md +63 -6
- package/skills-templates/stable-mode/SKILL.md +61 -4
|
@@ -17,19 +17,20 @@ When this skill is activated, you are helping discover the best approach for a f
|
|
|
17
17
|
|
|
18
18
|
| Command | Used For | When | Phase |
|
|
19
19
|
|---------|----------|------|-------|
|
|
20
|
-
| `work
|
|
21
|
-
| `work tests
|
|
22
|
-
| `work
|
|
23
|
-
| `work start <chore-id>` | Start implementing a specific chore | After tests merged (Step
|
|
20
|
+
| `work tests start <feature-id>` | Create worktree for test authoring | After Integration Contract (Step 7) | Feature Planning |
|
|
21
|
+
| `work tests merge` → `cd` → `work cleanup` | Merge tests to main, then cleanup worktree | After chores created (Step 12) | Feature Planning |
|
|
22
|
+
| `work implement <feature-id>` | Transition feature to implementation phase | After chores created (Step 11) | Feature Planning |
|
|
23
|
+
| `work start <chore-id>` | Start implementing a specific chore | After tests merged (Step 13) | Speed Mode |
|
|
24
24
|
|
|
25
25
|
**CRITICAL:** All commands are run by **Claude**, not the user. The distinction is:
|
|
26
|
+
- `work tests start` = Creates isolated worktree for BDD test authoring (Step 7)
|
|
26
27
|
- `work implement` = Ends feature planning, transitions to implementation phase
|
|
27
|
-
- `work tests
|
|
28
|
+
- `work tests merge` = Land BDD tests on main
|
|
28
29
|
- `work start` = Creates worktree/branch for chore implementation
|
|
29
30
|
|
|
30
|
-
**🛑 STOP GATE:** DO NOT run `work start` until Step
|
|
31
|
+
**🛑 STOP GATE:** DO NOT run `work start` until Step 13. Tests must be merged to main first.
|
|
31
32
|
|
|
32
|
-
**🛑 HANDOFF REQUIREMENT:** After `work start`, you MUST invoke speed-mode using the Skill tool. See Step
|
|
33
|
+
**🛑 HANDOFF REQUIREMENT:** After `work start`, you MUST invoke speed-mode using the Skill tool. See Step 13.
|
|
33
34
|
|
|
34
35
|
---
|
|
35
36
|
|
|
@@ -141,7 +142,25 @@ Would you like me to create working prototypes of these approaches?
|
|
|
141
142
|
|
|
142
143
|
If user wants prototypes:
|
|
143
144
|
|
|
144
|
-
1
|
|
145
|
+
**Sub-step 1: Create prototype worktree**
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
jettypod work prototype start ${FEATURE_ID} [approach-name]
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Example:
|
|
152
|
+
```bash
|
|
153
|
+
jettypod work prototype start 42 simple-form
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
This creates a worktree at `.jettypod-work/prototype-<id>-<slug>-<approach>/` where prototypes can be safely built and committed.
|
|
157
|
+
|
|
158
|
+
**🛑 STOP AND CHECK:** Verify worktree was created successfully before proceeding.
|
|
159
|
+
|
|
160
|
+
**Sub-step 2: Build prototypes in the worktree**
|
|
161
|
+
|
|
162
|
+
1. **Build prototypes** using **absolute paths** to the worktree:
|
|
163
|
+
- `<worktree_path>/prototypes/feature-[id]-[approach-name]/`
|
|
145
164
|
2. **Name format**: `YYYY-MM-DD-[feature-slug]-[option].ext`
|
|
146
165
|
3. **Focus on UX**: Show the feel, not production code
|
|
147
166
|
4. **Add visible banner header at TOP of page** (for HTML/web prototypes):
|
|
@@ -156,10 +175,28 @@ If user wants prototypes:
|
|
|
156
175
|
</div>
|
|
157
176
|
```
|
|
158
177
|
For CLI/terminal prototypes, add similar info as first output.
|
|
159
|
-
5. **
|
|
178
|
+
5. **Commit the prototype** in the worktree:
|
|
179
|
+
```bash
|
|
180
|
+
cd <worktree_path>
|
|
181
|
+
git add .
|
|
182
|
+
git commit -m "Add prototype: [approach-name] for feature #${FEATURE_ID}"
|
|
183
|
+
```
|
|
184
|
+
6. **Offer to open them**: "Want me to open these in your browser?"
|
|
160
185
|
|
|
161
186
|
**WAIT for user to test prototypes.**
|
|
162
187
|
|
|
188
|
+
**Sub-step 3: Merge prototype after testing**
|
|
189
|
+
|
|
190
|
+
After user has tested (regardless of whether they pick this approach):
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
jettypod work prototype merge ${FEATURE_ID}
|
|
194
|
+
cd <main-repo-path>
|
|
195
|
+
jettypod work cleanup ${FEATURE_ID}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
This merges prototype files to main (in `/prototypes/` directory) and cleans up the worktree.
|
|
199
|
+
|
|
163
200
|
<details>
|
|
164
201
|
<summary><strong>📋 Prototyping Guidelines (click to expand)</strong></summary>
|
|
165
202
|
|
|
@@ -192,7 +229,7 @@ Which approach works best?
|
|
|
192
229
|
|
|
193
230
|
**WAIT for user response.**
|
|
194
231
|
|
|
195
|
-
User picks winner. Note their choice - you'll record it formally in Step
|
|
232
|
+
User picks winner. Note their choice - you'll record it formally in Step 11 when transitioning to implementation.
|
|
196
233
|
|
|
197
234
|
**🔄 WORKFLOW CHECKPOINT: Winner chosen**
|
|
198
235
|
|
|
@@ -202,12 +239,10 @@ jettypod workflow checkpoint <feature-id> --step=5
|
|
|
202
239
|
|
|
203
240
|
**Proceed to Step 6.**
|
|
204
241
|
|
|
205
|
-
### Step 6: Define Integration Contract
|
|
242
|
+
### Step 6: Define Integration Contract
|
|
206
243
|
|
|
207
244
|
**CRITICAL:** Before writing scenarios, you MUST define how users reach this feature. Features that pass tests but aren't integrated into the product are useless.
|
|
208
245
|
|
|
209
|
-
#### Step 6A: Define Integration Contract
|
|
210
|
-
|
|
211
246
|
**Ask yourself and document:**
|
|
212
247
|
|
|
213
248
|
1. **Entry Point** - How does a user reach this feature?
|
|
@@ -243,17 +278,77 @@ Example:
|
|
|
243
278
|
|
|
244
279
|
**WAIT for user to confirm or adjust the integration contract.**
|
|
245
280
|
|
|
246
|
-
|
|
281
|
+
**Proceed to Step 7.**
|
|
282
|
+
|
|
283
|
+
### Step 7: Create Test Worktree
|
|
247
284
|
|
|
248
|
-
|
|
285
|
+
**CRITICAL:** Create the isolated worktree BEFORE proposing scenarios. This ensures:
|
|
286
|
+
1. A safe workspace exists before any file discussion
|
|
287
|
+
2. Claude has `WORKTREE_PATH` before being tempted to write files
|
|
288
|
+
3. Writing to main is impossible because we're in worktree context
|
|
289
|
+
|
|
290
|
+
**🚫 FORBIDDEN: Manual Git Worktree Commands**
|
|
291
|
+
```
|
|
292
|
+
❌ git worktree add ...
|
|
293
|
+
❌ git checkout -b tests/...
|
|
294
|
+
❌ git branch tests/...
|
|
295
|
+
```
|
|
296
|
+
**ALWAYS use jettypod commands** - they handle branch naming, path conventions, database tracking, and cleanup. Manual git commands will create orphaned worktrees that break the merge workflow.
|
|
297
|
+
|
|
298
|
+
**Run:**
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
jettypod work tests start ${FEATURE_ID}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
This creates:
|
|
305
|
+
- Worktree at `.jettypod-work/tests-<id>-<slug>/`
|
|
306
|
+
- Branch `tests/feature-<id>-<slug>`
|
|
307
|
+
|
|
308
|
+
**🛑 STOP AND CHECK:** Verify worktree was created successfully. If you see an error, investigate before continuing.
|
|
309
|
+
|
|
310
|
+
**Capture from output:**
|
|
311
|
+
- `WORKTREE_PATH` - the absolute path to the worktree (e.g., `/path/to/.jettypod-work/tests-42-email-login`)
|
|
312
|
+
|
|
313
|
+
Example output:
|
|
314
|
+
```
|
|
315
|
+
✅ Created test worktree: /path/to/.jettypod-work/tests-42-email-login
|
|
316
|
+
Branch: tests/feature-42-email-login
|
|
317
|
+
|
|
318
|
+
Write your BDD files to:
|
|
319
|
+
<worktree>/features/email-login.feature
|
|
320
|
+
<worktree>/features/step_definitions/email-login.steps.js
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
**Display:**
|
|
324
|
+
|
|
325
|
+
```
|
|
326
|
+
📁 Test worktree created: ${WORKTREE_PATH}
|
|
327
|
+
Branch: tests/feature-${FEATURE_ID}-${FEATURE_SLUG}
|
|
328
|
+
|
|
329
|
+
🔒 WORKTREE LOCK ACTIVE: All BDD file writes will use this path.
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
**🔒 WORKTREE PATH LOCK**
|
|
333
|
+
|
|
334
|
+
From this point forward, ALL file operations for BDD tests MUST use paths starting with:
|
|
249
335
|
```
|
|
250
|
-
|
|
251
|
-
❌ Write tool to features/step_definitions/*.js
|
|
252
|
-
❌ Any file creation on main branch
|
|
336
|
+
${WORKTREE_PATH}/features/
|
|
253
337
|
```
|
|
254
|
-
**Files are written in Step 8D** inside an isolated worktree. At this step, you are ONLY displaying proposed scenarios to the user for confirmation. The worktree doesn't exist yet.
|
|
255
338
|
|
|
256
|
-
**
|
|
339
|
+
**Store `WORKTREE_PATH`** - you'll need it for Step 9.
|
|
340
|
+
|
|
341
|
+
**Proceed to Step 8.**
|
|
342
|
+
|
|
343
|
+
### Step 8: Propose BDD Scenarios
|
|
344
|
+
|
|
345
|
+
**🚫 FORBIDDEN: Writing Files at This Step**
|
|
346
|
+
```
|
|
347
|
+
❌ Write tool to ${WORKTREE_PATH}/features/*.feature
|
|
348
|
+
❌ Write tool to ${WORKTREE_PATH}/features/step_definitions/*.js
|
|
349
|
+
❌ Any file creation (even in worktree)
|
|
350
|
+
```
|
|
351
|
+
**Files are written in Step 9** after user confirms the scenarios. At this step, you are ONLY displaying proposed scenarios to the user for confirmation.
|
|
257
352
|
|
|
258
353
|
**Feature slug:** Derive `FEATURE_SLUG` from the feature title:
|
|
259
354
|
- Lowercase
|
|
@@ -266,8 +361,8 @@ Based on chosen approach, **display** the proposed scenarios to the user:
|
|
|
266
361
|
```
|
|
267
362
|
📋 Proposed BDD Scenarios
|
|
268
363
|
|
|
269
|
-
**Feature file:** features/[feature-slug].feature
|
|
270
|
-
**Step definitions:** features/step_definitions/[feature-slug].steps.js
|
|
364
|
+
**Feature file:** ${WORKTREE_PATH}/features/[feature-slug].feature
|
|
365
|
+
**Step definitions:** ${WORKTREE_PATH}/features/step_definitions/[feature-slug].steps.js
|
|
271
366
|
```
|
|
272
367
|
|
|
273
368
|
Then show the full Gherkin content:
|
|
@@ -280,8 +375,8 @@ Feature: [Feature Name]
|
|
|
280
375
|
Approach: [Chosen approach name]
|
|
281
376
|
|
|
282
377
|
# Integration Contract:
|
|
283
|
-
# Entry Point: [from Step
|
|
284
|
-
# Caller Code: [from Step
|
|
378
|
+
# Entry Point: [from Step 6]
|
|
379
|
+
# Caller Code: [from Step 6]
|
|
285
380
|
|
|
286
381
|
# INTEGRATION SCENARIO (REQUIRED - proves feature is reachable)
|
|
287
382
|
Scenario: User can reach [feature] from [entry point]
|
|
@@ -318,7 +413,7 @@ Does this capture the feature correctly? Any scenarios to add/change?
|
|
|
318
413
|
```
|
|
319
414
|
|
|
320
415
|
**Scenario content requirements:**
|
|
321
|
-
- **FIRST scenario MUST be the Integration Scenario** from Step
|
|
416
|
+
- **FIRST scenario MUST be the Integration Scenario** from Step 6 (proves reachability)
|
|
322
417
|
- **Include all "make it work" scenarios**:
|
|
323
418
|
- All success paths - required functionality AND optional features
|
|
324
419
|
- Multiple valid workflows if the feature supports them
|
|
@@ -329,17 +424,17 @@ Does this capture the feature correctly? Any scenarios to add/change?
|
|
|
329
424
|
|
|
330
425
|
**WAIT for user confirmation.**
|
|
331
426
|
|
|
332
|
-
- If user confirms → Proceed to Step
|
|
427
|
+
- If user confirms → Proceed to Step 9
|
|
333
428
|
- If user requests changes → Revise scenarios and display again
|
|
334
|
-
- **Store the confirmed scenarios in memory** - you'll write them in Step
|
|
429
|
+
- **Store the confirmed scenarios in memory** - you'll write them in Step 9
|
|
335
430
|
|
|
336
431
|
**🔄 WORKFLOW CHECKPOINT: BDD scenarios confirmed**
|
|
337
432
|
|
|
338
433
|
```bash
|
|
339
|
-
jettypod workflow checkpoint <feature-id> --step=
|
|
434
|
+
jettypod workflow checkpoint <feature-id> --step=8
|
|
340
435
|
```
|
|
341
436
|
|
|
342
|
-
**Proceed to Step
|
|
437
|
+
**Proceed to Step 9.**
|
|
343
438
|
|
|
344
439
|
**Template for speed mode (make it work):**
|
|
345
440
|
|
|
@@ -351,8 +446,8 @@ Feature: [Feature Name]
|
|
|
351
446
|
Approach: [Chosen approach name]
|
|
352
447
|
|
|
353
448
|
# Integration Contract:
|
|
354
|
-
# Entry Point: [from Step
|
|
355
|
-
# Caller Code: [from Step
|
|
449
|
+
# Entry Point: [from Step 6]
|
|
450
|
+
# Caller Code: [from Step 6]
|
|
356
451
|
|
|
357
452
|
# INTEGRATION SCENARIO (REQUIRED - proves feature is reachable)
|
|
358
453
|
Scenario: User can reach [feature] from [entry point]
|
|
@@ -464,13 +559,94 @@ Scenario: Prevent unauthorized access
|
|
|
464
559
|
|
|
465
560
|
</details>
|
|
466
561
|
|
|
467
|
-
### Step
|
|
562
|
+
### Step 9: Write and Validate BDD Files
|
|
563
|
+
|
|
564
|
+
**NOW you may write files** - the worktree exists (from Step 7) and scenarios are confirmed (from Step 8).
|
|
565
|
+
|
|
566
|
+
**🔒 WORKTREE PATH REQUIRED:** All file writes MUST use the `WORKTREE_PATH` captured in Step 7.
|
|
567
|
+
|
|
568
|
+
Using the scenarios confirmed in Step 8, write the files using **absolute paths to the worktree**:
|
|
569
|
+
|
|
570
|
+
**A. Write scenario file** using Write tool:
|
|
571
|
+
```
|
|
572
|
+
${WORKTREE_PATH}/features/${FEATURE_SLUG}.feature
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
**B. Write step definitions file** using Write tool:
|
|
576
|
+
```
|
|
577
|
+
${WORKTREE_PATH}/features/step_definitions/${FEATURE_SLUG}.steps.js
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
**Step definition requirements:**
|
|
581
|
+
1. Implement all Given/When/Then steps from the scenarios
|
|
582
|
+
2. Follow existing patterns - check other `.steps.js` files for conventions
|
|
583
|
+
3. Include test environment setup/cleanup
|
|
584
|
+
4. All Given steps (setup state)
|
|
585
|
+
5. All When steps (execute actions)
|
|
586
|
+
6. All Then steps (verify outcomes)
|
|
587
|
+
|
|
588
|
+
**Validate BDD infrastructure:**
|
|
589
|
+
|
|
590
|
+
Run cucumber dry-run **from within the worktree**:
|
|
591
|
+
|
|
592
|
+
```bash
|
|
593
|
+
cd ${WORKTREE_PATH} && npx cucumber-js --dry-run features/${FEATURE_SLUG}.feature
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
**What the output means:**
|
|
597
|
+
|
|
598
|
+
✅ **Success** - No errors, all steps have definitions:
|
|
599
|
+
```
|
|
600
|
+
0 scenarios
|
|
601
|
+
0 steps
|
|
602
|
+
```
|
|
603
|
+
(Dry-run doesn't execute, so 0 is correct)
|
|
604
|
+
|
|
605
|
+
❌ **Undefined steps** - Missing step definitions:
|
|
606
|
+
```
|
|
607
|
+
Undefined. Implement with the following snippet:
|
|
608
|
+
Given('I am on the login page', function () {
|
|
609
|
+
...
|
|
610
|
+
});
|
|
611
|
+
```
|
|
612
|
+
→ Add the missing step definition to your `.steps.js` file
|
|
468
613
|
|
|
469
|
-
|
|
614
|
+
❌ **Syntax error** - Invalid Gherkin:
|
|
615
|
+
```
|
|
616
|
+
Parse error in features/foo.feature
|
|
617
|
+
```
|
|
618
|
+
→ Fix the feature file syntax
|
|
619
|
+
|
|
620
|
+
❌ **Duplicate steps** - Multiple definitions match:
|
|
621
|
+
```
|
|
622
|
+
Multiple step definitions match
|
|
623
|
+
```
|
|
624
|
+
→ Remove or rename one of the duplicate step definitions
|
|
625
|
+
|
|
626
|
+
**If validation fails:**
|
|
627
|
+
1. Read the error message carefully
|
|
628
|
+
2. Fix the step definitions or scenario file **in the worktree**
|
|
629
|
+
3. Re-run the dry-run command
|
|
630
|
+
4. **Loop until validation passes** - do NOT proceed until green
|
|
631
|
+
|
|
632
|
+
**If validation succeeds:**
|
|
633
|
+
Display: "✅ BDD infrastructure validated - all steps have definitions"
|
|
634
|
+
|
|
635
|
+
**Update database with scenario file path:**
|
|
636
|
+
|
|
637
|
+
```bash
|
|
638
|
+
sqlite3 .jettypod/work.db "UPDATE work_items SET scenario_file = 'features/${FEATURE_SLUG}.feature' WHERE id = ${FEATURE_ID}"
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
**Proceed to Step 10.**
|
|
642
|
+
|
|
643
|
+
### Step 10: Propose Speed Mode Chores
|
|
644
|
+
|
|
645
|
+
**CRITICAL:** After BDD files are written and validated, analyze the codebase and propose technical implementation chores. **DO NOT CREATE CHORES YET** - the feature must transition to implementation mode first (Step 11).
|
|
470
646
|
|
|
471
647
|
**Your analysis should consider:**
|
|
472
648
|
- The BDD scenarios (integration + all success paths)
|
|
473
|
-
- The Integration Contract from Step
|
|
649
|
+
- The Integration Contract from Step 6
|
|
474
650
|
- Existing codebase structure and patterns
|
|
475
651
|
- Epic's architectural decisions (if any)
|
|
476
652
|
- Tech stack and framework conventions
|
|
@@ -480,7 +656,7 @@ Scenario: Prevent unauthorized access
|
|
|
480
656
|
**REQUIRED: At least one chore MUST be an Integration Chore** that:
|
|
481
657
|
- Wires the feature into the existing app
|
|
482
658
|
- Makes the Integration Scenario pass
|
|
483
|
-
- Modifies the caller code identified in Step
|
|
659
|
+
- Modifies the caller code identified in Step 6
|
|
484
660
|
|
|
485
661
|
**Say to the user:**
|
|
486
662
|
|
|
@@ -494,7 +670,7 @@ Based on the scenario and my understanding of the codebase, here are the chores
|
|
|
494
670
|
**Chore 1: [Integration chore - wire feature into app]** ⚡ INTEGRATION
|
|
495
671
|
- Why: Makes the feature reachable from [entry point]
|
|
496
672
|
- Integration Contract:
|
|
497
|
-
• Entry point: [from Step
|
|
673
|
+
• Entry point: [from Step 6]
|
|
498
674
|
• Caller code to modify: [specific file/function]
|
|
499
675
|
- Scenario steps addressed:
|
|
500
676
|
• [Integration scenario Given/When/Then steps]
|
|
@@ -524,17 +700,17 @@ Sound good? Any adjustments?
|
|
|
524
700
|
|
|
525
701
|
**WAIT for user response.**
|
|
526
702
|
|
|
527
|
-
- If user confirms → Proceed to Step
|
|
703
|
+
- If user confirms → Proceed to Step 11
|
|
528
704
|
- If user requests changes → Revise chore proposals, then WAIT again
|
|
529
705
|
- If user adds/removes chores → Update your list accordingly
|
|
530
706
|
|
|
531
|
-
### Step
|
|
707
|
+
### Step 11: Rationale, Create Chores, and Transition
|
|
532
708
|
|
|
533
|
-
Complete the discovery phase by transitioning the feature from discovery to implementation.
|
|
709
|
+
Complete the discovery phase by recording the decision, creating chores, and transitioning the feature from discovery to implementation.
|
|
534
710
|
|
|
535
|
-
**CRITICAL: You must EXECUTE
|
|
711
|
+
**CRITICAL: You must EXECUTE commands using the Bash tool. Do NOT just display them as text.**
|
|
536
712
|
|
|
537
|
-
####
|
|
713
|
+
#### Sub-step A: Confirm Rationale
|
|
538
714
|
|
|
539
715
|
Display to user:
|
|
540
716
|
|
|
@@ -549,11 +725,11 @@ Does this rationale capture why you chose this approach? (You can edit it if nee
|
|
|
549
725
|
|
|
550
726
|
**WAIT for user to confirm or provide edited rationale.**
|
|
551
727
|
|
|
552
|
-
####
|
|
728
|
+
#### Sub-step B: Create the Chores
|
|
553
729
|
|
|
554
730
|
**CRITICAL: Create chores BEFORE running `work implement`.** The system validates that chores exist before allowing the transition.
|
|
555
731
|
|
|
556
|
-
For each chore that the user confirmed in Step
|
|
732
|
+
For each chore that the user confirmed in Step 10, use the Bash tool to create it:
|
|
557
733
|
|
|
558
734
|
```bash
|
|
559
735
|
jettypod work create chore "[Chore title]" "[Chore description]" --parent=${FEATURE_ID}
|
|
@@ -564,24 +740,24 @@ Replace `${FEATURE_ID}` with actual ID. Example:
|
|
|
564
740
|
jettypod work create chore "Set up auth routes" "Create login/logout endpoints..." --parent=42
|
|
565
741
|
```
|
|
566
742
|
|
|
567
|
-
**CRITICAL: Copy the EXACT proposal from Step
|
|
743
|
+
**CRITICAL: Copy the EXACT proposal from Step 10 into each chore description.** Do not paraphrase or summarize - the implementation guidance must be preserved verbatim:
|
|
568
744
|
|
|
569
745
|
```
|
|
570
|
-
[Technical description from Step
|
|
746
|
+
[Technical description from Step 10]
|
|
571
747
|
|
|
572
748
|
Scenario steps addressed:
|
|
573
|
-
• [EXACT steps from Step
|
|
749
|
+
• [EXACT steps from Step 10]
|
|
574
750
|
|
|
575
751
|
Implementation guidance:
|
|
576
|
-
• Files to create/modify: [EXACT paths from Step
|
|
577
|
-
• Patterns to follow: [EXACT references from Step
|
|
578
|
-
• Key functions/components needed: [EXACT list from Step
|
|
752
|
+
• Files to create/modify: [EXACT paths from Step 10]
|
|
753
|
+
• Patterns to follow: [EXACT references from Step 10]
|
|
754
|
+
• Key functions/components needed: [EXACT list from Step 10]
|
|
579
755
|
|
|
580
756
|
Verification:
|
|
581
|
-
• [EXACT step definitions from Step
|
|
757
|
+
• [EXACT step definitions from Step 10]
|
|
582
758
|
```
|
|
583
759
|
|
|
584
|
-
####
|
|
760
|
+
#### Sub-step C: Execute Transition
|
|
585
761
|
|
|
586
762
|
**After ALL chores are created, use Bash tool to EXECUTE the work implement command:**
|
|
587
763
|
|
|
@@ -600,8 +776,8 @@ jettypod work implement 42 --winner="Simple inline form" --rationale="Fastest UX
|
|
|
600
776
|
|
|
601
777
|
**If the command fails**, check the error message:
|
|
602
778
|
- "Feature not found" → Verify the feature ID
|
|
603
|
-
- "No chores exist" → You skipped
|
|
604
|
-
- "Already in implementation" → Feature was already transitioned, proceed to Step
|
|
779
|
+
- "No chores exist" → You skipped Sub-step B - go back and create chores first
|
|
780
|
+
- "Already in implementation" → Feature was already transitioned, proceed to Step 12
|
|
605
781
|
|
|
606
782
|
After successful transition, display:
|
|
607
783
|
|
|
@@ -609,134 +785,20 @@ After successful transition, display:
|
|
|
609
785
|
✅ Feature transitioned to implementation phase
|
|
610
786
|
✅ Created X chores for speed mode
|
|
611
787
|
|
|
612
|
-
Now I'll
|
|
788
|
+
Now I'll merge the BDD tests to main...
|
|
613
789
|
```
|
|
614
790
|
|
|
615
791
|
**🔄 WORKFLOW CHECKPOINT: Implementation transition complete**
|
|
616
792
|
|
|
617
793
|
```bash
|
|
618
|
-
jettypod workflow checkpoint <feature-id> --step=
|
|
619
|
-
```
|
|
620
|
-
|
|
621
|
-
**Proceed to Step 8D.**
|
|
622
|
-
|
|
623
|
-
#### Step 8D: Write Tests in Isolated Worktree
|
|
624
|
-
|
|
625
|
-
**CRITICAL:** Tests are written in an isolated worktree, not directly on main. This ensures agent failures don't leave uncommitted garbage on main.
|
|
626
|
-
|
|
627
|
-
**🚫 FORBIDDEN: Manual Git Worktree Commands**
|
|
628
|
-
```
|
|
629
|
-
❌ git worktree add ...
|
|
630
|
-
❌ git checkout -b tests/...
|
|
631
|
-
❌ git branch tests/...
|
|
632
|
-
```
|
|
633
|
-
**ALWAYS use jettypod commands** - they handle branch naming, path conventions, database tracking, and cleanup. Manual git commands will create orphaned worktrees that break the merge workflow.
|
|
634
|
-
|
|
635
|
-
**Sub-step 1: Create test worktree**
|
|
636
|
-
|
|
637
|
-
```bash
|
|
638
|
-
jettypod work tests start ${FEATURE_ID}
|
|
639
|
-
```
|
|
640
|
-
|
|
641
|
-
This creates:
|
|
642
|
-
- Worktree at `.jettypod-work/tests-<id>-<slug>/`
|
|
643
|
-
- Branch `tests/feature-<id>-<slug>`
|
|
644
|
-
|
|
645
|
-
**Capture the worktree path from output** - you'll need it for file operations.
|
|
646
|
-
|
|
647
|
-
Example output:
|
|
648
|
-
```
|
|
649
|
-
✅ Created test worktree: /path/to/.jettypod-work/tests-42-email-login
|
|
650
|
-
Branch: tests/feature-42-email-login
|
|
651
|
-
|
|
652
|
-
Write your BDD files to:
|
|
653
|
-
<worktree>/features/email-login.feature
|
|
654
|
-
<worktree>/features/step_definitions/email-login.steps.js
|
|
655
|
-
|
|
656
|
-
When done, merge then cleanup:
|
|
657
|
-
jettypod work tests merge 42
|
|
658
|
-
cd /path/to/main/repo
|
|
659
|
-
jettypod work cleanup 42
|
|
660
|
-
```
|
|
661
|
-
|
|
662
|
-
**🛑 STOP AND CHECK:** Verify worktree was created successfully. If you see an error, investigate before continuing.
|
|
663
|
-
|
|
664
|
-
**Sub-step 2: Write BDD files in the worktree**
|
|
665
|
-
|
|
666
|
-
Using the scenarios you confirmed in Step 6B, write the files using **absolute paths to the worktree**:
|
|
667
|
-
|
|
668
|
-
**A. Write scenario file** using Write tool:
|
|
669
|
-
```
|
|
670
|
-
<worktree_path>/features/${FEATURE_SLUG}.feature
|
|
671
|
-
```
|
|
672
|
-
|
|
673
|
-
**B. Write step definitions file** using Write tool:
|
|
674
|
-
```
|
|
675
|
-
<worktree_path>/features/step_definitions/${FEATURE_SLUG}.steps.js
|
|
676
|
-
```
|
|
677
|
-
|
|
678
|
-
**Step definition requirements:**
|
|
679
|
-
1. Implement all Given/When/Then steps from the scenarios
|
|
680
|
-
2. Follow existing patterns - check other `.steps.js` files for conventions
|
|
681
|
-
3. Include test environment setup/cleanup
|
|
682
|
-
4. All Given steps (setup state)
|
|
683
|
-
5. All When steps (execute actions)
|
|
684
|
-
6. All Then steps (verify outcomes)
|
|
685
|
-
|
|
686
|
-
**Sub-step 3: Validate BDD infrastructure**
|
|
687
|
-
|
|
688
|
-
Run cucumber dry-run **from within the worktree**:
|
|
689
|
-
|
|
690
|
-
```bash
|
|
691
|
-
cd <worktree_path> && npx cucumber-js --dry-run features/${FEATURE_SLUG}.feature
|
|
692
|
-
```
|
|
693
|
-
|
|
694
|
-
**What the output means:**
|
|
695
|
-
|
|
696
|
-
✅ **Success** - No errors, all steps have definitions:
|
|
697
|
-
```
|
|
698
|
-
0 scenarios
|
|
699
|
-
0 steps
|
|
700
|
-
```
|
|
701
|
-
(Dry-run doesn't execute, so 0 is correct)
|
|
702
|
-
|
|
703
|
-
❌ **Undefined steps** - Missing step definitions:
|
|
794
|
+
jettypod workflow checkpoint <feature-id> --step=11
|
|
704
795
|
```
|
|
705
|
-
Undefined. Implement with the following snippet:
|
|
706
|
-
Given('I am on the login page', function () {
|
|
707
|
-
...
|
|
708
|
-
});
|
|
709
|
-
```
|
|
710
|
-
→ Add the missing step definition to your `.steps.js` file
|
|
711
|
-
|
|
712
|
-
❌ **Syntax error** - Invalid Gherkin:
|
|
713
|
-
```
|
|
714
|
-
Parse error in features/foo.feature
|
|
715
|
-
```
|
|
716
|
-
→ Fix the feature file syntax
|
|
717
|
-
|
|
718
|
-
❌ **Duplicate steps** - Multiple definitions match:
|
|
719
|
-
```
|
|
720
|
-
Multiple step definitions match
|
|
721
|
-
```
|
|
722
|
-
→ Remove or rename one of the duplicate step definitions
|
|
723
796
|
|
|
724
|
-
**
|
|
725
|
-
1. Read the error message carefully
|
|
726
|
-
2. Fix the step definitions or scenario file **in the worktree**
|
|
727
|
-
3. Re-run the dry-run command
|
|
728
|
-
4. **Loop until validation passes** - do NOT proceed until green
|
|
797
|
+
**Proceed to Step 12.**
|
|
729
798
|
|
|
730
|
-
|
|
731
|
-
Display: "✅ BDD infrastructure validated - all steps have definitions"
|
|
732
|
-
|
|
733
|
-
**Sub-step 4: Update database with scenario file path**
|
|
734
|
-
|
|
735
|
-
```bash
|
|
736
|
-
sqlite3 .jettypod/work.db "UPDATE work_items SET scenario_file = 'features/${FEATURE_SLUG}.feature' WHERE id = ${FEATURE_ID}"
|
|
737
|
-
```
|
|
799
|
+
### Step 12: Merge Tests to Main
|
|
738
800
|
|
|
739
|
-
|
|
801
|
+
The BDD files were written in Step 9. Now merge them to main.
|
|
740
802
|
|
|
741
803
|
**Merge and cleanup (3 steps):**
|
|
742
804
|
|
|
@@ -763,7 +825,7 @@ This will:
|
|
|
763
825
|
- Mark worktree as merged (cleanup is separate)
|
|
764
826
|
|
|
765
827
|
**🛑 STOP AND CHECK:** Verify merge succeeded:
|
|
766
|
-
- ✅ "Tests merged to main" → Proceed to Step
|
|
828
|
+
- ✅ "Tests merged to main" → Proceed to Step 13
|
|
767
829
|
- ❌ Error → Investigate, worktree still exists for debugging
|
|
768
830
|
|
|
769
831
|
**After successful merge, display:**
|
|
@@ -796,9 +858,9 @@ jettypod workflow complete feature-planning <feature-id>
|
|
|
796
858
|
|
|
797
859
|
This marks the `feature_planning_complete` gate as passed, enabling speed-mode to start.
|
|
798
860
|
|
|
799
|
-
**Proceed to Step
|
|
861
|
+
**Proceed to Step 13.**
|
|
800
862
|
|
|
801
|
-
|
|
863
|
+
### Step 13: Start First Chore
|
|
802
864
|
|
|
803
865
|
**Feature planning is now complete.** The feature has been transitioned to implementation phase, tests are on main, and chores are ready.
|
|
804
866
|
|
|
@@ -921,15 +983,15 @@ Before completing feature planning, ensure:
|
|
|
921
983
|
- [ ] Exactly 3 approaches suggested
|
|
922
984
|
- [ ] Winner chosen (with prototypes or without)
|
|
923
985
|
- [ ] **Integration Contract defined** (entry point, caller code, integration scenario)
|
|
986
|
+
- [ ] **Test worktree created** with `work tests start` (Step 7)
|
|
924
987
|
- [ ] **Integration Scenario is FIRST scenario** in proposed scenarios
|
|
925
|
-
- [ ] BDD scenarios **proposed and confirmed** by user (Step
|
|
988
|
+
- [ ] BDD scenarios **proposed and confirmed** by user (Step 8)
|
|
989
|
+
- [ ] **BDD files written** in worktree using `WORKTREE_PATH` (Step 9)
|
|
990
|
+
- [ ] **BDD infrastructure validated** with dry-run (Step 9)
|
|
926
991
|
- [ ] **At least one Integration Chore proposed** (wires feature into app)
|
|
927
|
-
- [ ] Speed mode chores proposed and confirmed (Step
|
|
928
|
-
- [ ] Chores created in database (Step
|
|
929
|
-
- [ ] Feature transitioned to implementation with `work implement` (Step
|
|
930
|
-
- [ ] **
|
|
931
|
-
- [ ]
|
|
932
|
-
- [ ] **
|
|
933
|
-
- [ ] **Tests merged to main** with `work tests merge` → `cd` → `work cleanup` (Step 8D)
|
|
934
|
-
- [ ] First chore started with `work start [chore-id]` (Step 8E)
|
|
935
|
-
- [ ] **Speed-mode skill invoked using Skill tool** (Step 8E)
|
|
992
|
+
- [ ] Speed mode chores proposed and confirmed (Step 10)
|
|
993
|
+
- [ ] Chores created in database (Step 11)
|
|
994
|
+
- [ ] Feature transitioned to implementation with `work implement` (Step 11)
|
|
995
|
+
- [ ] **Tests merged to main** with `work tests merge` → `cd` → `work cleanup` (Step 12)
|
|
996
|
+
- [ ] First chore started with `work start [chore-id]` (Step 13)
|
|
997
|
+
- [ ] **Speed-mode skill invoked using Skill tool** (Step 13)
|