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,364 @@
1
+ ---
2
+ name: speed-mode
3
+ description: Guide implementation of speed mode chores with autonomous code analysis and execution. Use when user starts work on a speed mode chore. Analyzes BDD scenarios, proposes implementation, writes code, and generates stable mode chores at completion.
4
+ ---
5
+
6
+ # Speed Mode Skill
7
+
8
+ Guides Claude Code through speed mode implementation with autonomous analysis and execution. Users confirm approach but Claude Code writes the code.
9
+
10
+ ## Instructions
11
+
12
+ When this skill is activated, you are helping implement a speed mode chore to make the happy path scenario pass. Follow this structured approach:
13
+
14
+ ### Overview
15
+
16
+ **Speed Mode Goal:** Implement ALL scoped functionality to make the happy path BDD scenario pass, assuming everything works correctly.
17
+
18
+ **Key Principles:**
19
+ - **Implement ALL features/functions** defined in the scenario - do not skip functionality
20
+ - **Assume happy path** - assume inputs are valid, files upload successfully, types are correct
21
+ - **No error handling** - no validation, no edge case handling, no error messages (that's for stable mode)
22
+ - **Fast iteration** - single file when possible, inline code over abstraction
23
+ - **Pragmatic** - localStorage for data, simple implementations
24
+ - **Autonomous execution** - Claude Code writes code, user confirms approach
25
+
26
+ **User Profile:** May not know how to code - Claude Code does the implementation autonomously.
27
+
28
+ ---
29
+
30
+ ## Implementation Steps
31
+
32
+ ### Step 1: Autonomous Scenario Analysis
33
+
34
+ **CRITICAL:** Claude Code executes this autonomously - no user permission needed.
35
+
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
41
+
42
+ **Code to get scenario file:**
43
+
44
+ ```javascript
45
+ const { getCurrentWork } = require('../../lib/current-work');
46
+ const { getDb } = require('../../lib/database');
47
+ const fs = require('fs');
48
+ const path = require('path');
49
+
50
+ const currentWork = getCurrentWork();
51
+
52
+ // Get parent feature
53
+ const db = getDb();
54
+ db.get('SELECT * FROM work_items WHERE id = ?', [currentWork.parent_id], (err, feature) => {
55
+ if (!feature.scenario_file) {
56
+ console.error('No scenario file found for this feature');
57
+ return;
58
+ }
59
+
60
+ const scenarioPath = path.join(process.cwd(), feature.scenario_file);
61
+ const scenarioContent = fs.readFileSync(scenarioPath, 'utf8');
62
+
63
+ // Parse and analyze...
64
+ });
65
+ ```
66
+
67
+ **Parse Gherkin:**
68
+ - Extract first `Scenario:` block (happy path)
69
+ - Parse Given/When/Then/And steps
70
+ - Identify:
71
+ - Initial state setup (Given)
72
+ - User actions (When)
73
+ - Expected outcomes (Then)
74
+ - Observable changes (And)
75
+
76
+ **Display to user:**
77
+
78
+ ```
79
+ ๐Ÿš€ Speed Mode: [Feature Name]
80
+
81
+ Happy Path Scenario:
82
+ [Scenario title]
83
+
84
+ What needs to happen:
85
+ โ€ข [Given] Initial state: [extracted requirement]
86
+ โ€ข [When] User action: [extracted action]
87
+ โ€ข [Then] Expected result: [extracted outcome]
88
+ โ€ข [And] Observable change: [extracted change]
89
+
90
+ Now analyzing codebase to propose implementation...
91
+ ```
92
+
93
+ **Move to Step 2 automatically.**
94
+
95
+ ### Step 2: Autonomous Codebase Analysis
96
+
97
+ **CRITICAL:** Claude Code executes this autonomously - no user permission needed.
98
+
99
+ **Your task:**
100
+ 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
104
+
105
+ **Check for architectural decisions:**
106
+
107
+ ```javascript
108
+ const { getDecisionsForEpic } = require('../../lib/decisions-helpers');
109
+
110
+ // Get epic from current work
111
+ db.get('SELECT epic_id FROM work_items WHERE id = ?', [currentWork.parent_id], async (err, feature) => {
112
+ if (feature.epic_id) {
113
+ const decisions = await getDecisionsForEpic(feature.epic_id);
114
+ // Decisions constrain your implementation approach
115
+ }
116
+ });
117
+ ```
118
+
119
+ **Find relevant files:**
120
+ - Use Glob tool to find files matching patterns from scenario
121
+ - Example: Scenario mentions "login" โ†’ search for `**/*login*.js`, `**/*auth*.js`
122
+ - Use Grep tool to search for keywords from scenario
123
+ - Example: Scenario mentions "dashboard" โ†’ grep for "dashboard"
124
+ - Read similar features to understand patterns
125
+
126
+ **Understand patterns:**
127
+ - File structure conventions (where do features live?)
128
+ - Naming patterns (camelCase? kebab-case?)
129
+ - Import/export patterns
130
+ - Testing patterns (if tests exist)
131
+ - Database patterns (if data persistence mentioned)
132
+
133
+ **Identify integration points:**
134
+ - Where does this feature hook into existing code?
135
+ - What files need to import the new code?
136
+ - What existing functions need to call the new code?
137
+
138
+ **Display analysis results:**
139
+
140
+ ```
141
+ ๐Ÿ“Š Codebase Analysis Complete
142
+
143
+ Architectural Constraints:
144
+ [List any epic decisions that apply]
145
+
146
+ Existing Patterns Found:
147
+ โ€ข File structure: [pattern]
148
+ โ€ข Naming convention: [pattern]
149
+ โ€ข Similar feature: [file path and pattern]
150
+
151
+ Integration Points:
152
+ โ€ข New code will go in: [directory]
153
+ โ€ข Needs to be imported by: [file]
154
+ โ€ข Will call existing: [function/module]
155
+
156
+ Now proposing implementation approach...
157
+ ```
158
+
159
+ **Move to Step 3 automatically.**
160
+
161
+ ### Step 3: Propose and Execute Implementation
162
+
163
+ **Two phases: Propose (get user confirmation) โ†’ Execute (autonomous)**
164
+
165
+ #### Phase 1: Propose Implementation Approach
166
+
167
+ **Present your analysis and proposal:**
168
+
169
+ ```
170
+ ๐Ÿ’ก Implementation Proposal
171
+
172
+ Based on scenario analysis and codebase patterns, here's how I'll make the scenario pass:
173
+
174
+ **Files to create/modify:**
175
+ 1. [file path] - [what it will do]
176
+ 2. [file path] - [what it will do]
177
+
178
+ **Key implementation points:**
179
+ โ€ข [Point 1]: [specific approach]
180
+ โ€ข [Point 2]: [specific approach]
181
+ โ€ข [Point 3]: [specific approach]
182
+
183
+ **Why this approach:**
184
+ [Brief explanation of how this satisfies the scenario while following codebase patterns]
185
+
186
+ Sound good? I'll implement this autonomously once you confirm.
187
+ ```
188
+
189
+ **WAIT for user confirmation or adjustments.**
190
+
191
+ If user adjusts: revise proposal and confirm again.
192
+
193
+ #### Phase 2: Autonomous Execution
194
+
195
+ **CRITICAL:** After user confirms, Claude Code executes autonomously - no permission needed for individual code changes.
196
+
197
+ **Execution loop:**
198
+
199
+ 1. **Create/modify files** using Write/Edit tools
200
+ - Follow the proposed plan
201
+ - Write minimal code (speed mode - happy path only)
202
+ - Add basic comments for clarity
203
+ - Use inline code over abstractions
204
+
205
+ 2. **Run BDD tests** to verify step definitions pass
206
+ ```javascript
207
+ // Run the feature's BDD tests (scenarios + step definitions)
208
+ const { exec } = require('child_process');
209
+ exec('npm run test:bdd -- [feature-file].feature', (err, stdout) => {
210
+ // Check if step definitions pass
211
+ // Step definitions were created during feature discovery
212
+ // Your implementation must make them pass
213
+ });
214
+ ```
215
+
216
+ 3. **Check if BDD scenario passes**
217
+ - Run: `npm run test:bdd -- features/[feature-slug].feature`
218
+ - Step definitions execute your implementation code
219
+ - If yes: Move to final step
220
+ - If no: Analyze failure, adjust code, iterate
221
+ - **CRITICAL:** Tests must pass before moving on
222
+
223
+ 4. **Display progress:**
224
+ ```
225
+ โœ๏ธ Writing [file name]...
226
+ โœ… Created [file name]
227
+
228
+ ๐Ÿงช Running tests...
229
+ โŒ Scenario failed: [error message]
230
+ ๐Ÿ”ง Adjusting [specific fix]...
231
+ โœ… Scenario passes!
232
+ ```
233
+
234
+ **Speed mode constraints:**
235
+ - **Implement ALL scoped functionality** - if the scenario requires file upload, implement it (just assume it works)
236
+ - **Single file when possible** - keep it simple
237
+ - **NO error handling** - no try/catch, no validation, no edge cases
238
+ - **Assume everything works** - valid inputs, successful operations, correct types
239
+ - **localStorage/memory for data** - no full database setup
240
+ - **Inline code over separate modules** - keep it simple
241
+ - **Focus: Make. All. Features. Work.** (on the happy path)
242
+
243
+ **When scenario passes:**
244
+
245
+ ```
246
+ ๐ŸŽ‰ Happy path scenario passes!
247
+
248
+ Implementation complete:
249
+ โ€ข Created: [list files]
250
+ โ€ข Modified: [list files]
251
+ โ€ข Tests: โœ… Passing
252
+
253
+ Now analyzing what was built to propose stable mode chores...
254
+ ```
255
+
256
+ **Move to final step automatically.**
257
+
258
+ ### Step 4: Generate Stable Mode Chores
259
+
260
+ **Two phases: Analyze and propose โ†’ Get confirmation โ†’ Create autonomously**
261
+
262
+ #### Phase 1: Analyze Implementation
263
+
264
+ **Your task:** Review what was built and identify what's needed for stable mode.
265
+
266
+ **Analysis checklist:**
267
+
268
+ 1. **Error handling gaps**
269
+ - What user errors are possible?
270
+ - What system errors could occur?
271
+ - What validation is missing?
272
+
273
+ 2. **Edge cases**
274
+ - Boundary conditions (empty inputs, max values, etc.)
275
+ - Race conditions
276
+ - State consistency issues
277
+
278
+ 3. **Non-happy-path scenarios**
279
+ - Read the full scenario file (not just happy path)
280
+ - Identify scenarios 2+ (error handling, edge cases)
281
+ - Check what additional behavior is needed
282
+
283
+ 4. **Code quality needs**
284
+ - What needs better structure/organization?
285
+ - What needs proper error messages?
286
+ - What needs logging/debugging support?
287
+
288
+ #### Phase 2: Propose Stable Mode Chores
289
+
290
+ **Present your analysis:**
291
+
292
+ ```
293
+ ๐Ÿ“‹ Stable Mode Chores Proposal
294
+
295
+ I've analyzed the implementation. Here are the chores needed for stable mode:
296
+
297
+ **Chore 1: [Title]**
298
+ - Why: [What gap this fills]
299
+ - Scope: [What specifically needs to be done]
300
+ - Scenario: [Which BDD scenario this addresses, if applicable]
301
+
302
+ **Chore 2: [Title]**
303
+ - Why: [What gap this fills]
304
+ - Scope: [What specifically needs to be done]
305
+ - Scenario: [Which BDD scenario this addresses, if applicable]
306
+
307
+ **Chore 3: [Title]**
308
+ - Why: [What gap this fills]
309
+ - Scope: [What specifically needs to be done]
310
+ - Scenario: [Which BDD scenario this addresses, if applicable]
311
+
312
+ These chores will make all BDD scenarios pass with proper error handling and edge case coverage.
313
+
314
+ Sound good? I'll create these chores once you confirm.
315
+ ```
316
+
317
+ **WAIT for user confirmation or adjustments.**
318
+
319
+ If user adjusts: revise chores and confirm again.
320
+
321
+ #### Phase 3: Create Chores Autonomously
322
+
323
+ **CRITICAL:** After user confirms, create chores programmatically - no additional permission needed.
324
+
325
+ **Code to create chores:**
326
+
327
+ ```javascript
328
+ const { create } = require('./features/work-tracking');
329
+ const { getCurrentWork } = require('../../lib/current-work');
330
+
331
+ const currentWork = getCurrentWork();
332
+ const featureId = currentWork.parent_id; // Parent feature
333
+
334
+ // For each confirmed chore:
335
+ await create('chore', 'Chore Title', 'Description', featureId, 'stable', false);
336
+ ```
337
+
338
+ **Display results:**
339
+
340
+ ```
341
+ โœ… Created [N] stable mode chores
342
+
343
+ Chores created:
344
+ โ€ข #[ID]: [Title]
345
+ โ€ข #[ID]: [Title]
346
+ โ€ข #[ID]: [Title]
347
+
348
+ โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
349
+ ๐ŸŽฏ Speed Mode Complete!
350
+ โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
351
+
352
+ What we accomplished:
353
+ โœ… Happy path scenario passes
354
+ โœ… Stable mode chores ready
355
+
356
+ Next step: Elevate to stable mode
357
+ jettypod work elevate [feature-id] stable
358
+
359
+ Then start the first stable mode chore:
360
+ jettypod work start [chore-id]
361
+ ```
362
+
363
+ **Mark current chore as done and end skill.**
364
+