jettypod 4.1.2 → 4.1.4

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 (179) hide show
  1. package/.nvmrc +1 -0
  2. package/docs/COMPLETE-TESTING-STRATEGY.md +970 -0
  3. package/docs/DECISIONS.md +10 -12
  4. package/docs/NODE_VERSION.md +83 -0
  5. package/docs/TDD-INFRASTRUCTURE-STRATEGY.md +1374 -0
  6. package/docs/TESTING-FOR-NON-ENGINEERS.md +1588 -0
  7. package/docs/TESTING-STRATEGY-AUDIT.md +698 -0
  8. package/hooks/post-checkout +17 -0
  9. package/hooks/post-merge +17 -0
  10. package/hooks/pre-commit +30 -0
  11. package/jettypod.js +259 -120
  12. package/lib/coverage-tracker.js +218 -0
  13. package/lib/database.js +2 -0
  14. package/lib/db-export.js +192 -0
  15. package/lib/db-import.js +193 -0
  16. package/lib/external-transition-handler.js +32 -0
  17. package/lib/git-hook-helpers.js +174 -0
  18. package/lib/git-root.js +90 -0
  19. package/lib/infrastructure-chore-generator.js +45 -0
  20. package/lib/install-hooks.js +52 -0
  21. package/lib/jettypod-backup.js +238 -0
  22. package/lib/merge-lock.js +193 -0
  23. package/lib/migrations/012-add-worktree-path.js +38 -0
  24. package/lib/migrations/013-worktrees-table.js +86 -0
  25. package/lib/migrations/014-migrate-worktree-data.js +161 -0
  26. package/lib/migrations/015-merge-locks-table.js +67 -0
  27. package/lib/pattern-finder.js +152 -0
  28. package/lib/process-manager.js +140 -0
  29. package/lib/production-standards-reader.js +13 -2
  30. package/lib/production-standards-writer.js +85 -0
  31. package/lib/skills/feature-planning/dry-run-validator.js +135 -0
  32. package/lib/skills/feature-planning/validation-formatter.js +160 -0
  33. package/lib/smart-conflict-detection.js +168 -0
  34. package/lib/smart-fetch-rebase.js +614 -0
  35. package/lib/step-definition-parser.js +76 -0
  36. package/lib/unit-test-generator.js +232 -0
  37. package/lib/verification-command-generator.js +66 -0
  38. package/lib/worktree-diagnostics.js +413 -0
  39. package/lib/worktree-facade.js +174 -0
  40. package/lib/worktree-manager.js +636 -0
  41. package/lib/worktree-reconciler.js +429 -0
  42. package/package.json +30 -3
  43. package/skills-templates/external-transition/SKILL.md +34 -3
  44. package/skills-templates/feature-planning/SKILL.md +190 -24
  45. package/skills-templates/production-mode/SKILL.md +127 -9
  46. package/skills-templates/speed-mode/SKILL.md +454 -51
  47. package/skills-templates/stable-mode/SKILL.md +285 -76
  48. package/.claude/PROTECT_SKILLS.md +0 -28
  49. package/.claude/settings.json +0 -24
  50. package/.claude/settings.local.json +0 -16
  51. package/.claude/skills/epic-planning/SKILL.md +0 -297
  52. package/.claude/skills/external-transition/SKILL.md +0 -384
  53. package/.claude/skills/feature-planning/SKILL.md +0 -464
  54. package/.claude/skills/production-mode/SKILL.md +0 -369
  55. package/.claude/skills/speed-mode/SKILL.md +0 -481
  56. package/.claude/skills/stable-mode/SKILL.md +0 -713
  57. package/.claude/skills.backup-2025-11-10T23-33-09-368Z/epic-planning/SKILL.md +0 -297
  58. package/.claude/skills.backup-2025-11-10T23-33-09-368Z/feature-planning/SKILL.md +0 -464
  59. package/.claude/skills.backup-2025-11-10T23-33-09-368Z/speed-mode/SKILL.md +0 -467
  60. package/.claude/skills.backup-2025-11-10T23-33-09-368Z/stable-mode/SKILL.md +0 -673
  61. package/.claude/skills.backup-2025-11-11T16-15-10-070Z/epic-discover/SKILL.md +0 -297
  62. package/.claude/skills.backup-2025-11-11T16-42-43-212Z/epic-planning/SKILL.md +0 -297
  63. package/.claude/skills.backup-2025-11-11T16-42-43-212Z/feature-planning/SKILL.md +0 -464
  64. package/.claude/skills.backup-2025-11-11T16-42-43-212Z/speed-mode/SKILL.md +0 -467
  65. package/.claude/skills.backup-2025-11-11T16-42-43-212Z/stable-mode/SKILL.md +0 -673
  66. package/.claude/skills.backup-2025-11-11T17-06-09-783Z/epic-planning/SKILL.md +0 -297
  67. package/.claude/skills.backup-2025-11-11T17-06-09-783Z/feature-planning/SKILL.md +0 -464
  68. package/.claude/skills.backup-2025-11-11T17-06-09-783Z/speed-mode/SKILL.md +0 -467
  69. package/.claude/skills.backup-2025-11-11T17-06-09-783Z/stable-mode/SKILL.md +0 -673
  70. package/.devpod/current-work.json +0 -10
  71. package/.devpod/work.db +0 -0
  72. package/.github/workflows/test-safety.yml +0 -85
  73. package/.jettypod/config.json +0 -5
  74. package/.jettypod/current-work.json +0 -10
  75. package/.jettypod/hooks/README.md +0 -77
  76. package/.jettypod/hooks/protect-claude-md.js +0 -338
  77. package/.jettypod/test-work.db +0 -0
  78. package/.jettypod/work.db +0 -0
  79. package/CLAUDE.md +0 -49
  80. package/SPEED-STABLE-AUDIT.md +0 -853
  81. package/SYSTEM-BEHAVIOR.md +0 -2199
  82. package/TEST_SAFETY_AUDIT.md +0 -314
  83. package/TEST_SAFETY_IMPLEMENTATION.md +0 -97
  84. package/cucumber-report.html +0 -45
  85. package/dist/devpod-linux +0 -0
  86. package/dist/devpod-macos +0 -0
  87. package/dist/devpod-win.exe +0 -0
  88. package/docs/features/jettypod-standards-explained.md +0 -543
  89. package/docs/features/standards-inventory.md +0 -257
  90. package/features/auto-generate-production-chores.feature +0 -13
  91. package/features/backlog-command.feature +0 -26
  92. package/features/backlog-filtering-production.feature +0 -10
  93. package/features/claude-md-protection/steps.js +0 -498
  94. package/features/decisions/index.js +0 -490
  95. package/features/decisions/index.test.js +0 -208
  96. package/features/fix-text-wrapping.feature +0 -42
  97. package/features/git-hooks/git-hooks.feature +0 -30
  98. package/features/git-hooks/index.js +0 -93
  99. package/features/git-hooks/index.test.js +0 -137
  100. package/features/git-hooks/post-commit +0 -56
  101. package/features/git-hooks/post-merge +0 -47
  102. package/features/git-hooks/pre-commit +0 -28
  103. package/features/git-hooks/simple-steps.js +0 -53
  104. package/features/git-hooks/simple-test.feature +0 -10
  105. package/features/git-hooks/steps.js +0 -196
  106. package/features/jettypod-update-command.feature +0 -46
  107. package/features/mode-prompts/index.js +0 -95
  108. package/features/mode-prompts/simple-steps.js +0 -44
  109. package/features/mode-prompts/simple-test.feature +0 -9
  110. package/features/mode-prompts/validation.test.js +0 -120
  111. package/features/multiple-claude-instances.feature +0 -121
  112. package/features/production-mode-skill.feature +0 -121
  113. package/features/refactor-mode/steps.js +0 -217
  114. package/features/refactor-mode.feature +0 -49
  115. package/features/simplify-external-transition.feature +0 -166
  116. package/features/skills-update/index.test.js +0 -216
  117. package/features/step_definitions/backlog-command.steps.js +0 -37
  118. package/features/step_definitions/fix-text-wrapping.steps.js +0 -271
  119. package/features/step_definitions/multiple-claude-instances.steps.js +0 -621
  120. package/features/step_definitions/production-mode-skill.steps.js +0 -862
  121. package/features/step_definitions/simplify-external-transition.steps.js +0 -370
  122. package/features/step_definitions/terminal-logo.steps.js +0 -145
  123. package/features/step_definitions/update-command.steps.js +0 -183
  124. package/features/support/hooks.js +0 -9
  125. package/features/terminal-logo/index.js +0 -39
  126. package/features/terminal-logo/terminal-logo.feature +0 -30
  127. package/features/update-command/index.js +0 -181
  128. package/features/update-command/index.test.js +0 -225
  129. package/features/work-commands/bug-workflow-display.feature +0 -22
  130. package/features/work-commands/index.js +0 -498
  131. package/features/work-commands/simple-steps.js +0 -69
  132. package/features/work-commands/stable-tests.feature +0 -57
  133. package/features/work-commands/steps.js +0 -1174
  134. package/features/work-commands/validation.test.js +0 -88
  135. package/features/work-commands/work-commands.feature +0 -13
  136. package/features/work-tracking/discovery-validation.test.js +0 -228
  137. package/features/work-tracking/index.js +0 -1921
  138. package/features/work-tracking/mode-required.feature +0 -112
  139. package/features/work-tracking/phase-tracking.test.js +0 -482
  140. package/features/work-tracking/prototype-tracking.test.js +0 -485
  141. package/features/work-tracking/tree-view.test.js +0 -310
  142. package/features/work-tracking/work-set-mode.feature +0 -71
  143. package/features/work-tracking/work-start-mode.feature +0 -88
  144. package/full-test.txt +0 -0
  145. package/lib/bug-workflow.test.js +0 -177
  146. package/lib/claudemd.test.js +0 -195
  147. package/lib/config.test.js +0 -511
  148. package/lib/constants.test.js +0 -164
  149. package/lib/current-work.test.js +0 -146
  150. package/lib/database-project-config.test.js +0 -111
  151. package/lib/database.test.js +0 -106
  152. package/lib/decisions-generator.test.js +0 -457
  153. package/lib/decisions-helpers.test.js +0 -310
  154. package/lib/git-coordinator.js +0 -167
  155. package/lib/git.test.js +0 -145
  156. package/lib/migrations/002-default-work-item-modes.test.js +0 -351
  157. package/lib/production-chore-generator.test.js +0 -432
  158. package/lib/production-context-detector.test.js +0 -277
  159. package/lib/production-scenario-appender.test.js +0 -235
  160. package/lib/production-scenario-validator.test.js +0 -246
  161. package/lib/production-standards-reader.test.js +0 -270
  162. package/lib/project-state.test.js +0 -92
  163. package/lib/push-queue.js +0 -417
  164. package/lib/queue-processor.js +0 -74
  165. package/lib/test-helpers.js +0 -202
  166. package/lib/test-helpers.test.js +0 -255
  167. package/prototypes/2025-01-11-production-mode-autonomous.js +0 -119
  168. package/prototypes/2025-01-11-production-mode-collaborative.js +0 -166
  169. package/prototypes/2025-01-11-production-mode-guided.js +0 -217
  170. package/prototypes/2025-01-11-production-mode-smart-context.js +0 -347
  171. package/prototypes/2025-01-11-production-standards-example.md +0 -204
  172. package/prototypes/2025-11-10-backlog-filtering-tree-aware.js +0 -242
  173. package/prototypes/test/index.html +0 -1
  174. package/setup-dist-repo.sh +0 -68
  175. package/test-production-standards-engine.js +0 -130
  176. package/test-results.json +0 -2195
  177. package/test-safety-check.sh +0 -80
  178. package/work-item-tracking-plan.md +0 -199
  179. /package/{.jettypod/devpod.db → jettypod.db} +0 -0
@@ -1,2199 +0,0 @@
1
- # JettyPod System Behaviors
2
-
3
- *Auto-generated from test scenarios on 2025-11-12*
4
-
5
- ## Summary
6
-
7
- - **19** features
8
- - **116** test scenarios
9
- - **619** test steps
10
-
11
- ## Table of Contents
12
-
13
- - [Auto-Generate Production Chores at End of Stable Mode](#auto-generate-production-chores-at-end-of-stable-mode) (0 scenarios)
14
- - [Backlog Command](#backlog-command) (3 scenarios)
15
- - [Backlog Filtering for Production Items](#backlog-filtering-for-production-items) (0 scenarios)
16
- - [Fix Text Wrapping in Terminal Output](#fix-text-wrapping-in-terminal-output) (4 scenarios)
17
- - [Git Hook Integration](#git-hook-integration) (4 scenarios)
18
- - [Git Hooks Integration](#git-hooks-integration) (1 scenarios)
19
- - [JettyPod update command](#jettypod-update-command) (5 scenarios)
20
- - [Mode Change Prompts](#mode-change-prompts) (1 scenarios)
21
- - [Multiple Claude Code instances coordination](#multiple-claude-code-instances-coordination) (14 scenarios)
22
- - [Production Mode Skill](#production-mode-skill) (14 scenarios)
23
- - [Refactor Mode](#refactor-mode) (5 scenarios)
24
- - [Simplify External Transition Command](#simplify-external-transition-command) (17 scenarios)
25
- - [Terminal Logo Display](#terminal-logo-display) (4 scenarios)
26
- - [Bug Workflow Display](#bug-workflow-display) (2 scenarios)
27
- - [Work Commands - Stable Mode](#work-commands-stable-mode) (10 scenarios)
28
- - [Work Item Commands](#work-item-commands) (1 scenarios)
29
- - [Mode defaults to discovery on work item creation](#mode-defaults-to-discovery-on-work-item-creation) (14 scenarios)
30
- - [Work set-mode updates CLAUDE.md if item is current](#work-set-mode-updates-claude-md-if-item-is-current) (6 scenarios)
31
- - [Work start sets CLAUDE.md mode from work item](#work-start-sets-claude-md-mode-from-work-item) (11 scenarios)
32
-
33
- ---
34
-
35
- ## What JettyPod Does
36
-
37
- This documentation is derived from actual passing tests. It describes the verified behaviors of the system.
38
-
39
- ### Auto-Generate Production Chores at End of Stable Mode
40
-
41
- *Related features: Auto-Generate Production Chores at End of Stable Mode*
42
-
43
- **Verified behaviors:**
44
-
45
- ---
46
-
47
- ### Backlog Command
48
-
49
- *Related features: Backlog Command*
50
-
51
- **Verified behaviors:**
52
-
53
- - **User views active backlog items**
54
- When I have work items in various statuses, I run "jettypod backlog" → I see only active work items (backlog, todo, in_progress) and I see the items in a tree hierarchy and completed items are hidden
55
-
56
- - **User views all work items including completed**
57
- When I have work items in various statuses, I run "jettypod backlog all" → I see all work items regardless of status and I see the items in a tree hierarchy
58
-
59
- - **User views only completed items**
60
- When I have work items in various statuses, I run "jettypod backlog completed" → I see only completed work items (done, cancelled) and I see the items in a tree hierarchy
61
-
62
- ---
63
-
64
- ### Backlog Filtering for Production Items
65
-
66
- *Related features: Backlog Filtering for Production Items*
67
-
68
- **Verified behaviors:**
69
-
70
- ---
71
-
72
- ### Fix Text Wrapping in Terminal Output
73
-
74
- *Related features: Fix Text Wrapping in Terminal Output*
75
-
76
- **Verified behaviors:**
77
-
78
- - **Long titles wrap at word boundaries within terminal width**
79
- When I have a feature with a title longer than the terminal width, I run jettypod backlog with current terminal width → the title wraps at word boundaries and continuation lines align with the content indentation and no words are split mid-character
80
-
81
- - **Long descriptions wrap cleanly in expanded view**
82
- When I have a feature with a long description, I run jettypod backlog --expand=1 with current terminal width → the description wraps at word boundaries and continuation lines have proper "Description: " prefix indentation and the text fits within terminal width
83
-
84
- - **Tree structure preserved with wrapped text**
85
- When I have nested items with long titles, I run jettypod backlog --expand=all with current terminal width → tree connectors (├──, └──) display correctly and wrapped continuation lines align under the item content and tree structure remains visually clear
86
-
87
- - **Terminal width changes are respected**
88
- When the terminal width is 120 columns, I have items with titles that wrap at 120 columns, the terminal is resized to 80 columns and I run jettypod backlog with current terminal width → text wraps to fit 80 columns and alignment adjusts to the new width
89
-
90
- ---
91
-
92
- ### Git Hook Integration
93
-
94
- *Related features: Git Hook Integration*
95
-
96
- **Verified behaviors:**
97
-
98
- - **First commit updates status to in_progress**
99
- When I have a work item with status "todo", the work item is set as current work, I make my first commit → the work item status should be "in_progress"
100
-
101
- - **Merge to main updates status to done**
102
- When I have a work item with status "in_progress", the work item is set as current work, I am on a feature branch, I merge to main → the work item status should be "done"
103
-
104
- - **No current work item - hooks do nothing**
105
- When no work item is set as current, I make a commit → no errors occur
106
-
107
- - **Integration - hooks work with existing work commands**
108
- When I have initialized jettypod with git, I create a work item via work commands, I start work on the item, I commit changes → the work item status updates automatically and the current work file still exists
109
-
110
- ---
111
-
112
- ### Git Hooks Integration
113
-
114
- *Related features: Git Hooks Integration*
115
-
116
- **Verified behaviors:**
117
-
118
- - **Integration - post-commit hook updates status**
119
- When I initialize a git repo with jettypod, I create and start work on a todo item, I make a commit → the hook updates status to in_progress
120
-
121
- ---
122
-
123
- ### JettyPod update command
124
-
125
- *Related features: JettyPod update command*
126
-
127
- **Verified behaviors:**
128
-
129
- - **User runs jettypod update when new version is available**
130
- When jettypod version 3.0.0 is installed, npm registry has version 3.1.0 available, I run update command "jettypod update" → jettypod checks npm registry for latest version and jettypod shows "New version available: 3.1.0 (current: 3.0.0)" and jettypod downloads and installs version 3.1.0 and skills are refreshed in current project and jettypod shows "✅ JettyPod updated to 3.1.0"
131
-
132
- - **User runs jettypod update when already on latest version**
133
- When jettypod version 3.1.0 is installed, npm registry has version 3.1.0 available, I run update command "jettypod update" → jettypod checks npm registry for latest version and jettypod shows "Already on latest version: 3.1.0" and skills are refreshed in current project
134
-
135
- - **User runs jettypod update without internet connection**
136
- When jettypod is installed, there is no internet connection, I run update command "jettypod update" → jettypod shows "Cannot check for updates: network error" and skills are still refreshed in current project using existing jettypod
137
-
138
- - **Command rename - jettypod without init creates new project**
139
- When I am in a directory without .claude/, I run update command "jettypod" → jettypod initializes the project and .claude/ directory is created and CLAUDE.md is created and skills are installed
140
-
141
- - **Backwards compatibility - jettypod init still works**
142
- When I am in a directory without .claude/, I run update command "jettypod init" → jettypod initializes the project and .claude/ directory is created and CLAUDE.md is created and skills are installed
143
-
144
- ---
145
-
146
- ### Mode Change Prompts
147
-
148
- *Related features: Mode Change Prompts*
149
-
150
- **Verified behaviors:**
151
-
152
- - **Integration - mode change with work item present**
153
- When I have jettypod with a work item in progress, I check current work exists → the work item has a status
154
-
155
- ---
156
-
157
- ### Multiple Claude Code instances coordination
158
-
159
- *Related features: Multiple Claude Code instances coordination*
160
-
161
- **Verified behaviors:**
162
-
163
- - **Single Claude instance pushes to main without queue**
164
- When I am a Claude Code instance with completed work, I have committed my changes locally, the push queue is empty, main branch has no new commits, I attempt to push to main → I push directly to main and I do not create a queue entry
165
-
166
- - **First Claude instance creates queue entry when main is ahead**
167
- When I am a Claude Code instance with completed work, I have committed my changes locally, the push queue is empty, main branch has 2 new commits since my work started, I attempt to push to main → I create a queue entry at position 1 and I see "Added to push queue (position 1)" and I rebase my commits on top of main and I push to main and I remove my queue entry
168
-
169
- - **Second Claude waits for first to complete**
170
- When Claude instance A is at position 1 in the push queue, I am a Claude Code instance with completed work, I have committed my changes locally, I attempt to push to main → I create a queue entry at position 2 and I see "Added to push queue (position 2, waiting for 1 commit ahead)" and I do not push yet and I wait for position 1 to complete
171
-
172
- - **Queue processes sequentially when first completes**
173
- When Claude instance A is at position 1 and is pushing, I am at position 2 in the queue, Claude instance A completes their push → I move to position 1 and I rebase my commits on top of the updated main and I push to main and I remove my queue entry
174
-
175
- - **Queue file corrupted or contains invalid JSON**
176
- When the push queue file exists but contains invalid JSON, I attempt to push to main → I should see an error message about corrupted queue file and the system should initialize a new empty queue and I should be able to push successfully
177
-
178
- - **Queue file cannot be written due to permissions**
179
- When the .jettypod directory has no write permissions, I attempt to push to main → I should see an error about insufficient permissions and the system should provide guidance to fix permissions and the push should not proceed
180
-
181
- - **Git rebase fails with conflicts**
182
- When I am at position 1 in the queue, my changes conflict with changes on main, I attempt to rebase on main → I should see a clear error about rebase conflicts and I should receive guidance on how to resolve conflicts and my queue entry should remain until conflicts are resolved
183
-
184
- - **Git fetch fails due to network issues**
185
- When I am checking if main has moved ahead, git fetch fails due to network connectivity → I should see an error about network failure and the system should suggest retry or check connectivity and the push should not proceed
186
-
187
- - **Git push fails after successful rebase**
188
- When I have successfully rebased on main, git push fails due to remote rejection → I should see a clear error message and my queue entry should remain for retry and the system should not corrupt the queue state
189
-
190
- - **Invalid queue entry with missing fields**
191
- When the queue contains an entry with missing instanceId, the queue processor attempts to process entries → invalid entries should be removed from queue and valid entries should continue processing and a warning should be logged about invalid entries
192
-
193
- - **Stale queue entry from crashed instance**
194
- When a queue entry has been waiting for over 1 hour, the instance that created it is no longer running, queue cleanup runs → the stale entry should be removed and subsequent entries should advance in position and a notification should be logged
195
-
196
- - **Multiple instances try to write queue simultaneously**
197
- When two Claude instances both try to add queue entries at same time, concurrent queue writes occur → both entries should be successfully added and no queue corruption should occur and positions should be correctly assigned
198
-
199
- - **Empty commit SHA provided to queue**
200
- When I attempt to add a queue entry with empty commit SHA, validation runs → I should see an error about invalid commit SHA and no queue entry should be created and guidance should be provided
201
-
202
- - **Queue position monitoring with removed entries**
203
- When I am at position 3 in the queue, entry at position 1 is removed (not completed normally) → I should move to position 2 and I should be notified of position change and queue integrity should be maintained
204
-
205
- ---
206
-
207
- ### Production Mode Skill
208
-
209
- *Related features: Production Mode Skill*
210
-
211
- **Verified behaviors:**
212
-
213
- - **Fresh from stable mode - Quick validation (Scenario A)**
214
- When a feature just completed stable mode within 1 day, production scenarios already exist in the feature file, production chores already exist for the feature, production standards file exists, I start the production-mode skill for this feature → it detects Scenario A (hot context) and it validates existing scenarios against current standards and it identifies no gaps and it proceeds to implement existing production chores
215
-
216
- - **Gap in time - Re-validation (Scenario B)**
217
- When a feature completed stable mode over 7 days ago, production scenarios exist in the feature file, production chores exist for the feature, production standards file exists, I start the production-mode skill for this feature → it detects Scenario B (cold context) and it re-validates existing scenarios against current standards and it checks if project state changed since stable mode and it identifies any gaps in standards coverage and it updates scenarios if needed
218
-
219
- - **Post external-transition - Generate from standards (Scenario C)**
220
- When a feature in stable mode with no production scenarios, no production chores exist for the feature, production standards file exists from external-transition, I start the production-mode skill for this feature → it detects Scenario C (post-transition) and it reads production standards from file and it generates production scenarios from activated standards and it appends scenarios to the feature file and it proposes production chores based on standards and it creates chores after user confirmation
221
-
222
- - **Missing production standards file**
223
- When a feature in stable mode, the production standards file does not exist at .jettypod/production-standards.json, I start the production-mode skill for this feature → it fails with error "Production standards file not found" and it suggests running external-transition first
224
-
225
- - **Corrupted production standards file**
226
- When a feature in stable mode, the production standards file exists but contains malformed JSON, I start the production-mode skill for this feature → it fails with error "Failed to parse production standards" and it shows the JSON parsing error details
227
-
228
- - **Invalid production standards format**
229
- When a feature in stable mode, the production standards file exists with valid JSON, I start the production-mode skill for this feature → it fails with error "Invalid standards format" and it specifies which required fields are missing
230
-
231
- - **Missing scenario file for feature**
232
- When a feature in stable mode, the feature has no scenario_file set in database, I start the production-mode skill for this feature → it fails with error "Feature has no scenario file" and it suggests the feature may not be properly initialized
233
-
234
- - **Scenario file does not exist on disk**
235
- When a feature in stable mode, the feature has scenario_file set in database, I start the production-mode skill for this feature → it fails with error "Scenario file not found" and it shows the expected file path
236
-
237
- - **Feature not found in database**
238
- When an invalid feature ID, I start the production-mode skill with that feature ID → it fails with error "Feature not found"
239
-
240
- - **Feature has no completed_at timestamp**
241
- When a feature marked as done in stable mode, the context detector checks time since stable completion → it treats this as Scenario C (no production content yet)
242
-
243
- - **File permission error reading standards**
244
- When a feature in stable mode, the production standards file exists, I start the production-mode skill for this feature → it fails with error indicating permission denied and it shows the file path with permission issues
245
-
246
- - **File permission error writing scenarios**
247
- When a feature in Scenario C (generating scenarios), production standards are loaded successfully, attempting to append scenarios to the file → it fails with error indicating write permission denied
248
-
249
- - **Empty standards array**
250
- When a feature in stable mode, the production standards file exists with empty standards array, I start the production-mode skill for this feature → it completes successfully and reports 0 standards to implement
251
-
252
- - **Database connection error**
253
- When the database file is locked or corrupted, I start the production-mode skill → it fails with database error and it suggests checking database integrity
254
-
255
- ---
256
-
257
- ### Refactor Mode
258
-
259
- *Related features: Refactor Mode*
260
-
261
- **Verified behaviors:**
262
-
263
- - **Refactor mode integrates with work tracking**
264
- When I have existing work items in the system, I enter refactor mode and audit the codebase and I select "Architectural" category and I approve creating chores for storage pattern → refactor chores are created under an epic and the epic is linked to the refactor mode work item
265
-
266
- - **User enters refactor mode and sees audit menu**
267
- When I'm in a project with technical debt, I enter refactor mode → Claude audits the codebase and I see categorized menu with counts:
268
-
269
- - **User picks category and sees detailed breakdown**
270
- When I see the audit menu, I pick "Architectural" category → I see detailed items with:
271
-
272
- - **Claude recommends quick wins**
273
- When I see the detailed breakdown for "Architectural", Claude analyzes impact vs time → I see recommendation: "Start with Storage Pattern (quick win, high impact)" and I see warning: "Skip State Management (needs Discovery Mode first)"
274
-
275
- - **User approves and chores are created**
276
- When I see recommendations for Storage Pattern, I say "create chores" → epic "Refactor: Architectural patterns" is created and chore "Create shared storage util" is created and chore "Migrate auth to storage util" is created and all chores are linked to the epic
277
-
278
- ---
279
-
280
- ### Simplify External Transition Command
281
-
282
- *Related features: Simplify External Transition Command*
283
-
284
- **Verified behaviors:**
285
-
286
- - **User transitions project to external state**
287
- When I have a JettyPod project in internal state, I have some features in stable mode with production chores already created, I run "jettypod project external" → the project_state should be updated to "external" and an "Infrastructure Readiness" epic should be created and 4 infrastructure features should be created under the epic and 15 infrastructure chores should be created across the features and production mode work items should now be visible in the backlog and no duplicate production chores should be created for existing features
288
-
289
- - **Project already in external state**
290
- When I have a JettyPod project in external state, I run "jettypod project external" → I should see a message "Project already in external state" and no duplicate infrastructure items should be created and the command should exit successfully
291
-
292
- - **Infrastructure epic already exists**
293
- When I have a JettyPod project in internal state, an "Infrastructure Readiness" epic already exists, I run "jettypod project external" → the project_state should be updated to "external" and no duplicate "Infrastructure Readiness" epic should be created and existing infrastructure items should be preserved and I should see a message about existing infrastructure
294
-
295
- - **Database connection fails during transition**
296
- When I have a JettyPod project in internal state, the database connection will fail, I run "jettypod project external" → I should see a clear error message about database failure and the project_state should remain "internal" and no partial infrastructure items should be created
297
-
298
- - **Work item creation fails mid-transition**
299
- When I have a JettyPod project in internal state, work item creation will fail after creating the epic, I run "jettypod project external" → I should see an error message about failed creation and the project_state should remain "internal" and any partial work items should be cleaned up
300
-
301
- - **Invalid checklist data structure**
302
- When I have a JettyPod project in internal state, the infrastructure checklist has invalid data, I run "jettypod project external" → I should see a validation error message and the project_state should remain "internal" and no infrastructure items should be created
303
-
304
- - **Infrastructure chores generated from production standards**
305
- When I have a JettyPod project in internal state, I have production standards with infrastructure-scoped standards, the standards include "database_backups" in infrastructure scope, the standards include "monitoring_setup" in infrastructure scope, I run "jettypod project external" → infrastructure chores should be created from standards and each infrastructure standard should create one chore and chore descriptions should include acceptance criteria from standards and chore descriptions should include reasoning from standards and no static checklist should be used
306
-
307
- - **Different presets create different infrastructure chores**
308
- When I have a JettyPod project in internal state, production standards are set to "startup-mvp" preset, I run "jettypod project external" and I change production standards to "enterprise" preset → infrastructure chores should match startup-mvp standards and I should see fewer infrastructure chores than enterprise preset and I run "jettypod project external" on a new project and infrastructure chores should match enterprise standards and I should see more infrastructure chores than startup-mvp preset and additional chores should include multi-region setup and additional chores should include advanced monitoring
309
-
310
- - **Scope field correctly filters infrastructure vs feature standards**
311
- When I have a JettyPod project in internal state, production standards include 5 infrastructure-scoped standards, production standards include 8 feature-scoped standards, I run "jettypod project external" → exactly 5 infrastructure chores should be created and no feature-scoped standards should create infrastructure chores and feature-scoped standards should be reserved for feature production chores
312
-
313
- - **Infrastructure chore created per standard (not grouped by domain)**
314
- When I have a JettyPod project in internal state, production standards include 3 security infrastructure standards, production standards include 2 monitoring infrastructure standards, I run "jettypod project external" → 5 separate infrastructure chores should be created and each chore should reference exactly one standard and chores should not be grouped by domain and each chore title should describe the specific standard
315
-
316
- - **Missing production standards file during transition**
317
- When I have a JettyPod project in internal state, no production standards file exists, I run "jettypod project external" → I should see an error "Production standards file not found" and I should be prompted to run external transition interactively and the project_state should remain "internal" and no infrastructure items should be created
318
-
319
- - **Infrastructure chores include pattern guidance from standards**
320
- When I have a JettyPod project in internal state, production standards include a standard with pattern guidance, the standard has pattern "Use pg_dump with --clean flag", I run "jettypod project external" → the created chore should include the pattern in description and the pattern should be labeled "Pattern:" in the description and developers should have clear implementation guidance
321
-
322
- - **Audit logging for external transition**
323
- When I have a JettyPod project in internal state, I run "jettypod project external" → an audit log entry should be created and the log should include timestamp, user, and project details and the log should record the state change from "internal" to "external" and the log should include the infrastructure epic ID created
324
-
325
- - **Performance with large projects (1000+ work items)**
326
- When I have a JettyPod project with 1000 work items, the project is in internal state, I run "jettypod project external" → the transition should complete in under 5 seconds and memory usage should remain under 100MB and all infrastructure items should be created successfully
327
-
328
- - **Concurrent transition attempts are prevented**
329
- When I have a JettyPod project in internal state, I start "jettypod project external" in one process and I attempt "jettypod project external" in another process → the second attempt should be blocked and I should see "Transition already in progress" and only one infrastructure epic should be created
330
-
331
- - **State transition is recorded for compliance**
332
- When I have a JettyPod project in internal state, I run "jettypod project external" → a state transition record should be created and the record should include "from: internal, to: external" and the record should include a timestamp and the record should be immutable
333
-
334
- - **Infrastructure creation is idempotent**
335
- When I have a JettyPod project in external state, an "Infrastructure Readiness" epic exists, I run "jettypod project external" again → no duplicate infrastructure items should be created and the existing epic ID should be preserved and I should see "Infrastructure already configured"
336
-
337
- ---
338
-
339
- ### Terminal Logo Display
340
-
341
- *Related features: Terminal Logo Display*
342
-
343
- **Verified behaviors:**
344
-
345
- - **jettypod init displays unicode gradient logo**
346
- When a new empty directory, I run jettypod init → the output contains the unicode gradient logo and the logo includes "DEV" and "POD" text and the logo uses ANSI color codes
347
-
348
- - **Logo module exports showLogo function**
349
- When the logo module exists, I import it → it exports a "showLogo" function
350
-
351
- - **Logo output is properly formatted**
352
- I call the showLogo function → it outputs 6 lines of logo art and it includes the version subtitle
353
-
354
- - **jettypod init integrates with existing features**
355
- When a new empty directory, I run jettypod init → I see the unicode logo and the .jettypod directory is created and CLAUDE.md is created and git hooks are installed
356
-
357
- ---
358
-
359
- ### Bug Workflow Display
360
-
361
- *Related features: Bug Workflow Display*
362
-
363
- **Verified behaviors:**
364
-
365
- - **Starting work on a bug displays workflow guidance**
366
- When jettypod is initialized, I create a bug "Install script fails", I start work on the bug → the output contains "BUG FIXING WORKFLOW" and the output contains "1. REPRODUCE" and the output contains "2. INVESTIGATE" and the output contains "3. ISOLATE" and the output contains "4. FIX" and the output contains "5. VERIFY" and the output contains "6. COMMIT"
367
-
368
- - **Starting work on a feature does not display bug workflow**
369
- When jettypod is initialized, I create a feature "Add new feature", I start work on the feature → the output does not contain "BUG FIXING WORKFLOW"
370
-
371
- ---
372
-
373
- ### Work
374
-
375
- *Related features: Work Commands - Stable Mode*
376
-
377
- **Verified behaviors:**
378
-
379
- - **Start work with invalid ID**
380
- When jettypod is initialized, I try to start work with ID "invalid" → I get an error "Invalid work item ID"
381
-
382
- - **Start work with negative ID**
383
- When jettypod is initialized, I try to start work with ID "-1" → I get an error "Invalid work item ID"
384
-
385
- - **Start work when not initialized**
386
- When jettypod is not initialized, I try to start work with ID "1" → I get an error "JettyPod not initialized"
387
-
388
- - **Start work on non-existent item**
389
- When jettypod is initialized, I try to start work with ID "999" → I get an error "Work item #999 not found"
390
-
391
- - **Stop work with invalid status**
392
- When I have current work, I try to stop work with status "invalid" → I get an error "Invalid status"
393
-
394
- - **Stop work when no current work**
395
- When jettypod is initialized, no work is active, I try to stop work → operation succeeds with no changes
396
-
397
- - **Get current work with corrupted file**
398
- When jettypod is initialized, current work file is corrupted, I get current work → it returns null
399
-
400
- - **Start work without git repo**
401
- When jettypod is initialized without git, I have a work item, I start work on the item → it succeeds without creating branch
402
-
403
- - **Multiple start work calls**
404
- When I have a work item, I start work on it, I start work on a different item → the first item stops being current and the second item becomes current
405
-
406
- - **Start work preserves existing status**
407
- When I have a work item with status "in_progress", I start work on it → the status remains "in_progress"
408
-
409
- ---
410
-
411
- ### Work Item
412
-
413
- *Related features: Work Item Commands*
414
-
415
- **Verified behaviors:**
416
-
417
- - **Integration - work commands with existing work tracking**
418
- When I have initialized jettypod, I create an epic with id 1, I create a feature with id 2 under epic 1, I start work on item 2 → the current work file exists and the current work contains item 2 and item 2 status is in_progress or backlog
419
-
420
- ---
421
-
422
- ### Mode defaults to discovery on work item creation
423
-
424
- *Related features: Mode defaults to discovery on work item creation*
425
-
426
- **Verified behaviors:**
427
-
428
- - **Create epic without mode**
429
- When jettypod is initialized, I create an epic "Test Epic" without mode → the work item is created successfully and the work item has NULL mode
430
-
431
- - **Create epic with mode (optional)**
432
- When jettypod is initialized, I create an epic "Test Epic" with mode "stable" → the work item is created successfully and the work item has mode "stable"
433
-
434
- - **Create feature with explicit mode**
435
- When jettypod is initialized, I create a feature "Test Feature" with mode "speed" → the work item is created successfully and the work item has mode "speed"
436
-
437
- - **Create feature without mode defaults to discovery**
438
- When jettypod is initialized, I create a feature "Test Feature" without mode → the work item is created successfully and the work item has mode "discovery"
439
-
440
- - **Create feature with invalid mode**
441
- When jettypod is initialized, I try to create a feature "Test Feature" with mode "invalid" → I get an error "Invalid mode" and no work item is created
442
-
443
- - **Create bug with mode fails**
444
- When jettypod is initialized, I try to create a bug "Test Bug" with mode "stable" → I get an error "Bugs cannot have modes" and no work item is created
445
-
446
- - **Create bug without mode succeeds with NULL**
447
- When jettypod is initialized, I create a bug "Test Bug" without mode → the work item is created successfully and the work item has no mode
448
-
449
- - **Create chore with mode fails**
450
- When jettypod is initialized, I try to create a chore "Test Chore" with mode "production" → I get an error "Chores do not have modes" and no work item is created
451
-
452
- - **Create chore without mode succeeds with NULL**
453
- When jettypod is initialized, jettypod is initialized, I create a chore "Test Chore" without mode and I create a feature "Test Feature" with mode "<mode>" → the work item is created successfully and the work item has NULL mode and the work item is created successfully and the work item has mode "<mode>"
454
-
455
- - **Epic with children in different modes**
456
- When jettypod is initialized, I create an epic "Test Epic" without mode, I create a feature "Speed Feature" with mode "speed" and parent epic, I create a bug "Test Bug" with parent epic, I create a chore "Test Chore" without mode and parent epic, I view the backlog → I see the epic without mode indicator and I see the feature with mode "speed" and I see the bug without mode indicator and I see the chore without mode indicator
457
-
458
- - **Create multiple items with same title but different modes**
459
- When jettypod is initialized, I create a feature "Duplicate" with mode "speed" and I create a feature "Duplicate" with mode "stable" → both work items are created successfully and they have different modes
460
-
461
- - **Mode is case-sensitive**
462
- When jettypod is initialized, I try to create a feature "Test" with mode "Speed" → I get an error "Invalid mode"
463
-
464
- - **Mode with whitespace is invalid**
465
- When jettypod is initialized, I try to create a feature "Test" with mode " speed " → I get an error "Invalid mode"
466
-
467
- - **Empty string mode is treated as NULL**
468
- When jettypod is initialized, I try to create a feature "Test" with mode "" → I get an error "Invalid mode"
469
-
470
- ---
471
-
472
- ### Work set-mode updates CLAUDE.md if item is current
473
-
474
- *Related features: Work set-mode updates CLAUDE.md if item is current*
475
-
476
- **Verified behaviors:**
477
-
478
- - **Set mode on current work item updates CLAUDE.md**
479
- When I create a feature "Test Feature" with mode "speed", I start work on the feature, CLAUDE.md mode is set to "speed", I set mode for current item to "stable" → the work item has mode "stable" and CLAUDE.md mode is set to "stable"
480
-
481
- - **Set mode on non-current item does not update CLAUDE.md**
482
- When I create a feature "Item 1" with mode "speed", I create a feature "Item 2" with mode "discovery", I start work on the feature "Item 1", CLAUDE.md mode is set to "speed", I set mode for item "Item 2" to "stable" → item "Item 2" has mode "stable"
483
-
484
- - **Set invalid mode shows error**
485
- When I create a feature "Test Feature" with mode "speed", I try to set mode to "invalid" → I get error "Invalid mode" and the work item still has mode "speed"
486
-
487
- - **Set mode is case-sensitive**
488
- When I create a feature "Test Feature" with mode "speed", I create a feature "Test Feature" with mode "speed", I try to set mode to "Speed" and I set mode for current item to "<new_mode>" → I get error "Invalid mode" and I start work on the feature and the work item has mode "<new_mode>" and CLAUDE.md mode is set to "<new_mode>"
489
-
490
- - **Mode change persists across work start/stop**
491
- When I create a feature "Test Feature" with mode "speed", I start work on the feature, I set mode for current item to "production" and I stop work and I start work on the feature → CLAUDE.md mode is set to "production"
492
-
493
- - **Change mode multiple times**
494
- When I create a feature "Test Feature" with mode "speed", I start work on the feature, I set mode for current item to "discovery" and I set mode for current item to "stable" and I set mode for current item to "production" → the work item has mode "production" and CLAUDE.md mode is set to "production"
495
-
496
- ---
497
-
498
- ### Work start sets CLAUDE.md mode from work item
499
-
500
- *Related features: Work start sets CLAUDE.md mode from work item*
501
-
502
- **Verified behaviors:**
503
-
504
- - **Start work on feature in speed mode**
505
- When I create a feature "Speed Feature" with mode "speed", I start work on the feature → CLAUDE.md mode is set to "speed"
506
-
507
- - **Start work on bug in stable mode**
508
- When I create a bug "Stable Bug" with mode "stable", I start work on the bug → CLAUDE.md mode is set to "stable"
509
-
510
- - **Start work on chore inherits parent feature mode**
511
- When I create a feature "Discovery Feature" with mode "discovery", I create a chore "Child Chore" without mode and parent feature, I start work on the chore → CLAUDE.md mode is set to "discovery"
512
-
513
- - **Start work on feature in production mode**
514
- When I create a feature "Production Feature" with mode "production", I start work on the feature → CLAUDE.md mode is set to "production"
515
-
516
- - **Switch from speed mode item to stable mode item**
517
- When I create a feature "Speed Feature" with mode "speed", I create a bug "Stable Bug" with mode "stable", I start work on the feature, CLAUDE.md mode is set to "speed", I stop work and I start work on the bug → CLAUDE.md mode is set to "stable"
518
-
519
- - **Start work updates mode even if item already in progress**
520
- When I create a feature "Test Feature" with mode "discovery", the feature status is "in_progress", CLAUDE.md has mode "speed", I start work on the feature → CLAUDE.md mode is set to "discovery"
521
-
522
- - **Start work on epic (NULL mode)**
523
- When I create an epic "Test Epic" without mode, I start work on the epic → CLAUDE.md has no mode line and the current work section exists
524
-
525
- - **Start work on feature with default discovery mode**
526
- When I create a feature "Default Feature" without mode, the work item has mode "discovery", I start work on the feature → CLAUDE.md mode is set to "discovery"
527
-
528
- - **Start work on child features use their own mode, not parent's**
529
- When I create an epic "Test Epic" without mode, I create a feature "Speed Feature" with mode "speed" and parent epic, I create a feature "Stable Feature" with mode "stable" and parent epic, I start work on the speed feature and I stop work → CLAUDE.md mode is set to "speed" and I start work on the stable feature and CLAUDE.md mode is set to "stable"
530
-
531
- - **Work item mode persists in database after start**
532
- When I create a feature "Test Feature" with mode "stable", I start work on the feature and I stop work → the work item still has mode "stable"
533
-
534
- - **Starting work multiple times preserves mode**
535
- When I create a feature "Test Feature" with mode "production", I start work on the feature and I stop work and I start work on the feature → CLAUDE.md mode is set to "production" and the work item still has mode "production"
536
-
537
- ---
538
-
539
- ## Detailed Feature Specifications
540
-
541
- ### Auto-Generate Production Chores at End of Stable Mode
542
-
543
- When stable mode completes all scenarios for a feature, the skill analyzes the implementation with hot context and generates specific, actionable production chores. Chore visibility depends on project state (external vs internal). Epic: Production Mode Approach: Preview-and-Confirm (Transparent)
544
-
545
- ---
546
-
547
- ### Backlog Command
548
-
549
- Enhanced command to view work items with built-in filters Approach: Enhanced backlog with filters (backlog, backlog all, backlog completed)
550
-
551
- #### User views active backlog items
552
-
553
- **Context:**
554
- - I have work items in various statuses
555
-
556
- **Action:**
557
- - I run "jettypod backlog"
558
-
559
- **Expected outcome:**
560
- - I see only active work items (backlog, todo, in_progress)
561
- - I see the items in a tree hierarchy
562
- - completed items are hidden
563
-
564
- #### User views all work items including completed
565
-
566
- **Context:**
567
- - I have work items in various statuses
568
-
569
- **Action:**
570
- - I run "jettypod backlog all"
571
-
572
- **Expected outcome:**
573
- - I see all work items regardless of status
574
- - I see the items in a tree hierarchy
575
-
576
- #### User views only completed items
577
-
578
- **Context:**
579
- - I have work items in various statuses
580
-
581
- **Action:**
582
- - I run "jettypod backlog completed"
583
-
584
- **Expected outcome:**
585
- - I see only completed work items (done, cancelled)
586
- - I see the items in a tree hierarchy
587
-
588
- ---
589
-
590
- ### Backlog Filtering for Production Items
591
-
592
- Hide production mode features and their chores from the BACKLOG section when project_state is 'internal'. Show them with --all flag. Epic: Production Mode Approach: Tree-aware filtering with smart pruning
593
-
594
- ---
595
-
596
- ### Fix Text Wrapping in Terminal Output
597
-
598
- Terminal-aware word wrapping that respects terminal width and aligns continuation lines with tree structure indentation Approach: Terminal-Aware Word-Wrap with Alignment @text-wrapping
599
-
600
- #### Long titles wrap at word boundaries within terminal width
601
-
602
- **Context:**
603
- - I have a feature with a title longer than the terminal width
604
-
605
- **Action:**
606
- - I run jettypod backlog with current terminal width
607
-
608
- **Expected outcome:**
609
- - the title wraps at word boundaries
610
- - continuation lines align with the content indentation
611
- - no words are split mid-character
612
-
613
- #### Long descriptions wrap cleanly in expanded view
614
-
615
- **Context:**
616
- - I have a feature with a long description
617
-
618
- **Action:**
619
- - I run jettypod backlog --expand=1 with current terminal width
620
-
621
- **Expected outcome:**
622
- - the description wraps at word boundaries
623
- - continuation lines have proper "Description: " prefix indentation
624
- - the text fits within terminal width
625
-
626
- #### Tree structure preserved with wrapped text
627
-
628
- **Context:**
629
- - I have nested items with long titles
630
-
631
- **Action:**
632
- - I run jettypod backlog --expand=all with current terminal width
633
-
634
- **Expected outcome:**
635
- - tree connectors (├──, └──) display correctly
636
- - wrapped continuation lines align under the item content
637
- - tree structure remains visually clear
638
-
639
- #### Terminal width changes are respected
640
-
641
- **Context:**
642
- - the terminal width is 120 columns
643
- - I have items with titles that wrap at 120 columns
644
-
645
- **Action:**
646
- - the terminal is resized to 80 columns
647
- - I run jettypod backlog with current terminal width
648
-
649
- **Expected outcome:**
650
- - text wraps to fit 80 columns
651
- - alignment adjusts to the new width
652
-
653
- ---
654
-
655
- ### Git Hook Integration
656
-
657
- As a developer I want work item status to update automatically on git operations So that I don't have to manually track progress
658
-
659
- #### First commit updates status to in_progress
660
-
661
- **Context:**
662
- - I have a work item with status "todo"
663
- - the work item is set as current work
664
-
665
- **Action:**
666
- - I make my first commit
667
-
668
- **Expected outcome:**
669
- - the work item status should be "in_progress"
670
-
671
- #### Merge to main updates status to done
672
-
673
- **Context:**
674
- - I have a work item with status "in_progress"
675
- - the work item is set as current work
676
- - I am on a feature branch
677
-
678
- **Action:**
679
- - I merge to main
680
-
681
- **Expected outcome:**
682
- - the work item status should be "done"
683
-
684
- #### No current work item - hooks do nothing
685
-
686
- **Context:**
687
- - no work item is set as current
688
-
689
- **Action:**
690
- - I make a commit
691
-
692
- **Expected outcome:**
693
- - no errors occur
694
-
695
- #### Integration - hooks work with existing work commands
696
-
697
- **Context:**
698
- - I have initialized jettypod with git
699
- - I create a work item via work commands
700
- - I start work on the item
701
-
702
- **Action:**
703
- - I commit changes
704
-
705
- **Expected outcome:**
706
- - the work item status updates automatically
707
- - the current work file still exists
708
-
709
- ---
710
-
711
- ### Git Hooks Integration
712
-
713
- As a developer I want work item status to auto-update on commits So I don't manually track progress
714
-
715
- #### Integration - post-commit hook updates status
716
-
717
- **Context:**
718
- - I initialize a git repo with jettypod
719
- - I create and start work on a todo item
720
-
721
- **Action:**
722
- - I make a commit
723
-
724
- **Expected outcome:**
725
- - the hook updates status to in_progress
726
-
727
- ---
728
-
729
- ### JettyPod update command
730
-
731
- Self-updating jettypod and skills refresh with a single command Epic: JettyPod and Skills Auto-Update Approach: Full self-update - Check npm, update jettypod, refresh skills
732
-
733
- #### User runs jettypod update when new version is available
734
-
735
- **Context:**
736
- - jettypod version 3.0.0 is installed
737
- - npm registry has version 3.1.0 available
738
-
739
- **Action:**
740
- - I run update command "jettypod update"
741
-
742
- **Expected outcome:**
743
- - jettypod checks npm registry for latest version
744
- - jettypod shows "New version available: 3.1.0 (current: 3.0.0)"
745
- - jettypod downloads and installs version 3.1.0
746
- - skills are refreshed in current project
747
- - jettypod shows "✅ JettyPod updated to 3.1.0"
748
-
749
- #### User runs jettypod update when already on latest version
750
-
751
- **Context:**
752
- - jettypod version 3.1.0 is installed
753
- - npm registry has version 3.1.0 available
754
-
755
- **Action:**
756
- - I run update command "jettypod update"
757
-
758
- **Expected outcome:**
759
- - jettypod checks npm registry for latest version
760
- - jettypod shows "Already on latest version: 3.1.0"
761
- - skills are refreshed in current project
762
-
763
- #### User runs jettypod update without internet connection
764
-
765
- **Context:**
766
- - jettypod is installed
767
- - there is no internet connection
768
-
769
- **Action:**
770
- - I run update command "jettypod update"
771
-
772
- **Expected outcome:**
773
- - jettypod shows "Cannot check for updates: network error"
774
- - skills are still refreshed in current project using existing jettypod
775
-
776
- #### Command rename - jettypod without init creates new project
777
-
778
- **Context:**
779
- - I am in a directory without .claude/
780
-
781
- **Action:**
782
- - I run update command "jettypod"
783
-
784
- **Expected outcome:**
785
- - jettypod initializes the project
786
- - .claude/ directory is created
787
- - CLAUDE.md is created
788
- - skills are installed
789
-
790
- #### Backwards compatibility - jettypod init still works
791
-
792
- **Context:**
793
- - I am in a directory without .claude/
794
-
795
- **Action:**
796
- - I run update command "jettypod init"
797
-
798
- **Expected outcome:**
799
- - jettypod initializes the project
800
- - .claude/ directory is created
801
- - CLAUDE.md is created
802
- - skills are installed
803
-
804
- ---
805
-
806
- ### Mode Change Prompts
807
-
808
- As a developer I want to update work status when switching modes So my work state stays current
809
-
810
- #### Integration - mode change with work item present
811
-
812
- **Context:**
813
- - I have jettypod with a work item in progress
814
-
815
- **Action:**
816
- - I check current work exists
817
-
818
- **Expected outcome:**
819
- - the work item has a status
820
-
821
- ---
822
-
823
- ### Multiple Claude Code instances coordination
824
-
825
- Commit queue system ensures safe, ordered pushes to main when multiple Claude Code instances work in the same directory simultaneously Approach: Commit Queue System
826
-
827
- #### Single Claude instance pushes to main without queue
828
-
829
- **Context:**
830
- - I am a Claude Code instance with completed work
831
- - I have committed my changes locally
832
- - the push queue is empty
833
- - main branch has no new commits
834
-
835
- **Action:**
836
- - I attempt to push to main
837
-
838
- **Expected outcome:**
839
- - I push directly to main
840
- - I do not create a queue entry
841
-
842
- #### First Claude instance creates queue entry when main is ahead
843
-
844
- **Context:**
845
- - I am a Claude Code instance with completed work
846
- - I have committed my changes locally
847
- - the push queue is empty
848
- - main branch has 2 new commits since my work started
849
-
850
- **Action:**
851
- - I attempt to push to main
852
-
853
- **Expected outcome:**
854
- - I create a queue entry at position 1
855
- - I see "Added to push queue (position 1)"
856
- - I rebase my commits on top of main
857
- - I push to main
858
- - I remove my queue entry
859
-
860
- #### Second Claude waits for first to complete
861
-
862
- **Context:**
863
- - Claude instance A is at position 1 in the push queue
864
- - I am a Claude Code instance with completed work
865
- - I have committed my changes locally
866
-
867
- **Action:**
868
- - I attempt to push to main
869
-
870
- **Expected outcome:**
871
- - I create a queue entry at position 2
872
- - I see "Added to push queue (position 2, waiting for 1 commit ahead)"
873
- - I do not push yet
874
- - I wait for position 1 to complete
875
-
876
- #### Queue processes sequentially when first completes
877
-
878
- **Context:**
879
- - Claude instance A is at position 1 and is pushing
880
- - I am at position 2 in the queue
881
-
882
- **Action:**
883
- - Claude instance A completes their push
884
-
885
- **Expected outcome:**
886
- - I move to position 1
887
- - I rebase my commits on top of the updated main
888
- - I push to main
889
- - I remove my queue entry
890
-
891
- #### Queue file corrupted or contains invalid JSON
892
-
893
- **Context:**
894
- - the push queue file exists but contains invalid JSON
895
-
896
- **Action:**
897
- - I attempt to push to main
898
-
899
- **Expected outcome:**
900
- - I should see an error message about corrupted queue file
901
- - the system should initialize a new empty queue
902
- - I should be able to push successfully
903
-
904
- #### Queue file cannot be written due to permissions
905
-
906
- **Context:**
907
- - the .jettypod directory has no write permissions
908
-
909
- **Action:**
910
- - I attempt to push to main
911
-
912
- **Expected outcome:**
913
- - I should see an error about insufficient permissions
914
- - the system should provide guidance to fix permissions
915
- - the push should not proceed
916
-
917
- #### Git rebase fails with conflicts
918
-
919
- **Context:**
920
- - I am at position 1 in the queue
921
- - my changes conflict with changes on main
922
-
923
- **Action:**
924
- - I attempt to rebase on main
925
-
926
- **Expected outcome:**
927
- - I should see a clear error about rebase conflicts
928
- - I should receive guidance on how to resolve conflicts
929
- - my queue entry should remain until conflicts are resolved
930
-
931
- #### Git fetch fails due to network issues
932
-
933
- **Context:**
934
- - I am checking if main has moved ahead
935
-
936
- **Action:**
937
- - git fetch fails due to network connectivity
938
-
939
- **Expected outcome:**
940
- - I should see an error about network failure
941
- - the system should suggest retry or check connectivity
942
- - the push should not proceed
943
-
944
- #### Git push fails after successful rebase
945
-
946
- **Context:**
947
- - I have successfully rebased on main
948
-
949
- **Action:**
950
- - git push fails due to remote rejection
951
-
952
- **Expected outcome:**
953
- - I should see a clear error message
954
- - my queue entry should remain for retry
955
- - the system should not corrupt the queue state
956
-
957
- #### Invalid queue entry with missing fields
958
-
959
- **Context:**
960
- - the queue contains an entry with missing instanceId
961
-
962
- **Action:**
963
- - the queue processor attempts to process entries
964
-
965
- **Expected outcome:**
966
- - invalid entries should be removed from queue
967
- - valid entries should continue processing
968
- - a warning should be logged about invalid entries
969
-
970
- #### Stale queue entry from crashed instance
971
-
972
- **Context:**
973
- - a queue entry has been waiting for over 1 hour
974
- - the instance that created it is no longer running
975
-
976
- **Action:**
977
- - queue cleanup runs
978
-
979
- **Expected outcome:**
980
- - the stale entry should be removed
981
- - subsequent entries should advance in position
982
- - a notification should be logged
983
-
984
- #### Multiple instances try to write queue simultaneously
985
-
986
- **Context:**
987
- - two Claude instances both try to add queue entries at same time
988
-
989
- **Action:**
990
- - concurrent queue writes occur
991
-
992
- **Expected outcome:**
993
- - both entries should be successfully added
994
- - no queue corruption should occur
995
- - positions should be correctly assigned
996
-
997
- #### Empty commit SHA provided to queue
998
-
999
- **Context:**
1000
- - I attempt to add a queue entry with empty commit SHA
1001
-
1002
- **Action:**
1003
- - validation runs
1004
-
1005
- **Expected outcome:**
1006
- - I should see an error about invalid commit SHA
1007
- - no queue entry should be created
1008
- - guidance should be provided
1009
-
1010
- #### Queue position monitoring with removed entries
1011
-
1012
- **Context:**
1013
- - I am at position 3 in the queue
1014
-
1015
- **Action:**
1016
- - entry at position 1 is removed (not completed normally)
1017
-
1018
- **Expected outcome:**
1019
- - I should move to position 2
1020
- - I should be notified of position change
1021
- - queue integrity should be maintained
1022
-
1023
- ---
1024
-
1025
- ### Production Mode Skill
1026
-
1027
- Context-aware skill that guides implementation of production mode chores with smart detection of three starting contexts (hot, cold, post-transition) Epic: #609 Production Mode Approach: Context-Aware Production Mode with Scenario A/B/C detection
1028
-
1029
- #### Fresh from stable mode - Quick validation (Scenario A)
1030
-
1031
- **Context:**
1032
- - a feature just completed stable mode within 1 day
1033
- - production scenarios already exist in the feature file
1034
- - production chores already exist for the feature
1035
- - production standards file exists
1036
-
1037
- **Action:**
1038
- - I start the production-mode skill for this feature
1039
-
1040
- **Expected outcome:**
1041
- - it detects Scenario A (hot context)
1042
- - it validates existing scenarios against current standards
1043
- - it identifies no gaps
1044
- - it proceeds to implement existing production chores
1045
-
1046
- #### Gap in time - Re-validation (Scenario B)
1047
-
1048
- **Context:**
1049
- - a feature completed stable mode over 7 days ago
1050
- - production scenarios exist in the feature file
1051
- - production chores exist for the feature
1052
- - production standards file exists
1053
-
1054
- **Action:**
1055
- - I start the production-mode skill for this feature
1056
-
1057
- **Expected outcome:**
1058
- - it detects Scenario B (cold context)
1059
- - it re-validates existing scenarios against current standards
1060
- - it checks if project state changed since stable mode
1061
- - it identifies any gaps in standards coverage
1062
- - it updates scenarios if needed
1063
-
1064
- #### Post external-transition - Generate from standards (Scenario C)
1065
-
1066
- **Context:**
1067
- - a feature in stable mode with no production scenarios
1068
- - no production chores exist for the feature
1069
- - production standards file exists from external-transition
1070
-
1071
- **Action:**
1072
- - I start the production-mode skill for this feature
1073
-
1074
- **Expected outcome:**
1075
- - it detects Scenario C (post-transition)
1076
- - it reads production standards from file
1077
- - it generates production scenarios from activated standards
1078
- - it appends scenarios to the feature file
1079
- - it proposes production chores based on standards
1080
- - it creates chores after user confirmation
1081
-
1082
- #### Missing production standards file
1083
-
1084
- **Context:**
1085
- - a feature in stable mode
1086
- - the production standards file does not exist at .jettypod/production-standards.json
1087
-
1088
- **Action:**
1089
- - I start the production-mode skill for this feature
1090
-
1091
- **Expected outcome:**
1092
- - it fails with error "Production standards file not found"
1093
- - it suggests running external-transition first
1094
-
1095
- #### Corrupted production standards file
1096
-
1097
- **Context:**
1098
- - a feature in stable mode
1099
- - the production standards file exists but contains malformed JSON
1100
-
1101
- **Action:**
1102
- - I start the production-mode skill for this feature
1103
-
1104
- **Expected outcome:**
1105
- - it fails with error "Failed to parse production standards"
1106
- - it shows the JSON parsing error details
1107
-
1108
- #### Invalid production standards format
1109
-
1110
- **Context:**
1111
- - a feature in stable mode
1112
- - the production standards file exists with valid JSON
1113
-
1114
- **Action:**
1115
- - I start the production-mode skill for this feature
1116
-
1117
- **Expected outcome:**
1118
- - it fails with error "Invalid standards format"
1119
- - it specifies which required fields are missing
1120
-
1121
- #### Missing scenario file for feature
1122
-
1123
- **Context:**
1124
- - a feature in stable mode
1125
- - the feature has no scenario_file set in database
1126
-
1127
- **Action:**
1128
- - I start the production-mode skill for this feature
1129
-
1130
- **Expected outcome:**
1131
- - it fails with error "Feature has no scenario file"
1132
- - it suggests the feature may not be properly initialized
1133
-
1134
- #### Scenario file does not exist on disk
1135
-
1136
- **Context:**
1137
- - a feature in stable mode
1138
- - the feature has scenario_file set in database
1139
-
1140
- **Action:**
1141
- - I start the production-mode skill for this feature
1142
-
1143
- **Expected outcome:**
1144
- - it fails with error "Scenario file not found"
1145
- - it shows the expected file path
1146
-
1147
- #### Feature not found in database
1148
-
1149
- **Context:**
1150
- - an invalid feature ID
1151
-
1152
- **Action:**
1153
- - I start the production-mode skill with that feature ID
1154
-
1155
- **Expected outcome:**
1156
- - it fails with error "Feature not found"
1157
-
1158
- #### Feature has no completed_at timestamp
1159
-
1160
- **Context:**
1161
- - a feature marked as done in stable mode
1162
-
1163
- **Action:**
1164
- - the context detector checks time since stable completion
1165
-
1166
- **Expected outcome:**
1167
- - it treats this as Scenario C (no production content yet)
1168
-
1169
- #### File permission error reading standards
1170
-
1171
- **Context:**
1172
- - a feature in stable mode
1173
- - the production standards file exists
1174
-
1175
- **Action:**
1176
- - I start the production-mode skill for this feature
1177
-
1178
- **Expected outcome:**
1179
- - it fails with error indicating permission denied
1180
- - it shows the file path with permission issues
1181
-
1182
- #### File permission error writing scenarios
1183
-
1184
- **Context:**
1185
- - a feature in Scenario C (generating scenarios)
1186
- - production standards are loaded successfully
1187
-
1188
- **Action:**
1189
- - attempting to append scenarios to the file
1190
-
1191
- **Expected outcome:**
1192
- - it fails with error indicating write permission denied
1193
-
1194
- #### Empty standards array
1195
-
1196
- **Context:**
1197
- - a feature in stable mode
1198
- - the production standards file exists with empty standards array
1199
-
1200
- **Action:**
1201
- - I start the production-mode skill for this feature
1202
-
1203
- **Expected outcome:**
1204
- - it completes successfully
1205
- - reports 0 standards to implement
1206
-
1207
- #### Database connection error
1208
-
1209
- **Context:**
1210
- - the database file is locked or corrupted
1211
-
1212
- **Action:**
1213
- - I start the production-mode skill
1214
-
1215
- **Expected outcome:**
1216
- - it fails with database error
1217
- - it suggests checking database integrity
1218
-
1219
- ---
1220
-
1221
- ### Refactor Mode
1222
-
1223
- As a developer I want an interactive audit menu for refactoring So that I can systematically clean up technical debt
1224
-
1225
- #### Refactor mode integrates with work tracking
1226
-
1227
- **Context:**
1228
- - I have existing work items in the system
1229
-
1230
- **Action:**
1231
- - I enter refactor mode and audit the codebase
1232
- - I select "Architectural" category
1233
- - I approve creating chores for storage pattern
1234
-
1235
- **Expected outcome:**
1236
- - refactor chores are created under an epic
1237
- - the epic is linked to the refactor mode work item
1238
-
1239
- #### User enters refactor mode and sees audit menu
1240
-
1241
- **Context:**
1242
- - I'm in a project with technical debt
1243
-
1244
- **Action:**
1245
- - I enter refactor mode
1246
-
1247
- **Expected outcome:**
1248
- - Claude audits the codebase
1249
- - I see categorized menu with counts:
1250
-
1251
- #### User picks category and sees detailed breakdown
1252
-
1253
- **Context:**
1254
- - I see the audit menu
1255
-
1256
- **Action:**
1257
- - I pick "Architectural" category
1258
-
1259
- **Expected outcome:**
1260
- - I see detailed items with:
1261
-
1262
- #### Claude recommends quick wins
1263
-
1264
- **Context:**
1265
- - I see the detailed breakdown for "Architectural"
1266
-
1267
- **Action:**
1268
- - Claude analyzes impact vs time
1269
-
1270
- **Expected outcome:**
1271
- - I see recommendation: "Start with Storage Pattern (quick win, high impact)"
1272
- - I see warning: "Skip State Management (needs Discovery Mode first)"
1273
-
1274
- #### User approves and chores are created
1275
-
1276
- **Context:**
1277
- - I see recommendations for Storage Pattern
1278
-
1279
- **Action:**
1280
- - I say "create chores"
1281
-
1282
- **Expected outcome:**
1283
- - epic "Refactor: Architectural patterns" is created
1284
- - chore "Create shared storage util" is created
1285
- - chore "Migrate auth to storage util" is created
1286
- - all chores are linked to the epic
1287
-
1288
- ---
1289
-
1290
- ### Simplify External Transition Command
1291
-
1292
- Remove batch production chore generation from 'jettypod project external'. Just update project_state flag and create infrastructure readiness work items. Production items become visible automatically through backlog filtering. Epic: Production Mode Approach: Skill-based external transition with infrastructure epic creation
1293
-
1294
- #### User transitions project to external state
1295
-
1296
- **Context:**
1297
- - I have a JettyPod project in internal state
1298
- - I have some features in stable mode with production chores already created
1299
-
1300
- **Action:**
1301
- - I run "jettypod project external"
1302
-
1303
- **Expected outcome:**
1304
- - the project_state should be updated to "external"
1305
- - an "Infrastructure Readiness" epic should be created
1306
- - 4 infrastructure features should be created under the epic
1307
- - 15 infrastructure chores should be created across the features
1308
- - production mode work items should now be visible in the backlog
1309
- - no duplicate production chores should be created for existing features
1310
-
1311
- #### Project already in external state
1312
-
1313
- **Context:**
1314
- - I have a JettyPod project in external state
1315
-
1316
- **Action:**
1317
- - I run "jettypod project external"
1318
-
1319
- **Expected outcome:**
1320
- - I should see a message "Project already in external state"
1321
- - no duplicate infrastructure items should be created
1322
- - the command should exit successfully
1323
-
1324
- #### Infrastructure epic already exists
1325
-
1326
- **Context:**
1327
- - I have a JettyPod project in internal state
1328
- - an "Infrastructure Readiness" epic already exists
1329
-
1330
- **Action:**
1331
- - I run "jettypod project external"
1332
-
1333
- **Expected outcome:**
1334
- - the project_state should be updated to "external"
1335
- - no duplicate "Infrastructure Readiness" epic should be created
1336
- - existing infrastructure items should be preserved
1337
- - I should see a message about existing infrastructure
1338
-
1339
- #### Database connection fails during transition
1340
-
1341
- **Context:**
1342
- - I have a JettyPod project in internal state
1343
- - the database connection will fail
1344
-
1345
- **Action:**
1346
- - I run "jettypod project external"
1347
-
1348
- **Expected outcome:**
1349
- - I should see a clear error message about database failure
1350
- - the project_state should remain "internal"
1351
- - no partial infrastructure items should be created
1352
-
1353
- #### Work item creation fails mid-transition
1354
-
1355
- **Context:**
1356
- - I have a JettyPod project in internal state
1357
- - work item creation will fail after creating the epic
1358
-
1359
- **Action:**
1360
- - I run "jettypod project external"
1361
-
1362
- **Expected outcome:**
1363
- - I should see an error message about failed creation
1364
- - the project_state should remain "internal"
1365
- - any partial work items should be cleaned up
1366
-
1367
- #### Invalid checklist data structure
1368
-
1369
- **Context:**
1370
- - I have a JettyPod project in internal state
1371
- - the infrastructure checklist has invalid data
1372
-
1373
- **Action:**
1374
- - I run "jettypod project external"
1375
-
1376
- **Expected outcome:**
1377
- - I should see a validation error message
1378
- - the project_state should remain "internal"
1379
- - no infrastructure items should be created
1380
-
1381
- #### Infrastructure chores generated from production standards
1382
-
1383
- **Context:**
1384
- - I have a JettyPod project in internal state
1385
- - I have production standards with infrastructure-scoped standards
1386
- - the standards include "database_backups" in infrastructure scope
1387
- - the standards include "monitoring_setup" in infrastructure scope
1388
-
1389
- **Action:**
1390
- - I run "jettypod project external"
1391
-
1392
- **Expected outcome:**
1393
- - infrastructure chores should be created from standards
1394
- - each infrastructure standard should create one chore
1395
- - chore descriptions should include acceptance criteria from standards
1396
- - chore descriptions should include reasoning from standards
1397
- - no static checklist should be used
1398
-
1399
- #### Different presets create different infrastructure chores
1400
-
1401
- **Context:**
1402
- - I have a JettyPod project in internal state
1403
- - production standards are set to "startup-mvp" preset
1404
-
1405
- **Action:**
1406
- - I run "jettypod project external"
1407
- - I change production standards to "enterprise" preset
1408
-
1409
- **Expected outcome:**
1410
- - infrastructure chores should match startup-mvp standards
1411
- - I should see fewer infrastructure chores than enterprise preset
1412
- - I run "jettypod project external" on a new project
1413
- - infrastructure chores should match enterprise standards
1414
- - I should see more infrastructure chores than startup-mvp preset
1415
- - additional chores should include multi-region setup
1416
- - additional chores should include advanced monitoring
1417
-
1418
- #### Scope field correctly filters infrastructure vs feature standards
1419
-
1420
- **Context:**
1421
- - I have a JettyPod project in internal state
1422
- - production standards include 5 infrastructure-scoped standards
1423
- - production standards include 8 feature-scoped standards
1424
-
1425
- **Action:**
1426
- - I run "jettypod project external"
1427
-
1428
- **Expected outcome:**
1429
- - exactly 5 infrastructure chores should be created
1430
- - no feature-scoped standards should create infrastructure chores
1431
- - feature-scoped standards should be reserved for feature production chores
1432
-
1433
- #### Infrastructure chore created per standard (not grouped by domain)
1434
-
1435
- **Context:**
1436
- - I have a JettyPod project in internal state
1437
- - production standards include 3 security infrastructure standards
1438
- - production standards include 2 monitoring infrastructure standards
1439
-
1440
- **Action:**
1441
- - I run "jettypod project external"
1442
-
1443
- **Expected outcome:**
1444
- - 5 separate infrastructure chores should be created
1445
- - each chore should reference exactly one standard
1446
- - chores should not be grouped by domain
1447
- - each chore title should describe the specific standard
1448
-
1449
- #### Missing production standards file during transition
1450
-
1451
- **Context:**
1452
- - I have a JettyPod project in internal state
1453
- - no production standards file exists
1454
-
1455
- **Action:**
1456
- - I run "jettypod project external"
1457
-
1458
- **Expected outcome:**
1459
- - I should see an error "Production standards file not found"
1460
- - I should be prompted to run external transition interactively
1461
- - the project_state should remain "internal"
1462
- - no infrastructure items should be created
1463
-
1464
- #### Infrastructure chores include pattern guidance from standards
1465
-
1466
- **Context:**
1467
- - I have a JettyPod project in internal state
1468
- - production standards include a standard with pattern guidance
1469
- - the standard has pattern "Use pg_dump with --clean flag"
1470
-
1471
- **Action:**
1472
- - I run "jettypod project external"
1473
-
1474
- **Expected outcome:**
1475
- - the created chore should include the pattern in description
1476
- - the pattern should be labeled "Pattern:" in the description
1477
- - developers should have clear implementation guidance
1478
-
1479
- #### Audit logging for external transition
1480
-
1481
- **Context:**
1482
- - I have a JettyPod project in internal state
1483
-
1484
- **Action:**
1485
- - I run "jettypod project external"
1486
-
1487
- **Expected outcome:**
1488
- - an audit log entry should be created
1489
- - the log should include timestamp, user, and project details
1490
- - the log should record the state change from "internal" to "external"
1491
- - the log should include the infrastructure epic ID created
1492
-
1493
- #### Performance with large projects (1000+ work items)
1494
-
1495
- **Context:**
1496
- - I have a JettyPod project with 1000 work items
1497
- - the project is in internal state
1498
-
1499
- **Action:**
1500
- - I run "jettypod project external"
1501
-
1502
- **Expected outcome:**
1503
- - the transition should complete in under 5 seconds
1504
- - memory usage should remain under 100MB
1505
- - all infrastructure items should be created successfully
1506
-
1507
- #### Concurrent transition attempts are prevented
1508
-
1509
- **Context:**
1510
- - I have a JettyPod project in internal state
1511
-
1512
- **Action:**
1513
- - I start "jettypod project external" in one process
1514
- - I attempt "jettypod project external" in another process
1515
-
1516
- **Expected outcome:**
1517
- - the second attempt should be blocked
1518
- - I should see "Transition already in progress"
1519
- - only one infrastructure epic should be created
1520
-
1521
- #### State transition is recorded for compliance
1522
-
1523
- **Context:**
1524
- - I have a JettyPod project in internal state
1525
-
1526
- **Action:**
1527
- - I run "jettypod project external"
1528
-
1529
- **Expected outcome:**
1530
- - a state transition record should be created
1531
- - the record should include "from: internal, to: external"
1532
- - the record should include a timestamp
1533
- - the record should be immutable
1534
-
1535
- #### Infrastructure creation is idempotent
1536
-
1537
- **Context:**
1538
- - I have a JettyPod project in external state
1539
- - an "Infrastructure Readiness" epic exists
1540
-
1541
- **Action:**
1542
- - I run "jettypod project external" again
1543
-
1544
- **Expected outcome:**
1545
- - no duplicate infrastructure items should be created
1546
- - the existing epic ID should be preserved
1547
- - I should see "Infrastructure already configured"
1548
-
1549
- ---
1550
-
1551
- ### Terminal Logo Display
1552
-
1553
- As a JettyPod user I want to see a welcoming logo when I run jettypod init So that the tool feels approachable and modern
1554
-
1555
- #### jettypod init displays unicode gradient logo
1556
-
1557
- **Context:**
1558
- - a new empty directory
1559
-
1560
- **Action:**
1561
- - I run jettypod init
1562
-
1563
- **Expected outcome:**
1564
- - the output contains the unicode gradient logo
1565
- - the logo includes "DEV" and "POD" text
1566
- - the logo uses ANSI color codes
1567
-
1568
- #### Logo module exports showLogo function
1569
-
1570
- **Context:**
1571
- - the logo module exists
1572
-
1573
- **Action:**
1574
- - I import it
1575
-
1576
- **Expected outcome:**
1577
- - it exports a "showLogo" function
1578
-
1579
- #### Logo output is properly formatted
1580
-
1581
- **Action:**
1582
- - I call the showLogo function
1583
-
1584
- **Expected outcome:**
1585
- - it outputs 6 lines of logo art
1586
- - it includes the version subtitle
1587
-
1588
- #### jettypod init integrates with existing features
1589
-
1590
- **Context:**
1591
- - a new empty directory
1592
-
1593
- **Action:**
1594
- - I run jettypod init
1595
-
1596
- **Expected outcome:**
1597
- - I see the unicode logo
1598
- - the .jettypod directory is created
1599
- - CLAUDE.md is created
1600
- - git hooks are installed
1601
-
1602
- ---
1603
-
1604
- ### Bug Workflow Display
1605
-
1606
- As a developer I want to see bug-specific workflow guidance when starting a bug So that I have systematic steps to follow for fixing bugs
1607
-
1608
- #### Starting work on a bug displays workflow guidance
1609
-
1610
- **Context:**
1611
- - jettypod is initialized
1612
- - I create a bug "Install script fails"
1613
-
1614
- **Action:**
1615
- - I start work on the bug
1616
-
1617
- **Expected outcome:**
1618
- - the output contains "BUG FIXING WORKFLOW"
1619
- - the output contains "1. REPRODUCE"
1620
- - the output contains "2. INVESTIGATE"
1621
- - the output contains "3. ISOLATE"
1622
- - the output contains "4. FIX"
1623
- - the output contains "5. VERIFY"
1624
- - the output contains "6. COMMIT"
1625
-
1626
- #### Starting work on a feature does not display bug workflow
1627
-
1628
- **Context:**
1629
- - jettypod is initialized
1630
- - I create a feature "Add new feature"
1631
-
1632
- **Action:**
1633
- - I start work on the feature
1634
-
1635
- **Expected outcome:**
1636
- - the output does not contain "BUG FIXING WORKFLOW"
1637
-
1638
- ---
1639
-
1640
- ### Work Commands - Stable Mode
1641
-
1642
- Edge cases and error handling for work commands
1643
-
1644
- #### Start work with invalid ID
1645
-
1646
- **Context:**
1647
- - jettypod is initialized
1648
-
1649
- **Action:**
1650
- - I try to start work with ID "invalid"
1651
-
1652
- **Expected outcome:**
1653
- - I get an error "Invalid work item ID"
1654
-
1655
- #### Start work with negative ID
1656
-
1657
- **Context:**
1658
- - jettypod is initialized
1659
-
1660
- **Action:**
1661
- - I try to start work with ID "-1"
1662
-
1663
- **Expected outcome:**
1664
- - I get an error "Invalid work item ID"
1665
-
1666
- #### Start work when not initialized
1667
-
1668
- **Context:**
1669
- - jettypod is not initialized
1670
-
1671
- **Action:**
1672
- - I try to start work with ID "1"
1673
-
1674
- **Expected outcome:**
1675
- - I get an error "JettyPod not initialized"
1676
-
1677
- #### Start work on non-existent item
1678
-
1679
- **Context:**
1680
- - jettypod is initialized
1681
-
1682
- **Action:**
1683
- - I try to start work with ID "999"
1684
-
1685
- **Expected outcome:**
1686
- - I get an error "Work item #999 not found"
1687
-
1688
- #### Stop work with invalid status
1689
-
1690
- **Context:**
1691
- - I have current work
1692
-
1693
- **Action:**
1694
- - I try to stop work with status "invalid"
1695
-
1696
- **Expected outcome:**
1697
- - I get an error "Invalid status"
1698
-
1699
- #### Stop work when no current work
1700
-
1701
- **Context:**
1702
- - jettypod is initialized
1703
- - no work is active
1704
-
1705
- **Action:**
1706
- - I try to stop work
1707
-
1708
- **Expected outcome:**
1709
- - operation succeeds with no changes
1710
-
1711
- #### Get current work with corrupted file
1712
-
1713
- **Context:**
1714
- - jettypod is initialized
1715
- - current work file is corrupted
1716
-
1717
- **Action:**
1718
- - I get current work
1719
-
1720
- **Expected outcome:**
1721
- - it returns null
1722
-
1723
- #### Start work without git repo
1724
-
1725
- **Context:**
1726
- - jettypod is initialized without git
1727
- - I have a work item
1728
-
1729
- **Action:**
1730
- - I start work on the item
1731
-
1732
- **Expected outcome:**
1733
- - it succeeds without creating branch
1734
-
1735
- #### Multiple start work calls
1736
-
1737
- **Context:**
1738
- - I have a work item
1739
- - I start work on it
1740
-
1741
- **Action:**
1742
- - I start work on a different item
1743
-
1744
- **Expected outcome:**
1745
- - the first item stops being current
1746
- - the second item becomes current
1747
-
1748
- #### Start work preserves existing status
1749
-
1750
- **Context:**
1751
- - I have a work item with status "in_progress"
1752
-
1753
- **Action:**
1754
- - I start work on it
1755
-
1756
- **Expected outcome:**
1757
- - the status remains "in_progress"
1758
-
1759
- ---
1760
-
1761
- ### Work Item Commands
1762
-
1763
- As a developer I want to start and stop work on items So that my current work is tracked automatically
1764
-
1765
- #### Integration - work commands with existing work tracking
1766
-
1767
- **Context:**
1768
- - I have initialized jettypod
1769
- - I create an epic with id 1
1770
- - I create a feature with id 2 under epic 1
1771
-
1772
- **Action:**
1773
- - I start work on item 2
1774
-
1775
- **Expected outcome:**
1776
- - the current work file exists
1777
- - the current work contains item 2
1778
- - item 2 status is in_progress or backlog
1779
-
1780
- ---
1781
-
1782
- ### Mode defaults to discovery on work item creation
1783
-
1784
- As a developer I want new work items to default to discovery mode So I can start exploring without specifying mode every time
1785
-
1786
- #### Create epic without mode
1787
-
1788
- **Context:**
1789
- - jettypod is initialized
1790
-
1791
- **Action:**
1792
- - I create an epic "Test Epic" without mode
1793
-
1794
- **Expected outcome:**
1795
- - the work item is created successfully
1796
- - the work item has NULL mode
1797
-
1798
- #### Create epic with mode (optional)
1799
-
1800
- **Context:**
1801
- - jettypod is initialized
1802
-
1803
- **Action:**
1804
- - I create an epic "Test Epic" with mode "stable"
1805
-
1806
- **Expected outcome:**
1807
- - the work item is created successfully
1808
- - the work item has mode "stable"
1809
-
1810
- #### Create feature with explicit mode
1811
-
1812
- **Context:**
1813
- - jettypod is initialized
1814
-
1815
- **Action:**
1816
- - I create a feature "Test Feature" with mode "speed"
1817
-
1818
- **Expected outcome:**
1819
- - the work item is created successfully
1820
- - the work item has mode "speed"
1821
-
1822
- #### Create feature without mode defaults to discovery
1823
-
1824
- **Context:**
1825
- - jettypod is initialized
1826
-
1827
- **Action:**
1828
- - I create a feature "Test Feature" without mode
1829
-
1830
- **Expected outcome:**
1831
- - the work item is created successfully
1832
- - the work item has mode "discovery"
1833
-
1834
- #### Create feature with invalid mode
1835
-
1836
- **Context:**
1837
- - jettypod is initialized
1838
-
1839
- **Action:**
1840
- - I try to create a feature "Test Feature" with mode "invalid"
1841
-
1842
- **Expected outcome:**
1843
- - I get an error "Invalid mode"
1844
- - no work item is created
1845
-
1846
- #### Create bug with mode fails
1847
-
1848
- **Context:**
1849
- - jettypod is initialized
1850
-
1851
- **Action:**
1852
- - I try to create a bug "Test Bug" with mode "stable"
1853
-
1854
- **Expected outcome:**
1855
- - I get an error "Bugs cannot have modes"
1856
- - no work item is created
1857
-
1858
- #### Create bug without mode succeeds with NULL
1859
-
1860
- **Context:**
1861
- - jettypod is initialized
1862
-
1863
- **Action:**
1864
- - I create a bug "Test Bug" without mode
1865
-
1866
- **Expected outcome:**
1867
- - the work item is created successfully
1868
- - the work item has no mode
1869
-
1870
- #### Create chore with mode fails
1871
-
1872
- **Context:**
1873
- - jettypod is initialized
1874
-
1875
- **Action:**
1876
- - I try to create a chore "Test Chore" with mode "production"
1877
-
1878
- **Expected outcome:**
1879
- - I get an error "Chores do not have modes"
1880
- - no work item is created
1881
-
1882
- #### Create chore without mode succeeds with NULL
1883
-
1884
- **Context:**
1885
- - jettypod is initialized
1886
- - jettypod is initialized
1887
-
1888
- **Action:**
1889
- - I create a chore "Test Chore" without mode
1890
- - I create a feature "Test Feature" with mode "<mode>"
1891
-
1892
- **Expected outcome:**
1893
- - the work item is created successfully
1894
- - the work item has NULL mode
1895
- - the work item is created successfully
1896
- - the work item has mode "<mode>"
1897
-
1898
- #### Epic with children in different modes
1899
-
1900
- **Context:**
1901
- - jettypod is initialized
1902
- - I create an epic "Test Epic" without mode
1903
- - I create a feature "Speed Feature" with mode "speed" and parent epic
1904
- - I create a bug "Test Bug" with parent epic
1905
- - I create a chore "Test Chore" without mode and parent epic
1906
-
1907
- **Action:**
1908
- - I view the backlog
1909
-
1910
- **Expected outcome:**
1911
- - I see the epic without mode indicator
1912
- - I see the feature with mode "speed"
1913
- - I see the bug without mode indicator
1914
- - I see the chore without mode indicator
1915
-
1916
- #### Create multiple items with same title but different modes
1917
-
1918
- **Context:**
1919
- - jettypod is initialized
1920
-
1921
- **Action:**
1922
- - I create a feature "Duplicate" with mode "speed"
1923
- - I create a feature "Duplicate" with mode "stable"
1924
-
1925
- **Expected outcome:**
1926
- - both work items are created successfully
1927
- - they have different modes
1928
-
1929
- #### Mode is case-sensitive
1930
-
1931
- **Context:**
1932
- - jettypod is initialized
1933
-
1934
- **Action:**
1935
- - I try to create a feature "Test" with mode "Speed"
1936
-
1937
- **Expected outcome:**
1938
- - I get an error "Invalid mode"
1939
-
1940
- #### Mode with whitespace is invalid
1941
-
1942
- **Context:**
1943
- - jettypod is initialized
1944
-
1945
- **Action:**
1946
- - I try to create a feature "Test" with mode " speed "
1947
-
1948
- **Expected outcome:**
1949
- - I get an error "Invalid mode"
1950
-
1951
- #### Empty string mode is treated as NULL
1952
-
1953
- **Context:**
1954
- - jettypod is initialized
1955
-
1956
- **Action:**
1957
- - I try to create a feature "Test" with mode ""
1958
-
1959
- **Expected outcome:**
1960
- - I get an error "Invalid mode"
1961
-
1962
- ---
1963
-
1964
- ### Work set-mode updates CLAUDE.md if item is current
1965
-
1966
- As a developer I want to change a work item's mode with jettypod work set-mode So I can adjust my approach without recreating the work item Given jettypod is initialized And CLAUDE.md exists
1967
-
1968
- #### Set mode on current work item updates CLAUDE.md
1969
-
1970
- **Context:**
1971
- - I create a feature "Test Feature" with mode "speed"
1972
- - I start work on the feature
1973
- - CLAUDE.md mode is set to "speed"
1974
-
1975
- **Action:**
1976
- - I set mode for current item to "stable"
1977
-
1978
- **Expected outcome:**
1979
- - the work item has mode "stable"
1980
- - CLAUDE.md mode is set to "stable"
1981
-
1982
- #### Set mode on non-current item does not update CLAUDE.md
1983
-
1984
- **Context:**
1985
- - I create a feature "Item 1" with mode "speed"
1986
- - I create a feature "Item 2" with mode "discovery"
1987
- - I start work on the feature "Item 1"
1988
- - CLAUDE.md mode is set to "speed"
1989
-
1990
- **Action:**
1991
- - I set mode for item "Item 2" to "stable"
1992
-
1993
- **Expected outcome:**
1994
- - item "Item 2" has mode "stable"
1995
-
1996
- #### Set invalid mode shows error
1997
-
1998
- **Context:**
1999
- - I create a feature "Test Feature" with mode "speed"
2000
-
2001
- **Action:**
2002
- - I try to set mode to "invalid"
2003
-
2004
- **Expected outcome:**
2005
- - I get error "Invalid mode"
2006
- - the work item still has mode "speed"
2007
-
2008
- #### Set mode is case-sensitive
2009
-
2010
- **Context:**
2011
- - I create a feature "Test Feature" with mode "speed"
2012
- - I create a feature "Test Feature" with mode "speed"
2013
-
2014
- **Action:**
2015
- - I try to set mode to "Speed"
2016
- - I set mode for current item to "<new_mode>"
2017
-
2018
- **Expected outcome:**
2019
- - I get error "Invalid mode"
2020
- - I start work on the feature
2021
- - the work item has mode "<new_mode>"
2022
- - CLAUDE.md mode is set to "<new_mode>"
2023
-
2024
- #### Mode change persists across work start/stop
2025
-
2026
- **Context:**
2027
- - I create a feature "Test Feature" with mode "speed"
2028
- - I start work on the feature
2029
-
2030
- **Action:**
2031
- - I set mode for current item to "production"
2032
- - I stop work
2033
- - I start work on the feature
2034
-
2035
- **Expected outcome:**
2036
- - CLAUDE.md mode is set to "production"
2037
-
2038
- #### Change mode multiple times
2039
-
2040
- **Context:**
2041
- - I create a feature "Test Feature" with mode "speed"
2042
- - I start work on the feature
2043
-
2044
- **Action:**
2045
- - I set mode for current item to "discovery"
2046
- - I set mode for current item to "stable"
2047
- - I set mode for current item to "production"
2048
-
2049
- **Expected outcome:**
2050
- - the work item has mode "production"
2051
- - CLAUDE.md mode is set to "production"
2052
-
2053
- ---
2054
-
2055
- ### Work start sets CLAUDE.md mode from work item
2056
-
2057
- As a developer I want jettypod work start to set the CLAUDE.md mode from the work item's mode So I automatically work in the correct mode for each work item Given jettypod is initialized And CLAUDE.md exists
2058
-
2059
- #### Start work on feature in speed mode
2060
-
2061
- **Context:**
2062
- - I create a feature "Speed Feature" with mode "speed"
2063
-
2064
- **Action:**
2065
- - I start work on the feature
2066
-
2067
- **Expected outcome:**
2068
- - CLAUDE.md mode is set to "speed"
2069
-
2070
- #### Start work on bug in stable mode
2071
-
2072
- **Context:**
2073
- - I create a bug "Stable Bug" with mode "stable"
2074
-
2075
- **Action:**
2076
- - I start work on the bug
2077
-
2078
- **Expected outcome:**
2079
- - CLAUDE.md mode is set to "stable"
2080
-
2081
- #### Start work on chore inherits parent feature mode
2082
-
2083
- **Context:**
2084
- - I create a feature "Discovery Feature" with mode "discovery"
2085
- - I create a chore "Child Chore" without mode and parent feature
2086
-
2087
- **Action:**
2088
- - I start work on the chore
2089
-
2090
- **Expected outcome:**
2091
- - CLAUDE.md mode is set to "discovery"
2092
-
2093
- #### Start work on feature in production mode
2094
-
2095
- **Context:**
2096
- - I create a feature "Production Feature" with mode "production"
2097
-
2098
- **Action:**
2099
- - I start work on the feature
2100
-
2101
- **Expected outcome:**
2102
- - CLAUDE.md mode is set to "production"
2103
-
2104
- #### Switch from speed mode item to stable mode item
2105
-
2106
- **Context:**
2107
- - I create a feature "Speed Feature" with mode "speed"
2108
- - I create a bug "Stable Bug" with mode "stable"
2109
- - I start work on the feature
2110
- - CLAUDE.md mode is set to "speed"
2111
-
2112
- **Action:**
2113
- - I stop work
2114
- - I start work on the bug
2115
-
2116
- **Expected outcome:**
2117
- - CLAUDE.md mode is set to "stable"
2118
-
2119
- #### Start work updates mode even if item already in progress
2120
-
2121
- **Context:**
2122
- - I create a feature "Test Feature" with mode "discovery"
2123
- - the feature status is "in_progress"
2124
- - CLAUDE.md has mode "speed"
2125
-
2126
- **Action:**
2127
- - I start work on the feature
2128
-
2129
- **Expected outcome:**
2130
- - CLAUDE.md mode is set to "discovery"
2131
-
2132
- #### Start work on epic (NULL mode)
2133
-
2134
- **Context:**
2135
- - I create an epic "Test Epic" without mode
2136
-
2137
- **Action:**
2138
- - I start work on the epic
2139
-
2140
- **Expected outcome:**
2141
- - CLAUDE.md has no mode line
2142
- - the current work section exists
2143
-
2144
- #### Start work on feature with default discovery mode
2145
-
2146
- **Context:**
2147
- - I create a feature "Default Feature" without mode
2148
- - the work item has mode "discovery"
2149
-
2150
- **Action:**
2151
- - I start work on the feature
2152
-
2153
- **Expected outcome:**
2154
- - CLAUDE.md mode is set to "discovery"
2155
-
2156
- #### Start work on child features use their own mode, not parent's
2157
-
2158
- **Context:**
2159
- - I create an epic "Test Epic" without mode
2160
- - I create a feature "Speed Feature" with mode "speed" and parent epic
2161
- - I create a feature "Stable Feature" with mode "stable" and parent epic
2162
-
2163
- **Action:**
2164
- - I start work on the speed feature
2165
- - I stop work
2166
-
2167
- **Expected outcome:**
2168
- - CLAUDE.md mode is set to "speed"
2169
- - I start work on the stable feature
2170
- - CLAUDE.md mode is set to "stable"
2171
-
2172
- #### Work item mode persists in database after start
2173
-
2174
- **Context:**
2175
- - I create a feature "Test Feature" with mode "stable"
2176
-
2177
- **Action:**
2178
- - I start work on the feature
2179
- - I stop work
2180
-
2181
- **Expected outcome:**
2182
- - the work item still has mode "stable"
2183
-
2184
- #### Starting work multiple times preserves mode
2185
-
2186
- **Context:**
2187
- - I create a feature "Test Feature" with mode "production"
2188
-
2189
- **Action:**
2190
- - I start work on the feature
2191
- - I stop work
2192
- - I start work on the feature
2193
-
2194
- **Expected outcome:**
2195
- - CLAUDE.md mode is set to "production"
2196
- - the work item still has mode "production"
2197
-
2198
- ---
2199
-