jettypod 3.0.1 → 3.0.3

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.
@@ -186,13 +186,16 @@ Scenario: User successfully logs in with valid credentials
186
186
 
187
187
  ### Step 7: Propose Speed Mode Chores
188
188
 
189
- **CRITICAL:** After generating BDD scenarios, analyze the codebase and propose technical implementation chores.
189
+ **CRITICAL:** After generating BDD scenarios, analyze the codebase and propose technical implementation chores with rich breadcrumbs for speed mode execution.
190
190
 
191
191
  **Your analysis should consider:**
192
192
  - The BDD scenarios (especially the happy path)
193
193
  - Existing codebase structure and patterns
194
194
  - Epic's architectural decisions (if any)
195
195
  - Tech stack and framework conventions
196
+ - Which scenario steps each chore addresses
197
+ - Similar code patterns to follow
198
+ - Specific step definitions that should pass
196
199
 
197
200
  **Say to the user:**
198
201
 
@@ -205,11 +208,25 @@ Based on the scenario and codebase, here are the chores I recommend for speed mo
205
208
 
206
209
  **Chore 1: [Technical task title]**
207
210
  - Why: [What this accomplishes toward the scenario]
208
- - Scope: [Specific implementation details]
211
+ - Scenario steps addressed:
212
+ • [Which Given/When/Then steps this chore makes work]
213
+ - Implementation guidance:
214
+ • Files to create/modify: [specific paths]
215
+ • Patterns to follow: [reference existing similar code]
216
+ • Key functions/components needed: [list]
217
+ - Verification:
218
+ • Step definitions that should pass: [specific steps from .steps.js]
209
219
 
210
220
  **Chore 2: [Technical task title]**
211
221
  - Why: [What this accomplishes]
212
- - Scope: [Specific implementation details]
222
+ - Scenario steps addressed:
223
+ • [Which steps]
224
+ - Implementation guidance:
225
+ • Files to create/modify: [paths]
226
+ • Patterns to follow: [references]
227
+ • Key functions/components needed: [list]
228
+ - Verification:
229
+ • Step definitions that should pass: [steps]
213
230
 
214
231
  [etc.]
215
232
 
@@ -220,20 +237,58 @@ Sound good? Any adjustments?
220
237
 
221
238
  **Wait for user confirmation/adjustments.**
222
239
 
223
- **Then create the chores:**
240
+ **Then create the chores with rich descriptions:**
224
241
 
225
242
  ```javascript
226
243
  // For each confirmed chore:
227
244
  const { create } = require('./features/work-tracking');
228
245
 
229
- await create('chore', 'Chore Title', 'Description', featureId, 'speed', false);
246
+ const description = `[Technical description]
247
+
248
+ Scenario steps addressed:
249
+ • [Which Given/When/Then steps this chore makes work]
250
+
251
+ Implementation guidance:
252
+ • Files to create/modify: [specific paths]
253
+ • Patterns to follow: [reference existing similar code]
254
+ • Key functions/components needed: [list]
255
+
256
+ Verification:
257
+ • Step definitions that should pass: [specific steps from .steps.js file]`;
258
+
259
+ await create('chore', 'Chore Title', description, featureId, 'speed', false);
230
260
  // Repeat for each chore
231
261
  ```
232
262
 
263
+ **Example chore description:**
264
+
265
+ ```
266
+ Build login form component with email/password fields
267
+
268
+ Scenario steps addressed:
269
+ • Given I am on the login page
270
+ • When I enter valid credentials and submit
271
+
272
+ Implementation guidance:
273
+ • Create: src/components/LoginForm.jsx
274
+ • Follow pattern: src/components/SignupForm.jsx (similar form structure)
275
+ • Key components: EmailInput, PasswordInput, SubmitButton
276
+ • Key functions: handleSubmit(), validateEmailFormat()
277
+
278
+ Verification:
279
+ • features/step_definitions/login.steps.js - 'I am on the login page' should pass
280
+ • features/step_definitions/login.steps.js - 'I enter valid credentials and submit' should pass
281
+ ```
282
+
233
283
  **Report:**
234
284
  ```
235
285
  ✅ Created X chores for speed mode
236
286
 
287
+ Each chore includes:
288
+ • Scenario steps it addresses
289
+ • Implementation guidance with file paths and patterns
290
+ • Step definitions to verify against
291
+
237
292
  Ready to start implementation: jettypod work start [first-chore-id]
238
293
  ```
239
294
 
@@ -29,17 +29,18 @@ When this skill is activated, you are helping implement a speed mode chore to ma
29
29
 
30
30
  ## Implementation Steps
31
31
 
32
- ### Step 1: Autonomous Scenario Analysis
32
+ ### Step 1: Check for Breadcrumbs and Analyze Scenario
33
33
 
34
34
  **CRITICAL:** Claude Code executes this autonomously - no user permission needed.
35
35
 
36
36
  **Your task:**
37
- 1. Get the current work item to find the parent feature's scenario file
38
- 2. Read the scenario file from the database path
39
- 3. Parse the Gherkin format and extract the happy path scenario (first scenario)
40
- 4. Identify what needs to be implemented based on Given/When/Then steps
37
+ 1. Get the current work item and read its description for breadcrumbs
38
+ 2. If breadcrumbs exist (Scenario steps addressed, Implementation guidance, Verification), use them
39
+ 3. If no breadcrumbs, fall back to full autonomous analysis
40
+ 4. Read the parent feature's scenario file
41
+ 5. Parse the Gherkin and identify what needs to be implemented
41
42
 
42
- **Code to get scenario file:**
43
+ **Code to check for breadcrumbs:**
43
44
 
44
45
  ```javascript
45
46
  const { getCurrentWork } = require('../../lib/current-work');
@@ -49,6 +50,12 @@ const path = require('path');
49
50
 
50
51
  const currentWork = getCurrentWork();
51
52
 
53
+ // Check if description has breadcrumbs from feature-discover
54
+ const hasBreadcrumbs = currentWork.description &&
55
+ currentWork.description.includes('Scenario steps addressed:') &&
56
+ currentWork.description.includes('Implementation guidance:') &&
57
+ currentWork.description.includes('Verification:');
58
+
52
59
  // Get parent feature
53
60
  const db = getDb();
54
61
  db.get('SELECT * FROM work_items WHERE id = ?', [currentWork.parent_id], (err, feature) => {
@@ -73,7 +80,24 @@ db.get('SELECT * FROM work_items WHERE id = ?', [currentWork.parent_id], (err, f
73
80
  - Expected outcomes (Then)
74
81
  - Observable changes (And)
75
82
 
76
- **Display to user:**
83
+ **Display to user (with breadcrumbs):**
84
+
85
+ ```
86
+ 🚀 Speed Mode: [Chore Title]
87
+
88
+ Scenario steps addressed:
89
+ [Steps from breadcrumbs]
90
+
91
+ Implementation guidance:
92
+ [Files, patterns, functions from breadcrumbs]
93
+
94
+ Verification:
95
+ [Step definitions from breadcrumbs]
96
+
97
+ Now analyzing codebase to finalize implementation approach...
98
+ ```
99
+
100
+ **Display to user (without breadcrumbs):**
77
101
 
78
102
  ```
79
103
  🚀 Speed Mode: [Feature Name]
@@ -98,9 +122,10 @@ Now analyzing codebase to propose implementation...
98
122
 
99
123
  **Your task:**
100
124
  1. Check for epic architectural decisions
101
- 2. Find relevant existing files
102
- 3. Understand code patterns and conventions
103
- 4. Identify where new code should be added
125
+ 2. Use breadcrumbs if available, otherwise discover patterns
126
+ 3. Verify/find relevant existing files
127
+ 4. Understand code patterns and conventions
128
+ 5. Identify where new code should be added
104
129
 
105
130
  **Check for architectural decisions:**
106
131
 
@@ -116,7 +141,14 @@ db.get('SELECT epic_id FROM work_items WHERE id = ?', [currentWork.parent_id], a
116
141
  });
117
142
  ```
118
143
 
119
- **Find relevant files:**
144
+ **If breadcrumbs exist (from feature-discover):**
145
+ - Parse "Files to create/modify" section - these are your target files
146
+ - Parse "Patterns to follow" section - read these reference files first
147
+ - Parse "Key functions/components needed" - these guide your implementation
148
+ - Verify reference files exist and read them to understand patterns
149
+ - Confirm target file locations make sense in project structure
150
+
151
+ **If no breadcrumbs (autonomous discovery):**
120
152
  - Use Glob tool to find files matching patterns from scenario
121
153
  - Example: Scenario mentions "login" → search for `**/*login*.js`, `**/*auth*.js`
122
154
  - Use Grep tool to search for keywords from scenario
@@ -1220,13 +1220,14 @@ async function main() {
1220
1220
 
1221
1221
  if (!featureId || isNaN(featureId)) {
1222
1222
  console.error('Error: Feature ID is required');
1223
- console.log('Usage: jettypod work implement <feature-id> [--prototypes="file1,file2"] [--winner="file.js"]');
1223
+ console.log('Usage: jettypod work implement <feature-id> [--prototypes="file1,file2"] [--winner="file.js"] [--rationale="why this approach"]');
1224
1224
  process.exit(1);
1225
1225
  }
1226
1226
 
1227
- // Parse optional --prototypes and --winner flags
1227
+ // Parse optional --prototypes, --winner, and --rationale flags
1228
1228
  const prototypesIndex = args.findIndex(a => a.startsWith('--prototypes='));
1229
1229
  const winnerIndex = args.findIndex(a => a.startsWith('--winner='));
1230
+ const rationaleIndex = args.findIndex(a => a.startsWith('--rationale='));
1230
1231
 
1231
1232
  const prototypes = prototypesIndex !== -1
1232
1233
  ? args[prototypesIndex].split('=')[1].replace(/^["']|["']$/g, '').split(',').map(p => p.trim())
@@ -1234,6 +1235,9 @@ async function main() {
1234
1235
  const winner = winnerIndex !== -1
1235
1236
  ? args[winnerIndex].split('=')[1].replace(/^["']|["']$/g, '')
1236
1237
  : null;
1238
+ const rationale = rationaleIndex !== -1
1239
+ ? args[rationaleIndex].split('=')[1].replace(/^["']|["']$/g, '')
1240
+ : null;
1237
1241
 
1238
1242
  db.get(`SELECT * FROM work_items WHERE id = ?`, [featureId], (err, feature) => {
1239
1243
  if (err) {
@@ -1297,10 +1301,11 @@ async function main() {
1297
1301
  // Transition to implementation phase, set mode to speed
1298
1302
  const prototypeFilesValue = prototypes.length > 0 ? JSON.stringify(prototypes) : null;
1299
1303
  const winnerValue = winner || null;
1304
+ const rationaleValue = rationale || null;
1300
1305
 
1301
1306
  db.run(
1302
- `UPDATE work_items SET phase = 'implementation', mode = 'speed', prototype_files = ?, discovery_winner = ? WHERE id = ?`,
1303
- [prototypeFilesValue, winnerValue, featureId],
1307
+ `UPDATE work_items SET phase = 'implementation', mode = 'speed', prototype_files = ?, discovery_winner = ?, discovery_rationale = ? WHERE id = ?`,
1308
+ [prototypeFilesValue, winnerValue, rationaleValue, featureId],
1304
1309
  (err) => {
1305
1310
  if (err) {
1306
1311
  console.error(`Error: ${err.message}`);
@@ -1321,6 +1326,9 @@ async function main() {
1321
1326
  if (winner) {
1322
1327
  console.log(`Winner: ${winner}`);
1323
1328
  }
1329
+ if (rationale) {
1330
+ console.log(`Rationale: ${rationale}`);
1331
+ }
1324
1332
  console.log('');
1325
1333
  console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
1326
1334
  console.log('🚀 Speed Mode: Prove It Works');
@@ -0,0 +1,24 @@
1
+ // Migration: Add discovery_rationale field for feature discovery decisions
2
+ // Created: 2025-01-06
3
+ // Purpose: Track rationale for UX approach chosen during feature discovery
4
+ // Related: Feature-discover skill - records why an approach was selected
5
+
6
+ module.exports = {
7
+ id: '009-discovery-rationale-field',
8
+ description: 'Add discovery_rationale field for feature discovery decisions',
9
+
10
+ up: (db) => {
11
+ return new Promise((resolve, reject) => {
12
+ db.run(
13
+ `ALTER TABLE work_items ADD COLUMN discovery_rationale TEXT`,
14
+ (err) => {
15
+ if (err && !err.message.includes('duplicate column')) {
16
+ return reject(err);
17
+ }
18
+ console.log('Added discovery_rationale column to work_items');
19
+ resolve();
20
+ }
21
+ );
22
+ });
23
+ }
24
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jettypod",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "Simplified development mode manager",
5
5
  "main": "jettypod.js",
6
6
  "bin": {