jettypod 3.0.1

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.
Files changed (122) hide show
  1. package/.claude/PROTECT_SKILLS.md +28 -0
  2. package/.claude/settings.json +24 -0
  3. package/.claude/settings.local.json +16 -0
  4. package/.claude/skills/epic-discover/SKILL.md +262 -0
  5. package/.claude/skills/feature-discover/SKILL.md +393 -0
  6. package/.claude/skills/speed-mode/SKILL.md +364 -0
  7. package/.claude/skills/stable-mode/SKILL.md +591 -0
  8. package/.github/workflows/test-safety.yml +85 -0
  9. package/README.md +25 -0
  10. package/SPEED-STABLE-AUDIT.md +853 -0
  11. package/SYSTEM-BEHAVIOR.md +1241 -0
  12. package/TEST_SAFETY_AUDIT.md +314 -0
  13. package/TEST_SAFETY_IMPLEMENTATION.md +97 -0
  14. package/cucumber.js +8 -0
  15. package/docs/COMMAND_REFERENCE.md +903 -0
  16. package/docs/DECISIONS.md +68 -0
  17. package/docs/README.md +48 -0
  18. package/docs/STANDARDS-SYSTEM-DOCUMENTATION.md +374 -0
  19. package/docs/TEST-REWRITE-PLAN.md +261 -0
  20. package/docs/ai-test-writing-requirements.md +219 -0
  21. package/docs/claude-code-skills.md +607 -0
  22. package/docs/core-jettypod-methodology/comprehensive-jettypod-methodology.md +582 -0
  23. package/docs/core-jettypod-methodology/deprecated/jettypod-comprehensive-standards.md +1222 -0
  24. package/docs/core-jettypod-methodology/deprecated/jettypod-operating-guide.md +3399 -0
  25. package/docs/core-jettypod-methodology/deprecated/jettypod-technical-checklist.md +1325 -0
  26. package/docs/core-jettypod-methodology/deprecated/jettypod-vibe-coding-framework.md +1544 -0
  27. package/docs/core-jettypod-methodology/deprecated/prompt-engineering-guide.md +320 -0
  28. package/docs/core-jettypod-methodology/deprecated/vibe-coding-cheatsheet (1).md +516 -0
  29. package/docs/core-jettypod-methodology/deprecated/vibe-coding-framework.md +1544 -0
  30. package/docs/features/jettypod-standards-explained.md +543 -0
  31. package/docs/features/standards-inventory.md +257 -0
  32. package/docs/gap-analysis-current-vs-comprehensive-methodology.md +939 -0
  33. package/docs/jettypod-system-overview.md +409 -0
  34. package/features/auto-generate-production-chores.feature +14 -0
  35. package/features/claude-md-protection/steps.js +487 -0
  36. package/features/decisions/index.js +490 -0
  37. package/features/decisions/index.test.js +208 -0
  38. package/features/git-hooks/git-hooks.feature +30 -0
  39. package/features/git-hooks/index.js +93 -0
  40. package/features/git-hooks/index.test.js +137 -0
  41. package/features/git-hooks/post-commit +56 -0
  42. package/features/git-hooks/post-merge +47 -0
  43. package/features/git-hooks/pre-commit +28 -0
  44. package/features/git-hooks/simple-steps.js +53 -0
  45. package/features/git-hooks/simple-test.feature +10 -0
  46. package/features/git-hooks/steps.js +196 -0
  47. package/features/jettypod-update-command.feature +46 -0
  48. package/features/mode-prompts/index.js +95 -0
  49. package/features/mode-prompts/simple-steps.js +44 -0
  50. package/features/mode-prompts/simple-test.feature +9 -0
  51. package/features/mode-prompts/validation.test.js +120 -0
  52. package/features/refactor-mode/steps.js +217 -0
  53. package/features/refactor-mode.feature +49 -0
  54. package/features/skills-update/index.test.js +216 -0
  55. package/features/step_definitions/auto-generate-production-chores.steps.js +162 -0
  56. package/features/step_definitions/terminal-logo.steps.js +145 -0
  57. package/features/step_definitions/update-command.steps.js +183 -0
  58. package/features/terminal-logo/index.js +39 -0
  59. package/features/terminal-logo/terminal-logo.feature +30 -0
  60. package/features/update-command/index.js +181 -0
  61. package/features/update-command/index.test.js +225 -0
  62. package/features/work-commands/bug-workflow-display.feature +22 -0
  63. package/features/work-commands/index.js +311 -0
  64. package/features/work-commands/simple-steps.js +69 -0
  65. package/features/work-commands/stable-tests.feature +57 -0
  66. package/features/work-commands/steps.js +1120 -0
  67. package/features/work-commands/validation.test.js +88 -0
  68. package/features/work-commands/work-commands.feature +13 -0
  69. package/features/work-tracking/discovery-validation.test.js +228 -0
  70. package/features/work-tracking/index.js +1511 -0
  71. package/features/work-tracking/mode-required.feature +112 -0
  72. package/features/work-tracking/phase-tracking.test.js +482 -0
  73. package/features/work-tracking/prototype-tracking.test.js +485 -0
  74. package/features/work-tracking/tree-view.test.js +310 -0
  75. package/features/work-tracking/work-set-mode.feature +71 -0
  76. package/features/work-tracking/work-start-mode.feature +88 -0
  77. package/full-test.txt +0 -0
  78. package/install.sh +89 -0
  79. package/jettypod.js +1640 -0
  80. package/lib/bug-workflow.js +94 -0
  81. package/lib/bug-workflow.test.js +177 -0
  82. package/lib/claudemd.js +130 -0
  83. package/lib/claudemd.test.js +195 -0
  84. package/lib/comprehensive-standards-full.json +1778 -0
  85. package/lib/config.js +181 -0
  86. package/lib/config.test.js +511 -0
  87. package/lib/constants.js +107 -0
  88. package/lib/constants.test.js +164 -0
  89. package/lib/current-work.js +130 -0
  90. package/lib/current-work.test.js +146 -0
  91. package/lib/database-project-config.test.js +107 -0
  92. package/lib/database.js +256 -0
  93. package/lib/database.test.js +106 -0
  94. package/lib/decisions-generator.js +102 -0
  95. package/lib/decisions-generator.test.js +457 -0
  96. package/lib/decisions-helpers.js +119 -0
  97. package/lib/decisions-helpers.test.js +310 -0
  98. package/lib/discovery-checkpoint.js +83 -0
  99. package/lib/docs-generator.js +280 -0
  100. package/lib/external-checklist.js +177 -0
  101. package/lib/git.js +142 -0
  102. package/lib/git.test.js +145 -0
  103. package/lib/logo.js +3 -0
  104. package/lib/migrations/001-epic-to-parent.js +24 -0
  105. package/lib/migrations/002-default-work-item-modes.js +37 -0
  106. package/lib/migrations/002-default-work-item-modes.test.js +351 -0
  107. package/lib/migrations/003-epic-discovery-fields.js +52 -0
  108. package/lib/migrations/004-discovery-decisions-table.js +32 -0
  109. package/lib/migrations/005-migrate-decision-data.js +62 -0
  110. package/lib/migrations/006-feature-phase-field.js +61 -0
  111. package/lib/migrations/007-prototype-tracking.js +38 -0
  112. package/lib/migrations/008-scenario-file-field.js +24 -0
  113. package/lib/migrations/index.js +74 -0
  114. package/lib/production-helpers.js +69 -0
  115. package/lib/project-state.test.js +92 -0
  116. package/lib/test-helpers.js +184 -0
  117. package/lib/test-helpers.test.js +255 -0
  118. package/package.json +36 -0
  119. package/prototypes/test/index.html +1 -0
  120. package/setup-dist-repo.sh +68 -0
  121. package/test-safety-check.sh +80 -0
  122. package/work-item-tracking-plan.md +199 -0
@@ -0,0 +1,393 @@
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.
4
+ ---
5
+
6
+ # Feature Discovery Skill
7
+
8
+ Guides Claude through feature discovery including UX approach exploration, optional prototyping, and BDD scenario generation.
9
+
10
+ ## Instructions
11
+
12
+ When this skill is activated, you are helping discover the best approach for a feature. Follow this structured approach:
13
+
14
+ ### Step 1: Understand the Feature Context
15
+
16
+ You'll receive context about:
17
+ - Feature title and description
18
+ - Parent epic (if any)
19
+ - Project context
20
+
21
+ ### Step 2: Check Epic Architectural Decisions
22
+
23
+ **CRITICAL:** If this feature belongs to an epic, check for existing architectural decisions:
24
+
25
+ ```javascript
26
+ const { getDecisionsForEpic } = require('../../lib/decisions-helpers');
27
+
28
+ if (parentEpicId) {
29
+ const epicDecisions = await getDecisionsForEpic(parentEpicId);
30
+ // Surface decisions to user
31
+ }
32
+ ```
33
+
34
+ Display the context with decisions:
35
+
36
+ ```
37
+ ✨ Planning Feature: [Feature Name]
38
+ Epic: [Epic Name]
39
+
40
+ 🎯 **Epic Architectural Decisions:**
41
+ [If decisions exist:]
42
+ - **[Aspect]:** [Decision]
43
+ *Rationale:* [Why this was chosen]
44
+ *Impact:* [How this constrains/guides this feature]
45
+
46
+ [If no decisions:]
47
+ No architectural decisions recorded for this epic yet.
48
+
49
+ Let's explore different approaches for this feature [that align with these decisions].
50
+ ```
51
+
52
+ **IMPORTANT:** When suggesting UX approaches in the next step, ensure they respect/align with the epic's architectural decisions.
53
+
54
+ ### Step 3: Suggest 3 UX Approaches
55
+
56
+ Propose exactly 3 approaches with varying complexity/trade-offs:
57
+
58
+ ```
59
+ Here are 3 different approaches for [feature name]:
60
+
61
+ **Option 1: [Simple/Minimal approach name]**
62
+ - **Pros**: ✅ [2-3 advantages]
63
+ - **Cons**: ❌ [2-3 trade-offs]
64
+ - **Experience**: [What it feels like to use]
65
+
66
+ **Option 2: [Balanced approach name]**
67
+ - **Pros**: ✅ [2-3 advantages]
68
+ - **Cons**: ❌ [2-3 trade-offs]
69
+ - **Experience**: [What it feels like to use]
70
+
71
+ **Option 3: [Advanced/Comprehensive approach name]**
72
+ - **Pros**: ✅ [2-3 advantages]
73
+ - **Cons**: ❌ [2-3 trade-offs]
74
+ - **Experience**: [What it feels like to use]
75
+
76
+ **Additional approaches considered but not recommended:**
77
+ - *[Alternative 1]*: [Brief] - Not selected because [reason]
78
+ - *[Alternative 2]*: [Brief] - Not selected because [reason]
79
+
80
+ Would you like me to create working prototypes of these approaches?
81
+ ```
82
+
83
+ ### Step 4: Optional Prototyping
84
+
85
+ If user wants prototypes:
86
+
87
+ 1. **Build prototypes** in `/prototypes/feature-[id]-[approach-name]/`
88
+ 2. **Name format**: `YYYY-MM-DD-[feature-slug]-[option].ext`
89
+ 3. **Focus on UX**: Show the feel, not production code
90
+ 4. **Add prototype header**:
91
+ ```
92
+ // Prototype: [feature] - [option]
93
+ // Created: [date]
94
+ // Purpose: [what this explores]
95
+ // Decision: [to be filled after testing]
96
+ ```
97
+ 5. **Offer to open them**: "Want me to open these in your browser?"
98
+
99
+ ### Step 5: Choose Winner
100
+
101
+ After user tests (or skips prototyping):
102
+
103
+ ```
104
+ Which approach works best?
105
+ ```
106
+
107
+ User picks winner. Record it.
108
+
109
+ ### Step 6: Generate BDD Scenarios AND Step Definitions
110
+
111
+ **CRITICAL:** BDD scenarios and step definitions must ALWAYS be created together. Never create scenarios without step definitions.
112
+
113
+ Based on chosen approach, generate:
114
+
115
+ **A. Scenario file** at `features/[feature-slug].feature` using Write tool:
116
+
117
+ 1. **Create file** at `features/[feature-slug].feature` using Write tool
118
+ 2. **ONLY include happy path scenario**:
119
+ - Happy path ONLY - the core user journey that proves it works
120
+ - NO error handling scenarios (added in stable mode)
121
+ - NO edge cases (added in stable mode)
122
+ - NO security/compliance scenarios (added in production mode)
123
+
124
+ **B. Step definitions file** at `features/step_definitions/[feature-slug].steps.js` using Write tool:
125
+
126
+ 1. **Create file** at `features/step_definitions/[feature-slug].steps.js`
127
+ 2. **Implement all Given/When/Then steps** from the scenarios
128
+ 3. **Follow existing patterns** - check other `.steps.js` files for conventions
129
+ 4. **Include**:
130
+ - Test environment setup/cleanup
131
+ - All Given steps (setup state)
132
+ - All When steps (execute actions)
133
+ - All Then steps (verify outcomes)
134
+
135
+ 3. **Update database** with scenario file path:
136
+ ```javascript
137
+ // After creating scenario file AND step definitions
138
+ const { getDb } = require('../../lib/database');
139
+ const db = getDb();
140
+
141
+ db.run(
142
+ `UPDATE work_items SET scenario_file = ? WHERE id = ?`,
143
+ ['features/[feature-slug].feature', featureId],
144
+ (err) => {
145
+ if (err) console.error('Failed to update scenario_file:', err);
146
+ }
147
+ );
148
+ ```
149
+
150
+ **Template for speed mode (happy path only):**
151
+
152
+ ```gherkin
153
+ Feature: [Feature Name]
154
+ [Brief description based on chosen UX approach]
155
+
156
+ Epic: [Epic name if applicable]
157
+ Approach: [Chosen approach name]
158
+
159
+ Scenario: [Happy path scenario - core user journey]
160
+ Given [initial state]
161
+ When [user takes main action]
162
+ Then [expected successful outcome]
163
+ And [observable UI/system state change]
164
+
165
+ # SPEED MODE: Only happy path above
166
+ # STABLE MODE: Will add error handling, edge cases, validation scenarios
167
+ # These additional scenarios are added by stable-mode skill, NOT during feature discovery
168
+ ```
169
+
170
+ **Example for Login feature (speed mode):**
171
+ ```gherkin
172
+ Feature: Email/Password Login
173
+ Simple inline form with email and password fields
174
+
175
+ Epic: User Authentication
176
+ Approach: Simple inline form
177
+
178
+ Scenario: User successfully logs in with valid credentials
179
+ Given I am on the login page
180
+ When I enter valid email and password
181
+ And I click the login button
182
+ Then I am redirected to the dashboard
183
+ And I see a welcome message with my name
184
+ And I have an active session token
185
+ ```
186
+
187
+ ### Step 7: Propose Speed Mode Chores
188
+
189
+ **CRITICAL:** After generating BDD scenarios, analyze the codebase and propose technical implementation chores.
190
+
191
+ **Your analysis should consider:**
192
+ - The BDD scenarios (especially the happy path)
193
+ - Existing codebase structure and patterns
194
+ - Epic's architectural decisions (if any)
195
+ - Tech stack and framework conventions
196
+
197
+ **Say to the user:**
198
+
199
+ ```
200
+ Now let me analyze the codebase and propose implementation chores for speed mode.
201
+
202
+ [Analyze codebase, read relevant files, check patterns]
203
+
204
+ Based on the scenario and codebase, here are the chores I recommend for speed mode:
205
+
206
+ **Chore 1: [Technical task title]**
207
+ - Why: [What this accomplishes toward the scenario]
208
+ - Scope: [Specific implementation details]
209
+
210
+ **Chore 2: [Technical task title]**
211
+ - Why: [What this accomplishes]
212
+ - Scope: [Specific implementation details]
213
+
214
+ [etc.]
215
+
216
+ These chores will make the happy path scenario pass.
217
+
218
+ Sound good? Any adjustments?
219
+ ```
220
+
221
+ **Wait for user confirmation/adjustments.**
222
+
223
+ **Then create the chores:**
224
+
225
+ ```javascript
226
+ // For each confirmed chore:
227
+ const { create } = require('./features/work-tracking');
228
+
229
+ await create('chore', 'Chore Title', 'Description', featureId, 'speed', false);
230
+ // Repeat for each chore
231
+ ```
232
+
233
+ **Report:**
234
+ ```
235
+ ✅ Created X chores for speed mode
236
+
237
+ Ready to start implementation: jettypod work start [first-chore-id]
238
+ ```
239
+
240
+ ### Step 8: Transition to Implementation
241
+
242
+ Complete the discovery phase:
243
+
244
+ ```
245
+ I'll archive the prototypes and transition to implementation.
246
+
247
+ First, let me propose the rationale:
248
+
249
+ "I'm going to record this decision:
250
+
251
+ Winner: prototypes/[winner-file] (or approach name if no prototypes)
252
+ Rationale: [Why this approach was chosen]
253
+
254
+ Does this rationale capture why you chose this approach? (You can edit it if needed)"
255
+ ```
256
+
257
+ WAIT for user to confirm or provide edited rationale.
258
+
259
+ **Then record with final rationale:**
260
+
261
+ ```
262
+ jettypod work implement [feature-id] \
263
+ --winner="prototypes/[winner-file]" \
264
+ --rationale="[user's confirmed/edited rationale]"
265
+
266
+ ✅ Feature discovery complete!
267
+
268
+ 📋 BDD scenarios written: features/[feature-slug].feature
269
+ 💾 Scenario file tracked in database
270
+
271
+ **Next step:** Start implementing
272
+ Run: jettypod work start [feature-id]
273
+
274
+ The feature is now in implementation phase (speed mode).
275
+ Build code that passes the happy path scenarios we just wrote.
276
+ ```
277
+
278
+ ## Key Principles
279
+
280
+ 1. **Always suggest exactly 3 options** - Simple, Balanced, Advanced
281
+ 2. **Show epic's architectural decision** - Feature should align with epic's technical approach
282
+ 3. **UX first, tech second** - Focus on what it feels like to use, not implementation details
283
+ 4. **Prototypes are optional but valuable** - User can skip if approach is obvious
284
+ 5. **BDD scenarios are required** - Discovery isn't complete without scenarios
285
+ 6. **Guide to next step** - Always end with clear action
286
+
287
+ ## Prototyping Guidelines
288
+
289
+ **Use fastest tech to demonstrate UX:**
290
+ - Quick HTML+JS for web UX
291
+ - Simple CLI scripts for command-line UX
292
+ - Minimal frameworks, maximum clarity
293
+
294
+ **What to prototype:**
295
+ - User interaction flow
296
+ - Visual layout (if UI)
297
+ - Command structure (if CLI)
298
+ - API shape (if API)
299
+
300
+ **What NOT to prototype:**
301
+ - Production error handling
302
+ - Database layer
303
+ - Authentication (unless that's the feature)
304
+ - Test coverage
305
+
306
+ ## BDD Scenario Guidelines
307
+
308
+ **Scenario naming:**
309
+ - Use present tense
310
+ - Be specific about what's being tested
311
+ - Focus on user behavior
312
+
313
+ **Given/When/Then structure:**
314
+ - **Given**: Set up initial state
315
+ - **When**: User action
316
+ - **Then**: Observable outcome
317
+
318
+ **What feature-discover creates:**
319
+
320
+ **Feature discovery ONLY creates speed mode scenarios (happy path):**
321
+ ```gherkin
322
+ Scenario: User successfully [does the thing]
323
+ Given [setup]
324
+ When [action]
325
+ Then [success]
326
+ ```
327
+
328
+ **Additional scenarios are added LATER by stable-mode skill:**
329
+
330
+ Stable mode adds error handling:
331
+ ```gherkin
332
+ Scenario: Handle invalid input
333
+ Given [setup]
334
+ When [invalid action]
335
+ Then [appropriate error]
336
+ ```
337
+
338
+ Production mode adds security/scale/compliance:
339
+ ```gherkin
340
+ Scenario: Prevent unauthorized access
341
+ Given [unauthorized user]
342
+ When [attempts action]
343
+ Then [access denied with proper error]
344
+ ```
345
+
346
+ **IMPORTANT:** Feature discovery only creates happy path. Stable/production chores add more scenarios later.
347
+
348
+ ## Example: Feature Discovery Flow
349
+
350
+ **Feature:** "Email/password login"
351
+ **Epic decision:** "Using Auth.js with JWT tokens"
352
+
353
+ **Suggested approaches:**
354
+ 1. **Simple inline form** - Email + password fields, inline validation
355
+ 2. **Multi-step flow** - Step 1: Email, Step 2: Password (better mobile UX)
356
+ 3. **Unified auth form** - Combined login/signup (switches based on email)
357
+
358
+ **User picks:** Option 1 (Simple inline form)
359
+
360
+ **Scenarios generated:**
361
+ ```gherkin
362
+ Feature: Email/Password Login
363
+
364
+ Scenario: Successful login
365
+ Given I am on the login page
366
+ When I enter valid credentials and submit
367
+ Then I am redirected to the dashboard
368
+ And I have an active JWT token
369
+
370
+ Scenario: Invalid credentials
371
+ Given I am on the login page
372
+ When I enter invalid credentials
373
+ Then I see an error message
374
+ And I remain on the login page
375
+ ```
376
+
377
+ **Rationale confirmation:**
378
+ Claude proposes: "Simple inline form chosen - fastest for users, cleanest UX"
379
+ User confirms: "Yes, perfect"
380
+
381
+ **Transition:** `jettypod work implement 10 --winner="prototypes/2025-10-30-login-simple.html" --rationale="Simple inline form chosen - fastest for users, cleanest UX"`
382
+
383
+ ## Validation
384
+
385
+ Before completing feature discovery, ensure:
386
+ - [ ] Epic's architectural decision is shown (if exists)
387
+ - [ ] Exactly 3 approaches suggested
388
+ - [ ] Winner chosen (with prototypes or without)
389
+ - [ ] BDD scenarios written
390
+ - [ ] Step definitions written for ALL scenario steps
391
+ - [ ] Scenarios file exists at `features/[feature-slug].feature`
392
+ - [ ] Step definitions file exists at `features/step_definitions/[feature-slug].steps.js`
393
+ - [ ] User knows next step .jettypod work start [feature-id])