jettypod 4.4.118 → 4.4.121

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 (240) hide show
  1. package/.env +4 -3
  2. package/Cargo.lock +6450 -0
  3. package/Cargo.toml +35 -0
  4. package/README.md +5 -1
  5. package/TAURI-MIGRATION-PLAN.md +840 -0
  6. package/apps/dashboard/app/connect-claude/page.tsx +5 -6
  7. package/apps/dashboard/app/decision/[id]/page.tsx +63 -58
  8. package/apps/dashboard/app/demo/gates/page.tsx +43 -45
  9. package/apps/dashboard/app/design-system/page.tsx +868 -0
  10. package/apps/dashboard/app/globals.css +80 -4
  11. package/apps/dashboard/app/install-claude/page.tsx +4 -6
  12. package/apps/dashboard/app/login/page.tsx +72 -54
  13. package/apps/dashboard/app/page.tsx +101 -48
  14. package/apps/dashboard/app/settings/page.tsx +61 -13
  15. package/apps/dashboard/app/signup/page.tsx +242 -0
  16. package/apps/dashboard/app/subscribe/page.tsx +0 -2
  17. package/apps/dashboard/app/tests/page.tsx +37 -4
  18. package/apps/dashboard/app/welcome/page.tsx +13 -16
  19. package/apps/dashboard/app/work/[id]/page.tsx +117 -118
  20. package/apps/dashboard/app/work/[id]/proof/page.tsx +1489 -0
  21. package/apps/dashboard/components/AppShell.tsx +92 -85
  22. package/apps/dashboard/components/CardMenu.tsx +45 -12
  23. package/apps/dashboard/components/ClaudePanel.tsx +771 -850
  24. package/apps/dashboard/components/ClaudePanelInput.tsx +43 -15
  25. package/apps/dashboard/components/ConnectClaudeScreen.tsx +17 -34
  26. package/apps/dashboard/components/CopyableId.tsx +3 -4
  27. package/apps/dashboard/components/DetailReviewActions.tsx +100 -0
  28. package/apps/dashboard/components/DragContext.tsx +134 -63
  29. package/apps/dashboard/components/DraggableCard.tsx +3 -5
  30. package/apps/dashboard/components/DropZone.tsx +6 -7
  31. package/apps/dashboard/components/EditableDetailDescription.tsx +7 -13
  32. package/apps/dashboard/components/EditableDetailTitle.tsx +6 -13
  33. package/apps/dashboard/components/EditableTitle.tsx +26 -7
  34. package/apps/dashboard/components/ElapsedTimer.tsx +66 -0
  35. package/apps/dashboard/components/EpicGroup.tsx +359 -0
  36. package/apps/dashboard/components/GateCard.tsx +79 -17
  37. package/apps/dashboard/components/GateChoiceCard.tsx +15 -18
  38. package/apps/dashboard/components/InstallClaudeScreen.tsx +15 -32
  39. package/apps/dashboard/components/JettyLoader.tsx +37 -0
  40. package/apps/dashboard/components/KanbanBoard.tsx +368 -958
  41. package/apps/dashboard/components/KanbanCard.tsx +740 -0
  42. package/apps/dashboard/components/LazyCard.tsx +62 -0
  43. package/apps/dashboard/components/LazyMarkdown.tsx +11 -0
  44. package/apps/dashboard/components/MainNav.tsx +38 -73
  45. package/apps/dashboard/components/MessageBlock.tsx +468 -0
  46. package/apps/dashboard/components/ModeStartCard.tsx +15 -16
  47. package/apps/dashboard/components/OnboardingWelcome.tsx +213 -0
  48. package/apps/dashboard/components/PlaceholderCard.tsx +3 -4
  49. package/apps/dashboard/components/ProjectSwitcher.tsx +30 -30
  50. package/apps/dashboard/components/PrototypeTimeline.tsx +72 -51
  51. package/apps/dashboard/components/RealTimeKanbanWrapper.tsx +406 -388
  52. package/apps/dashboard/components/RealTimeTestsWrapper.tsx +373 -235
  53. package/apps/dashboard/components/ReviewFooter.tsx +139 -0
  54. package/apps/dashboard/components/SessionList.tsx +19 -19
  55. package/apps/dashboard/components/SubscribeContent.tsx +91 -47
  56. package/apps/dashboard/components/TestTree.tsx +16 -16
  57. package/apps/dashboard/components/TipCard.tsx +16 -17
  58. package/apps/dashboard/components/Toast.tsx +5 -6
  59. package/apps/dashboard/components/TypeIcon.tsx +55 -0
  60. package/apps/dashboard/components/ViewModeToolbar.tsx +104 -0
  61. package/apps/dashboard/components/WaveCompletionAnimation.tsx +52 -65
  62. package/apps/dashboard/components/WelcomeScreen.tsx +19 -35
  63. package/apps/dashboard/components/WorkItemHeader.tsx +4 -5
  64. package/apps/dashboard/components/WorkItemTree.tsx +11 -32
  65. package/apps/dashboard/components/settings/AccountSection.tsx +55 -35
  66. package/apps/dashboard/components/settings/AiContextSection.tsx +89 -0
  67. package/apps/dashboard/components/settings/ContextDocumentsSection.tsx +317 -0
  68. package/apps/dashboard/components/settings/EnvVarsSection.tsx +74 -152
  69. package/apps/dashboard/components/settings/GeneralSection.tsx +162 -56
  70. package/apps/dashboard/components/settings/ProjectStackSection.tsx +948 -0
  71. package/apps/dashboard/components/settings/SettingsLayout.tsx +4 -5
  72. package/apps/dashboard/components/ui/Button.tsx +104 -0
  73. package/apps/dashboard/components/ui/Input.tsx +78 -0
  74. package/apps/dashboard/components.json +1 -1
  75. package/apps/dashboard/contexts/ClaudeSessionContext.tsx +711 -418
  76. package/apps/dashboard/contexts/ConnectionStatusContext.tsx +25 -5
  77. package/apps/dashboard/contexts/UsageContext.tsx +87 -32
  78. package/apps/dashboard/dev.sh +35 -0
  79. package/apps/dashboard/eslint.config.mjs +9 -9
  80. package/apps/dashboard/hooks/useKanbanAnimation.ts +29 -0
  81. package/apps/dashboard/hooks/useKanbanUndo.ts +83 -0
  82. package/apps/dashboard/hooks/useWebSocket.ts +138 -83
  83. package/apps/dashboard/index.html +73 -0
  84. package/apps/dashboard/lib/constants.ts +43 -0
  85. package/apps/dashboard/lib/data-bridge.ts +722 -0
  86. package/apps/dashboard/lib/db.ts +69 -1265
  87. package/apps/dashboard/lib/environment-config.ts +173 -0
  88. package/apps/dashboard/lib/environment-verification.ts +119 -0
  89. package/apps/dashboard/lib/kanban-utils.ts +270 -0
  90. package/apps/dashboard/lib/proof-run.ts +495 -0
  91. package/apps/dashboard/lib/proof-scenario-runner.ts +346 -0
  92. package/apps/dashboard/lib/run-migrations.js +27 -2
  93. package/apps/dashboard/lib/service-recovery.ts +326 -0
  94. package/apps/dashboard/lib/session-state-machine.ts +1 -0
  95. package/apps/dashboard/lib/session-state-utils.ts +0 -164
  96. package/apps/dashboard/lib/session-stream-manager.ts +308 -134
  97. package/apps/dashboard/lib/shadows.ts +7 -0
  98. package/apps/dashboard/lib/stream-manager-registry.ts +46 -6
  99. package/apps/dashboard/lib/tauri-bridge.ts +102 -0
  100. package/apps/dashboard/lib/tauri.ts +106 -0
  101. package/apps/dashboard/lib/utils.ts +6 -0
  102. package/apps/dashboard/next-env.d.ts +1 -1
  103. package/apps/dashboard/package.json +21 -32
  104. package/apps/dashboard/public/bug-icon.png +0 -0
  105. package/apps/dashboard/public/buoy-icon.png +0 -0
  106. package/apps/dashboard/public/fonts/Satoshi-Variable.woff2 +0 -0
  107. package/apps/dashboard/public/fonts/Satoshi-VariableItalic.woff2 +0 -0
  108. package/apps/dashboard/public/in-flight-seagull.png +0 -0
  109. package/apps/dashboard/public/jetty-icon-loading-alt.svg +11 -0
  110. package/apps/dashboard/public/jetty-icon-loading.svg +11 -0
  111. package/apps/dashboard/public/jettypod_logo.png +0 -0
  112. package/apps/dashboard/public/pier-icon.png +0 -0
  113. package/apps/dashboard/public/star-icon.png +0 -0
  114. package/apps/dashboard/public/wrench-icon.png +0 -0
  115. package/apps/dashboard/scripts/tauri-build.js +228 -0
  116. package/apps/dashboard/scripts/upload-tauri-to-r2.js +125 -0
  117. package/apps/dashboard/scripts/ws-server.js +191 -0
  118. package/apps/dashboard/src/main.tsx +12 -0
  119. package/apps/dashboard/src/router.tsx +107 -0
  120. package/apps/dashboard/src/vite-env.d.ts +1 -0
  121. package/apps/dashboard/tsconfig.json +7 -12
  122. package/apps/dashboard/tsconfig.tsbuildinfo +1 -1
  123. package/apps/dashboard/vite.config.ts +33 -0
  124. package/apps/update-server/src/index.ts +228 -80
  125. package/claude-hooks/global-guardrails.js +14 -13
  126. package/crates/jettypod-cli/Cargo.toml +19 -0
  127. package/crates/jettypod-cli/src/commands.rs +1249 -0
  128. package/crates/jettypod-cli/src/main.rs +595 -0
  129. package/crates/jettypod-core/Cargo.toml +26 -0
  130. package/crates/jettypod-core/build.rs +98 -0
  131. package/crates/jettypod-core/migrations/V1__baseline.sql +197 -0
  132. package/crates/jettypod-core/migrations/V2__work_items_indexes.sql +6 -0
  133. package/crates/jettypod-core/migrations/V3__qa_steps.sql +2 -0
  134. package/crates/jettypod-core/src/auth.rs +294 -0
  135. package/crates/jettypod-core/src/config.rs +397 -0
  136. package/crates/jettypod-core/src/db/mod.rs +507 -0
  137. package/crates/jettypod-core/src/db/recovery.rs +114 -0
  138. package/crates/jettypod-core/src/db/startup.rs +101 -0
  139. package/crates/jettypod-core/src/db/validate.rs +149 -0
  140. package/crates/jettypod-core/src/error.rs +76 -0
  141. package/crates/jettypod-core/src/git.rs +458 -0
  142. package/crates/jettypod-core/src/lib.rs +20 -0
  143. package/crates/jettypod-core/src/sessions.rs +625 -0
  144. package/crates/jettypod-core/src/skills.rs +556 -0
  145. package/crates/jettypod-core/src/work.rs +1086 -0
  146. package/crates/jettypod-core/src/worktree.rs +628 -0
  147. package/crates/jettypod-core/src/ws.rs +767 -0
  148. package/cucumber-test.cjs +6 -0
  149. package/cucumber.js +9 -3
  150. package/docs/COMMAND_REFERENCE.md +34 -0
  151. package/hooks/post-checkout +32 -75
  152. package/hooks/post-merge +111 -10
  153. package/jest.setup.js +1 -0
  154. package/jettypod.js +145 -116
  155. package/lib/bdd-preflight.js +96 -0
  156. package/lib/chore-taxonomy.js +33 -10
  157. package/lib/database.js +36 -16
  158. package/lib/db-watcher.js +1 -1
  159. package/lib/git-hooks/pre-commit +1 -1
  160. package/lib/jettypod-backup.js +27 -4
  161. package/lib/merge-lock.js +111 -253
  162. package/lib/migrations/027-plan-at-creation-column.js +3 -1
  163. package/lib/migrations/029-remove-autoincrement.js +307 -0
  164. package/lib/migrations/029-rename-corrupted-to-cleaned.js +149 -0
  165. package/lib/migrations/030-rejection-round-columns.js +54 -0
  166. package/lib/migrations/031-session-isolation-index.js +17 -0
  167. package/lib/migrations/index.js +47 -4
  168. package/lib/schema.js +10 -5
  169. package/lib/seed-onboarding.js +1 -1
  170. package/lib/update-command/index.js +9 -175
  171. package/lib/work-commands/index.js +144 -19
  172. package/lib/work-tracking/index.js +148 -27
  173. package/lib/worktree-diagnostics.js +16 -16
  174. package/lib/worktree-facade.js +1 -1
  175. package/lib/worktree-manager.js +8 -8
  176. package/lib/worktree-reconciler.js +5 -5
  177. package/package.json +9 -2
  178. package/scripts/ndjson-to-cucumber-json.js +152 -0
  179. package/scripts/postinstall.js +25 -0
  180. package/skills-templates/bug-mode/SKILL.md +79 -20
  181. package/skills-templates/bug-planning/SKILL.md +25 -29
  182. package/skills-templates/chore-mode/SKILL.md +171 -69
  183. package/skills-templates/chore-mode/verification.js +51 -10
  184. package/skills-templates/chore-planning/SKILL.md +47 -18
  185. package/skills-templates/design-system-selection/SKILL.md +273 -0
  186. package/skills-templates/epic-planning/SKILL.md +82 -48
  187. package/skills-templates/external-transition/SKILL.md +47 -47
  188. package/skills-templates/feature-planning/SKILL.md +173 -74
  189. package/skills-templates/production-mode/SKILL.md +69 -49
  190. package/skills-templates/request-routing/SKILL.md +4 -4
  191. package/skills-templates/simple-improvement/SKILL.md +74 -29
  192. package/skills-templates/speed-mode/SKILL.md +217 -141
  193. package/skills-templates/stable-mode/SKILL.md +148 -89
  194. package/apps/dashboard/README.md +0 -36
  195. package/apps/dashboard/app/api/claude/[workItemId]/message/route.ts +0 -386
  196. package/apps/dashboard/app/api/claude/[workItemId]/pin/route.ts +0 -24
  197. package/apps/dashboard/app/api/claude/[workItemId]/route.ts +0 -167
  198. package/apps/dashboard/app/api/claude/sessions/[sessionId]/content/route.ts +0 -52
  199. package/apps/dashboard/app/api/claude/sessions/[sessionId]/message/route.ts +0 -378
  200. package/apps/dashboard/app/api/claude/sessions/[sessionId]/pin/route.ts +0 -24
  201. package/apps/dashboard/app/api/claude/sessions/cleanup/route.ts +0 -34
  202. package/apps/dashboard/app/api/claude/sessions/route.ts +0 -184
  203. package/apps/dashboard/app/api/decisions/[id]/route.ts +0 -25
  204. package/apps/dashboard/app/api/internal/set-project/route.ts +0 -17
  205. package/apps/dashboard/app/api/kanban/route.ts +0 -15
  206. package/apps/dashboard/app/api/settings/env-vars/route.ts +0 -125
  207. package/apps/dashboard/app/api/settings/general/route.ts +0 -21
  208. package/apps/dashboard/app/api/tests/route.ts +0 -9
  209. package/apps/dashboard/app/api/tests/run/route.ts +0 -82
  210. package/apps/dashboard/app/api/tests/run/stream/route.ts +0 -71
  211. package/apps/dashboard/app/api/tests/undefined/route.ts +0 -9
  212. package/apps/dashboard/app/api/usage/route.ts +0 -17
  213. package/apps/dashboard/app/api/work/[id]/description/route.ts +0 -21
  214. package/apps/dashboard/app/api/work/[id]/epic/route.ts +0 -21
  215. package/apps/dashboard/app/api/work/[id]/order/route.ts +0 -21
  216. package/apps/dashboard/app/api/work/[id]/status/route.ts +0 -21
  217. package/apps/dashboard/app/api/work/[id]/title/route.ts +0 -21
  218. package/apps/dashboard/app/layout.tsx +0 -43
  219. package/apps/dashboard/components/UpgradeBanner.tsx +0 -29
  220. package/apps/dashboard/electron/ipc-handlers.js +0 -1028
  221. package/apps/dashboard/electron/main.js +0 -2124
  222. package/apps/dashboard/electron/preload.js +0 -123
  223. package/apps/dashboard/electron/session-manager.js +0 -141
  224. package/apps/dashboard/electron-builder.config.js +0 -357
  225. package/apps/dashboard/hooks/useClaudeSessions.ts +0 -299
  226. package/apps/dashboard/lib/claude-process-manager.ts +0 -492
  227. package/apps/dashboard/lib/db-bridge.ts +0 -282
  228. package/apps/dashboard/lib/prototypes.ts +0 -202
  229. package/apps/dashboard/lib/test-results-db.ts +0 -307
  230. package/apps/dashboard/lib/tests.ts +0 -282
  231. package/apps/dashboard/next.config.js +0 -50
  232. package/apps/dashboard/postcss.config.mjs +0 -7
  233. package/apps/dashboard/public/file.svg +0 -1
  234. package/apps/dashboard/public/globe.svg +0 -1
  235. package/apps/dashboard/public/next.svg +0 -1
  236. package/apps/dashboard/public/vercel.svg +0 -1
  237. package/apps/dashboard/public/window.svg +0 -1
  238. package/apps/dashboard/scripts/download-node.js +0 -104
  239. package/apps/dashboard/scripts/upload-to-r2.js +0 -89
  240. package/docs/bdd-guidance.md +0 -390
@@ -30,7 +30,7 @@ When this skill is activated, you are investigating a bug to identify root cause
30
30
  **Gather from user:**
31
31
 
32
32
  ```
33
- 🐛 Bug Investigation
33
+ Bug Investigation
34
34
 
35
35
  I need to understand the bug before we investigate.
36
36
 
@@ -61,7 +61,7 @@ I need to understand the bug before we investigate.
61
61
 
62
62
  ```
63
63
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
64
- 📋 Bug Report
64
+ Bug Report
65
65
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
66
66
 
67
67
  **Symptom:** [What's happening]
@@ -105,7 +105,7 @@ git log --oneline -10 -- <relevant-files>
105
105
  **Display hypotheses:**
106
106
 
107
107
  ```
108
- 🔍 Hypotheses
108
+ Hypotheses
109
109
 
110
110
  Based on symptoms and codebase analysis:
111
111
 
@@ -148,12 +148,12 @@ Starting evidence gathering with H1...
148
148
  ```
149
149
  ━━━ Testing H1: [Title] ━━━
150
150
 
151
- 📂 Reading: [file:lines]
152
- 🔎 Looking for: [specific issue]
151
+ Reading: [file:lines]
152
+ Looking for: [specific issue]
153
153
 
154
154
  **Finding:** [What you discovered]
155
155
 
156
- **Verdict:** CONFIRMED / ELIMINATED / ⚠️ PARTIAL
156
+ **Verdict:** CONFIRMED / ELIMINATED / PARTIAL
157
157
  ```
158
158
 
159
159
  **If ELIMINATED:** Move to next hypothesis.
@@ -163,7 +163,7 @@ Starting evidence gathering with H1...
163
163
  **If all hypotheses eliminated:**
164
164
 
165
165
  ```
166
- ⚠️ Initial hypotheses eliminated
166
+ Initial hypotheses eliminated
167
167
 
168
168
  What we learned:
169
169
  - H1: Eliminated because [reason]
@@ -182,11 +182,11 @@ Loop back to Phase 2 with new information.
182
182
 
183
183
  **Goal:** Confirm root cause with user before creating work item.
184
184
 
185
- **⚡ ASYNC BOUNDARY - Wait for user confirmation**
185
+ **ASYNC BOUNDARY - Wait for user confirmation**
186
186
 
187
187
  ```
188
188
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
189
- 🎯 Root Cause Identified
189
+ Root Cause Identified
190
190
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
191
191
 
192
192
  **What's broken:** [Specific code/logic]
@@ -212,24 +212,20 @@ If user disagrees or adds context, revise understanding and confirm again.
212
212
 
213
213
  **Goal:** Create tracked bug work item with breadcrumbs for implementation.
214
214
 
215
- **Create bug work item with description:**
215
+ **Create bug work item with description (using --from for truncation safety):**
216
216
 
217
- ```bash
218
- jettypod work create bug "[Bug title - brief description]" "Root cause: [What's broken and why]
219
- Location: [file:line]
220
-
221
- Fix approach:
222
- - [Step 1]
223
- - [Step 2]
224
-
225
- Files to modify:
226
- - [file1]: [what to change]
227
- - [file2]: [what to change]
217
+ Use the **Write** tool to create `/tmp/jettypod-create.json`:
218
+ ```json
219
+ {
220
+ "type": "bug",
221
+ "title": "[Bug title - brief description]",
222
+ "description": "Root cause: [What's broken and why]\nLocation: [file:line]\n\nFix approach:\n- [Step 1]\n- [Step 2]\n\nFiles to modify:\n- [file1]: [what to change]\n- [file2]: [what to change]\n\nVerification:\n- Regression test passes\n- Original bug no longer reproduces\n- [Any other checks]"
223
+ }
224
+ ```
228
225
 
229
- Verification:
230
- - Regression test passes
231
- - Original bug no longer reproduces
232
- - [Any other checks]"
226
+ Then run via **Bash**:
227
+ ```bash
228
+ jettypod work create --from=/tmp/jettypod-create.json
233
229
  ```
234
230
 
235
231
  **Capture the bug ID from output.**
@@ -252,12 +248,12 @@ jettypod ui gate work-created --data='{"id":<bug-id>,"title":"[bug title]"}'
252
248
 
253
249
  ```
254
250
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
255
- Bug Planning Complete
251
+ Bug Planning Complete
256
252
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
257
253
 
258
- 📋 Bug: #<bug-id> [title]
259
- 📍 Root cause: [file:line]
260
- 🔧 Fix approach: [brief summary]
254
+ Bug: #<bug-id> [title]
255
+ Root cause: [file:line]
256
+ Fix approach: [brief summary]
261
257
 
262
258
  Ready to implement the fix?
263
259
  ```
@@ -40,13 +40,14 @@ When this skill is activated, you are executing a standalone chore. The chore-pl
40
40
  | Type | Test Handling | Key Constraint |
41
41
  |------|---------------|----------------|
42
42
  | refactor | Affected tests only | Do NOT modify test assertions |
43
- | dependency | Full test suite | Check for deprecation warnings |
43
+ | dependency | Affected + impacted tests | Check for deprecation warnings |
44
44
  | cleanup | Affected tests | Verify code is actually unused |
45
45
  | tooling | CI/manual verification | Focus on verification over unit tests |
46
+ | enhancement | TDD: write tests first | RED → GREEN → REFACTOR cycle |
46
47
 
47
48
  ---
48
49
 
49
- ## 🚨 SHELL CWD RECOVERY
50
+ ## SHELL CWD RECOVERY
50
51
 
51
52
  **If ALL bash commands start failing with "Error: Exit code 1" and no output:**
52
53
 
@@ -68,11 +69,11 @@ Your shell's working directory was likely inside a worktree that was deleted. Th
68
69
 
69
70
  **Your task:** Acknowledge the context passed from chore-planning.
70
71
 
71
- **🚫 FORBIDDEN: Writing Files at This Step**
72
+ **FORBIDDEN: Writing Files at This Step**
72
73
  ```
73
- Write tool to any path
74
- Edit tool to any path
75
- Any file creation or modification
74
+ Write tool to any path
75
+ Edit tool to any path
76
+ Any file creation or modification
76
77
  ```
77
78
  **This is a CONTEXT step.** File writes happen in Step 5.
78
79
 
@@ -89,7 +90,7 @@ You will receive:
89
90
 
90
91
  ```
91
92
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
92
- 🔧 Chore Mode: [Chore Title]
93
+ Chore Mode: [Chore Title]
93
94
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
94
95
 
95
96
  Type: [TYPE] (confidence: [high/medium/low])
@@ -104,12 +105,12 @@ Implementation Plan:
104
105
 
105
106
  Add this line after Chore ID:
106
107
  ```
107
- Technical Epic Chore - no mode progression
108
+ Technical Epic Chore - no mode progression
108
109
  ```
109
110
 
110
111
  This confirms the chore belongs to a technical epic and will execute directly without any speed→stable→production phases (which is the default for all chores anyway).
111
112
 
112
- **🔄 WORKFLOW INTEGRATION: Start workflow tracking**
113
+ **WORKFLOW INTEGRATION: Start workflow tracking**
113
114
 
114
115
  After receiving context, register this skill execution:
115
116
 
@@ -125,11 +126,11 @@ This validates that `chore_planning_complete` gate is passed (if applicable) and
125
126
 
126
127
  **Your task:** Create an isolated worktree for this chore.
127
128
 
128
- **🚫 FORBIDDEN: Manual Git Worktree Commands**
129
+ **FORBIDDEN: Manual Git Worktree Commands**
129
130
  ```
130
- git worktree add ...
131
- git checkout -b feature/...
132
- git branch feature/...
131
+ git worktree add ...
132
+ git checkout -b feature/...
133
+ git branch feature/...
133
134
  ```
134
135
  **ALWAYS use `jettypod work start`** - it handles branch naming, path conventions, database tracking, and cleanup. Manual git commands will create orphaned worktrees that break the merge workflow.
135
136
 
@@ -139,7 +140,7 @@ jettypod work start [chore-id]
139
140
 
140
141
  This creates a worktree at `.jettypod-work/[id]-[title-slug]` and switches to a new branch.
141
142
 
142
- **🛑 VALIDATION REQUIRED:** After running `work start`, verify the worktree was created:
143
+ **VALIDATION REQUIRED:** After running `work start`, verify the worktree was created:
143
144
 
144
145
  ```bash
145
146
  sqlite3 .jettypod/work.db "SELECT worktree_path FROM worktrees WHERE work_item_id = [chore-id] AND status = 'active'"
@@ -147,20 +148,20 @@ sqlite3 .jettypod/work.db "SELECT worktree_path FROM worktrees WHERE work_item_i
147
148
 
148
149
  | Result | What it means | Action |
149
150
  |--------|---------------|--------|
150
- | **Has a path** | Worktree created successfully | Continue to Step 3 |
151
- | **Empty/no rows** | Worktree creation failed | **STOP - check the error output from `work start` and resolve before continuing** |
151
+ | **Has a path** | Worktree created successfully | Continue to Step 3 |
152
+ | **Empty/no rows** | Worktree creation failed | **STOP - check the error output from `work start` and resolve before continuing** |
152
153
 
153
154
  **Display (on success):**
154
155
 
155
156
  ```
156
- 📁 Worktree created: .jettypod-work/[id]-[title-slug]
157
+ Worktree created: .jettypod-work/[id]-[title-slug]
157
158
  Branch: chore-[id]-[title-slug]
158
159
  ```
159
160
 
160
161
  **Display (on failure):**
161
162
 
162
163
  ```
163
- Worktree creation failed. Check:
164
+ Worktree creation failed. Check:
164
165
  - Are there uncommitted changes? Run: git status
165
166
  - Does the branch already exist? Run: git branch -a | grep [chore-id]
166
167
  - Is there a worktree conflict? Run: git worktree list
@@ -170,7 +171,7 @@ Resolve the issue before continuing.
170
171
 
171
172
  **Move to Step 3 only if worktree was created successfully.**
172
173
 
173
- **🔒 WORKTREE PATH LOCK**
174
+ **WORKTREE PATH LOCK**
174
175
 
175
176
  After worktree validation passes, capture and lock the path:
176
177
  - `WORKTREE_PATH` - the absolute path from the query result
@@ -178,7 +179,7 @@ After worktree validation passes, capture and lock the path:
178
179
  **Display:**
179
180
 
180
181
  ```
181
- 🔒 WORKTREE LOCK ACTIVE
182
+ WORKTREE LOCK ACTIVE
182
183
  Path: ${WORKTREE_PATH}
183
184
 
184
185
  All file writes will use this path.
@@ -196,11 +197,11 @@ jettypod ui gate worktree-started --data='{"path":"${WORKTREE_PATH}"}'
196
197
 
197
198
  **Your task:** Run tests to establish baseline before making changes.
198
199
 
199
- **🚫 FORBIDDEN: Writing Files at This Step**
200
+ **FORBIDDEN: Writing Files at This Step**
200
201
  ```
201
- Write tool to any path
202
- Edit tool to any path
203
- Any file creation or modification
202
+ Write tool to any path
203
+ Edit tool to any path
204
+ Any file creation or modification
204
205
  ```
205
206
  **This is a TESTING step.** File writes happen in Step 5.
206
207
 
@@ -214,8 +215,8 @@ npm test -- [affected-test-patterns]
214
215
 
215
216
  **For DEPENDENCY:**
216
217
  ```bash
217
- # Run full test suite
218
- npm test
218
+ # Run tests for affected and potentially impacted modules
219
+ npm test -- [affected-test-patterns]
219
220
  ```
220
221
 
221
222
  **For CLEANUP:**
@@ -230,21 +231,28 @@ npm test -- [affected-test-patterns]
230
231
  # (may not have unit tests)
231
232
  ```
232
233
 
234
+ **For ENHANCEMENT:**
235
+ ```bash
236
+ # Run existing affected tests to establish baseline (these must keep passing)
237
+ npm test -- [affected-test-patterns]
238
+ # Note: No new tests exist yet - they will be written in Step 5 (TDD RED phase)
239
+ ```
240
+
233
241
  **Display:**
234
242
 
235
243
  ```
236
- 🧪 Establishing test baseline...
244
+ Establishing test baseline...
237
245
 
238
246
  Baseline Result:
239
247
  Tests: [X] passing / [Y] total
240
248
  Execution time: [Z]s
241
249
 
242
- Baseline established - all tests passing
250
+ Baseline established - affected tests passing
243
251
  ```
244
252
 
245
253
  **CRITICAL:** If baseline tests fail, STOP. Fix existing failures before proceeding with chore work.
246
254
 
247
- **🔄 WORKFLOW CHECKPOINT: Test baseline established**
255
+ **WORKFLOW CHECKPOINT: Test baseline established**
248
256
 
249
257
  ```bash
250
258
  jettypod workflow checkpoint <chore-id> --step=3
@@ -256,11 +264,11 @@ jettypod workflow checkpoint <chore-id> --step=3
256
264
 
257
265
  **Your task:** Display warnings and constraints based on chore type.
258
266
 
259
- **🚫 FORBIDDEN: Writing Files at This Step**
267
+ **FORBIDDEN: Writing Files at This Step**
260
268
  ```
261
- Write tool to any path
262
- Edit tool to any path
263
- Any file creation or modification
269
+ Write tool to any path
270
+ Edit tool to any path
271
+ Any file creation or modification
264
272
  ```
265
273
  **This is a GUIDANCE step.** File writes happen in Step 5.
266
274
 
@@ -275,9 +283,9 @@ const guidance = getGuidance('[chore-type]');
275
283
 
276
284
  **For REFACTOR:**
277
285
  ```
278
- ⚠️ REFACTOR CONSTRAINTS:
286
+ REFACTOR CONSTRAINTS:
279
287
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
280
- All existing tests MUST pass WITHOUT modification
288
+ Affected tests MUST pass WITHOUT modification
281
289
  • If tests fail, the refactor broke behavior - FIX THE CODE, not the tests
282
290
  • No new functionality - this is restructuring only
283
291
  • Behavior must be preserved exactly
@@ -285,9 +293,9 @@ const guidance = getGuidance('[chore-type]');
285
293
 
286
294
  **For DEPENDENCY:**
287
295
  ```
288
- ⚠️ DEPENDENCY CONSTRAINTS:
296
+ DEPENDENCY CONSTRAINTS:
289
297
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
290
- • Run FULL test suite to catch regressions
298
+ • Run tests for affected and potentially impacted modules to catch regressions
291
299
  • Check for deprecation warnings after update
292
300
  • Review changelog for breaking changes
293
301
  • Update code if API changed
@@ -295,7 +303,7 @@ const guidance = getGuidance('[chore-type]');
295
303
 
296
304
  **For CLEANUP:**
297
305
  ```
298
- ⚠️ CLEANUP CONSTRAINTS:
306
+ CLEANUP CONSTRAINTS:
299
307
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
300
308
  • VERIFY code is actually unused before deleting
301
309
  • Search for all references (grep for function names)
@@ -305,7 +313,7 @@ const guidance = getGuidance('[chore-type]');
305
313
 
306
314
  **For TOOLING:**
307
315
  ```
308
- ⚠️ TOOLING CONSTRAINTS:
316
+ TOOLING CONSTRAINTS:
309
317
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
310
318
  • Verify via CI run or manual testing
311
319
  • Focus on verification over unit testing
@@ -313,13 +321,28 @@ const guidance = getGuidance('[chore-type]');
313
321
  • Plan rollback strategy
314
322
  ```
315
323
 
324
+ **For ENHANCEMENT:**
325
+ ```
326
+ ENHANCEMENT CONSTRAINTS (TDD):
327
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
328
+ • RED: Write failing tests FIRST that define the new behavior
329
+ • GREEN: Write MINIMUM code to make tests pass
330
+ • REFACTOR: Clean up code while keeping tests green
331
+ • Existing affected tests MUST still pass after implementation
332
+ • Do NOT write implementation before tests
333
+ ```
334
+
316
335
  **Move to Step 5 automatically.**
317
336
 
337
+ ### BDD Step Definition Constraints (ENFORCED)
338
+
339
+ If this chore involves writing step definitions, read `templates/bdd-guidance.md` first. BANNED in step defs: `setTimeout`/`sleep`, module-level `let`/`var`, raw SQL, assertions in Given/When, loops/branching, self-fulfilling mocks (setting state then asserting it). Steps must be 1-5 lines calling one helper via Cucumber World (`this`). Read `features/support/helpers/` and reuse before creating.
340
+
318
341
  ### Step 5: Execute with Iteration
319
342
 
320
- **🔒 WORKTREE PATH REQUIRED:** All file writes MUST use the `WORKTREE_PATH` captured in Step 2.
343
+ **WORKTREE PATH REQUIRED:** All file writes MUST use the `WORKTREE_PATH` captured in Step 2.
321
344
 
322
- **✅ NOW you may write files** - worktree is locked, guidance is displayed.
345
+ **NOW you may write files** - worktree is locked, guidance is displayed.
323
346
 
324
347
  **Emit gate signal:**
325
348
 
@@ -329,13 +352,40 @@ jettypod ui gate implementing --data='{"description":"[chore implementation]","f
329
352
 
330
353
  **Your task:** Make changes and iterate until tests pass. Max 5 iterations.
331
354
 
355
+ **For ENHANCEMENT type, follow TDD cycle instead of the standard iteration:**
356
+
357
+ ```
358
+ ━━━ TDD RED Phase ━━━
359
+ Writing tests that define the new behavior...
360
+ [Write test files that assert expected behavior - these MUST FAIL initially]
361
+
362
+ Running new tests (expecting failures)...
363
+ [Confirm tests fail - this validates the tests are meaningful]
364
+
365
+ ━━━ TDD GREEN Phase ━━━
366
+ Implementing minimum code to pass tests...
367
+ [Write the simplest implementation that makes tests pass]
368
+
369
+ Running tests...
370
+ [Confirm new tests pass + existing affected tests still pass]
371
+
372
+ ━━━ TDD REFACTOR Phase ━━━
373
+ Cleaning up implementation...
374
+ [Refactor for clarity, remove duplication, improve naming]
375
+
376
+ Running tests (confirming still green)...
377
+ [All tests must still pass after refactoring]
378
+ ```
379
+
380
+ **For behavior-preserving types (refactor, dependency, cleanup, tooling), use standard iteration:**
381
+
332
382
  ```
333
383
  ━━━ Iteration [N]/5 ━━━
334
384
 
335
- ✍️ Making changes...
385
+ Making changes...
336
386
  [Describe what you're changing]
337
387
 
338
- 🧪 Running tests...
388
+ Running tests...
339
389
  ```
340
390
 
341
391
  **On each iteration:**
@@ -346,22 +396,22 @@ jettypod ui gate implementing --data='{"description":"[chore implementation]","f
346
396
  **Display progress:**
347
397
 
348
398
  ```
349
- 📊 Progress: [X]/[Y] tests passing
399
+ Progress: [X]/[Y] tests passing
350
400
 
351
- Newly passing:
401
+ Newly passing:
352
402
  • [test name]
353
403
 
354
- Still failing:
404
+ Still failing:
355
405
  • [test name]: [brief error]
356
406
 
357
- 🔧 Next: [what you'll fix]
407
+ Next: [what you'll fix]
358
408
  ```
359
409
 
360
410
  **Exit conditions:**
361
- - All tests pass → Move to Step 6
362
- - Max iterations reached → Display failure, ask user for guidance
411
+ - Affected tests pass → Move to Step 6
412
+ - Max iterations reached → Display failure, ask user for guidance
363
413
 
364
- **🔄 WORKFLOW CHECKPOINT: Execution complete** (when all tests pass)
414
+ **WORKFLOW CHECKPOINT: Execution complete** (when affected tests pass)
365
415
 
366
416
  ```bash
367
417
  jettypod workflow checkpoint <chore-id> --step=5
@@ -370,7 +420,7 @@ jettypod workflow checkpoint <chore-id> --step=5
370
420
  **On max iterations:**
371
421
 
372
422
  ```
373
- ⚠️ Maximum iterations (5) reached
423
+ Maximum iterations (5) reached
374
424
 
375
425
  Final Progress: [X]/[Y] tests passing
376
426
 
@@ -403,17 +453,17 @@ const guidance = getGuidance('[chore-type]');
403
453
 
404
454
  ```
405
455
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
406
- 🔍 Verification Checklist
456
+ Verification Checklist
407
457
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
408
458
 
409
- [✅/❌] All existing tests pass without modification
410
- [✅/❌] No new functionality added
411
- [✅/❌] Code review confirms behavior preservation
412
- [✅/❌] Performance is not degraded
459
+ [/] Affected tests pass without modification
460
+ [/] No new functionality added
461
+ [/] Code review confirms behavior preservation
462
+ [/] Performance is not degraded
413
463
  ```
414
464
 
415
465
  **Verification methods:**
416
- - **Tests pass**: Run `npm test` and check exit code
466
+ - **Tests pass**: Run `npm test -- [affected-test-patterns]` and check exit code
417
467
  - **No new functionality**: Review diff for new features
418
468
  - **Behavior preservation**: Compare before/after behavior
419
469
  - **Performance**: Run benchmarks if applicable
@@ -421,7 +471,7 @@ const guidance = getGuidance('[chore-type]');
421
471
  **If any verification fails:**
422
472
 
423
473
  ```
424
- Verification failed:
474
+ Verification failed:
425
475
  • [failed item]: [reason]
426
476
 
427
477
  Returning to iteration loop...
@@ -429,7 +479,29 @@ Returning to iteration loop...
429
479
 
430
480
  Go back to Step 5 to fix issues.
431
481
 
432
- **If all verification passes → Move to Step 7.**
482
+ **If all verification passes → Move to Step 6B.**
483
+
484
+ ### Step 6B: Prove It Works
485
+
486
+ **Before committing, demonstrate the change works in practice — not just that tests pass.**
487
+
488
+ 1. **Run or build the actual code** — compile, start the server, execute the command, or trigger the relevant workflow
489
+ 2. **Show real output** — display console output, build result, or observable behavior
490
+ 3. **Confirm it matches expectations** — verify the output is what was requested
491
+
492
+ **Display:**
493
+
494
+ ```
495
+ Verifying in practice...
496
+
497
+ [Actual output from running/building the code]
498
+
499
+ Verified: [what was confirmed]
500
+ ```
501
+
502
+ **If the change cannot be run directly** (requires hardware, external service, or manual UI interaction), state what the user should verify manually and why you can't verify it yourself.
503
+
504
+ **Move to Step 7.**
433
505
 
434
506
  ### Step 7: Complete and Merge
435
507
 
@@ -455,6 +527,8 @@ git push
455
527
  jettypod work merge [chore-id]
456
528
  ```
457
529
 
530
+ **If merge fails with `Uncommitted changes detected`:** `git stash` from main repo CWD → create a work item for the stashed changes → `jettypod work start <id>` → `git stash pop` in that worktree → commit → merge → cleanup → then retry your original merge.
531
+
458
532
  ```bash
459
533
  # Step 2: cd to main repo
460
534
  cd /path/to/main/repo
@@ -466,11 +540,26 @@ pwd && ls .jettypod # verify
466
540
  jettypod work cleanup [chore-id]
467
541
  ```
468
542
 
543
+ **Generate QA checklist:**
544
+
545
+ Based on the chore work completed, generate specific QA steps. Write a JSON array to `/tmp/qa-steps.json`:
546
+ ```json
547
+ [
548
+ {"section": "Section Name", "text": "Action to perform and expected result", "detail": "Additional context"},
549
+ ...
550
+ ]
551
+ ```
552
+ Be specific. 3-8 steps covering what was changed and how to verify it works.
553
+
554
+ ```bash
555
+ jettypod work set-qa-steps [chore-id] --from=/tmp/qa-steps.json
556
+ ```
557
+
469
558
  **Display:**
470
559
 
471
560
  ```
472
561
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
473
- Chore Complete
562
+ Chore Complete
474
563
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
475
564
 
476
565
  Type: [TYPE]
@@ -478,15 +567,15 @@ Iterations: [N]/5
478
567
  Tests: [X]/[Y] passing
479
568
 
480
569
  Verification:
481
- All existing tests pass without modification
482
- No new functionality added
483
- Code review confirms behavior preservation
484
- Performance is not degraded
570
+ Affected tests pass without modification
571
+ No new functionality added
572
+ Code review confirms behavior preservation
573
+ Performance is not degraded
485
574
 
486
575
  Merged to main. Chore #[id] marked done.
487
576
  ```
488
577
 
489
- **🔄 WORKFLOW INTEGRATION: Complete workflow**
578
+ **WORKFLOW INTEGRATION: Complete workflow**
490
579
 
491
580
  ```bash
492
581
  jettypod workflow complete chore-mode <chore-id>
@@ -508,7 +597,7 @@ This marks the `chore_mode_complete` gate as passed. The standalone chore is now
508
597
 
509
598
  ### Baseline Tests Fail
510
599
  ```
511
- Cannot proceed - baseline tests failing
600
+ Cannot proceed - baseline tests failing
512
601
 
513
602
  [X] tests failing before chore work started.
514
603
  Fix existing test failures before proceeding.
@@ -520,7 +609,7 @@ Failing tests:
520
609
  ### Verification Loop
521
610
  If verification fails repeatedly (3+ times on same item):
522
611
  ```
523
- ⚠️ Verification stuck on: [item]
612
+ Verification stuck on: [item]
524
613
 
525
614
  This has failed [N] times. Options:
526
615
  1. Review the implementation approach
@@ -530,7 +619,7 @@ This has failed [N] times. Options:
530
619
 
531
620
  ### Worktree Issues
532
621
  ```
533
- Worktree creation failed
622
+ Worktree creation failed
534
623
 
535
624
  Error: [message]
536
625
 
@@ -539,6 +628,13 @@ Try:
539
628
  jettypod work start [chore-id]
540
629
  ```
541
630
 
631
+ ### Stale/Orphaned Worktree
632
+ If a worktree is stuck active (e.g., fix was superseded, merge conflicts with main, or work was abandoned):
633
+ ```bash
634
+ jettypod work cleanup --force <id> # Bypasses merge requirement, prompts for confirmation
635
+ ```
636
+ This checks for unmerged commits and uncommitted changes, warns you, and marks the work item as cancelled.
637
+
542
638
  ---
543
639
 
544
640
  ## Type Reference
@@ -551,7 +647,7 @@ Try:
551
647
 
552
648
  ### DEPENDENCY
553
649
  - **Goal:** Update packages safely
554
- - **Tests:** Full suite
650
+ - **Tests:** Affected + impacted modules
555
651
  - **Key rule:** Check changelogs for breaking changes
556
652
  - **Verification:** Tests pass, no deprecation warnings
557
653
 
@@ -566,3 +662,9 @@ Try:
566
662
  - **Tests:** CI pipeline or manual
567
663
  - **Key rule:** Plan rollback strategy
568
664
  - **Verification:** CI passes, workflows work
665
+
666
+ ### ENHANCEMENT
667
+ - **Goal:** Add new behavior with TDD
668
+ - **Tests:** Write new tests FIRST (TDD), then implement
669
+ - **Key rule:** RED → GREEN → REFACTOR - never implement before tests
670
+ - **Verification:** New tests written and passing, existing tests unbroken