jettypod 4.4.116 → 4.4.120
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.
- package/.env +7 -0
- package/apps/dashboard/app/api/claude/[workItemId]/message/route.ts +124 -48
- package/apps/dashboard/app/api/claude/[workItemId]/route.ts +171 -58
- package/apps/dashboard/app/api/claude/sessions/[sessionId]/message/route.ts +161 -10
- package/apps/dashboard/app/api/tests/run/stream/route.ts +13 -1
- package/apps/dashboard/app/api/usage/route.ts +17 -0
- package/apps/dashboard/app/api/work/[id]/route.ts +35 -0
- package/apps/dashboard/app/api/work/[id]/status/route.ts +43 -1
- package/apps/dashboard/app/connect-claude/page.tsx +24 -0
- package/apps/dashboard/app/decision/[id]/page.tsx +14 -14
- package/apps/dashboard/app/demo/gates/page.tsx +42 -42
- package/apps/dashboard/app/design-system/page.tsx +868 -0
- package/apps/dashboard/app/globals.css +6 -2
- package/apps/dashboard/app/install-claude/page.tsx +9 -7
- package/apps/dashboard/app/layout.tsx +17 -5
- package/apps/dashboard/app/login/page.tsx +250 -0
- package/apps/dashboard/app/page.tsx +11 -9
- package/apps/dashboard/app/settings/page.tsx +4 -2
- package/apps/dashboard/app/signup/page.tsx +245 -0
- package/apps/dashboard/app/subscribe/page.tsx +11 -0
- package/apps/dashboard/app/welcome/page.tsx +24 -1
- package/apps/dashboard/app/work/[id]/page.tsx +34 -50
- package/apps/dashboard/components/AppShell.tsx +95 -55
- package/apps/dashboard/components/CardMenu.tsx +56 -13
- package/apps/dashboard/components/ClaudePanel.tsx +301 -582
- package/apps/dashboard/components/ClaudePanelInput.tsx +23 -14
- package/apps/dashboard/components/ConnectClaudeScreen.tsx +210 -0
- package/apps/dashboard/components/CopyableId.tsx +3 -3
- package/apps/dashboard/components/DetailReviewActions.tsx +109 -0
- package/apps/dashboard/components/DragContext.tsx +75 -65
- package/apps/dashboard/components/DraggableCard.tsx +6 -46
- package/apps/dashboard/components/DropZone.tsx +2 -2
- package/apps/dashboard/components/EditableDetailDescription.tsx +1 -1
- package/apps/dashboard/components/EditableTitle.tsx +26 -6
- package/apps/dashboard/components/ElapsedTimer.tsx +54 -0
- package/apps/dashboard/components/EpicGroup.tsx +329 -0
- package/apps/dashboard/components/GateCard.tsx +100 -16
- package/apps/dashboard/components/GateChoiceCard.tsx +15 -17
- package/apps/dashboard/components/InstallClaudeScreen.tsx +140 -51
- package/apps/dashboard/components/JettyLoader.tsx +38 -0
- package/apps/dashboard/components/KanbanBoard.tsx +147 -766
- package/apps/dashboard/components/KanbanCard.tsx +506 -0
- package/apps/dashboard/components/LazyMarkdown.tsx +12 -0
- package/apps/dashboard/components/MainNav.tsx +20 -54
- package/apps/dashboard/components/MessageBlock.tsx +391 -0
- package/apps/dashboard/components/ModeStartCard.tsx +15 -15
- package/apps/dashboard/components/OnboardingWelcome.tsx +214 -0
- package/apps/dashboard/components/PlaceholderCard.tsx +11 -21
- package/apps/dashboard/components/ProjectSwitcher.tsx +36 -8
- package/apps/dashboard/components/PrototypeTimeline.tsx +25 -25
- package/apps/dashboard/components/RealTimeKanbanWrapper.tsx +265 -301
- package/apps/dashboard/components/RealTimeTestsWrapper.tsx +97 -74
- package/apps/dashboard/components/ReviewFooter.tsx +141 -0
- package/apps/dashboard/components/SessionList.tsx +19 -18
- package/apps/dashboard/components/SubscribeContent.tsx +206 -0
- package/apps/dashboard/components/TestTree.tsx +15 -14
- package/apps/dashboard/components/TipCard.tsx +177 -0
- package/apps/dashboard/components/Toast.tsx +5 -5
- package/apps/dashboard/components/TypeIcon.tsx +56 -0
- package/apps/dashboard/components/UpgradeBanner.tsx +30 -0
- package/apps/dashboard/components/WaveCompletionAnimation.tsx +61 -62
- package/apps/dashboard/components/WelcomeScreen.tsx +25 -27
- package/apps/dashboard/components/WorkItemHeader.tsx +4 -4
- package/apps/dashboard/components/WorkItemTree.tsx +9 -28
- package/apps/dashboard/components/settings/AccountSection.tsx +169 -0
- package/apps/dashboard/components/settings/EnvVarsSection.tsx +54 -79
- package/apps/dashboard/components/settings/GeneralSection.tsx +26 -31
- package/apps/dashboard/components/settings/SettingsLayout.tsx +4 -4
- package/apps/dashboard/components/ui/Button.tsx +104 -0
- package/apps/dashboard/components/ui/Input.tsx +78 -0
- package/apps/dashboard/contexts/ClaudeSessionContext.tsx +408 -105
- package/apps/dashboard/contexts/ConnectionStatusContext.tsx +25 -4
- package/apps/dashboard/contexts/UsageContext.tsx +155 -0
- package/apps/dashboard/contexts/usageHelpers.js +9 -0
- package/apps/dashboard/electron/ipc-handlers.js +281 -88
- package/apps/dashboard/electron/main.js +691 -131
- package/apps/dashboard/electron/preload.js +25 -4
- package/apps/dashboard/electron/session-manager.js +163 -0
- package/apps/dashboard/electron-builder.config.js +3 -5
- package/apps/dashboard/hooks/useKanbanAnimation.ts +29 -0
- package/apps/dashboard/hooks/useKanbanUndo.ts +83 -0
- package/apps/dashboard/lib/backlog-parser.ts +50 -0
- package/apps/dashboard/lib/claude-process-manager.ts +50 -11
- package/apps/dashboard/lib/constants.ts +43 -0
- package/apps/dashboard/lib/db-bridge.ts +33 -0
- package/apps/dashboard/lib/db.ts +136 -20
- package/apps/dashboard/lib/kanban-utils.ts +70 -0
- package/apps/dashboard/lib/run-migrations.js +27 -2
- package/apps/dashboard/lib/session-state-machine.ts +3 -0
- package/apps/dashboard/lib/session-stream-manager.ts +144 -38
- package/apps/dashboard/lib/shadows.ts +7 -0
- package/apps/dashboard/lib/tests.ts +3 -1
- package/apps/dashboard/lib/utils.ts +6 -0
- package/apps/dashboard/next.config.js +35 -14
- package/apps/dashboard/package.json +6 -3
- package/apps/dashboard/public/bug-icon.svg +9 -0
- package/apps/dashboard/public/buoy-icon.svg +9 -0
- package/apps/dashboard/public/fonts/Satoshi-Variable.woff2 +0 -0
- package/apps/dashboard/public/fonts/Satoshi-VariableItalic.woff2 +0 -0
- package/apps/dashboard/public/in-flight-seagull.svg +9 -0
- package/apps/dashboard/public/jetty-icon-loading-alt.svg +11 -0
- package/apps/dashboard/public/jetty-icon-loading.svg +11 -0
- package/apps/dashboard/public/jettypod_logo.png +0 -0
- package/apps/dashboard/public/pier-icon.svg +14 -0
- package/apps/dashboard/public/star-icon.svg +9 -0
- package/apps/dashboard/public/wrench-icon.svg +9 -0
- package/apps/dashboard/scripts/upload-to-r2.js +89 -0
- package/apps/dashboard/scripts/ws-server.js +191 -0
- package/apps/dashboard/tsconfig.tsbuildinfo +1 -0
- package/apps/update-server/package.json +16 -0
- package/apps/update-server/schema.sql +31 -0
- package/apps/update-server/src/index.ts +1085 -0
- package/apps/update-server/tsconfig.json +16 -0
- package/apps/update-server/wrangler.toml +35 -0
- package/cucumber.js +9 -3
- package/docs/COMMAND_REFERENCE.md +34 -0
- package/hooks/post-checkout +32 -75
- package/hooks/post-merge +111 -10
- package/jest.setup.js +1 -0
- package/jettypod.js +54 -116
- package/lib/chore-taxonomy.js +33 -10
- package/lib/database.js +36 -16
- package/lib/db-watcher.js +1 -1
- package/lib/git-hooks/pre-commit +1 -1
- package/lib/jettypod-backup.js +27 -4
- package/lib/migrations/027-plan-at-creation-column.js +33 -0
- package/lib/migrations/028-ready-for-review-column.js +27 -0
- package/lib/migrations/029-remove-autoincrement.js +307 -0
- package/lib/migrations/029-rename-corrupted-to-cleaned.js +149 -0
- package/lib/migrations/index.js +47 -4
- package/lib/schema.js +13 -6
- package/lib/seed-onboarding.js +101 -69
- package/lib/update-command/index.js +9 -175
- package/lib/work-commands/index.js +129 -16
- package/lib/work-tracking/index.js +86 -46
- package/lib/worktree-diagnostics.js +16 -16
- package/lib/worktree-facade.js +1 -1
- package/lib/worktree-manager.js +8 -8
- package/lib/worktree-reconciler.js +5 -5
- package/package.json +9 -2
- package/scripts/ndjson-to-cucumber-json.js +152 -0
- package/scripts/postinstall.js +25 -0
- package/skills-templates/bug-mode/SKILL.md +39 -28
- package/skills-templates/bug-planning/SKILL.md +25 -29
- package/skills-templates/chore-mode/SKILL.md +131 -68
- package/skills-templates/chore-mode/verification.js +51 -10
- package/skills-templates/chore-planning/SKILL.md +47 -18
- package/skills-templates/epic-planning/SKILL.md +68 -48
- package/skills-templates/external-transition/SKILL.md +47 -47
- package/skills-templates/feature-planning/SKILL.md +83 -73
- package/skills-templates/production-mode/SKILL.md +49 -49
- package/skills-templates/request-routing/SKILL.md +27 -14
- package/skills-templates/simple-improvement/SKILL.md +68 -44
- package/skills-templates/speed-mode/SKILL.md +209 -128
- package/skills-templates/stable-mode/SKILL.md +105 -94
- package/templates/bdd-guidance.md +139 -0
- package/templates/bdd-scaffolding/wait.js +18 -0
- package/templates/bdd-scaffolding/world.js +19 -0
- package/.jettypod-backup/work.db +0 -0
- package/apps/dashboard/app/access-code/page.tsx +0 -110
- package/lib/discovery-checkpoint.js +0 -123
- package/skills-templates/project-discovery/SKILL.md +0 -372
|
@@ -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 |
|
|
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
|
-
##
|
|
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
|
-
|
|
72
|
+
**FORBIDDEN: Writing Files at This Step**
|
|
72
73
|
```
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
129
|
+
**FORBIDDEN: Manual Git Worktree Commands**
|
|
129
130
|
```
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
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** |
|
|
151
|
-
| **Empty/no rows** |
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
200
|
+
**FORBIDDEN: Writing Files at This Step**
|
|
200
201
|
```
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
267
|
+
**FORBIDDEN: Writing Files at This Step**
|
|
260
268
|
```
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
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
|
-
|
|
286
|
+
REFACTOR CONSTRAINTS:
|
|
279
287
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
280
|
-
•
|
|
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
|
-
|
|
296
|
+
DEPENDENCY CONSTRAINTS:
|
|
289
297
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
290
|
-
• Run
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
343
|
+
**WORKTREE PATH REQUIRED:** All file writes MUST use the `WORKTREE_PATH` captured in Step 2.
|
|
321
344
|
|
|
322
|
-
|
|
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
|
-
|
|
385
|
+
Making changes...
|
|
336
386
|
[Describe what you're changing]
|
|
337
387
|
|
|
338
|
-
|
|
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
|
-
|
|
399
|
+
Progress: [X]/[Y] tests passing
|
|
350
400
|
|
|
351
|
-
|
|
401
|
+
Newly passing:
|
|
352
402
|
• [test name]
|
|
353
403
|
|
|
354
|
-
|
|
404
|
+
Still failing:
|
|
355
405
|
• [test name]: [brief error]
|
|
356
406
|
|
|
357
|
-
|
|
407
|
+
Next: [what you'll fix]
|
|
358
408
|
```
|
|
359
409
|
|
|
360
410
|
**Exit conditions:**
|
|
361
|
-
-
|
|
362
|
-
-
|
|
411
|
+
- Affected tests pass → Move to Step 6
|
|
412
|
+
- Max iterations reached → Display failure, ask user for guidance
|
|
363
413
|
|
|
364
|
-
|
|
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
|
-
|
|
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
|
-
|
|
456
|
+
Verification Checklist
|
|
407
457
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
408
458
|
|
|
409
|
-
[
|
|
410
|
-
[
|
|
411
|
-
[
|
|
412
|
-
[
|
|
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
|
-
|
|
474
|
+
Verification failed:
|
|
425
475
|
• [failed item]: [reason]
|
|
426
476
|
|
|
427
477
|
Returning to iteration loop...
|
|
@@ -470,7 +520,7 @@ jettypod work cleanup [chore-id]
|
|
|
470
520
|
|
|
471
521
|
```
|
|
472
522
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
473
|
-
|
|
523
|
+
Chore Complete
|
|
474
524
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
475
525
|
|
|
476
526
|
Type: [TYPE]
|
|
@@ -478,15 +528,15 @@ Iterations: [N]/5
|
|
|
478
528
|
Tests: [X]/[Y] passing
|
|
479
529
|
|
|
480
530
|
Verification:
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
531
|
+
Affected tests pass without modification
|
|
532
|
+
No new functionality added
|
|
533
|
+
Code review confirms behavior preservation
|
|
534
|
+
Performance is not degraded
|
|
485
535
|
|
|
486
536
|
Merged to main. Chore #[id] marked done.
|
|
487
537
|
```
|
|
488
538
|
|
|
489
|
-
|
|
539
|
+
**WORKFLOW INTEGRATION: Complete workflow**
|
|
490
540
|
|
|
491
541
|
```bash
|
|
492
542
|
jettypod workflow complete chore-mode <chore-id>
|
|
@@ -508,7 +558,7 @@ This marks the `chore_mode_complete` gate as passed. The standalone chore is now
|
|
|
508
558
|
|
|
509
559
|
### Baseline Tests Fail
|
|
510
560
|
```
|
|
511
|
-
|
|
561
|
+
Cannot proceed - baseline tests failing
|
|
512
562
|
|
|
513
563
|
[X] tests failing before chore work started.
|
|
514
564
|
Fix existing test failures before proceeding.
|
|
@@ -520,7 +570,7 @@ Failing tests:
|
|
|
520
570
|
### Verification Loop
|
|
521
571
|
If verification fails repeatedly (3+ times on same item):
|
|
522
572
|
```
|
|
523
|
-
|
|
573
|
+
Verification stuck on: [item]
|
|
524
574
|
|
|
525
575
|
This has failed [N] times. Options:
|
|
526
576
|
1. Review the implementation approach
|
|
@@ -530,7 +580,7 @@ This has failed [N] times. Options:
|
|
|
530
580
|
|
|
531
581
|
### Worktree Issues
|
|
532
582
|
```
|
|
533
|
-
|
|
583
|
+
Worktree creation failed
|
|
534
584
|
|
|
535
585
|
Error: [message]
|
|
536
586
|
|
|
@@ -539,6 +589,13 @@ Try:
|
|
|
539
589
|
jettypod work start [chore-id]
|
|
540
590
|
```
|
|
541
591
|
|
|
592
|
+
### Stale/Orphaned Worktree
|
|
593
|
+
If a worktree is stuck active (e.g., fix was superseded, merge conflicts with main, or work was abandoned):
|
|
594
|
+
```bash
|
|
595
|
+
jettypod work cleanup --force <id> # Bypasses merge requirement, prompts for confirmation
|
|
596
|
+
```
|
|
597
|
+
This checks for unmerged commits and uncommitted changes, warns you, and marks the work item as cancelled.
|
|
598
|
+
|
|
542
599
|
---
|
|
543
600
|
|
|
544
601
|
## Type Reference
|
|
@@ -551,7 +608,7 @@ Try:
|
|
|
551
608
|
|
|
552
609
|
### DEPENDENCY
|
|
553
610
|
- **Goal:** Update packages safely
|
|
554
|
-
- **Tests:**
|
|
611
|
+
- **Tests:** Affected + impacted modules
|
|
555
612
|
- **Key rule:** Check changelogs for breaking changes
|
|
556
613
|
- **Verification:** Tests pass, no deprecation warnings
|
|
557
614
|
|
|
@@ -566,3 +623,9 @@ Try:
|
|
|
566
623
|
- **Tests:** CI pipeline or manual
|
|
567
624
|
- **Key rule:** Plan rollback strategy
|
|
568
625
|
- **Verification:** CI passes, workflows work
|
|
626
|
+
|
|
627
|
+
### ENHANCEMENT
|
|
628
|
+
- **Goal:** Add new behavior with TDD
|
|
629
|
+
- **Tests:** Write new tests FIRST (TDD), then implement
|
|
630
|
+
- **Key rule:** RED → GREEN → REFACTOR - never implement before tests
|
|
631
|
+
- **Verification:** New tests written and passing, existing tests unbroken
|
|
@@ -57,6 +57,10 @@ function runVerificationChecklist(type, context = {}) {
|
|
|
57
57
|
checks.push(...runToolingChecks(guidance, context));
|
|
58
58
|
break;
|
|
59
59
|
|
|
60
|
+
case CHORE_TYPES.ENHANCEMENT:
|
|
61
|
+
checks.push(...runEnhancementChecks(guidance, context));
|
|
62
|
+
break;
|
|
63
|
+
|
|
60
64
|
default:
|
|
61
65
|
checks.push(createCheck(
|
|
62
66
|
'Valid chore type',
|
|
@@ -80,9 +84,9 @@ function runVerificationChecklist(type, context = {}) {
|
|
|
80
84
|
function runRefactorChecks(guidance, context) {
|
|
81
85
|
const checks = [];
|
|
82
86
|
|
|
83
|
-
// "
|
|
87
|
+
// "Affected tests pass without modification"
|
|
84
88
|
checks.push(createCheck(
|
|
85
|
-
'
|
|
89
|
+
'Affected tests pass without modification',
|
|
86
90
|
context.testResult?.passed === true,
|
|
87
91
|
context.testResult?.passed ? null : 'Tests failed - refactor may have broken behavior'
|
|
88
92
|
));
|
|
@@ -117,9 +121,9 @@ function runRefactorChecks(guidance, context) {
|
|
|
117
121
|
function runDependencyChecks(guidance, context) {
|
|
118
122
|
const checks = [];
|
|
119
123
|
|
|
120
|
-
// "
|
|
124
|
+
// "Affected tests pass after update"
|
|
121
125
|
checks.push(createCheck(
|
|
122
|
-
'
|
|
126
|
+
'Affected tests pass after update',
|
|
123
127
|
context.testResult?.passed === true,
|
|
124
128
|
context.testResult?.passed ? null : 'Tests failed after dependency update'
|
|
125
129
|
));
|
|
@@ -150,9 +154,9 @@ function runDependencyChecks(guidance, context) {
|
|
|
150
154
|
function runCleanupChecks(guidance, context) {
|
|
151
155
|
const checks = [];
|
|
152
156
|
|
|
153
|
-
// "
|
|
157
|
+
// "Affected tests still pass"
|
|
154
158
|
checks.push(createCheck(
|
|
155
|
-
'
|
|
159
|
+
'Affected tests still pass',
|
|
156
160
|
context.testResult?.passed === true,
|
|
157
161
|
context.testResult?.passed ? null : 'Tests failed after cleanup'
|
|
158
162
|
));
|
|
@@ -204,6 +208,43 @@ function runToolingChecks(guidance, context) {
|
|
|
204
208
|
return checks;
|
|
205
209
|
}
|
|
206
210
|
|
|
211
|
+
/**
|
|
212
|
+
* Run enhancement-specific verification checks (TDD)
|
|
213
|
+
*/
|
|
214
|
+
function runEnhancementChecks(guidance, context) {
|
|
215
|
+
const checks = [];
|
|
216
|
+
|
|
217
|
+
// "New tests written BEFORE implementation (TDD red phase)"
|
|
218
|
+
checks.push(createCheck(
|
|
219
|
+
'New tests written before implementation (TDD red phase)',
|
|
220
|
+
context.newTestsWritten === true,
|
|
221
|
+
context.newTestsWritten ? null : 'No new tests detected - enhancement chores require TDD'
|
|
222
|
+
));
|
|
223
|
+
|
|
224
|
+
// "All new tests pass (TDD green phase)"
|
|
225
|
+
checks.push(createCheck(
|
|
226
|
+
'All new tests pass (TDD green phase)',
|
|
227
|
+
context.testResult?.passed === true,
|
|
228
|
+
context.testResult?.passed ? null : 'New tests failing - implementation incomplete'
|
|
229
|
+
));
|
|
230
|
+
|
|
231
|
+
// "Code is clean and well-structured (TDD refactor phase)"
|
|
232
|
+
checks.push(createCheck(
|
|
233
|
+
'Code is clean and well-structured (TDD refactor phase)',
|
|
234
|
+
context.refactorComplete !== false,
|
|
235
|
+
context.refactorComplete === false ? 'Refactor phase not completed' : null
|
|
236
|
+
));
|
|
237
|
+
|
|
238
|
+
// "Existing affected tests still pass"
|
|
239
|
+
checks.push(createCheck(
|
|
240
|
+
'Existing affected tests still pass',
|
|
241
|
+
context.existingTestsBroken !== true,
|
|
242
|
+
context.existingTestsBroken ? 'Existing tests broken by enhancement' : null
|
|
243
|
+
));
|
|
244
|
+
|
|
245
|
+
return checks;
|
|
246
|
+
}
|
|
247
|
+
|
|
207
248
|
/**
|
|
208
249
|
* Format verification results for display
|
|
209
250
|
*
|
|
@@ -213,12 +254,12 @@ function runToolingChecks(guidance, context) {
|
|
|
213
254
|
function formatVerificationResult(result) {
|
|
214
255
|
const lines = [];
|
|
215
256
|
lines.push('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
216
|
-
lines.push('
|
|
257
|
+
lines.push('Verification Checklist');
|
|
217
258
|
lines.push('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
218
259
|
lines.push('');
|
|
219
260
|
|
|
220
261
|
for (const check of result.checks) {
|
|
221
|
-
const icon = check.passed ? '
|
|
262
|
+
const icon = check.passed ? '[PASS]' : '[FAIL]';
|
|
222
263
|
lines.push(`${icon} ${check.description}`);
|
|
223
264
|
if (check.details) {
|
|
224
265
|
lines.push(` └─ ${check.details}`);
|
|
@@ -227,10 +268,10 @@ function formatVerificationResult(result) {
|
|
|
227
268
|
|
|
228
269
|
lines.push('');
|
|
229
270
|
if (result.passed) {
|
|
230
|
-
lines.push('
|
|
271
|
+
lines.push('All verification checks passed');
|
|
231
272
|
} else {
|
|
232
273
|
const failedCount = result.checks.filter(c => !c.passed).length;
|
|
233
|
-
lines.push(
|
|
274
|
+
lines.push(`${failedCount} verification check(s) failed`);
|
|
234
275
|
}
|
|
235
276
|
|
|
236
277
|
return lines.join('\n');
|