jettypod 4.3.0 → 4.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,255 @@
1
+ /**
2
+ * Type-specific verification runner for chore-mode skill
3
+ * Runs verification checklist from chore taxonomy based on chore type
4
+ */
5
+
6
+ const { getGuidance, CHORE_TYPES } = require('../../../lib/chore-taxonomy');
7
+
8
+ /**
9
+ * Create a verification check result
10
+ *
11
+ * @param {string} description - What is being verified
12
+ * @param {boolean} passed - Whether the check passed
13
+ * @param {string} [details] - Additional details or failure reason
14
+ * @returns {{description: string, passed: boolean, details?: string}}
15
+ */
16
+ function createCheck(description, passed, details = null) {
17
+ const check = { description, passed };
18
+ if (details) check.details = details;
19
+ return check;
20
+ }
21
+
22
+ /**
23
+ * Run all verification checks for a chore type
24
+ *
25
+ * @param {string} type - Chore type (refactor, dependency, cleanup, tooling)
26
+ * @param {object} context - Context about the chore execution
27
+ * @param {object} context.testResult - Test execution result
28
+ * @param {boolean} context.testResult.passed - Whether tests passed
29
+ * @param {number} context.testResult.total - Total tests run
30
+ * @param {boolean} [context.testsModified] - Whether test assertions were changed
31
+ * @param {boolean} [context.newFunctionalityAdded] - Whether new features were added
32
+ * @param {string[]} [context.deprecationWarnings] - Any deprecation warnings found
33
+ * @param {boolean} [context.unusedCodeVerified] - Whether code was verified unused
34
+ * @param {boolean} [context.ciPassed] - Whether CI pipeline passed
35
+ * @returns {{passed: boolean, checks: Array<{description: string, passed: boolean, details?: string}>}}
36
+ */
37
+ function runVerificationChecklist(type, context = {}) {
38
+ const guidance = getGuidance(type);
39
+ const checks = [];
40
+ let allPassed = true;
41
+
42
+ // Run type-specific verification based on taxonomy criteria
43
+ switch (type) {
44
+ case CHORE_TYPES.REFACTOR:
45
+ checks.push(...runRefactorChecks(guidance, context));
46
+ break;
47
+
48
+ case CHORE_TYPES.DEPENDENCY:
49
+ checks.push(...runDependencyChecks(guidance, context));
50
+ break;
51
+
52
+ case CHORE_TYPES.CLEANUP:
53
+ checks.push(...runCleanupChecks(guidance, context));
54
+ break;
55
+
56
+ case CHORE_TYPES.TOOLING:
57
+ checks.push(...runToolingChecks(guidance, context));
58
+ break;
59
+
60
+ default:
61
+ checks.push(createCheck(
62
+ 'Valid chore type',
63
+ false,
64
+ `Unknown type: ${type}`
65
+ ));
66
+ }
67
+
68
+ // Calculate overall pass/fail
69
+ allPassed = checks.every(check => check.passed);
70
+
71
+ return {
72
+ passed: allPassed,
73
+ checks
74
+ };
75
+ }
76
+
77
+ /**
78
+ * Run refactor-specific verification checks
79
+ */
80
+ function runRefactorChecks(guidance, context) {
81
+ const checks = [];
82
+
83
+ // "All existing tests pass without modification"
84
+ checks.push(createCheck(
85
+ 'All existing tests pass without modification',
86
+ context.testResult?.passed === true,
87
+ context.testResult?.passed ? null : 'Tests failed - refactor may have broken behavior'
88
+ ));
89
+
90
+ // Check if tests were modified (should NOT be)
91
+ checks.push(createCheck(
92
+ 'No test assertions modified',
93
+ context.testsModified !== true,
94
+ context.testsModified ? 'Test assertions were changed - this violates refactor rules' : null
95
+ ));
96
+
97
+ // "No new functionality added"
98
+ checks.push(createCheck(
99
+ 'No new functionality added',
100
+ context.newFunctionalityAdded !== true,
101
+ context.newFunctionalityAdded ? 'New functionality detected - this should be a feature, not a refactor' : null
102
+ ));
103
+
104
+ // "Performance is not degraded" - assumed pass unless context indicates otherwise
105
+ checks.push(createCheck(
106
+ 'Performance not degraded',
107
+ context.performanceDegraded !== true,
108
+ context.performanceDegraded ? 'Performance regression detected' : null
109
+ ));
110
+
111
+ return checks;
112
+ }
113
+
114
+ /**
115
+ * Run dependency-specific verification checks
116
+ */
117
+ function runDependencyChecks(guidance, context) {
118
+ const checks = [];
119
+
120
+ // "All tests pass after update"
121
+ checks.push(createCheck(
122
+ 'All tests pass after update',
123
+ context.testResult?.passed === true,
124
+ context.testResult?.passed ? null : 'Tests failed after dependency update'
125
+ ));
126
+
127
+ // "Application builds successfully" - assumed from test pass
128
+ checks.push(createCheck(
129
+ 'Application builds successfully',
130
+ context.buildPassed !== false,
131
+ context.buildPassed === false ? 'Build failed' : null
132
+ ));
133
+
134
+ // "No new deprecation warnings"
135
+ const hasDeprecations = context.deprecationWarnings && context.deprecationWarnings.length > 0;
136
+ checks.push(createCheck(
137
+ 'No new deprecation warnings (or documented)',
138
+ !hasDeprecations || context.deprecationsDocumented === true,
139
+ hasDeprecations && !context.deprecationsDocumented
140
+ ? `Found ${context.deprecationWarnings.length} deprecation warnings`
141
+ : null
142
+ ));
143
+
144
+ return checks;
145
+ }
146
+
147
+ /**
148
+ * Run cleanup-specific verification checks
149
+ */
150
+ function runCleanupChecks(guidance, context) {
151
+ const checks = [];
152
+
153
+ // "All tests still pass"
154
+ checks.push(createCheck(
155
+ 'All tests still pass',
156
+ context.testResult?.passed === true,
157
+ context.testResult?.passed ? null : 'Tests failed after cleanup'
158
+ ));
159
+
160
+ // "No broken imports or references"
161
+ checks.push(createCheck(
162
+ 'No broken imports or references',
163
+ context.brokenReferences !== true,
164
+ context.brokenReferences ? 'Broken references found' : null
165
+ ));
166
+
167
+ // "Removed code was actually unused"
168
+ checks.push(createCheck(
169
+ 'Removed code was verified unused',
170
+ context.unusedCodeVerified === true,
171
+ context.unusedCodeVerified ? null : 'Code usage was not verified before removal'
172
+ ));
173
+
174
+ return checks;
175
+ }
176
+
177
+ /**
178
+ * Run tooling-specific verification checks
179
+ */
180
+ function runToolingChecks(guidance, context) {
181
+ const checks = [];
182
+
183
+ // "CI pipeline passes"
184
+ checks.push(createCheck(
185
+ 'CI pipeline passes',
186
+ context.ciPassed === true,
187
+ context.ciPassed ? null : 'CI not verified or failed'
188
+ ));
189
+
190
+ // "Build completes successfully"
191
+ checks.push(createCheck(
192
+ 'Build completes successfully',
193
+ context.buildPassed !== false,
194
+ context.buildPassed === false ? 'Build failed' : null
195
+ ));
196
+
197
+ // "No regression in build times or developer experience"
198
+ checks.push(createCheck(
199
+ 'No regression in build times/DX',
200
+ context.dxRegression !== true,
201
+ context.dxRegression ? 'Developer experience regression detected' : null
202
+ ));
203
+
204
+ return checks;
205
+ }
206
+
207
+ /**
208
+ * Format verification results for display
209
+ *
210
+ * @param {{passed: boolean, checks: Array}} result - Verification result
211
+ * @returns {string} Formatted string for display
212
+ */
213
+ function formatVerificationResult(result) {
214
+ const lines = [];
215
+ lines.push('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
216
+ lines.push('🔍 Verification Checklist');
217
+ lines.push('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
218
+ lines.push('');
219
+
220
+ for (const check of result.checks) {
221
+ const icon = check.passed ? '✅' : '❌';
222
+ lines.push(`${icon} ${check.description}`);
223
+ if (check.details) {
224
+ lines.push(` └─ ${check.details}`);
225
+ }
226
+ }
227
+
228
+ lines.push('');
229
+ if (result.passed) {
230
+ lines.push('✅ All verification checks passed');
231
+ } else {
232
+ const failedCount = result.checks.filter(c => !c.passed).length;
233
+ lines.push(`❌ ${failedCount} verification check(s) failed`);
234
+ }
235
+
236
+ return lines.join('\n');
237
+ }
238
+
239
+ /**
240
+ * Get verification criteria from taxonomy for display
241
+ *
242
+ * @param {string} type - Chore type
243
+ * @returns {string[]} Array of verification criteria strings
244
+ */
245
+ function getVerificationCriteria(type) {
246
+ const guidance = getGuidance(type);
247
+ return guidance.verification || [];
248
+ }
249
+
250
+ module.exports = {
251
+ runVerificationChecklist,
252
+ formatVerificationResult,
253
+ getVerificationCriteria,
254
+ createCheck
255
+ };
@@ -0,0 +1,229 @@
1
+ ---
2
+ name: chore-planning
3
+ description: Guide standalone chore planning with automatic type classification, taxonomy guidance loading, and routing to chore-mode for execution. Use when user starts a standalone chore (chore with no parent feature), mentions planning a chore, or says "help me with this chore".
4
+ ---
5
+
6
+ # Chore Planning Skill
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.
9
+
10
+ ## Instructions
11
+
12
+ When this skill is activated, you are helping plan a standalone chore (one without a parent feature). Follow this structured approach:
13
+
14
+ ### Step 1: Understand the Chore Context
15
+
16
+ You'll receive context about:
17
+ - Chore title and description
18
+ - Project context
19
+ - No parent feature (standalone chores don't have features)
20
+
21
+ Display:
22
+
23
+ ```
24
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
25
+ 🔧 Planning Standalone Chore
26
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
27
+
28
+ **Chore:** [Title]
29
+ **Description:** [Description if provided]
30
+
31
+ Analyzing chore type...
32
+ ```
33
+
34
+ ### Step 2: Classify Chore Type
35
+
36
+ **CRITICAL:** Use the chore-classifier to determine the chore type automatically.
37
+
38
+ **Execute this code:**
39
+
40
+ ```javascript
41
+ const { classifyChoreType, classifyWithConfidence } = require('./lib/chore-classifier');
42
+
43
+ const choreTitle = '[chore title]';
44
+ const choreDescription = '[chore description or empty string]';
45
+
46
+ const classification = classifyWithConfidence(choreTitle, choreDescription);
47
+ console.log('Classification:', JSON.stringify(classification, null, 2));
48
+ ```
49
+
50
+ Display the classification result:
51
+
52
+ ```
53
+ **Type Classification:** [type] (confidence: [high/medium/low])
54
+ ```
55
+
56
+ **If confidence is low:**
57
+ ```
58
+ ⚠️ Low confidence classification. The chore might be:
59
+ - [type] - because [reason based on keywords found]
60
+ - [alternative type] - if [alternative interpretation]
61
+
62
+ Proceeding with [type]. Let me know if this should be different.
63
+ ```
64
+
65
+ ### Step 3: Load Taxonomy Guidance
66
+
67
+ **Execute this code to load type-specific guidance:**
68
+
69
+ ```javascript
70
+ const { getGuidance } = require('./lib/chore-taxonomy');
71
+
72
+ const guidance = getGuidance('[classified-type]');
73
+ console.log('Guidance:', JSON.stringify(guidance, null, 2));
74
+ ```
75
+
76
+ Display the guidance:
77
+
78
+ ```
79
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
80
+ 📋 [Type] Chore Guidance
81
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
82
+
83
+ **Scope Considerations:**
84
+ [List each scope item from guidance]
85
+
86
+ **Verification Criteria:**
87
+ [List each verification item from guidance]
88
+
89
+ **Test Handling:**
90
+ - Tests required: [yes/no]
91
+ - Approach: [testHandling.approach]
92
+ ```
93
+
94
+ ### Step 4: Build Enriched Context
95
+
96
+ Combine all information into a structured context object:
97
+
98
+ ```javascript
99
+ const choreContext = {
100
+ chore: {
101
+ id: [chore-id],
102
+ title: '[title]',
103
+ description: '[description]',
104
+ type: 'chore',
105
+ parent_id: null // standalone
106
+ },
107
+ classification: {
108
+ type: '[classified-type]',
109
+ confidence: '[high/medium/low]'
110
+ },
111
+ guidance: {
112
+ scope: [...],
113
+ verification: [...],
114
+ testHandling: {
115
+ required: true/false,
116
+ approach: '...'
117
+ }
118
+ }
119
+ };
120
+ ```
121
+
122
+ ### Step 5: Analyze Codebase Impact
123
+
124
+ Based on the chore type and guidance, analyze what needs to be done:
125
+
126
+ **For REFACTOR chores:**
127
+ - Identify the code being restructured
128
+ - Find all callers/dependents
129
+ - List affected test files
130
+
131
+ **For DEPENDENCY chores:**
132
+ - Check current version
133
+ - Review changelog for breaking changes
134
+ - Identify affected code
135
+
136
+ **For CLEANUP chores:**
137
+ - Find all references to code being removed
138
+ - Verify nothing depends on it
139
+ - List files to modify
140
+
141
+ **For TOOLING chores:**
142
+ - Check current tool configuration
143
+ - Identify affected workflows
144
+ - Review CI/CD impacts
145
+
146
+ Display analysis:
147
+
148
+ ```
149
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
150
+ 🔍 Impact Analysis
151
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
152
+
153
+ **Files to modify:**
154
+ [List of files]
155
+
156
+ **Tests to run:**
157
+ [List of test files/patterns]
158
+
159
+ **Verification steps:**
160
+ [Specific steps based on guidance]
161
+ ```
162
+
163
+ ### Step 6: Create Implementation Plan
164
+
165
+ Based on the analysis, create a focused plan:
166
+
167
+ ```
168
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
169
+ 📝 Implementation Plan
170
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
171
+
172
+ **Step 1:** [First action]
173
+ **Step 2:** [Second action]
174
+ ...
175
+
176
+ **Verification:**
177
+ 1. [First check from guidance]
178
+ 2. [Second check from guidance]
179
+ ...
180
+
181
+ Ready to proceed?
182
+ ```
183
+
184
+ ### Step 7: Route to Chore Mode
185
+
186
+ **WAIT for user confirmation.**
187
+
188
+ When user confirms (responds with "yes", "proceed", "let's go", etc.):
189
+
190
+ **Invoke the chore-mode skill using the Skill tool:**
191
+
192
+ ```
193
+ Use the Skill tool with skill: "chore-mode"
194
+ ```
195
+
196
+ The chore-mode skill will:
197
+ 1. Create a worktree for the chore
198
+ 2. Execute the implementation plan
199
+ 3. Run verification steps
200
+ 4. Merge when complete
201
+
202
+ **End chore-planning skill after invoking chore-mode.**
203
+
204
+ ## Key Principles
205
+
206
+ 1. **Automatic classification** - AI determines chore type from title/description
207
+ 2. **Taxonomy-driven guidance** - Load specific guidance for each chore type
208
+ 3. **Context enrichment** - Build complete context before execution
209
+ 4. **Impact analysis** - Understand what the chore affects
210
+ 5. **Verification-focused** - Use type-specific verification criteria
211
+ 6. **Seamless handoff** - Route to chore-mode with full context
212
+
213
+ ## Chore Type Quick Reference
214
+
215
+ | Type | Keywords | Test Handling |
216
+ |------|----------|---------------|
217
+ | refactor | refactor, restructure, extract, rename | Run all tests, don't modify assertions |
218
+ | dependency | update, upgrade, bump, migrate | Run full suite, check for deprecations |
219
+ | cleanup | remove, delete, unused, legacy | Verify no references, run affected tests |
220
+ | tooling | ci, build, lint, config | Run affected pipelines |
221
+
222
+ ## Validation
223
+
224
+ Before routing to chore-mode, ensure:
225
+ - [ ] Chore type classified
226
+ - [ ] Taxonomy guidance loaded
227
+ - [ ] Impact analysis complete
228
+ - [ ] Implementation plan created
229
+ - [ ] User confirmed ready to proceed
@@ -159,13 +159,21 @@ Once features are defined and architectural decision is made (if needed):
159
159
 
160
160
  #### Step 6A: Create Features
161
161
 
162
- Use the Bash tool to create each feature:
162
+ **CRITICAL:** You MUST pass the `--parent=<epic-id>` flag with the actual numeric epic ID. Without this, features won't appear under the epic in the backlog tree.
163
+
164
+ Use the Bash tool to create each feature. Replace `<EPIC_ID>` with the actual epic ID number:
163
165
 
164
166
  ```javascript
165
- // For each feature, use Bash tool to execute:
166
- node jettypod.js work create feature "[Feature 1]" "[Description]" --parent=[epic-id]
167
- node jettypod.js work create feature "[Feature 2]" "[Description]" --parent=[epic-id]
168
- // etc.
167
+ // CORRECT - uses actual numeric epic ID:
168
+ node jettypod.js work create feature "Live cursor tracking" "Track cursor positions in real-time" --parent=5
169
+
170
+ // WRONG - missing parent flag (feature won't be under epic):
171
+ node jettypod.js work create feature "Live cursor tracking" "Track cursor positions in real-time"
172
+ ```
173
+
174
+ For each feature, execute:
175
+ ```bash
176
+ node jettypod.js work create feature "<Title>" "<Description>" --parent=<EPIC_ID>
169
177
  ```
170
178
 
171
179
  Display to user as you create each one: