omgkit 2.28.0 → 2.30.0

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 (51) hide show
  1. package/README.md +72 -1
  2. package/bin/omgkit.js +188 -1
  3. package/lib/cli.js +58 -4
  4. package/lib/theme.js +1220 -0
  5. package/package.json +2 -2
  6. package/plugin/agents/fullstack-developer.md +1 -0
  7. package/plugin/agents/ui-ux-designer.md +175 -41
  8. package/plugin/commands/design/add.md +86 -0
  9. package/plugin/commands/design/builder.md +96 -0
  10. package/plugin/commands/design/from-screenshot.md +64 -0
  11. package/plugin/commands/design/from-url.md +74 -0
  12. package/plugin/commands/design/preview.md +55 -0
  13. package/plugin/commands/design/rebuild.md +153 -0
  14. package/plugin/commands/design/reset.md +65 -0
  15. package/plugin/commands/design/rollback.md +179 -0
  16. package/plugin/commands/design/scan.md +155 -0
  17. package/plugin/commands/design/theme.md +65 -0
  18. package/plugin/commands/design/themes.md +50 -0
  19. package/plugin/registry.yaml +15 -3
  20. package/plugin/skills/frontend/design-system-context/SKILL.md +252 -0
  21. package/templates/design/schema/theme.schema.json +102 -0
  22. package/templates/design/themes/corporate-enterprise/consulting.json +81 -0
  23. package/templates/design/themes/corporate-enterprise/corporate-indigo.json +81 -0
  24. package/templates/design/themes/corporate-enterprise/finance.json +81 -0
  25. package/templates/design/themes/corporate-enterprise/healthcare.json +81 -0
  26. package/templates/design/themes/corporate-enterprise/legal.json +81 -0
  27. package/templates/design/themes/corporate-enterprise/ocean-blue.json +81 -0
  28. package/templates/design/themes/creative-bold/candy.json +81 -0
  29. package/templates/design/themes/creative-bold/coral-sunset.json +81 -0
  30. package/templates/design/themes/creative-bold/gradient-dream.json +81 -0
  31. package/templates/design/themes/creative-bold/neon.json +81 -0
  32. package/templates/design/themes/creative-bold/retro.json +81 -0
  33. package/templates/design/themes/creative-bold/studio.json +81 -0
  34. package/templates/design/themes/minimal-clean/minimal-slate.json +81 -0
  35. package/templates/design/themes/minimal-clean/mono.json +81 -0
  36. package/templates/design/themes/minimal-clean/nordic.json +81 -0
  37. package/templates/design/themes/minimal-clean/paper.json +81 -0
  38. package/templates/design/themes/minimal-clean/swiss.json +81 -0
  39. package/templates/design/themes/minimal-clean/zen.json +81 -0
  40. package/templates/design/themes/nature-organic/arctic.json +81 -0
  41. package/templates/design/themes/nature-organic/autumn.json +81 -0
  42. package/templates/design/themes/nature-organic/desert.json +81 -0
  43. package/templates/design/themes/nature-organic/forest.json +81 -0
  44. package/templates/design/themes/nature-organic/lavender.json +81 -0
  45. package/templates/design/themes/nature-organic/ocean.json +81 -0
  46. package/templates/design/themes/tech-ai/electric-cyan.json +81 -0
  47. package/templates/design/themes/tech-ai/hologram.json +81 -0
  48. package/templates/design/themes/tech-ai/matrix-green.json +81 -0
  49. package/templates/design/themes/tech-ai/neo-tokyo.json +81 -0
  50. package/templates/design/themes/tech-ai/neural-dark.json +81 -0
  51. package/templates/design/themes/tech-ai/quantum-purple.json +81 -0
package/README.md CHANGED
@@ -37,10 +37,11 @@ All coordinated through **Omega-level thinking** - a framework for finding break
37
37
  | Component | Count | Description |
38
38
  |-----------|-------|-------------|
39
39
  | **Agents** | 41 | Specialized AI team members with distinct roles |
40
- | **Commands** | 161 | Slash commands for every development task |
40
+ | **Commands** | 169 | Slash commands for every development task |
41
41
  | **Workflows** | 69 | Complete development processes from idea to deploy |
42
42
  | **Skills** | 161 | Domain expertise modules across 24 categories |
43
43
  | **Modes** | 10 | Behavioral configurations for different contexts |
44
+ | **Themes** | 30 | Curated design system themes for shadcn/ui |
44
45
  | **Archetypes** | 14 | Project templates for autonomous development |
45
46
 
46
47
  ---
@@ -165,6 +166,76 @@ testing:
165
166
  target: 85
166
167
  ```
167
168
 
169
+ ### 6. Design System (New in 2.29.0)
170
+
171
+ OMGKIT includes a complete design system with 30 curated themes for shadcn/ui integration:
172
+
173
+ ```bash
174
+ # Initialize with a theme (opt-in)
175
+ omgkit init --theme neo-tokyo
176
+
177
+ # Or explore themes first
178
+ omgkit init --with-design
179
+ ```
180
+
181
+ #### 5 Theme Categories
182
+
183
+ | Category | Themes | Description |
184
+ |----------|--------|-------------|
185
+ | **Tech & AI** | neo-tokyo, electric-cyan, neural-dark, matrix-green, quantum-purple, hologram | Futuristic, cyberpunk-inspired |
186
+ | **Minimal & Clean** | minimal-slate, paper, mono, zen, nordic, swiss | Simple, elegant, distraction-free |
187
+ | **Corporate** | ocean-blue, corporate-indigo, finance, legal, healthcare, consulting | Professional, trustworthy |
188
+ | **Creative & Bold** | coral-sunset, candy, neon, gradient-dream, retro, studio | Vibrant, expressive |
189
+ | **Nature & Organic** | forest, ocean, desert, lavender, arctic, autumn | Earth tones, calming |
190
+
191
+ #### Design Commands
192
+
193
+ | Command | Description |
194
+ |---------|-------------|
195
+ | `/design:themes` | List all 30 curated themes |
196
+ | `/design:theme <id>` | Apply a theme to your project |
197
+ | `/design:preview` | Preview current theme colors |
198
+ | `/design:builder` | Build custom theme interactively |
199
+ | `/design:from-screenshot` | Extract theme from image |
200
+ | `/design:from-url` | Extract theme from webpage |
201
+ | `/design:add <comp>` | Add shadcn/ui components |
202
+ | `/design:reset` | Reset to original theme |
203
+ | `/design:rebuild <id>` | Rebuild entire project with new theme |
204
+ | `/design:scan` | Scan for non-compliant colors |
205
+ | `/design:rollback` | Rollback to previous theme |
206
+
207
+ #### Theme Rebuild
208
+
209
+ Rebuild your entire project's UI with a single command:
210
+
211
+ ```bash
212
+ # Rebuild with new theme (scans and fixes hardcoded colors)
213
+ omgkit design:rebuild neo-tokyo
214
+
215
+ # Scan for non-compliant colors
216
+ omgkit design:scan
217
+
218
+ # Rollback if needed
219
+ omgkit design:rollback
220
+ ```
221
+
222
+ The rebuild feature:
223
+ - Backs up current theme before changes
224
+ - Scans `app/`, `components/`, `src/`, `pages/` directories
225
+ - Replaces hardcoded colors (`bg-blue-500`) with theme variables (`bg-primary`)
226
+ - Reports unfixable patterns for manual review
227
+
228
+ #### How It Works
229
+
230
+ OMGKIT provides CSS variables that shadcn/ui components consume:
231
+
232
+ ```
233
+ .omgkit/design/theme.json → Theme configuration
234
+ .omgkit/design/theme.css → CSS variables (:root + .dark)
235
+ ```
236
+
237
+ After applying a theme, use `npx shadcn@latest add button` to add components that automatically use your theme colors.
238
+
168
239
  ---
169
240
 
170
241
  ## Installation
package/bin/omgkit.js CHANGED
@@ -34,6 +34,13 @@ import {
34
34
  log
35
35
  } from '../lib/cli.js';
36
36
 
37
+ import {
38
+ scanProjectColors,
39
+ rebuildProjectTheme,
40
+ rollbackTheme,
41
+ listThemeBackups
42
+ } from '../lib/theme.js';
43
+
37
44
  // Set package root for CLI context
38
45
  const __filename = fileURLToPath(import.meta.url);
39
46
  const __dirname = dirname(__filename);
@@ -56,6 +63,8 @@ ${COLORS.bright}GLOBAL COMMANDS${COLORS.reset}
56
63
 
57
64
  ${COLORS.bright}PROJECT COMMANDS${COLORS.reset}
58
65
  ${COLORS.cyan}init${COLORS.reset} Initialize .omgkit/ in current project
66
+ ${COLORS.cyan}init --with-design${COLORS.reset} Initialize with theme selection UI
67
+ ${COLORS.cyan}init --theme <id>${COLORS.reset} Initialize with specific theme (e.g., neo-tokyo)
59
68
  ${COLORS.cyan}project:upgrade${COLORS.reset} Upgrade project to latest OMGKIT version
60
69
  ${COLORS.cyan}project:rollback${COLORS.reset} Rollback project to previous backup
61
70
  ${COLORS.cyan}project:backups${COLORS.reset} List available project backups
@@ -67,6 +76,12 @@ ${COLORS.bright}CONFIG COMMANDS${COLORS.reset}
67
76
  ${COLORS.cyan}config list [section]${COLORS.reset} List all config or specific section
68
77
  ${COLORS.cyan}config reset <key>${COLORS.reset} Reset config key to default
69
78
 
79
+ ${COLORS.bright}DESIGN SYSTEM COMMANDS${COLORS.reset}
80
+ ${COLORS.cyan}design:rebuild <theme>${COLORS.reset} Rebuild project UI with new theme
81
+ ${COLORS.cyan}design:scan${COLORS.reset} Scan for non-compliant colors
82
+ ${COLORS.cyan}design:rollback [id]${COLORS.reset} Rollback to previous theme
83
+ ${COLORS.cyan}design:backups${COLORS.reset} List available theme backups
84
+
70
85
  ${COLORS.bright}UPGRADE OPTIONS${COLORS.reset}
71
86
  --dry Show what would change without applying
72
87
  --force Skip confirmation prompts
@@ -74,6 +89,8 @@ ${COLORS.bright}UPGRADE OPTIONS${COLORS.reset}
74
89
  ${COLORS.bright}EXAMPLES${COLORS.reset}
75
90
  omgkit install # Install plugin globally
76
91
  omgkit init # Initialize project
92
+ omgkit init --theme neo-tokyo # Init with specific theme
93
+ omgkit init --with-design # Init with theme selection UI
77
94
  omgkit project:upgrade # Upgrade project config
78
95
  omgkit project:upgrade --dry # Preview upgrade changes
79
96
  omgkit project:rollback # Rollback to last backup
@@ -87,6 +104,13 @@ ${COLORS.bright}CONFIG EXAMPLES${COLORS.reset}
87
104
  omgkit config list testing
88
105
  omgkit config reset testing.enforcement.level
89
106
 
107
+ ${COLORS.bright}DESIGN EXAMPLES${COLORS.reset}
108
+ omgkit design:rebuild neo-tokyo # Rebuild with Neo Tokyo theme
109
+ omgkit design:rebuild --dry # Preview what would change
110
+ omgkit design:scan # Scan for non-compliant colors
111
+ omgkit design:rollback # Rollback to previous theme
112
+ omgkit design:backups # List theme backups
113
+
90
114
  ${COLORS.bright}AFTER INSTALLATION${COLORS.reset}
91
115
  In Claude Code, type / to see all OMGKIT commands:
92
116
 
@@ -114,7 +138,12 @@ switch (command) {
114
138
  break;
115
139
  }
116
140
  case 'init': {
117
- const result = initProject();
141
+ // Parse init options
142
+ const withDesign = args.includes('--with-design');
143
+ const themeIdx = args.indexOf('--theme');
144
+ const theme = themeIdx !== -1 ? args[themeIdx + 1] : null;
145
+
146
+ const result = initProject({ theme, withDesign });
118
147
  if (!result.success) process.exit(1);
119
148
  break;
120
149
  }
@@ -238,6 +267,164 @@ ${COLORS.bright}Examples:${COLORS.reset}
238
267
  }
239
268
  break;
240
269
  }
270
+ case 'design:rebuild': {
271
+ console.log(BANNER);
272
+ const themeId = args.find(a => !a.startsWith('--'));
273
+ const dryRun = args.includes('--dry');
274
+ const force = args.includes('--force');
275
+
276
+ if (!themeId) {
277
+ log.error('Usage: omgkit design:rebuild <theme-id> [--dry] [--force]');
278
+ log.info('Run /design:themes in Claude Code to see available themes');
279
+ log.info('Example: omgkit design:rebuild neo-tokyo');
280
+ process.exit(1);
281
+ }
282
+
283
+ console.log(`${COLORS.bright}🔮 Design Rebuild: ${themeId}${COLORS.reset}`);
284
+ console.log('━'.repeat(40));
285
+
286
+ if (dryRun) {
287
+ log.info('DRY RUN - No changes will be made\n');
288
+ }
289
+
290
+ const result = rebuildProjectTheme(process.cwd(), themeId, { dryRun, force });
291
+
292
+ if (!result.success) {
293
+ log.error(result.error);
294
+ process.exit(1);
295
+ }
296
+
297
+ if (!dryRun && result.backupId) {
298
+ console.log(`\n📦 ${COLORS.green}Backup created:${COLORS.reset} ${result.backupId}`);
299
+ }
300
+
301
+ console.log(`\n🎨 ${COLORS.bright}Theme Applied:${COLORS.reset} ${result.newTheme}`);
302
+
303
+ if (result.changedFiles.length > 0) {
304
+ console.log(`\n${COLORS.bright}Changed Files:${COLORS.reset}`);
305
+ for (const f of result.changedFiles) {
306
+ console.log(` ${COLORS.green}✓${COLORS.reset} ${f}`);
307
+ }
308
+ }
309
+
310
+ if (result.fixedColors.length > 0) {
311
+ console.log(`\n${COLORS.bright}Fixed Colors:${COLORS.reset}`);
312
+ for (const fc of result.fixedColors) {
313
+ console.log(` ${COLORS.cyan}${fc.file}${COLORS.reset}`);
314
+ for (const r of fc.replacements) {
315
+ if (r.count) {
316
+ console.log(` ${r.from} → ${r.to} (${r.count}x)`);
317
+ } else {
318
+ console.log(` ${r.from} → ${r.to}`);
319
+ }
320
+ }
321
+ }
322
+ }
323
+
324
+ if (result.warnings.length > 0) {
325
+ console.log(`\n${COLORS.yellow}⚠️ Warnings (manual review needed):${COLORS.reset}`);
326
+ for (const w of result.warnings.slice(0, 10)) {
327
+ console.log(` ${w}`);
328
+ }
329
+ if (result.warnings.length > 10) {
330
+ console.log(` ... and ${result.warnings.length - 10} more`);
331
+ }
332
+ }
333
+
334
+ if (dryRun) {
335
+ log.info('\nTo apply changes, run without --dry flag');
336
+ } else {
337
+ log.success('\nRebuild complete!');
338
+ log.info('To rollback: omgkit design:rollback');
339
+ }
340
+ break;
341
+ }
342
+
343
+ case 'design:scan': {
344
+ console.log(BANNER);
345
+ console.log(`${COLORS.bright}🔍 Scanning for non-compliant colors...${COLORS.reset}\n`);
346
+
347
+ const result = scanProjectColors(process.cwd());
348
+
349
+ console.log(`Scanned ${result.scannedFiles} files\n`);
350
+
351
+ if (result.nonCompliant.length === 0) {
352
+ log.success('All colors are theme-compliant!');
353
+ } else {
354
+ log.warn(`Found ${result.nonCompliant.length} non-compliant color references\n`);
355
+
356
+ // Group by file
357
+ const byFile = {};
358
+ for (const item of result.nonCompliant) {
359
+ if (!byFile[item.file]) byFile[item.file] = [];
360
+ byFile[item.file].push(item);
361
+ }
362
+
363
+ for (const [file, items] of Object.entries(byFile)) {
364
+ console.log(`${COLORS.cyan}📁 ${file}${COLORS.reset}`);
365
+ for (const item of items.slice(0, 5)) {
366
+ const suggestion = item.suggestion ? ` → ${COLORS.green}${item.suggestion}${COLORS.reset}` : ` ${COLORS.yellow}(manual review)${COLORS.reset}`;
367
+ console.log(` Line ${item.line}: ${item.match}${suggestion}`);
368
+ }
369
+ if (items.length > 5) {
370
+ console.log(` ... and ${items.length - 5} more`);
371
+ }
372
+ console.log();
373
+ }
374
+
375
+ console.log('━'.repeat(40));
376
+ console.log(`Total: ${result.nonCompliant.length} violations in ${Object.keys(byFile).length} files`);
377
+ console.log(`\nRun ${COLORS.cyan}omgkit design:rebuild <theme-id>${COLORS.reset} to auto-fix`);
378
+ }
379
+ break;
380
+ }
381
+
382
+ case 'design:rollback': {
383
+ console.log(BANNER);
384
+ const backupId = args[0];
385
+
386
+ console.log(`${COLORS.bright}🔄 Theme Rollback${COLORS.reset}\n`);
387
+
388
+ const result = rollbackTheme(process.cwd(), backupId);
389
+
390
+ if (!result.success) {
391
+ log.error(result.error);
392
+ if (result.error.includes('No theme backups')) {
393
+ log.info('No backups available. Rebuild a theme first to create backups.');
394
+ }
395
+ process.exit(1);
396
+ }
397
+
398
+ log.success(`Rolled back to: ${result.restoredTheme}`);
399
+ console.log(`\n${COLORS.bright}Restored Files:${COLORS.reset}`);
400
+ for (const f of result.restoredFiles) {
401
+ console.log(` ${COLORS.green}✓${COLORS.reset} ${f}`);
402
+ }
403
+ console.log(`\nBackup used: ${result.backupUsed}`);
404
+ break;
405
+ }
406
+
407
+ case 'design:backups': {
408
+ console.log(BANNER);
409
+ console.log(`${COLORS.bright}📦 Theme Backups${COLORS.reset}\n`);
410
+
411
+ const backups = listThemeBackups(process.cwd());
412
+
413
+ if (backups.length === 0) {
414
+ log.info('No theme backups found');
415
+ log.info('Run omgkit design:rebuild <theme-id> to create backups');
416
+ } else {
417
+ for (const b of backups) {
418
+ console.log(` ${COLORS.cyan}${b.id}${COLORS.reset}`);
419
+ console.log(` ${b.previousTheme} → ${b.newTheme}`);
420
+ console.log(` ${b.date} (${b.filesChanged} files)\n`);
421
+ }
422
+ console.log(`To rollback: ${COLORS.cyan}omgkit design:rollback${COLORS.reset}`);
423
+ console.log(`Or specify: ${COLORS.cyan}omgkit design:rollback <backup-id>${COLORS.reset}`);
424
+ }
425
+ break;
426
+ }
427
+
241
428
  case 'version':
242
429
  case '-v':
243
430
  case '--version': {
package/lib/cli.js CHANGED
@@ -6,6 +6,13 @@
6
6
  import { existsSync, mkdirSync, cpSync, readFileSync, rmSync, readdirSync, statSync, writeFileSync } from 'fs';
7
7
  import { join, dirname } from 'path';
8
8
  import { fileURLToPath } from 'url';
9
+ import {
10
+ getThemeById,
11
+ getAllThemeIds,
12
+ applyThemeToProject,
13
+ loadAllThemes,
14
+ THEME_CATEGORIES
15
+ } from './theme.js';
9
16
 
10
17
  // Package root detection
11
18
  let PACKAGE_ROOT;
@@ -51,7 +58,7 @@ ${COLORS.magenta}╔════════════════════
51
58
  ║ ║
52
59
  ║ 🔮 OMGKIT - Omega-Level Development Kit ║
53
60
  ║ ║
54
- ║ 41 Agents • 160 Commands • 161 Skills • 10 Modes ║
61
+ ║ 41 Agents • 169 Commands • 162 Skills • 10 Modes ║
55
62
  ║ "Think Omega. Build Omega. Be Omega." ║
56
63
  ║ ║
57
64
  ╚════════════════════════════════════════════════════════════╝${COLORS.reset}
@@ -351,10 +358,12 @@ ${COLORS.magenta}🔮 Think Omega. Build Omega. Be Omega.${COLORS.reset}
351
358
  * @param {Object} options - Initialization options
352
359
  * @param {string} [options.cwd] - Working directory
353
360
  * @param {boolean} [options.silent] - Suppress output
361
+ * @param {string} [options.theme] - Theme ID to apply (opt-in)
362
+ * @param {boolean} [options.withDesign] - Show theme selection UI (opt-in)
354
363
  * @returns {Object} Result with success status and created files
355
364
  */
356
365
  export function initProject(options = {}) {
357
- const { cwd = process.cwd(), silent = false } = options;
366
+ const { cwd = process.cwd(), silent = false, theme = null, withDesign = false } = options;
358
367
 
359
368
  if (!silent) {
360
369
  console.log(BANNER);
@@ -425,6 +434,47 @@ export function initProject(options = {}) {
425
434
  }
426
435
  });
427
436
 
437
+ // Apply theme if specified (opt-in design system)
438
+ let appliedTheme = null;
439
+ if (theme) {
440
+ const themeObj = getThemeById(theme);
441
+ if (themeObj) {
442
+ const themePaths = applyThemeToProject(themeObj, cwd);
443
+ appliedTheme = themeObj;
444
+ createdFiles.push('.omgkit/design/theme.json', '.omgkit/design/theme.css');
445
+ if (!silent) {
446
+ log.success(`Applied theme: ${themeObj.name}`);
447
+ log.info(` → ${themePaths.themeJson}`);
448
+ log.info(` → ${themePaths.themeCss}`);
449
+ }
450
+ } else {
451
+ if (!silent) log.warn(`Theme '${theme}' not found. Skipping theme setup.`);
452
+ }
453
+ } else if (withDesign && !silent) {
454
+ // Show available themes when --with-design is used
455
+ console.log(`
456
+ ${COLORS.bright}🎨 Design System Setup${COLORS.reset}
457
+ To apply a theme, run: ${COLORS.cyan}omgkit init --theme <theme-id>${COLORS.reset}
458
+
459
+ ${COLORS.bright}Available Themes:${COLORS.reset}`);
460
+
461
+ const allThemes = loadAllThemes();
462
+ for (const [categoryId, themes] of Object.entries(allThemes)) {
463
+ const category = THEME_CATEGORIES[categoryId];
464
+ if (!category || themes.length === 0) continue;
465
+ console.log(`\n${category.emoji} ${COLORS.bright}${category.name}${COLORS.reset}`);
466
+ for (const t of themes) {
467
+ console.log(` ${COLORS.cyan}${t.id}${COLORS.reset} - ${t.name}`);
468
+ }
469
+ }
470
+ console.log(`
471
+ ${COLORS.bright}Or use these commands later:${COLORS.reset}
472
+ ${COLORS.cyan}/design:themes${COLORS.reset} List all themes
473
+ ${COLORS.cyan}/design:theme <id>${COLORS.reset} Apply a theme
474
+ ${COLORS.cyan}/design:builder${COLORS.reset} Build custom theme
475
+ `);
476
+ }
477
+
428
478
  if (!silent) {
429
479
  console.log(`
430
480
  ${COLORS.bright}Project initialized!${COLORS.reset}
@@ -438,12 +488,16 @@ ${COLORS.bright}Quick commands:${COLORS.reset}
438
488
  /dev:feature [desc] Build a feature
439
489
  /dev:fix [issue] Fix a bug
440
490
  /omega:10x [topic] Find 10x improvement
441
-
491
+ ${appliedTheme ? `
492
+ ${COLORS.bright}Design System:${COLORS.reset}
493
+ /design:preview Preview current theme
494
+ /design:add <comp> Add shadcn components
495
+ ` : ''}
442
496
  ${COLORS.magenta}🔮 Your Omega journey begins!${COLORS.reset}
443
497
  `);
444
498
  }
445
499
 
446
- return { success: true, createdDirs, createdFiles };
500
+ return { success: true, createdDirs, createdFiles, theme: appliedTheme };
447
501
  }
448
502
 
449
503
  /**