jettypod 4.4.98 → 4.4.100

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.
@@ -59,6 +59,12 @@ if (!checkBranchRestriction()) {
59
59
 
60
60
  // Export database snapshots (runs for all commits where .jettypod exists)
61
61
  async function exportSnapshots() {
62
+ // Skip in worktrees - snapshots only matter for commits on main
63
+ // Worktrees can't git add files from main repo ("outside repository" error)
64
+ if (process.cwd().includes('.jettypod-work')) {
65
+ return;
66
+ }
67
+
62
68
  const jettypodDir = path.join(process.cwd(), '.jettypod');
63
69
  if (!fs.existsSync(jettypodDir)) {
64
70
  return; // No JettyPod directory, skip export
@@ -1508,9 +1508,20 @@ async function mergeWork(options = {}) {
1508
1508
  return Promise.reject(new Error(`Failed to check git status: ${err.message}`));
1509
1509
  }
1510
1510
 
1511
+ // Validate work item type BEFORE git operations
1512
+ // Only chores, bugs, and test worktrees can be merged directly
1513
+ const isTestWorktree = currentBranch.startsWith('tests/');
1514
+ if (!isTestWorktree && !['chore', 'bug'].includes(currentWork.type)) {
1515
+ return Promise.reject(new Error(
1516
+ `Cannot merge ${currentWork.type} #${currentWork.id} directly.\n\n` +
1517
+ `Only chores and bugs can be merged. Features complete when all their chores are done.\n` +
1518
+ `Test worktrees (tests/* branches) merge BDD scenarios without completing the feature.`
1519
+ ));
1520
+ }
1521
+
1511
1522
  console.log(`Merging work item #${currentWork.id}: ${currentWork.title}`);
1512
1523
  console.log(`Branch: ${currentBranch}`);
1513
-
1524
+
1514
1525
  // Step 1: Push feature branch to remote
1515
1526
  // NOTE: Use ['pipe', 'inherit', 'inherit'] instead of 'inherit' to avoid stealing stdin
1516
1527
  // from Claude Code's shell. Using 'inherit' for stdin breaks the shell when run interactively.
@@ -1724,10 +1735,8 @@ async function mergeWork(options = {}) {
1724
1735
 
1725
1736
  console.log(`✓ Successfully merged work item #${currentWork.id}`);
1726
1737
 
1727
- // Check if this is a test worktree (tests/ prefix) - only set scenario_file, don't mark done
1728
- const isTestWorktree = currentBranch.startsWith('tests/');
1729
-
1730
1738
  // Get worktree info from database (needed for cleanup message)
1739
+ // Note: isTestWorktree was already set before git operations for early validation
1731
1740
  const worktree = await new Promise((resolve, reject) => {
1732
1741
  db.get(
1733
1742
  `SELECT id, worktree_path, branch_name FROM worktrees WHERE work_item_id = ? AND status = 'active'`,
@@ -1775,16 +1784,17 @@ async function mergeWork(options = {}) {
1775
1784
 
1776
1785
  console.log(`✅ BDD tests merged for feature #${currentWork.id}`);
1777
1786
  console.log(' Feature remains in discovery phase - create chores to continue');
1778
- } else if (currentWork.type !== 'chore') {
1779
- // Non-test branch for a non-chore - this shouldn't happen
1787
+ } else if (!['chore', 'bug'].includes(currentWork.type)) {
1788
+ // Non-test branch for a non-mergeable type - should have been caught by early validation
1789
+ // but kept as defensive check
1780
1790
  return Promise.reject(new Error(
1781
1791
  `Cannot merge ${currentWork.type} #${currentWork.id} directly.\n\n` +
1782
- `Only chores can be merged. Features complete when all their chores are done.\n` +
1792
+ `Only chores and bugs can be merged. Features complete when all their chores are done.\n` +
1783
1793
  `Test worktrees (tests/* branches) merge BDD scenarios without completing the feature.`
1784
1794
  ));
1785
1795
  } else {
1786
- // Chore worktree: mark as done (existing behavior)
1787
- console.log('Marking chore as done...');
1796
+ // Chore or bug worktree: mark as done
1797
+ console.log(`Marking ${currentWork.type} as done...`);
1788
1798
  const completedAt = new Date().toISOString();
1789
1799
  await new Promise((resolve, reject) => {
1790
1800
  db.run(
@@ -1796,7 +1806,7 @@ async function mergeWork(options = {}) {
1796
1806
  }
1797
1807
  );
1798
1808
  });
1799
- console.log(`✅ Chore #${currentWork.id} marked as done`);
1809
+ console.log(`✅ ${currentWork.type.charAt(0).toUpperCase() + currentWork.type.slice(1)} #${currentWork.id} marked as done`);
1800
1810
  }
1801
1811
 
1802
1812
  // Mark worktree as merged but DON'T delete it yet
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jettypod",
3
- "version": "4.4.98",
3
+ "version": "4.4.100",
4
4
  "description": "AI-powered development workflow manager with TDD, BDD, and automatic test generation",
5
5
  "main": "jettypod.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: chore-mode
3
- description: Guide implementation of standalone chores with type-appropriate guidance, verification steps, and test handling. Receives enriched context from chore-planning and executes with iteration until verification passes.
3
+ description: Guide implementation of standalone chores with type-appropriate guidance, verification steps, and test handling. Receives enriched context from chore-planning and executes with iteration until verification passes. For chores under technical epics, receives context indicating no mode progression needed (already the default for all chores).
4
4
  ---
5
5
 
6
6
  # Chore Mode Skill
@@ -33,6 +33,7 @@ When this skill is activated, you are executing a standalone chore. The chore-pl
33
33
  - **Guided verification** - Use taxonomy verification checklist, not arbitrary checks
34
34
  - **Iteration with limits** - Max 5 iterations to achieve verification
35
35
  - **No mode progression** - Chores don't have speed/stable/production phases
36
+ - **Technical epic awareness** - Acknowledge when a chore belongs to a technical epic (display indicator, confirm no mode progression)
36
37
 
37
38
  **Chore Types Quick Reference:**
38
39
 
@@ -80,6 +81,9 @@ You will receive:
80
81
  - `choreContext.classification` - Type and confidence
81
82
  - `choreContext.guidance` - Scope, verification, testHandling from taxonomy
82
83
  - `choreContext.implementationPlan` - Files to modify, affected tests
84
+ - `choreContext.technicalEpic` - (optional) Technical epic context:
85
+ - `isTechnicalEpic: true/false` - Whether this chore belongs to a technical epic
86
+ - `skipModeProgression: true/false` - Whether to skip mode progression (always true for chores)
83
87
 
84
88
  **Display:**
85
89
 
@@ -96,6 +100,15 @@ Implementation Plan:
96
100
  • Affected tests: [list from context]
97
101
  ```
98
102
 
103
+ **If `technicalEpic.isTechnicalEpic = true`:**
104
+
105
+ Add this line after Chore ID:
106
+ ```
107
+ ⚡ Technical Epic Chore - no mode progression
108
+ ```
109
+
110
+ 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
+
99
112
  **🔄 WORKFLOW INTEGRATION: Start workflow tracking**
100
113
 
101
114
  After receiving context, register this skill execution:
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: chore-planning
3
- description: Guide standalone chore planning with automatic type classification and routing to chore-mode. Invoked by request-routing for substantial technical work - refactoring, infrastructure, migrations, or enhancements where the implementation approach is obvious. (project)
3
+ description: Guide standalone chore planning with automatic type classification and routing to chore-mode. Invoked by request-routing for substantial technical work - refactoring, infrastructure, migrations, or enhancements where the implementation approach is obvious. For chores under technical epics, detects ancestry and passes context to chore-mode indicating no mode progression needed. (project)
4
4
  ---
5
5
 
6
6
  # Chore Planning Skill
7
7
 
8
- Guides Claude through standalone chore planning including automatic type classification, loading type-specific guidance from the taxonomy, building enriched context, and routing to chore-mode for execution.
8
+ Guides Claude through standalone chore planning including automatic type classification, loading type-specific guidance from the taxonomy, building enriched context, and routing to chore-mode for execution. For chores under **technical epics**, detects this ancestry and passes context to skip mode progression.
9
9
 
10
10
  ## Instructions
11
11
 
@@ -18,6 +18,22 @@ You'll receive context about:
18
18
  - Project context
19
19
  - No parent feature (standalone chores don't have features)
20
20
 
21
+ **⚡ FIRST: Detect Technical Epic Ancestry**
22
+
23
+ Check if this chore belongs to a **technical epic** (an epic that creates chores directly without features):
24
+
25
+ 1. Check if the chore has a parent epic (not a feature)
26
+ 2. If it has a parent epic, check if that epic was created as a technical epic (detected by epic-planning based on refactor/migrate/infrastructure signals)
27
+
28
+ **If chore belongs to a technical epic:**
29
+ - Set `IS_TECHNICAL_EPIC = true`
30
+ - Display: `⚡ Technical Epic Chore - no mode progression`
31
+ - This context will be passed to chore-mode
32
+
33
+ **If chore is standalone or under a regular epic:**
34
+ - Set `IS_TECHNICAL_EPIC = false`
35
+ - Proceed with normal flow
36
+
21
37
  Display:
22
38
 
23
39
  ```
@@ -180,12 +196,16 @@ const choreContext = {
180
196
  title: '[title]',
181
197
  description: '[description]',
182
198
  type: 'chore',
183
- parent_id: null // standalone
199
+ parent_id: null // standalone, or epic_id if under technical epic
184
200
  },
185
201
  classification: {
186
202
  type: '[classified-type]',
187
203
  confidence: '[high/medium/low]'
188
204
  },
205
+ technicalEpic: {
206
+ isTechnicalEpic: true/false, // from Step 1 detection
207
+ skipModeProgression: true/false // same as isTechnicalEpic
208
+ },
189
209
  guidance: {
190
210
  scope: [...],
191
211
  verification: [...],
@@ -197,6 +217,8 @@ const choreContext = {
197
217
  };
198
218
  ```
199
219
 
220
+ **Note:** If `technicalEpic.isTechnicalEpic = true`, chore-mode will skip mode progression (no speed→stable→production phases).
221
+
200
222
  ### Step 5: Analyze Codebase Impact
201
223
 
202
224
  Based on the chore type and guidance, analyze what needs to be done:
@@ -271,6 +293,15 @@ When user confirms (responds with "yes", "proceed", "let's go", etc.):
271
293
  Use the Skill tool with skill: "chore-mode"
272
294
  ```
273
295
 
296
+ **Pass the technical epic context** in the skill arguments so chore-mode knows whether to skip mode progression:
297
+
298
+ ```
299
+ Arguments should include:
300
+ - choreContext (from Step 4)
301
+ - technicalEpic.isTechnicalEpic = true/false
302
+ - technicalEpic.skipModeProgression = true/false
303
+ ```
304
+
274
305
  The chore-mode skill will:
275
306
  1. Create a worktree for the chore
276
307
  2. Execute the implementation plan
@@ -297,6 +328,7 @@ This marks the `chore_planning_complete` gate as passed, enabling chore-mode to
297
328
  4. **Impact analysis** - Understand what the chore affects
298
329
  5. **Verification-focused** - Use type-specific verification criteria
299
330
  6. **Seamless handoff** - Route to chore-mode with full context
331
+ 7. **Technical epic awareness** - Detect when a chore belongs to a technical epic and pass this context to chore-mode so it skips mode progression (no speed→stable→production phases)
300
332
 
301
333
  ## Chore Type Quick Reference
302
334
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: epic-planning
3
- description: Guide epic planning with feature brainstorming and optional architectural decision prototyping. Invoked by request-routing for large multi-feature initiatives that need to be broken down into features. (project)
3
+ description: Guide epic planning with feature brainstorming and optional architectural decision prototyping. Invoked by request-routing for large multi-feature initiatives that need to be broken down into features. For technical epics (refactors, migrations, infrastructure), creates chores directly without features or mode progression. (project)
4
4
  ---
5
5
 
6
6
  # Epic Planning Skill
7
7
 
8
- Guides Claude through comprehensive epic planning including feature identification and architectural decisions.
8
+ Guides Claude through comprehensive epic planning including feature identification and architectural decisions. For **technical epics**, skips feature brainstorming and creates chores directly.
9
9
 
10
10
  ## Instructions
11
11
 
@@ -17,6 +17,30 @@ When this skill is activated, you are helping plan an epic. Follow this structur
17
17
 
18
18
  ---
19
19
 
20
+ **⚡ FIRST: Detect Technical Epic**
21
+
22
+ Before proceeding, check if this is a **technical epic** by looking for these signals in the request or context passed from request-routing:
23
+
24
+ | Technical Epic Signals |
25
+ |------------------------|
26
+ | refactor, migrate, infrastructure, technical debt |
27
+ | + epic-scale words: "across all", "major", "entire", "large" |
28
+ | No user-facing features mentioned |
29
+ | Pure technical/engineering work |
30
+
31
+ **If technical epic detected:**
32
+ - Set `IS_TECHNICAL_EPIC = true`
33
+ - Skip UX-focused questions in Scenario B
34
+ - Will use Step 3B (Brainstorm Chores) instead of Step 3 (Brainstorm Features)
35
+ - Will skip Steps 4-5 (Architectural Decision) - not needed for technical work
36
+ - Will create chores in Step 6 instead of features
37
+
38
+ **If NOT a technical epic:**
39
+ - Set `IS_TECHNICAL_EPIC = false`
40
+ - Follow normal feature-based flow
41
+
42
+ ---
43
+
20
44
  **Scenario A: Epic ID provided** (e.g., "plan epic #5", "help me with epic 42")
21
45
 
22
46
  Run this command to get epic context:
@@ -42,7 +66,28 @@ Proceed to Step 2.
42
66
 
43
67
  **Scenario B: Just an idea** (e.g., "I want to add real-time collab", "plan an epic for auth")
44
68
 
45
- User has only provided a sentence or vague concept. **DO NOT suggest features yet.**
69
+ User has only provided a sentence or vague concept. **DO NOT suggest features/chores yet.**
70
+
71
+ **If `IS_TECHNICAL_EPIC = true`:**
72
+
73
+ Gather technical context. Ask 2-3 of the most relevant questions from:
74
+
75
+ ```
76
+ I'd like to understand this technical epic better before suggesting chores.
77
+
78
+ **Scope:**
79
+ - What's the scope? (which modules/areas are affected?)
80
+ - What's the end state? (what does "done" look like?)
81
+
82
+ **Constraints:**
83
+ - Any ordering dependencies? (must do X before Y?)
84
+ - Any patterns to follow? (existing conventions, migration guides)
85
+
86
+ **Verification:**
87
+ - How will we know it's complete? (tests pass, no warnings, etc.)
88
+ ```
89
+
90
+ **If `IS_TECHNICAL_EPIC = false`:**
46
91
 
47
92
  Gather context first. Ask 2-4 of the most relevant questions from:
48
93
 
@@ -81,7 +126,9 @@ jettypod workflow start epic-planning <epic-id>
81
126
 
82
127
  This creates an execution record for session resume.
83
128
 
84
- Proceed to Step 3 (skip Step 2 since nothing exists yet).
129
+ Proceed to Step 2 if epic already exists, or:
130
+ - **If `IS_TECHNICAL_EPIC = true`:** Proceed to Step 3B (Brainstorm Chores)
131
+ - **If `IS_TECHNICAL_EPIC = false`:** Proceed to Step 3 (Brainstorm Features)
85
132
 
86
133
  ### Step 2: Check Existing State
87
134
 
@@ -102,9 +149,11 @@ Based on results, follow the appropriate path:
102
149
 
103
150
  ---
104
151
 
105
- **Path A: Nothing exists (no decisions AND no features)**
152
+ **Path A: Nothing exists (no decisions AND no features/chores)**
106
153
 
107
- Fresh start. Proceed to Step 3 (Brainstorm Features).
154
+ Fresh start.
155
+ - **If `IS_TECHNICAL_EPIC = true`:** Proceed to Step 3B (Brainstorm Chores)
156
+ - **If `IS_TECHNICAL_EPIC = false`:** Proceed to Step 3 (Brainstorm Features)
108
157
 
109
158
  ---
110
159
 
@@ -174,8 +223,37 @@ What features should we include? What am I missing?
174
223
 
175
224
  When user confirms features (says "looks good", "yes", lists modifications, etc.), finalize the feature list and proceed to Step 4.
176
225
 
226
+ ### Step 3B: Brainstorm Chores (Technical Epic)
227
+
228
+ **Only used when `IS_TECHNICAL_EPIC = true`**
229
+
230
+ Based on the technical epic's purpose, suggest chores that accomplish the work:
231
+
232
+ ```
233
+ I'll help you plan the chores for this technical epic.
234
+
235
+ Based on [epic name], here are the chores I recommend:
236
+
237
+ **Chore 1: [Name]** - [Brief description of technical work]
238
+ **Chore 2: [Name]** - [Brief description]
239
+ **Chore 3: [Name]** - [Brief description]
240
+ ...
241
+
242
+ **Ordering notes:**
243
+ - [Any dependencies between chores]
244
+ - [Suggested sequence if applicable]
245
+
246
+ What chores should we include? What am I missing?
247
+ ```
248
+
249
+ **WAIT for user response.**
250
+
251
+ When user confirms chores (says "looks good", "yes", lists modifications, etc.), finalize the chore list and **skip directly to Step 6** (no architectural decision needed for technical epics).
252
+
177
253
  ### Step 4: Architectural Decision (Optional)
178
254
 
255
+ **⚠️ SKIP THIS STEP if `IS_TECHNICAL_EPIC = true`** - Technical epics don't need architectural decisions. Go directly to Step 6.
256
+
179
257
  After features are defined, ask if this epic needs a shared technical approach.
180
258
 
181
259
  **Say to user:**
@@ -287,7 +365,7 @@ Set `ARCH_DECISION_MADE = false` and proceed directly to Step 6.
287
365
 
288
366
  ---
289
367
 
290
- ### Step 6: Create Features
368
+ ### Step 6: Create Features or Chores
291
369
 
292
370
  **CRITICAL: Execute these commands with the Bash tool. Do NOT just display them.**
293
371
 
@@ -296,7 +374,31 @@ Set `ARCH_DECISION_MADE = false` and proceed directly to Step 6.
296
374
  jettypod backlog
297
375
  ```
298
376
 
299
- #### Step 6A: Create Each Feature
377
+ ---
378
+
379
+ #### Step 6A: Create Items (Features OR Chores)
380
+
381
+ **If `IS_TECHNICAL_EPIC = true`:** Create chores
382
+
383
+ For each chore the user agreed on, execute this command:
384
+
385
+ ```bash
386
+ jettypod work create chore "${CHORE_TITLE}" "${CHORE_DESCRIPTION}" --parent=${EPIC_ID}
387
+ ```
388
+
389
+ **Example** (if epic ID is 5):
390
+ ```bash
391
+ jettypod work create chore "Migrate auth module to ESM" "Convert require() to import in auth/" --parent=5
392
+ ```
393
+
394
+ After each successful creation, tell the user:
395
+ > ✅ Created Chore #[id from output]: [title]
396
+
397
+ **Then skip to Step 7** (no architectural decision for technical epics).
398
+
399
+ ---
400
+
401
+ **If `IS_TECHNICAL_EPIC = false`:** Create features
300
402
 
301
403
  For each feature the user agreed on, execute this command using the epic ID from Step 1:
302
404
 
@@ -387,6 +489,11 @@ Based on user response:
387
489
  **If user confirms (says "yes", "let's go", "proceed", etc.):**
388
490
 
389
491
  Determine the skill to invoke based on item type:
492
+
493
+ **If `IS_TECHNICAL_EPIC = true`:**
494
+ - **All items are chores** → always invoke `chore-planning`
495
+
496
+ **If `IS_TECHNICAL_EPIC = false`:**
390
497
  - **Feature** → invoke `feature-planning`
391
498
  - **Chore** → invoke `chore-planning`
392
499
 
@@ -453,7 +560,7 @@ This marks the `epic_planning_complete` gate as passed. Features created under t
453
560
 
454
561
  ## Key Principles
455
562
 
456
- 1. **Feature brainstorming is always required** - Don't skip this even if architectural decision is clear
563
+ 1. **Feature brainstorming is always required** - Don't skip this even if architectural decision is clear (for regular epics)
457
564
  2. **Architectural decision is optional** - Not all epics need one (e.g., "Q1 Goals" is just grouping)
458
565
  3. **Always suggest exactly 3 options** when architectural decision needed - Simple/Conservative, Balanced, Advanced
459
566
  4. **Be specific about features** - Each feature should be user-facing capability
@@ -461,6 +568,7 @@ This marks the `epic_planning_complete` gate as passed. Features created under t
461
568
  6. **Route to next skill** - After creating items, recommend one and invoke the appropriate planning skill
462
569
  7. **Use jettypod commands** - Create features using jettypod CLI, record decisions with epic-implement
463
570
  8. **Skill handoff** - Invoke `feature-planning` for features, `chore-planning` for chores
571
+ 9. **Technical epics are different** - They create chores directly (no features), skip architectural decisions, and always route to `chore-planning`. Chores under technical epics don't use mode progression (no speed→stable→production).
464
572
 
465
573
  ## Example: Epic with Architectural Decision
466
574
 
@@ -519,6 +627,37 @@ Epic: "User Management"
519
627
 
520
628
  **Architectural decision:** None needed - these are independent features using existing auth system
521
629
 
630
+ ## Example: Technical Epic (Chores Only)
631
+
632
+ Epic: "Migrate Codebase from CommonJS to ESM"
633
+
634
+ **Detection:** `IS_TECHNICAL_EPIC = true` (signals: "migrate", "codebase", no user-facing features)
635
+
636
+ **Context questions asked:**
637
+ - What's the scope? → "All JavaScript files in src/ and lib/"
638
+ - What's the end state? → "All files use import/export, package.json has type:module"
639
+ - Any ordering dependencies? → "Start with leaf modules, work up to entry points"
640
+
641
+ **Chores brainstormed:**
642
+ - Migrate utility modules (src/utils/)
643
+ - Migrate lib/ modules
644
+ - Migrate core business logic
645
+ - Update build configuration
646
+ - Update test configuration
647
+
648
+ **Architectural decision:** Skipped (not needed for technical work)
649
+
650
+ **Commands run:**
651
+ ```bash
652
+ jettypod work create chore "Migrate utility modules" "Convert src/utils/ from require() to import" --parent=42
653
+ jettypod work create chore "Migrate lib modules" "Convert lib/ from require() to import" --parent=42
654
+ jettypod work create chore "Migrate core business logic" "Convert src/core/ from require() to import" --parent=42
655
+ jettypod work create chore "Update build configuration" "Update webpack/rollup for ESM output" --parent=42
656
+ jettypod work create chore "Update test configuration" "Update Jest config for ESM" --parent=42
657
+ ```
658
+
659
+ **Routing:** All chores route to `chore-planning` → `chore-mode` (no mode progression)
660
+
522
661
  ## Validation
523
662
 
524
663
  Before completing epic planning, ensure:
@@ -13,16 +13,20 @@ When this skill is activated, you are helping discover the best approach for a f
13
13
 
14
14
  ## 🔑 Critical Command Distinction
15
15
 
16
- **Four different commands, four different purposes:**
16
+ **Six commands in workflow order:**
17
17
 
18
18
  | Command | Used For | When | Phase |
19
19
  |---------|----------|------|-------|
20
+ | `work prototype start <feature-id> [approach]` | Create worktree for UX prototyping | After UX approaches proposed (Step 4) | Feature Planning |
21
+ | `work prototype merge <feature-id>` | Merge prototype to main | After user tests prototype (Step 4) | Feature Planning |
20
22
  | `work tests start <feature-id>` | Create worktree for test authoring | After Integration Contract (Step 7) | Feature Planning |
21
- | `work tests merge` → `cd` → `work cleanup` | Merge tests to main, then cleanup worktree | After chores created (Step 12) | Feature Planning |
22
23
  | `work implement <feature-id>` | Transition feature to implementation phase | After chores created (Step 11) | Feature Planning |
24
+ | `work tests merge` → `cd` → `work cleanup` | Merge tests to main, then cleanup worktree | After transition (Step 12) | Feature Planning |
23
25
  | `work start <chore-id>` | Start implementing a specific chore | After tests merged (Step 13) | Speed Mode |
24
26
 
25
27
  **CRITICAL:** All commands are run by **Claude**, not the user. The distinction is:
28
+ - `work prototype start` = Creates isolated worktree for UX prototyping (Step 4, optional)
29
+ - `work prototype merge` = Land prototype files on main (Step 4)
26
30
  - `work tests start` = Creates isolated worktree for BDD test authoring (Step 7)
27
31
  - `work implement` = Ends feature planning, transitions to implementation phase
28
32
  - `work tests merge` = Land BDD tests on main
@@ -31,6 +31,7 @@ From the user's request, identify work type and complexity signals:
31
31
  | Signal Words | Likely Route |
32
32
  |--------------|--------------|
33
33
  | fix, bug, broken, crash, error, not working, regression | bug-planning |
34
+ | (refactor, migrate, infrastructure, technical debt) + (epic, large, across, all, major) | epic-planning (technical) |
34
35
  | refactor, rename, move, clean up, upgrade, migrate, infrastructure | chore-planning |
35
36
  | add, build, create, implement, new feature, capability, workflow | feature-planning |
36
37
  | epic, initiative, project, roadmap, multi-feature | epic-planning |
@@ -79,6 +80,12 @@ Contains bug/fix/broken/error signals?
79
80
  ├─► Yes → bug-planning
80
81
 
81
82
 
83
+ Is this a large TECHNICAL initiative?
84
+ (Refactor/migrate/infrastructure + epic-scale: "across all", "major", "entire")
85
+ ├─► Yes → epic-planning (technical)
86
+ │ (Creates chores directly, no features, no mode progression)
87
+
88
+
82
89
  Describes large multi-feature initiative?
83
90
  ├─► Yes → epic-planning
84
91
 
@@ -109,6 +116,7 @@ Is this truly atomic?
109
116
  | Route | When to Use | Progression |
110
117
  |-------|-------------|-------------|
111
118
  | **bug-planning** | Something is broken/not working as expected | Investigation → fix |
119
+ | **epic-planning (technical)** | Large technical initiative (refactor, migration, infrastructure) with no user-facing features | Break down → chores directly (no features, no modes) |
112
120
  | **epic-planning** | Large initiative spanning multiple features | Break down → plan features |
113
121
  | **feature-planning** | New behavior needing UX exploration OR has edge cases worth sequencing | UX exploration → BDD → speed → stable → production |
114
122
  | **chore-planning** | Substantial technical work, clear implementation | speed → stable → production |
@@ -121,11 +129,21 @@ Is this truly atomic?
121
129
  - "Getting a crash when I save"
122
130
  - "Users are seeing a 500 error"
123
131
 
132
+ **→ epic-planning (technical)**
133
+ - "Migrate the entire codebase from CommonJS to ESM"
134
+ - "Refactor authentication across all modules"
135
+ - "Major infrastructure overhaul for the API layer"
136
+ - "Technical debt cleanup across the whole project"
137
+
138
+ *(Technical work at epic scale - no user-facing features, just chores)*
139
+
124
140
  **→ epic-planning**
125
141
  - "We need a full authentication system"
126
142
  - "Build out the reporting dashboard"
127
143
  - "Plan the v2 API migration"
128
144
 
145
+ *(User-facing initiatives with multiple features)*
146
+
129
147
  **→ feature-planning**
130
148
  - "Add drag-and-drop reordering for cards"
131
149
  - "Implement user notifications"
@@ -166,6 +184,12 @@ Sounds like a bug - [X] isn't working as expected. Let me help you investigate.
166
184
  ```
167
185
  Then invoke bug-planning skill.
168
186
 
187
+ **Technical Epic:**
188
+ ```
189
+ This is a large technical initiative - no user-facing features, just coordinated technical work. Let's break it down into chores.
190
+ ```
191
+ Then invoke epic-planning skill with context indicating technical epic.
192
+
169
193
  **Epic:**
170
194
  ```
171
195
  This is a larger initiative with multiple features. Let's break it down.
@@ -192,10 +192,34 @@ Do NOT proceed to Step 3 until chore is successfully created.
192
192
  jettypod work start <chore-id>
193
193
  ```
194
194
 
195
+ **🛑 STOP AND CHECK:** Verify worktree was created successfully before proceeding.
196
+
197
+ ```bash
198
+ sqlite3 .jettypod/work.db "SELECT worktree_path FROM worktrees WHERE work_item_id = <chore-id> AND status = 'active'"
199
+ ```
200
+
201
+ **If empty or error:** Stop and investigate. Do NOT proceed without a valid worktree.
202
+
203
+ **Capture the worktree path:**
204
+ - `WORKTREE_PATH` - the absolute path from the query result (e.g., `/path/to/.jettypod-work/42-fix-button-text`)
205
+
206
+ **Display confirmation:**
207
+
208
+ ```
209
+ 📁 Worktree created: ${WORKTREE_PATH}
210
+
211
+ From this point forward, ALL file operations MUST use paths starting with:
212
+ ${WORKTREE_PATH}/
213
+ ```
214
+
215
+ **🔒 WORKTREE PATH LOCK:** Store `WORKTREE_PATH` - all file operations in this skill MUST use this path prefix.
216
+
217
+ ---
218
+
195
219
  **Then implement the change directly:**
196
220
 
197
- 1. Read the file(s) that need modification
198
- 2. Make the specific change requested
221
+ 1. Read the file(s) that need modification (using `${WORKTREE_PATH}/...`)
222
+ 2. Make the specific change requested (using `${WORKTREE_PATH}/...`)
199
223
  3. Verify the change looks correct
200
224
 
201
225
  **Display progress:**
@@ -203,7 +227,7 @@ jettypod work start <chore-id>
203
227
  ```
204
228
  📝 Implementing change...
205
229
 
206
- Modified: [file path]
230
+ Modified: ${WORKTREE_PATH}/[relative path]
207
231
  Change: [what was changed]
208
232
 
209
233
  Verifying...
@@ -224,9 +248,11 @@ Verifying...
224
248
 
225
249
  **If verification passes:**
226
250
 
251
+ **🔒 WORKTREE PATH REQUIRED:** Use the `WORKTREE_PATH` captured in Step 3.
252
+
227
253
  ```bash
228
254
  # Commit the change
229
- cd <worktree-path>
255
+ cd ${WORKTREE_PATH}
230
256
  git add .
231
257
  git commit -m "fix: [brief description]
232
258