vibesuite 1.3.2 → 2.0.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.
Files changed (75) hide show
  1. package/README.md +8 -1
  2. package/assets/.agent/skills/avoid-feature-creep/SKILL.md +307 -0
  3. package/assets/.agent/skills/avoid-feature-creep/agents/openai.yaml +3 -0
  4. package/assets/.agent/skills/avoid-feature-creep/assets/large-logo.png +0 -0
  5. package/assets/.agent/skills/avoid-feature-creep/assets/small-logo.svg +17 -0
  6. package/assets/.agent/skills/convex/SKILL.md +62 -0
  7. package/assets/.agent/skills/convex/agents/openai.yaml +3 -0
  8. package/assets/.agent/skills/convex/assets/large-logo.png +0 -0
  9. package/assets/.agent/skills/convex/assets/small-logo.svg +17 -0
  10. package/assets/.agent/skills/convex-agents/SKILL.md +516 -0
  11. package/assets/.agent/skills/convex-agents/agents/openai.yaml +3 -0
  12. package/assets/.agent/skills/convex-agents/assets/large-logo.png +0 -0
  13. package/assets/.agent/skills/convex-agents/assets/small-logo.svg +17 -0
  14. package/assets/.agent/skills/convex-best-practices/SKILL.md +369 -0
  15. package/assets/.agent/skills/convex-best-practices/agents/openai.yaml +3 -0
  16. package/assets/.agent/skills/convex-best-practices/assets/large-logo.png +0 -0
  17. package/assets/.agent/skills/convex-best-practices/assets/small-logo.svg +17 -0
  18. package/assets/.agent/skills/convex-component-authoring/SKILL.md +457 -0
  19. package/assets/.agent/skills/convex-component-authoring/agents/openai.yaml +3 -0
  20. package/assets/.agent/skills/convex-component-authoring/assets/large-logo.png +0 -0
  21. package/assets/.agent/skills/convex-component-authoring/assets/small-logo.svg +17 -0
  22. package/assets/.agent/skills/convex-cron-jobs/SKILL.md +604 -0
  23. package/assets/.agent/skills/convex-cron-jobs/agents/openai.yaml +3 -0
  24. package/assets/.agent/skills/convex-cron-jobs/assets/large-logo.png +0 -0
  25. package/assets/.agent/skills/convex-cron-jobs/assets/small-logo.svg +17 -0
  26. package/assets/.agent/skills/convex-file-storage/SKILL.md +467 -0
  27. package/assets/.agent/skills/convex-file-storage/agents/openai.yaml +3 -0
  28. package/assets/.agent/skills/convex-file-storage/assets/large-logo.png +0 -0
  29. package/assets/.agent/skills/convex-file-storage/assets/small-logo.svg +17 -0
  30. package/assets/.agent/skills/convex-functions/SKILL.md +458 -0
  31. package/assets/.agent/skills/convex-functions/agents/openai.yaml +3 -0
  32. package/assets/.agent/skills/convex-functions/assets/large-logo.png +0 -0
  33. package/assets/.agent/skills/convex-functions/assets/small-logo.svg +17 -0
  34. package/assets/.agent/skills/convex-http-actions/SKILL.md +733 -0
  35. package/assets/.agent/skills/convex-http-actions/agents/openai.yaml +3 -0
  36. package/assets/.agent/skills/convex-http-actions/assets/large-logo.png +0 -0
  37. package/assets/.agent/skills/convex-http-actions/assets/small-logo.svg +17 -0
  38. package/assets/.agent/skills/convex-migrations/SKILL.md +712 -0
  39. package/assets/.agent/skills/convex-migrations/agents/openai.yaml +3 -0
  40. package/assets/.agent/skills/convex-migrations/assets/large-logo.png +0 -0
  41. package/assets/.agent/skills/convex-migrations/assets/small-logo.svg +17 -0
  42. package/assets/.agent/skills/convex-realtime/SKILL.md +443 -0
  43. package/assets/.agent/skills/convex-realtime/agents/openai.yaml +3 -0
  44. package/assets/.agent/skills/convex-realtime/assets/large-logo.png +0 -0
  45. package/assets/.agent/skills/convex-realtime/assets/small-logo.svg +17 -0
  46. package/assets/.agent/skills/convex-schema-validator/SKILL.md +400 -0
  47. package/assets/.agent/skills/convex-schema-validator/agents/openai.yaml +3 -0
  48. package/assets/.agent/skills/convex-schema-validator/assets/large-logo.png +0 -0
  49. package/assets/.agent/skills/convex-schema-validator/assets/small-logo.svg +17 -0
  50. package/assets/.agent/skills/convex-security-audit/SKILL.md +539 -0
  51. package/assets/.agent/skills/convex-security-audit/agents/openai.yaml +3 -0
  52. package/assets/.agent/skills/convex-security-audit/assets/large-logo.png +0 -0
  53. package/assets/.agent/skills/convex-security-audit/assets/small-logo.svg +17 -0
  54. package/assets/.agent/skills/convex-security-check/SKILL.md +378 -0
  55. package/assets/.agent/skills/convex-security-check/agents/openai.yaml +3 -0
  56. package/assets/.agent/skills/convex-security-check/assets/large-logo.png +0 -0
  57. package/assets/.agent/skills/convex-security-check/assets/small-logo.svg +17 -0
  58. package/assets/.agent/skills/github-ops/SKILL.md +4 -4
  59. package/assets/.agent/skills/google-trends/SKILL.md +7 -7
  60. package/assets/.agent/skills/optimize-agent-context/SKILL.md +97 -0
  61. package/assets/.agent/skills/youtube-pipeline/SKILL.md +10 -10
  62. package/assets/.agent/workflows/LEGACY/init_smart_ops.md +2 -2
  63. package/assets/.agent/workflows/agent_reset.md +2 -2
  64. package/assets/.agent/workflows/mode-orchestrator.md +114 -640
  65. package/assets/.agent/workflows/mode-visionary.md +192 -0
  66. package/assets/.agent/workflows/optimize-agent-context.md +54 -0
  67. package/assets/.agent/workflows/remotion-build.md +17 -17
  68. package/assets/.agent/workflows/stitch.md +4 -4
  69. package/assets/VibeCode-Agents/custom_modes.yaml +1257 -0
  70. package/assets/VibeCode-Agents/vibe-orchestrator.yaml +427 -145
  71. package/assets/VibeCode-Agents/vibe-visionary.yaml +617 -0
  72. package/package.json +2 -2
  73. package/src/cli.js +416 -20
  74. package/src/harness.js +281 -0
  75. package/src/store.js +239 -0
package/src/cli.js CHANGED
@@ -8,7 +8,6 @@ import {
8
8
  PATHS,
9
9
  getWorkflows,
10
10
  getSkills,
11
- copyToDestination,
12
11
  copySpecificWorkflows,
13
12
  copySpecificSkills,
14
13
  copyAllWorkflows,
@@ -19,11 +18,34 @@ import {
19
18
  updateWorkflows,
20
19
  updateSkills,
21
20
  updateAgentYamls,
22
- updateLegacyManual
21
+ updateLegacyManual,
22
+ downloadDirectoryFromGitHub,
23
23
  } from './utils.js';
24
+ import {
25
+ detectHarnesses,
26
+ printHarnessStatus,
27
+ syncToAllHarnesses,
28
+ syncToHarness,
29
+ } from './harness.js';
30
+ import {
31
+ STORE_PATH,
32
+ initGlobalStore,
33
+ getManifest,
34
+ writeManifest,
35
+ populateSkills,
36
+ populateWorkflows,
37
+ populateAgentYamls,
38
+ getStoreSkills,
39
+ getStoreWorkflows,
40
+ isStoreInitialized,
41
+ } from './store.js';
24
42
 
25
43
  const program = new Command();
26
44
 
45
+ // ─────────────────────────────────────────────────────────────────────────────
46
+ // vibesuite init (EXISTING — Backward Compatible)
47
+ // ─────────────────────────────────────────────────────────────────────────────
48
+
27
49
  async function init() {
28
50
  console.log(pc.magenta(figlet.textSync('VibeSuite', { horizontalLayout: 'full' })));
29
51
  console.log(pc.cyan(' J StaR Films Studios VibeCode Protocol Suite\n'));
@@ -109,8 +131,6 @@ async function init() {
109
131
  const skillsDest = path.join(agentDest, 'skills');
110
132
 
111
133
  await fs.ensureDir(agentDest);
112
-
113
- // Ensure workflows destination directory exists
114
134
  await fs.ensureDir(workflowsDest);
115
135
 
116
136
  // Handle Workflows
@@ -135,21 +155,15 @@ async function init() {
135
155
  await copySpecificWorkflows(response.selectedWorkflows, workflowsDest);
136
156
  }
137
157
 
138
- // Ensure skills destination directory exists
139
158
  await fs.ensureDir(skillsDest);
140
159
 
141
160
  // Handle Skills
142
161
  if (response.skillMode === 'core') {
143
162
  console.log(pc.green('✔ Downloading Core Skills...'));
144
163
  const coreSkills = [
145
- 'ai-sdk',
146
- 'code-review',
147
- 'component-analysis',
148
- 'nextjs-standards',
149
- 'security-audit',
150
- 'spawn-task',
151
- 'stitch',
152
- 'sync-docs'
164
+ 'ai-sdk', 'code-review', 'component-analysis',
165
+ 'nextjs-standards', 'security-audit', 'spawn-task',
166
+ 'stitch', 'sync-docs'
153
167
  ];
154
168
  await copySpecificSkills(coreSkills, skillsDest);
155
169
  } else if (response.skillMode === 'all') {
@@ -184,25 +198,382 @@ async function init() {
184
198
  console.log(pc.gray(`1. If using Cursor/Windsurf, the .agent folder is ready.`));
185
199
  console.log(pc.gray(`2. Try typing '/init_vibecode_genesis' in your IDE.`));
186
200
  }
201
+ console.log(pc.dim(`\n💡 Tip: Run "vibesuite install" for global multi-IDE setup.\n`));
187
202
 
188
203
  } catch (error) {
189
204
  console.error(pc.red('Error during installation:'), error);
190
205
  }
191
206
  }
192
207
 
208
+ // ─────────────────────────────────────────────────────────────────────────────
209
+ // vibesuite install (NEW — Global Setup + Harness Routing)
210
+ // ─────────────────────────────────────────────────────────────────────────────
211
+
212
+ async function install() {
213
+ console.log(pc.magenta(figlet.textSync('VibeSuite', { horizontalLayout: 'full' })));
214
+ console.log(pc.cyan(' 🌐 Global Installer v2.0\n'));
215
+
216
+ // 1. Detect harnesses
217
+ const detected = detectHarnesses();
218
+ printHarnessStatus(detected);
219
+
220
+ if (detected.length === 0) {
221
+ console.log(pc.yellow(' No AI harnesses detected on this machine.'));
222
+ console.log(pc.dim(' Supported: Antigravity, KiloCode, Windsurf, Cursor, Gemini CLI'));
223
+ console.log(pc.dim(' Use "vibesuite init" for per-project setup instead.\n'));
224
+ return;
225
+ }
226
+
227
+ // 2. Let user select which harnesses to configure
228
+ const harnessResponse = await prompts({
229
+ type: 'multiselect',
230
+ name: 'harnesses',
231
+ message: 'Which harnesses should we configure?',
232
+ choices: detected.map(h => ({
233
+ title: h.name,
234
+ value: h.id,
235
+ selected: true,
236
+ description: path.relative(process.env.USERPROFILE || process.env.HOME || '', h.rootPath),
237
+ })),
238
+ min: 1,
239
+ hint: '- Space to select. Return to submit',
240
+ });
241
+
242
+ if (!harnessResponse.harnesses || harnessResponse.harnesses.length === 0) return;
243
+
244
+ const selectedHarnesses = detected.filter(h => harnessResponse.harnesses.includes(h.id));
245
+
246
+ // 3. Ask what to install
247
+ const contentResponse = await prompts([
248
+ {
249
+ type: 'multiselect',
250
+ name: 'content',
251
+ message: 'What should we install globally?',
252
+ choices: [
253
+ { title: 'Skills', value: 'skills', selected: true, description: `${(await getSkills()).length} available` },
254
+ { title: 'Workflows', value: 'workflows', selected: true, description: `${(await getWorkflows()).length} available` },
255
+ { title: 'Agent YAMLs (custom_modes.yaml → KiloCode)', value: 'yamls', selected: selectedHarnesses.some(h => h.id === 'kilocode'), description: 'For KiloCode modes' },
256
+ ],
257
+ min: 1,
258
+ hint: '- Space to select. Return to submit',
259
+ },
260
+ // Skill pack selection
261
+ {
262
+ type: (prev, values) => values.content.includes('skills') ? 'select' : null,
263
+ name: 'skillMode',
264
+ message: 'Which skill pack?',
265
+ choices: [
266
+ { title: 'Core (8 essentials)', value: 'core', description: 'ai-sdk, code-review, nextjs-standards...' },
267
+ { title: `All (${(await getSkills()).length} skills)`, value: 'all' },
268
+ { title: 'Custom selection', value: 'custom' },
269
+ ],
270
+ },
271
+ {
272
+ type: (prev, values) => values.skillMode === 'custom' ? 'multiselect' : null,
273
+ name: 'selectedSkills',
274
+ message: 'Select skills:',
275
+ choices: async () => {
276
+ const skills = await getSkills();
277
+ return skills.map(s => ({ title: s, value: s }));
278
+ },
279
+ hint: '- Space to select. Return to submit',
280
+ },
281
+ // Workflow pack selection
282
+ {
283
+ type: (prev, values) => values.content.includes('workflows') ? 'select' : null,
284
+ name: 'workflowMode',
285
+ message: 'Which workflow pack?',
286
+ choices: [
287
+ { title: 'Core (15 essentials)', value: 'core', description: 'vibe-build, mode-architect...' },
288
+ { title: `All (${(await getWorkflows()).length} workflows)`, value: 'all' },
289
+ { title: 'All (Exclude Legacy)', value: 'no-legacy' },
290
+ { title: 'Custom selection', value: 'custom' },
291
+ ],
292
+ },
293
+ {
294
+ type: (prev, values) => values.workflowMode === 'custom' ? 'multiselect' : null,
295
+ name: 'selectedWorkflows',
296
+ message: 'Select workflows:',
297
+ choices: async () => {
298
+ const workflows = await getWorkflows();
299
+ return workflows.map(w => ({ title: w, value: w }));
300
+ },
301
+ hint: '- Space to select. Return to submit',
302
+ },
303
+ ]);
304
+
305
+ if (!contentResponse.content) return;
306
+
307
+ try {
308
+ // 4. Initialize global store
309
+ console.log(pc.cyan(`\n📦 Creating global store (${STORE_PATH})...\n`));
310
+ await initGlobalStore();
311
+
312
+ // 5. Populate store from package assets
313
+ if (contentResponse.content.includes('skills')) {
314
+ const skillMode = contentResponse.skillMode === 'custom'
315
+ ? contentResponse.selectedSkills
316
+ : contentResponse.skillMode;
317
+ const skills = await populateSkills(skillMode);
318
+ console.log(pc.green(` ✔ ${skills.length} skills loaded into store`));
319
+ }
320
+
321
+ if (contentResponse.content.includes('workflows')) {
322
+ const workflowMode = contentResponse.workflowMode === 'custom'
323
+ ? contentResponse.selectedWorkflows
324
+ : contentResponse.workflowMode;
325
+ const workflows = await populateWorkflows(workflowMode);
326
+ console.log(pc.green(` ✔ ${workflows.length} workflows loaded into store`));
327
+ }
328
+
329
+ if (contentResponse.content.includes('yamls')) {
330
+ const yamls = await populateAgentYamls();
331
+ console.log(pc.green(` ✔ ${yamls.length} agent YAMLs loaded into store`));
332
+ }
333
+
334
+ // 6. Sync store to all selected harnesses
335
+ console.log(pc.cyan('\n📡 Syncing to harnesses...\n'));
336
+ await syncToAllHarnesses(selectedHarnesses, STORE_PATH);
337
+
338
+ // 7. Update manifest
339
+ const manifest = await getManifest();
340
+ manifest.linkedHarnesses = selectedHarnesses.map(h => h.id);
341
+ manifest.installed.skills = await getStoreSkills();
342
+ manifest.installed.workflows = await getStoreWorkflows();
343
+ await writeManifest(manifest);
344
+
345
+ // 8. Summary
346
+ console.log(pc.magenta('\n✨ VibeSuite installed globally! ✨'));
347
+ console.log(pc.white(`\n Store: ${STORE_PATH}`));
348
+ console.log(pc.white(` Harnesses: ${selectedHarnesses.map(h => h.name).join(', ')}`));
349
+ console.log(pc.dim(`\n Run "vibesuite sync" to re-sync after adding new skills.`));
350
+ console.log(pc.dim(` Run "vibesuite add <github-url>" to fetch remote skills.\n`));
351
+
352
+ } catch (error) {
353
+ console.error(pc.red('\nError during global installation:'), error);
354
+ }
355
+ }
356
+
357
+ // ─────────────────────────────────────────────────────────────────────────────
358
+ // vibesuite sync (NEW — Re-sync store to all harnesses)
359
+ // ─────────────────────────────────────────────────────────────────────────────
360
+
361
+ async function sync() {
362
+ console.log(pc.magenta('📡 VibeSuite Sync\n'));
363
+
364
+ // Check if global store exists
365
+ if (!await isStoreInitialized()) {
366
+ console.log(pc.yellow('Global store not found. Run "vibesuite install" first.\n'));
367
+ return;
368
+ }
369
+
370
+ const manifest = await getManifest();
371
+ const detected = detectHarnesses();
372
+
373
+ if (detected.length === 0) {
374
+ console.log(pc.yellow('No AI harnesses detected.\n'));
375
+ return;
376
+ }
377
+
378
+ // Let user pick which harnesses to sync to
379
+ const response = await prompts({
380
+ type: 'multiselect',
381
+ name: 'harnesses',
382
+ message: 'Sync to which harnesses?',
383
+ choices: detected.map(h => ({
384
+ title: h.name,
385
+ value: h.id,
386
+ selected: manifest.linkedHarnesses.includes(h.id),
387
+ })),
388
+ min: 1,
389
+ hint: '- Space to select. Return to submit',
390
+ });
391
+
392
+ if (!response.harnesses || response.harnesses.length === 0) return;
393
+
394
+ const selectedHarnesses = detected.filter(h => response.harnesses.includes(h.id));
395
+
396
+ console.log(pc.cyan('\n📡 Syncing from global store...\n'));
397
+ await syncToAllHarnesses(selectedHarnesses, STORE_PATH);
398
+
399
+ // Update manifest with current harnesses
400
+ manifest.linkedHarnesses = [...new Set([...manifest.linkedHarnesses, ...response.harnesses])];
401
+ await writeManifest(manifest);
402
+
403
+ const skills = await getStoreSkills();
404
+ const workflows = await getStoreWorkflows();
405
+ console.log(pc.magenta(`\n✨ Synced ${skills.length} skills + ${workflows.length} workflows to ${selectedHarnesses.length} harness(es).\n`));
406
+ }
407
+
408
+ // ─────────────────────────────────────────────────────────────────────────────
409
+ // vibesuite add <url> (NEW — Fetch remote skills from GitHub)
410
+ // ─────────────────────────────────────────────────────────────────────────────
411
+
412
+ async function add(url) {
413
+ console.log(pc.magenta('📥 VibeSuite Add\n'));
414
+
415
+ // Parse GitHub URL → owner/repo
416
+ const match = url.match(/github\.com\/([^/]+\/[^/]+)/);
417
+ if (!match) {
418
+ console.log(pc.red('Invalid GitHub URL. Expected: https://github.com/owner/repo'));
419
+ return;
420
+ }
421
+
422
+ const repoSlug = match[1].replace(/\.git$/, '');
423
+ console.log(pc.dim(` Repo: ${repoSlug}\n`));
424
+
425
+ // Initialize store if needed
426
+ await initGlobalStore();
427
+
428
+ // Try to find skills in common locations
429
+ const skillsDest = path.join(STORE_PATH, 'skills');
430
+ const workflowsDest = path.join(STORE_PATH, 'workflows');
431
+
432
+ console.log(pc.cyan('📡 Fetching from GitHub...\n'));
433
+
434
+ // Try assets/.agent/skills/ first (VibeSuite structure)
435
+ let skillCount = await downloadDirectoryFromGitHub(
436
+ 'assets/.agent/skills',
437
+ skillsDest,
438
+ null,
439
+ 250
440
+ );
441
+
442
+ // Fallback: try .agent/skills/
443
+ if (skillCount === 0) {
444
+ skillCount = await downloadDirectoryFromGitHub(
445
+ '.agent/skills',
446
+ skillsDest,
447
+ null,
448
+ 250
449
+ );
450
+ }
451
+
452
+ // Try workflows
453
+ let workflowCount = await downloadDirectoryFromGitHub(
454
+ 'assets/.agent/workflows',
455
+ workflowsDest,
456
+ (item) => item.name.endsWith('.md'),
457
+ 250
458
+ );
459
+
460
+ if (workflowCount === 0) {
461
+ workflowCount = await downloadDirectoryFromGitHub(
462
+ '.agent/workflows',
463
+ workflowsDest,
464
+ (item) => item.name.endsWith('.md'),
465
+ 250
466
+ );
467
+ }
468
+
469
+ if (skillCount === 0 && workflowCount === 0) {
470
+ console.log(pc.yellow(' No skills or workflows found in repo.'));
471
+ console.log(pc.dim(' Expected structure: .agent/skills/ or assets/.agent/skills/\n'));
472
+ return;
473
+ }
474
+
475
+ console.log(pc.green(`\n ✔ Added ${skillCount} skills, ${workflowCount} workflows to global store.`));
476
+
477
+ // Update manifest
478
+ const manifest = await getManifest();
479
+ manifest.installed.skills = await getStoreSkills();
480
+ manifest.installed.workflows = await getStoreWorkflows();
481
+ await writeManifest(manifest);
482
+
483
+ // Offer to sync
484
+ if (manifest.linkedHarnesses.length > 0) {
485
+ const syncResponse = await prompts({
486
+ type: 'confirm',
487
+ name: 'doSync',
488
+ message: 'Sync to linked harnesses now?',
489
+ initial: true,
490
+ });
491
+
492
+ if (syncResponse.doSync) {
493
+ const detected = detectHarnesses();
494
+ const linked = detected.filter(h => manifest.linkedHarnesses.includes(h.id));
495
+ await syncToAllHarnesses(linked, STORE_PATH);
496
+ console.log(pc.magenta(`\n✨ Synced to ${linked.length} harness(es).\n`));
497
+ }
498
+ } else {
499
+ console.log(pc.dim('\n Run "vibesuite sync" to push these to your harnesses.\n'));
500
+ }
501
+ }
502
+
503
+ // ─────────────────────────────────────────────────────────────────────────────
504
+ // vibesuite harnesses (NEW — Show detected harnesses + status)
505
+ // ─────────────────────────────────────────────────────────────────────────────
506
+
507
+ async function harnesses() {
508
+ console.log(pc.magenta('🔌 VibeSuite Harnesses\n'));
509
+
510
+ const detected = detectHarnesses();
511
+ printHarnessStatus(detected);
512
+
513
+ // Show store status if initialized
514
+ if (await isStoreInitialized()) {
515
+ const manifest = await getManifest();
516
+ const skills = await getStoreSkills();
517
+ const workflows = await getStoreWorkflows();
518
+
519
+ console.log(pc.cyan('📦 Global Store Status\n'));
520
+ console.log(pc.white(` Path: ${STORE_PATH}`));
521
+ console.log(pc.white(` Skills: ${skills.length}`));
522
+ console.log(pc.white(` Workflows: ${workflows.length}`));
523
+ console.log(pc.white(` Linked: ${manifest.linkedHarnesses.join(', ') || 'none'}`));
524
+ console.log(pc.dim(` Updated: ${manifest.updatedAt}\n`));
525
+ } else {
526
+ console.log(pc.dim(' Global store not initialized. Run "vibesuite install" to set up.\n'));
527
+ }
528
+ }
529
+
530
+ // ─────────────────────────────────────────────────────────────────────────────
531
+ // Command Registration
532
+ // ─────────────────────────────────────────────────────────────────────────────
533
+
193
534
  program
194
535
  .name('vibesuite')
195
- .description('VibeCode Protocol Suite CLI')
196
- .version('1.3.2')
536
+ .description('VibeCode Protocol Suite CLI — Skills, Workflows & Agent Modes')
537
+ .version('2.0.0');
538
+
539
+ // Per-project setup (backward compatible)
540
+ program
197
541
  .command('init')
198
- .description('Initialize VibeCode in the current directory')
542
+ .description('Initialize VibeCode in the current project directory')
199
543
  .action(init);
200
544
 
545
+ // Global installer (NEW)
546
+ program
547
+ .command('install')
548
+ .description('Install skills globally and route to all your AI harnesses')
549
+ .action(install);
550
+
551
+ // Re-sync (NEW)
552
+ program
553
+ .command('sync')
554
+ .description('Re-sync global store to all linked harnesses')
555
+ .action(sync);
556
+
557
+ // Add remote skills (NEW)
558
+ program
559
+ .command('add <url>')
560
+ .description('Add skills from a GitHub repo into the global store')
561
+ .action(add);
562
+
563
+ // Show harness status (NEW)
564
+ program
565
+ .command('harnesses')
566
+ .description('Show detected AI harnesses and global store status')
567
+ .action(harnesses);
568
+
569
+ // Update from GitHub (EXISTING — enhanced)
201
570
  program
202
571
  .command('update')
203
- .description('Update resources from GitHub (Overwrites local files)')
572
+ .description('Update resources from GitHub (overwrites local files)')
204
573
  .action(async () => {
205
- console.log(pc.magenta('📡 VibeSuite Update Protocol'));
574
+ console.log(pc.magenta('📡 VibeSuite Update Protocol\n'));
575
+
576
+ const storeExists = await isStoreInitialized();
206
577
 
207
578
  const response = await prompts([
208
579
  {
@@ -212,7 +583,8 @@ program
212
583
  choices: [
213
584
  { title: '.agent (Workflows & Skills)', value: 'agent', selected: true },
214
585
  { title: 'Agent YAMLs', value: 'yamls' },
215
- { title: 'Legacy Protocols', value: 'legacy' }
586
+ { title: 'Legacy Protocols', value: 'legacy' },
587
+ ...(storeExists ? [{ title: 'Global Store', value: 'global', description: 'Update ~/.vibesuite/' }] : []),
216
588
  ],
217
589
  hint: '- Space to select. Return to submit'
218
590
  }
@@ -236,7 +608,31 @@ program
236
608
  await updateLegacyManual(path.join(destRoot, 'Legacy-Protocols'));
237
609
  }
238
610
 
239
- console.log(pc.magenta('\n✨ Resources updated from GitHub successfully!'));
611
+ // Update global store if selected
612
+ if (response.components.includes('global')) {
613
+ console.log(pc.cyan('\n📡 Updating global store from package assets...\n'));
614
+ const skills = await populateSkills('all');
615
+ const workflows = await populateWorkflows('all');
616
+ const yamls = await populateAgentYamls();
617
+ console.log(pc.green(` ✔ ${skills.length} skills, ${workflows.length} workflows, ${yamls.length} YAMLs updated`));
618
+
619
+ // Auto-sync to linked harnesses
620
+ const manifest = await getManifest();
621
+ if (manifest.linkedHarnesses.length > 0) {
622
+ const detected = detectHarnesses();
623
+ const linked = detected.filter(h => manifest.linkedHarnesses.includes(h.id));
624
+ if (linked.length > 0) {
625
+ console.log(pc.cyan('\n📡 Auto-syncing to linked harnesses...\n'));
626
+ await syncToAllHarnesses(linked, STORE_PATH);
627
+ }
628
+ }
629
+
630
+ manifest.installed.skills = await getStoreSkills();
631
+ manifest.installed.workflows = await getStoreWorkflows();
632
+ await writeManifest(manifest);
633
+ }
634
+
635
+ console.log(pc.magenta('\n✨ Resources updated successfully!'));
240
636
  });
241
637
 
242
638
  program.parse();