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
@@ -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
- // "All existing tests pass without modification"
87
+ // "Affected tests pass without modification"
84
88
  checks.push(createCheck(
85
- 'All existing tests pass without modification',
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
- // "All tests pass after update"
124
+ // "Affected tests pass after update"
121
125
  checks.push(createCheck(
122
- 'All tests pass after update',
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
- // "All tests still pass"
157
+ // "Affected tests still pass"
154
158
  checks.push(createCheck(
155
- 'All tests still pass',
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('🔍 Verification Checklist');
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('All verification checks passed');
271
+ lines.push('All verification checks passed');
231
272
  } else {
232
273
  const failedCount = result.checks.filter(c => !c.passed).length;
233
- lines.push(`❌ ${failedCount} verification check(s) failed`);
274
+ lines.push(`${failedCount} verification check(s) failed`);
234
275
  }
235
276
 
236
277
  return lines.join('\n');
@@ -18,7 +18,7 @@ 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**
21
+ **FIRST: Detect Technical Epic Ancestry**
22
22
 
23
23
  Check if this chore belongs to a **technical epic** (an epic that creates chores directly without features):
24
24
 
@@ -27,7 +27,7 @@ Check if this chore belongs to a **technical epic** (an epic that creates chores
27
27
 
28
28
  **If chore belongs to a technical epic:**
29
29
  - Set `IS_TECHNICAL_EPIC = true`
30
- - Display: `⚡ Technical Epic Chore - no mode progression`
30
+ - Display: `Technical Epic Chore - no mode progression`
31
31
  - This context will be passed to chore-mode
32
32
 
33
33
  **If chore is standalone or under a regular epic:**
@@ -38,7 +38,7 @@ Display:
38
38
 
39
39
  ```
40
40
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
41
- 🔧 Planning Standalone Chore
41
+ Planning Standalone Chore
42
42
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
43
43
 
44
44
  **Chore:** [Title]
@@ -47,7 +47,7 @@ Display:
47
47
  Analyzing chore type...
48
48
  ```
49
49
 
50
- **🔄 WORKFLOW INTEGRATION: Start workflow tracking**
50
+ **WORKFLOW INTEGRATION: Start workflow tracking**
51
51
 
52
52
  After understanding the chore context, register this skill execution:
53
53
 
@@ -71,9 +71,13 @@ Classify the chore by matching keywords in the title and description against the
71
71
  **Classification rules:**
72
72
  - Count keyword matches (exact word boundary matches = 2 points, partial = 1 point)
73
73
  - Highest score wins
74
- - Default to **refactor** if no matches
74
+ - Default to **enhancement** if no matches (behavior-adding is the catch-all)
75
75
  - Confidence: high (4+ points), medium (2-3 points), low (0-1 points)
76
76
 
77
+ **Category distinction:**
78
+ - **Behavior-preserving** (refactor, dependency, cleanup, tooling): Has specific keywords. Runs existing affected tests only. Never writes new tests.
79
+ - **Behavior-adding** (enhancement): The default when no behavior-preserving keywords match. Uses TDD red-green-refactor to write tests first, then implement.
80
+
77
81
  Display:
78
82
 
79
83
  ```
@@ -82,7 +86,7 @@ Display:
82
86
 
83
87
  **If confidence is low:**
84
88
  ```
85
- ⚠️ Low confidence classification. The chore might be:
89
+ Low confidence classification. The chore might be:
86
90
  - [type] - because [reason based on keywords found]
87
91
  - [alternative type] - if [alternative interpretation]
88
92
 
@@ -104,12 +108,12 @@ Based on the classified type, apply this guidance:
104
108
  - Consider breaking into smaller refactors if scope is large
105
109
 
106
110
  *Verification Criteria:*
107
- - All existing tests pass without modification
111
+ - Affected tests pass without modification
108
112
  - No new functionality added (that requires new tests)
109
113
  - Code review confirms behavior preservation
110
114
  - Performance is not degraded
111
115
 
112
- *Test Handling:* Tests required. Run all tests for affected modules before and after. Update test file paths/imports if moved. Do NOT change test assertions - if tests fail, the refactor broke behavior.
116
+ *Test Handling:* Tests required. Run tests for affected and potentially impacted modules. Update test file paths/imports if moved. Do NOT change test assertions - if tests fail, the refactor broke behavior.
113
117
 
114
118
  ---
115
119
 
@@ -122,12 +126,12 @@ Based on the classified type, apply this guidance:
122
126
  - Consider update strategy: one at a time vs batch
123
127
 
124
128
  *Verification Criteria:*
125
- - All tests pass after update
129
+ - Affected and potentially impacted tests pass after update
126
130
  - Application builds successfully
127
131
  - No new deprecation warnings (or documented)
128
132
  - Security vulnerabilities addressed (if security update)
129
133
 
130
- *Test Handling:* Tests not required. Run full test suite to catch regressions. No new tests needed unless migrating to new API patterns. Document any test changes needed due to library API changes.
134
+ *Test Handling:* Tests not required. Run tests for affected and potentially impacted modules to catch regressions. No new tests needed unless migrating to new API patterns. Document any test changes needed due to library API changes.
131
135
 
132
136
  ---
133
137
 
@@ -140,12 +144,12 @@ Based on the classified type, apply this guidance:
140
144
  - Consider impact on git history/blame
141
145
 
142
146
  *Verification Criteria:*
143
- - All tests still pass
147
+ - Affected tests still pass
144
148
  - No broken imports or references
145
149
  - Application runs correctly
146
150
  - Removed code was actually unused
147
151
 
148
- *Test Handling:* Tests not required. Run existing tests to ensure nothing breaks. Remove tests only if they test deleted code. No new tests needed for cleanup work.
152
+ *Test Handling:* Tests not required. Run tests for affected modules to ensure nothing breaks. Remove tests only if they test deleted code. No new tests needed for cleanup work.
149
153
 
150
154
  ---
151
155
 
@@ -167,11 +171,29 @@ Based on the classified type, apply this guidance:
167
171
 
168
172
  ---
169
173
 
174
+ **ENHANCEMENT Guidance:**
175
+
176
+ *Scope Considerations:*
177
+ - Define what new behavior is being added
178
+ - Identify where the behavior integrates with existing code
179
+ - Plan test cases BEFORE writing implementation (TDD)
180
+ - Keep scope focused - one behavior per chore
181
+
182
+ *Verification Criteria:*
183
+ - New tests written BEFORE implementation (TDD red phase)
184
+ - All new tests pass (TDD green phase)
185
+ - Code is clean and well-structured (TDD refactor phase)
186
+ - Existing affected tests still pass
187
+
188
+ *Test Handling:* Tests required - TDD mandatory. Write failing tests first that define the new behavior (RED), then implement minimum code to pass (GREEN), then refactor for cleanliness (REFACTOR). Run affected tests to ensure no regressions.
189
+
190
+ ---
191
+
170
192
  Display the relevant guidance:
171
193
 
172
194
  ```
173
195
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
174
- 📋 [Type] Chore Guidance
196
+ [Type] Chore Guidance
175
197
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
176
198
 
177
199
  **Scope Considerations:**
@@ -243,11 +265,17 @@ Based on the chore type and guidance, analyze what needs to be done:
243
265
  - Identify affected workflows
244
266
  - Review CI/CD impacts
245
267
 
268
+ **For ENHANCEMENT chores:**
269
+ - Identify what new behavior is being added
270
+ - Find integration points with existing code
271
+ - Plan test cases that define the new behavior
272
+ - List affected existing test files
273
+
246
274
  Display analysis:
247
275
 
248
276
  ```
249
277
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
250
- 🔍 Impact Analysis
278
+ Impact Analysis
251
279
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
252
280
 
253
281
  **Files to modify:**
@@ -266,7 +294,7 @@ Based on the analysis, create a focused plan:
266
294
 
267
295
  ```
268
296
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
269
- 📝 Implementation Plan
297
+ Implementation Plan
270
298
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
271
299
 
272
300
  **Step 1:** [First action]
@@ -308,7 +336,7 @@ The chore-mode skill will:
308
336
  3. Run verification steps
309
337
  4. Merge when complete
310
338
 
311
- **🔄 WORKFLOW INTEGRATION: Complete workflow**
339
+ **WORKFLOW INTEGRATION: Complete workflow**
312
340
 
313
341
  Before invoking chore-mode:
314
342
 
@@ -340,10 +368,11 @@ This marks the `chore_planning_complete` gate as passed, enabling chore-mode to
340
368
 
341
369
  | Type | Keywords | Test Handling |
342
370
  |------|----------|---------------|
343
- | refactor | refactor, restructure, extract, rename | Run all tests, don't modify assertions |
344
- | dependency | update, upgrade, bump, migrate | Run full suite, check for deprecations |
371
+ | refactor | refactor, restructure, extract, rename | Run affected tests, don't modify assertions |
372
+ | dependency | update, upgrade, bump, migrate | Run affected + impacted tests, check for deprecations |
345
373
  | cleanup | remove, delete, unused, legacy | Verify no references, run affected tests |
346
374
  | tooling | ci, build, lint, config | Run affected pipelines |
375
+ | enhancement | *(default - no keyword match)* | TDD: write tests first, then implement |
347
376
 
348
377
  ## Validation
349
378
 
@@ -0,0 +1,273 @@
1
+ # Design System Selection Skill
2
+
3
+ Walks users through discovering, configuring, and documenting their project's design system. Produces a standardized Brand Kit page.
4
+
5
+ ## When to Use
6
+
7
+ Invoke when the user says things like:
8
+ - "set up my design system"
9
+ - "configure design system"
10
+ - "help me with my brand kit"
11
+ - "add my design tokens"
12
+
13
+ ## Instructions
14
+
15
+ ### Opening
16
+
17
+ Start the conversation with enthusiasm. Design systems are the foundation of a polished product — they deserve excitement. Open with something like:
18
+
19
+ > Design systems are one of the highest-leverage things you can set up. Once Claude knows your colors, typography, spacing, and component patterns, every piece of UI it builds will feel like *your* product — not a generic template.
20
+ >
21
+ > I'm going to walk you through a few decisions, scan your project for what you already have, and we'll leave with two things:
22
+ >
23
+ > 1. **Your design system directory configured** — so Claude always has your tokens as context
24
+ > 2. **A Brand Kit page** — a living reference you (and Claude) can always check
25
+ >
26
+ > Here's what a finished Brand Kit looks like: `app/design-system/page.tsx` in this project.
27
+ >
28
+ > Let's start.
29
+
30
+ **Then proceed to Step 1.**
31
+
32
+ ### Step 1: Scan for What Exists
33
+
34
+ Before asking questions, scan the project to understand what's already in place. Run these in parallel:
35
+
36
+ **Directory search:**
37
+ ```bash
38
+ find . -maxdepth 3 -type d \( -name "design-system" -o -name "design-tokens" -o -name "tokens" -o -name "theme" -o -name "styles" -o -name "ui-kit" -o -name "foundations" -o -name "primitives" \) -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null
39
+ ```
40
+
41
+ **File pattern search** (use Glob tool):
42
+ - `**/tokens.{css,scss,json,ts,js}`
43
+ - `**/theme.{css,scss,json,ts,js}`
44
+ - `**/variables.{css,scss}`
45
+ - `**/_variables.scss`
46
+ - `**/design-tokens/**`
47
+ - `**/globals.css`
48
+ - `**/tailwind.config.*`
49
+
50
+ **Content signals** (use Grep tool):
51
+ - CSS custom properties: `--color-`, `--spacing-`, `--font-`
52
+ - Tailwind theme config: `colors:`, `spacing:`, `fontFamily:`
53
+ - Design token patterns: `$color-`, `$spacing-`
54
+
55
+ **Present what you found:**
56
+
57
+ If tokens/theme files exist:
58
+ > I found some existing design assets. Here's what I see:
59
+ > - [list files with brief content summary]
60
+ >
61
+ > Let me ask you a few questions to fill in the gaps.
62
+
63
+ If nothing found:
64
+ > Starting fresh — that's fine. Let me walk you through the key decisions.
65
+
66
+ ### Step 2: Walk Through Decisions
67
+
68
+ Guide the user through each design system category. For each, present a focused question. Don't overwhelm — one topic at a time.
69
+
70
+ **2a. Brand Palette**
71
+
72
+ > **Colors first.** Every brand needs at minimum:
73
+ > - **Primary** — your main action color (buttons, links, active states)
74
+ > - **Accent** — warm emphasis (CTAs, highlights, banners)
75
+ > - **Neutral black** — text, borders, outlined buttons
76
+ >
77
+ > Do you have brand colors already? Paste hex codes, a brand guide link, or describe the vibe you want (e.g., "calm and professional", "bold and energetic").
78
+
79
+ **WAIT for user response.**
80
+
81
+ For each color, derive three shades:
82
+ - **Solid** — the main color (buttons, fills)
83
+ - **Tint** — light background version (badges, callouts) — mix ~85% white
84
+ - **Text** — darker version for text on the tint — darken ~30%
85
+
86
+ **2b. Typography**
87
+
88
+ > **Typography.** What font does your project use? Check your CSS/config, or tell me what you'd like.
89
+ >
90
+ > I also need to know your heading style preference — tight tracking (modern/bold) or normal tracking (classic/readable)?
91
+
92
+ **WAIT for user response.**
93
+
94
+ **2c. Surface & Elevation**
95
+
96
+ > **Surfaces.** Two quick decisions:
97
+ > 1. **Background warmth** — Pure white canvas, or slightly warm (cream/gray tint)?
98
+ > 2. **Cards** — Separated by borders, or by shadow + background contrast (no borders)?
99
+
100
+ **WAIT for user response.**
101
+
102
+ **2d. Border Philosophy**
103
+
104
+ > **Borders.** I recommend the binary approach: thick borders (2px) on interactive elements (inputs, outlined buttons), and NO borders on containers (use shadow + background contrast instead). Sound good, or do you prefer a different approach?
105
+
106
+ **WAIT for user response.**
107
+
108
+ **2e. Spacing & Radius**
109
+
110
+ > **Last two quick ones:**
111
+ > - **Border radius** — Rounded (16px cards, 12px buttons) or sharp (4-8px everywhere)?
112
+ > - **Spacing** — Generous (lots of breathing room) or compact (dense, information-heavy)?
113
+
114
+ **WAIT for user response.**
115
+
116
+ ### Step 3: Configure the Design System Directory
117
+
118
+ Based on the scan results from Step 1, identify or create the design system directory.
119
+
120
+ **If a clear candidate exists:**
121
+ > I'll configure `[path]` as your design system directory.
122
+
123
+ **If no directory exists, create one:**
124
+ > I'll create a `design-system/` directory with your tokens.
125
+
126
+ Write a CSS tokens file with all the decisions from Step 2:
127
+
128
+ ```css
129
+ /* design-system/tokens.css */
130
+ :root {
131
+ /* Brand Palette - Primary */
132
+ --color-primary: [solid];
133
+ --color-primary-tint: [tint];
134
+ --color-primary-text: [text-on-tint];
135
+
136
+ /* Brand Palette - Accent */
137
+ --color-accent: [solid];
138
+ --color-accent-tint: [tint];
139
+ --color-accent-text: [text-on-tint];
140
+
141
+ /* Brand Palette - Neutral */
142
+ --color-black: [black];
143
+
144
+ /* Surfaces */
145
+ --color-background: [background];
146
+ --color-card: [card];
147
+
148
+ /* Typography */
149
+ --font-sans: [font];
150
+ --font-mono: [mono font];
151
+
152
+ /* Spacing */
153
+ --space-xs: [value];
154
+ --space-sm: [value];
155
+ --space-md: [value];
156
+ --space-lg: [value];
157
+ --space-xl: [value];
158
+
159
+ /* Radius */
160
+ --radius-sm: [value];
161
+ --radius-md: [value];
162
+ --radius-lg: [value];
163
+
164
+ /* Shadows */
165
+ --shadow-sm: [value];
166
+ --shadow-md: [value];
167
+ --shadow-lg: [value];
168
+ }
169
+ ```
170
+
171
+ Then configure it:
172
+
173
+ ```bash
174
+ node -e "
175
+ const fs = require('fs');
176
+ const path = require('path');
177
+ const dir = path.resolve('<selected-directory>');
178
+ const configPath = '.jettypod/config.json';
179
+ const config = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, 'utf-8')) : {};
180
+ config.designSystemDir = dir;
181
+ fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
182
+ console.log('Set designSystemDir to:', dir);
183
+ "
184
+ ```
185
+
186
+ Regenerate CLAUDE.md:
187
+ ```bash
188
+ jettypod claude generate
189
+ ```
190
+
191
+ Verify:
192
+ ```bash
193
+ grep -c "design_system" CLAUDE.md
194
+ ```
195
+
196
+ ### Step 4: Generate the Brand Kit Page
197
+
198
+ **This is the key deliverable.** Create a standardized Brand Kit page that serves as a living reference.
199
+
200
+ The page MUST follow this exact structure (same sections, same order, every time):
201
+
202
+ ```
203
+ app/design-system/page.tsx
204
+ ```
205
+
206
+ **Required sections (in order):**
207
+
208
+ | # | Section | What it shows |
209
+ |---|---------|---------------|
210
+ | 0 | Border Philosophy | Binary borders rule — thick on interactive, none on containers |
211
+ | 1 | Brand Palette | Each color with solid/tint/text swatches + in-context badges |
212
+ | 2 | Surface Hierarchy | Background → card → content layering with actual nesting demo |
213
+ | 3 | Elevation Scale | Shadow levels (sm/md/lg/overlay) with visual boxes |
214
+ | 4 | Typography | Full type scale from display (4xl) to caption (xs) |
215
+ | 5 | Motion & Easing | Duration, easing, and live hover demos |
216
+ | 6 | Border Radius | Visual comparison of radius tiers |
217
+ | 7 | Button Variants | All variants × all sizes, including loading states |
218
+ | 8 | Hover/Active/Disabled | Interactive state demos |
219
+ | 9 | Input Focus States | Resting vs focused with live interaction |
220
+ | 10 | Focus Rings | Tab-accessible focus-visible demos |
221
+ | 11 | Loading States | Skeletons and spinners |
222
+ | 12 | Toast Patterns | Success, error, info, warning static examples |
223
+ | 13 | Composition Examples | Cards with actions, forms, banners — how pieces fit together |
224
+ | 14 | Design Decisions | Resolved decisions (with DECIDED labels) and open questions |
225
+
226
+ **Each section uses:**
227
+ - `<Section title="N. Section Name" description="One-line explanation">` wrapper
228
+ - `<Card>` container with shadow (no borders)
229
+ - Monospace labels (`text-xs font-mono text-zinc-400`) for technical annotations
230
+ - Live interactive demos where applicable (hover, focus, click)
231
+
232
+ **Page infrastructure:**
233
+ - Dark mode toggle in header
234
+ - `max-w-5xl mx-auto` content width
235
+ - `space-y-20` between sections
236
+ - Helper components: `Section`, `ColorSwatch`, `Card`
237
+
238
+ **The page should use the user's actual tokens from Step 2** — not placeholder values. Every color swatch, button, and example should reflect their real brand.
239
+
240
+ Present the generated page to the user:
241
+
242
+ > Here's your Brand Kit page. It's a living reference — you and Claude can always check `app/design-system/page.tsx` to see your design system in action.
243
+ >
244
+ > Every section is interactive: hover the cards, click the inputs, tab through the buttons.
245
+
246
+ ### Step 5: Wrap Up
247
+
248
+ Summarize what was accomplished:
249
+
250
+ > **Done! Here's what we set up:**
251
+ >
252
+ > 1. **Design system directory** — `[path]` configured in `.jettypod/config.json`
253
+ > 2. **CLAUDE.md updated** — Claude now sees your design tokens as context in every conversation
254
+ > 3. **Brand Kit page** — `app/design-system/page.tsx` is your living reference
255
+ >
256
+ > From now on, when Claude builds UI for you, it'll use your exact colors, typography, spacing, and component patterns. No more generic-looking output.
257
+
258
+ ## Clearing
259
+
260
+ If user wants to remove the design system:
261
+
262
+ ```bash
263
+ node -e "
264
+ const fs = require('fs');
265
+ const configPath = '.jettypod/config.json';
266
+ const config = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, 'utf-8')) : {};
267
+ delete config.designSystemDir;
268
+ fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
269
+ console.log('Removed designSystemDir');
270
+ "
271
+ ```
272
+
273
+ Then: `jettypod claude generate`