jettypod 4.1.4 → 4.1.6

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.
@@ -113,7 +113,7 @@ After user tests (or skips prototyping):
113
113
  Which approach works best?
114
114
  ```
115
115
 
116
- User picks winner. Record it.
116
+ User picks winner. Note their choice - you'll record it formally in Step 8 when transitioning to implementation.
117
117
 
118
118
  ### Step 6: Generate BDD Scenarios AND Step Definitions
119
119
 
@@ -239,74 +239,20 @@ console.log(''); // Extra line before continuing
239
239
  1. Confirm success with checkmarks
240
240
  2. Proceed immediately to Step 6.75
241
241
 
242
- ### Step 6.75: Scaffold Unit Test Files
242
+ ### Step 6.75: Note About Unit Tests
243
243
 
244
- **CRITICAL:** After BDD validation passes, scaffold empty unit test files for expected implementation files.
244
+ **Unit tests will be created during speed mode implementation**, not during feature planning.
245
245
 
246
- **Execute:**
246
+ The speed-mode skill guides Claude to:
247
+ 1. Implement the feature code
248
+ 2. Create corresponding unit tests for the happy path
249
+ 3. Ensure tests pass before completing the chore
247
250
 
248
- ```javascript
249
- const { scaffoldUnitTestFile } = require('../../lib/unit-test-generator');
250
- const path = require('path');
251
-
252
- console.log('šŸ“ Scaffolding unit test files...\n');
253
-
254
- // Infer implementation files from chore breadcrumbs
255
- // Parse "Files to create/modify" from each proposed chore
256
- const implementationFiles = [];
257
-
258
- // For each chore you're about to propose, extract file paths
259
- // Example: if chore says "Files to create/modify: src/login.js, src/auth.js"
260
- // Then implementationFiles = ['src/login.js', 'src/auth.js']
261
-
262
- for (const chore of proposedChores) {
263
- const filesMatch = chore.description.match(/Files to create\/modify:\s*([^\n]+)/);
264
- if (filesMatch) {
265
- const files = filesMatch[1].split(',').map(f => f.trim());
266
- implementationFiles.push(...files);
267
- }
268
- }
269
-
270
- // Remove duplicates
271
- const uniqueFiles = [...new Set(implementationFiles)];
272
-
273
- // Scaffold test files
274
- const scaffoldedTests = [];
275
- for (const filePath of uniqueFiles) {
276
- if (filePath.endsWith('.js') && !filePath.includes('test')) {
277
- try {
278
- const testFile = scaffoldUnitTestFile(filePath);
279
- scaffoldedTests.push(testFile);
280
- console.log(` āœ… ${testFile}`);
281
- } catch (err) {
282
- console.log(` āš ļø Could not scaffold ${filePath}: ${err.message}`);
283
- }
284
- }
285
- }
286
-
287
- if (scaffoldedTests.length > 0) {
288
- console.log(`\nšŸ“¦ Scaffolded ${scaffoldedTests.length} unit test files`);
289
- console.log('These files have empty TODO placeholders - speed mode will fill them.\n');
290
- } else {
291
- console.log('No new test files to scaffold\n');
292
- }
293
- ```
294
-
295
- **Why scaffold now:**
296
- - Creates test file structure before implementation
297
- - Reminds developers tests are required
298
- - Speed mode can update these TODO placeholders after GREEN
299
- - Prevents "I'll add tests later" (they never do)
300
-
301
- **What gets scaffolded:**
302
- - Empty `test/[path]/[file].test.js` files
303
- - Basic `describe()` blocks
304
- - TODO placeholders for actual tests
305
- - Won't overwrite existing test files
251
+ This keeps feature planning focused on BDD scenarios (what users experience) while speed mode handles unit tests (implementation details).
306
252
 
307
253
  ### Step 7: Propose Speed Mode Chores
308
254
 
309
- **CRITICAL:** After BDD validation passes, analyze the codebase and propose technical implementation chores with rich breadcrumbs for speed mode execution.
255
+ **CRITICAL:** After BDD validation passes, analyze the codebase and propose technical implementation chores. **DO NOT CREATE CHORES YET** - the feature must transition to implementation mode first (Step 8).
310
256
 
311
257
  **Your analysis should consider:**
312
258
  - The BDD scenarios (especially the happy path)
@@ -315,7 +261,6 @@ if (scaffoldedTests.length > 0) {
315
261
  - Tech stack and framework conventions
316
262
  - Which scenario steps each chore addresses
317
263
  - Similar code patterns to follow
318
- - Specific step definitions that should pass
319
264
 
320
265
  **Say to the user:**
321
266
 
@@ -324,7 +269,7 @@ Now let me analyze the codebase and propose implementation chores for speed mode
324
269
 
325
270
  [Analyze codebase, read relevant files, check patterns]
326
271
 
327
- Based on the scenario and codebase, here are the chores I recommend for speed mode:
272
+ Based on the scenario and my understanding of the codebase, here are the chores I recommend for speed mode:
328
273
 
329
274
  **Chore 1: [Technical task title]**
330
275
  - Why: [What this accomplishes toward the scenario]
@@ -335,7 +280,7 @@ Based on the scenario and codebase, here are the chores I recommend for speed mo
335
280
  • Patterns to follow: [reference existing similar code]
336
281
  • Key functions/components needed: [list]
337
282
  - Verification:
338
- • Step definitions that should pass: [specific steps from .steps.js]
283
+ • [Which step definitions should pass]
339
284
 
340
285
  **Chore 2: [Technical task title]**
341
286
  - Why: [What this accomplishes]
@@ -346,7 +291,7 @@ Based on the scenario and codebase, here are the chores I recommend for speed mo
346
291
  • Patterns to follow: [references]
347
292
  • Key functions/components needed: [list]
348
293
  - Verification:
349
- • Step definitions that should pass: [steps]
294
+ • [Which steps should pass]
350
295
 
351
296
  [etc.]
352
297
 
@@ -355,107 +300,7 @@ These chores will make the happy path scenario pass.
355
300
  Sound good? Any adjustments?
356
301
  ```
357
302
 
358
- **Wait for user confirmation/adjustments.**
359
-
360
- **Then create the chores with rich descriptions:**
361
-
362
- ```javascript
363
- // Import breadcrumb generators
364
- const { parseStepDefinitions } = require('../../lib/step-definition-parser');
365
- const { findSimilarPatterns } = require('../../lib/pattern-finder');
366
- const { generateVerificationCommands } = require('../../lib/verification-command-generator');
367
- const { create } = require('./features/work-tracking');
368
- const path = require('path');
369
-
370
- // Parse step definitions for verification breadcrumbs
371
- const stepDefsPath = path.join(process.cwd(), 'features/step_definitions', `${featureSlug}.steps.js`);
372
- const stepMap = parseStepDefinitions(stepDefsPath);
373
-
374
- // For each confirmed chore:
375
- for (const chore of confirmedChores) {
376
- // Find similar patterns for implementation guidance
377
- const patterns = findSimilarPatterns(chore.keywords || []);
378
-
379
- // Build pattern references
380
- const patternRefs = patterns.length > 0
381
- ? patterns.map(p => `${p.file} (${p.description})`).join('\n • ')
382
- : 'No similar patterns found - create new implementation';
383
-
384
- // Build step definition references with file:line
385
- const stepRefs = chore.steps
386
- .map(stepText => {
387
- const stepInfo = stepMap.get(stepText);
388
- if (stepInfo) {
389
- return `${path.basename(stepInfo.file)}:${stepInfo.lineNumber} - "${stepText}"`;
390
- }
391
- return `"${stepText}" (not yet implemented)`;
392
- })
393
- .join('\n • ');
394
-
395
- // Generate verification command for the chore's scenario
396
- const verification = generateVerificationCommands(
397
- `features/${featureSlug}.feature`,
398
- chore.scenarioLine
399
- );
400
-
401
- const description = `${chore.technicalDescription}
402
-
403
- Scenario steps addressed:
404
- ${chore.scenarioSteps.map(s => `• ${s}`).join('\n')}
405
-
406
- Implementation guidance:
407
- • Files to create/modify: ${chore.files.join(', ')}
408
- • Patterns to follow:
409
- • ${patternRefs}
410
- • Key functions/components needed: ${chore.components.join(', ')}
411
-
412
- Verification:
413
- • Step definitions that should pass:
414
- • ${stepRefs}
415
- • Test command: ${verification.command}
416
- • Scenario: ${verification.scenarioName}`;
417
-
418
- await create('chore', chore.title, description, featureId, 'speed', false);
419
- }
420
- ```
421
-
422
- **Example chore description (with breadcrumb generators):**
423
-
424
- ```
425
- Build login form component with email/password fields
426
-
427
- Scenario steps addressed:
428
- • Given I am on the login page
429
- • When I enter valid credentials and submit
430
-
431
- Implementation guidance:
432
- • Files to create/modify: src/components/LoginForm.jsx
433
- • Patterns to follow:
434
- • src/components/SignupForm.jsx (Functions: handleSubmit, validateEmail)
435
- • lib/validation.js (Functions: validateEmailFormat, validatePassword)
436
- • Key functions/components needed: EmailInput, PasswordInput, SubmitButton
437
-
438
- Verification:
439
- • Step definitions that should pass:
440
- • login.steps.js:15 - "I am on the login page"
441
- • login.steps.js:23 - "I enter valid credentials and submit"
442
- • Test command: npm run test:bdd -- features/login.feature:8
443
- • Scenario: User successfully logs in with valid credentials
444
- ```
445
-
446
- **Report:**
447
- ```
448
- āœ… Created X chores for speed mode
449
-
450
- Each chore includes automated breadcrumbs from:
451
- • Step definition parser - Exact file:line references for verification
452
- • Pattern finder - Similar code patterns to follow
453
- • Verification command generator - Ready-to-run test commands
454
- • Scenario steps addressed
455
- • Implementation guidance with file paths
456
-
457
- Ready to start implementation: jettypod work start [first-chore-id]
458
- ```
303
+ **Wait for user confirmation/adjustments, then proceed to Step 8.**
459
304
 
460
305
  ### Step 8: Transition to Implementation
461
306
 
@@ -482,8 +327,8 @@ Does this rationale capture why you chose this approach? (You can edit it if nee
482
327
 
483
328
  **CRITICAL: After user confirms, use Bash tool to EXECUTE the work implement command:**
484
329
 
485
- ```javascript
486
- // Use Bash tool to execute:
330
+ ```bash
331
+ # Use Bash tool to execute:
487
332
  node jettypod.js work implement [feature-id] \
488
333
  --winner="[approach-name or prototypes/winner-file]" \
489
334
  --rationale="[user's confirmed/edited rationale]"
@@ -491,10 +336,39 @@ node jettypod.js work implement [feature-id] \
491
336
 
492
337
  **DO NOT display this as example text. EXECUTE IT using the Bash tool.**
493
338
 
494
- After execution succeeds, verify the feature transitioned to implementation phase and display:
339
+ #### Step 8C: Create the Chores
340
+
341
+ **CRITICAL: NOW create the chores.** The feature has transitioned to implementation mode, so chore creation will succeed.
342
+
343
+ For each chore that the user confirmed in Step 7, use the Bash tool to create it:
344
+
345
+ ```bash
346
+ # Use Bash tool to execute for each chore:
347
+ node jettypod.js work create chore "[Chore title]" "[Chore description with all the implementation guidance]" --parent=[feature-id]
348
+ ```
349
+
350
+ **Build the description from your Step 7 proposal:**
351
+ ```
352
+ [Technical description]
353
+
354
+ Scenario steps addressed:
355
+ • [Step 1]
356
+ • [Step 2]
357
+
358
+ Implementation guidance:
359
+ • Files to create/modify: [paths]
360
+ • Patterns to follow: [references]
361
+ • Key functions/components needed: [list]
362
+
363
+ Verification:
364
+ • [Which step definitions should pass]
365
+ ```
366
+
367
+ After creating all chores, display:
495
368
 
496
369
  ```
497
370
  āœ… Feature transitioned to implementation phase
371
+ āœ… Created X chores for speed mode
498
372
 
499
373
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
500
374
  šŸŽÆ Feature Discovery Complete!
@@ -505,12 +379,29 @@ After execution succeeds, verify the feature transitioned to implementation phas
505
379
  āœ… Feature phase: Implementation
506
380
  šŸš€ Feature mode: Speed
507
381
 
508
- **Next step:** Start implementing the first chore
509
- Run: jettypod work start [first-chore-id]
382
+ Ready to start implementation?
383
+ ```
384
+
385
+ #### Step 8D: Transition to Speed Mode
510
386
 
511
- Build code that passes the happy path scenarios we just wrote.
387
+ **WAIT for user confirmation.**
388
+
389
+ When user confirms they want to proceed with implementation (responds with "yes", "let's go", "proceed", "start", or similar):
390
+
391
+ **IMMEDIATELY invoke the speed-mode skill using the Skill tool:**
392
+
393
+ ```
394
+ Use the Skill tool with skill: "speed-mode"
512
395
  ```
513
396
 
397
+ **The speed-mode skill will then:**
398
+ 1. Guide the user to start the first chore with `jettypod work start [chore-id]`
399
+ 2. Create a worktree for the chore
400
+ 3. Follow TDD workflow to implement the chore
401
+ 4. Merge when complete
402
+
403
+ **End feature-planning skill after invoking speed-mode.**
404
+
514
405
  ## Key Principles
515
406
 
516
407
  1. **Always suggest exactly 3 options** - Simple, Balanced, Advanced
@@ -593,7 +484,7 @@ Scenario: Prevent unauthorized access
593
484
 
594
485
  **User picks:** Option 1 (Simple inline form)
595
486
 
596
- **Scenarios generated:**
487
+ **Scenarios generated (happy path only for speed mode):**
597
488
  ```gherkin
598
489
  Feature: Email/Password Login
599
490
 
@@ -603,11 +494,8 @@ Scenario: Successful login
603
494
  Then I am redirected to the dashboard
604
495
  And I have an active JWT token
605
496
 
606
- Scenario: Invalid credentials
607
- Given I am on the login page
608
- When I enter invalid credentials
609
- Then I see an error message
610
- And I remain on the login page
497
+ # SPEED MODE: Only happy path above
498
+ # STABLE MODE: Will add error handling scenarios like "Invalid credentials"
611
499
  ```
612
500
 
613
501
  **Rationale confirmation:**