ultra-dex 1.3.0 → 1.7.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.
- package/README.md +21 -0
- package/bin/ultra-dex.js +513 -38
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
> Scaffold Ultra-Dex projects from the command line.
|
|
4
4
|
|
|
5
|
+
## First 10 Minutes
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# 1. Create your project (2 min)
|
|
9
|
+
npx ultra-dex init
|
|
10
|
+
|
|
11
|
+
# 2. Open and review QUICK-START.md (3 min)
|
|
12
|
+
cd your-project
|
|
13
|
+
cat QUICK-START.md
|
|
14
|
+
|
|
15
|
+
# 3. Load Cursor rules for AI assistance (1 min)
|
|
16
|
+
# Download from: https://github.com/Srujan0798/Ultra-Dex/tree/main/cursor-rules
|
|
17
|
+
# Then: ./load.sh database api auth
|
|
18
|
+
|
|
19
|
+
# 4. Start building with AI agents (4 min)
|
|
20
|
+
# Use @Backend, @Frontend, @Database agents
|
|
21
|
+
# See: npx ultra-dex agents
|
|
22
|
+
|
|
23
|
+
# You're ready to code!
|
|
24
|
+
```
|
|
25
|
+
|
|
5
26
|
## Installation
|
|
6
27
|
|
|
7
28
|
```bash
|
package/bin/ultra-dex.js
CHANGED
|
@@ -109,7 +109,7 @@ Setting up the implementation plan.
|
|
|
109
109
|
program
|
|
110
110
|
.name('ultra-dex')
|
|
111
111
|
.description('CLI for Ultra-Dex SaaS Implementation Framework')
|
|
112
|
-
.version('1.
|
|
112
|
+
.version('1.7.1');
|
|
113
113
|
|
|
114
114
|
program
|
|
115
115
|
.command('init')
|
|
@@ -301,8 +301,8 @@ ${answers.ideaWhat} for ${answers.ideaFor}.
|
|
|
301
301
|
);
|
|
302
302
|
}
|
|
303
303
|
} catch (err) {
|
|
304
|
-
// Cursor rules not available (npm package, not local)
|
|
305
|
-
console.log(chalk.
|
|
304
|
+
// Cursor rules not available (npm package, not local) - this is expected
|
|
305
|
+
console.log(chalk.gray('\n Cursor rules: Download from GitHub for AI-assisted development'));
|
|
306
306
|
console.log(chalk.blue(' https://github.com/Srujan0798/Ultra-Dex/tree/main/cursor-rules'));
|
|
307
307
|
}
|
|
308
308
|
}
|
|
@@ -313,21 +313,23 @@ ${answers.ideaWhat} for ${answers.ideaFor}.
|
|
|
313
313
|
try {
|
|
314
314
|
await fs.copyFile(templatePath, path.join(outputDir, 'docs', 'MASTER-PLAN.md'));
|
|
315
315
|
} catch (err) {
|
|
316
|
-
|
|
316
|
+
// Template not available locally - this is expected for npm installs
|
|
317
|
+
console.log(chalk.gray('\n Full 34-section template: Download from GitHub'));
|
|
317
318
|
console.log(chalk.blue(' https://github.com/Srujan0798/Ultra-Dex/blob/main/%40%20Ultra%20DeX/Saas%20plan/04-Imp-Template.md'));
|
|
318
319
|
}
|
|
319
320
|
}
|
|
320
321
|
|
|
321
322
|
// Copy docs if requested
|
|
322
323
|
if (answers.includeDocs) {
|
|
323
|
-
const verificationPath = path.resolve(__dirname, '../../VERIFICATION.md');
|
|
324
|
-
const agentPath = path.resolve(__dirname, '../../AGENT-INSTRUCTIONS.md');
|
|
324
|
+
const verificationPath = path.resolve(__dirname, '../../docs/VERIFICATION.md');
|
|
325
|
+
const agentPath = path.resolve(__dirname, '../../agents/AGENT-INSTRUCTIONS.md');
|
|
325
326
|
try {
|
|
326
327
|
await fs.copyFile(verificationPath, path.join(outputDir, 'docs', 'CHECKLIST.md'));
|
|
327
328
|
await fs.copyFile(agentPath, path.join(outputDir, 'docs', 'AI-PROMPTS.md'));
|
|
328
329
|
} catch (err) {
|
|
329
|
-
|
|
330
|
-
console.log(chalk.
|
|
330
|
+
// Docs not available locally - this is expected for npm installs
|
|
331
|
+
console.log(chalk.gray('\n Verification checklist & agent instructions: Download from GitHub'));
|
|
332
|
+
console.log(chalk.blue(' https://github.com/Srujan0798/Ultra-Dex/tree/main/docs'));
|
|
331
333
|
}
|
|
332
334
|
}
|
|
333
335
|
|
|
@@ -338,16 +340,34 @@ ${answers.ideaWhat} for ${answers.ideaFor}.
|
|
|
338
340
|
|
|
339
341
|
const agentsSourcePath = path.resolve(__dirname, '../../agents');
|
|
340
342
|
try {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
343
|
+
// Copy tier directories and agent files
|
|
344
|
+
const tiers = ['1-leadership', '2-development', '3-security', '4-devops', '5-quality', '6-specialist'];
|
|
345
|
+
for (const tier of tiers) {
|
|
346
|
+
const tierDir = path.join(agentsDir, tier);
|
|
347
|
+
await fs.mkdir(tierDir, { recursive: true });
|
|
348
|
+
|
|
349
|
+
const tierPath = path.join(agentsSourcePath, tier);
|
|
350
|
+
const tierFiles = await fs.readdir(tierPath);
|
|
351
|
+
for (const file of tierFiles.filter(f => f.endsWith('.md'))) {
|
|
352
|
+
await fs.copyFile(
|
|
353
|
+
path.join(tierPath, file),
|
|
354
|
+
path.join(tierDir, file)
|
|
355
|
+
);
|
|
356
|
+
}
|
|
347
357
|
}
|
|
358
|
+
|
|
359
|
+
// Copy agent index and README
|
|
360
|
+
await fs.copyFile(
|
|
361
|
+
path.join(agentsSourcePath, '00-AGENT_INDEX.md'),
|
|
362
|
+
path.join(agentsDir, '00-AGENT_INDEX.md')
|
|
363
|
+
);
|
|
364
|
+
await fs.copyFile(
|
|
365
|
+
path.join(agentsSourcePath, 'README.md'),
|
|
366
|
+
path.join(agentsDir, 'README.md')
|
|
367
|
+
);
|
|
348
368
|
} catch (err) {
|
|
349
|
-
// Agents not available
|
|
350
|
-
console.log(chalk.
|
|
369
|
+
// Agents not available locally - this is expected for npm installs
|
|
370
|
+
console.log(chalk.gray('\n 15 AI agent prompts: Download from GitHub'));
|
|
351
371
|
console.log(chalk.blue(' https://github.com/Srujan0798/Ultra-Dex/tree/main/agents'));
|
|
352
372
|
}
|
|
353
373
|
}
|
|
@@ -370,7 +390,7 @@ ${answers.ideaWhat} for ${answers.ideaFor}.
|
|
|
370
390
|
console.log(chalk.gray(' ├── .cursor/rules/ (11 AI rule files)'));
|
|
371
391
|
}
|
|
372
392
|
if (answers.includeAgents) {
|
|
373
|
-
console.log(chalk.gray(' └── .agents/ (
|
|
393
|
+
console.log(chalk.gray(' └── .agents/ (15 AI agent prompts in 6 tiers)'));
|
|
374
394
|
}
|
|
375
395
|
|
|
376
396
|
console.log('\n' + chalk.bold('Next steps:'));
|
|
@@ -552,35 +572,52 @@ program
|
|
|
552
572
|
});
|
|
553
573
|
});
|
|
554
574
|
|
|
555
|
-
// Agent definitions
|
|
575
|
+
// Agent definitions (organized by tier)
|
|
556
576
|
const AGENTS = [
|
|
557
|
-
|
|
558
|
-
{ name: '
|
|
559
|
-
{ name: '
|
|
560
|
-
{ name: '
|
|
561
|
-
|
|
562
|
-
{ name: '
|
|
563
|
-
{ name: '
|
|
564
|
-
{ name: '
|
|
565
|
-
|
|
577
|
+
// Leadership Tier
|
|
578
|
+
{ name: 'cto', description: 'Architecture & tech decisions', file: '1-leadership/cto.md', tier: 'Leadership' },
|
|
579
|
+
{ name: 'planner', description: 'Task breakdown & planning', file: '1-leadership/planner.md', tier: 'Leadership' },
|
|
580
|
+
{ name: 'research', description: 'Technology evaluation & comparison', file: '1-leadership/research.md', tier: 'Leadership' },
|
|
581
|
+
// Development Tier
|
|
582
|
+
{ name: 'backend', description: 'API & server logic', file: '2-development/backend.md', tier: 'Development' },
|
|
583
|
+
{ name: 'database', description: 'Schema design & queries', file: '2-development/database.md', tier: 'Development' },
|
|
584
|
+
{ name: 'frontend', description: 'UI & components', file: '2-development/frontend.md', tier: 'Development' },
|
|
585
|
+
// Security Tier
|
|
586
|
+
{ name: 'auth', description: 'Authentication & authorization', file: '3-security/auth.md', tier: 'Security' },
|
|
587
|
+
{ name: 'security', description: 'Security audits & vulnerability fixes', file: '3-security/security.md', tier: 'Security' },
|
|
588
|
+
// DevOps Tier
|
|
589
|
+
{ name: 'devops', description: 'Deployment & infrastructure', file: '4-devops/devops.md', tier: 'DevOps' },
|
|
590
|
+
// Quality Tier
|
|
591
|
+
{ name: 'debugger', description: 'Bug fixing & troubleshooting', file: '5-quality/debugger.md', tier: 'Quality' },
|
|
592
|
+
{ name: 'documentation', description: 'Technical writing & docs maintenance', file: '5-quality/documentation.md', tier: 'Quality' },
|
|
593
|
+
{ name: 'reviewer', description: 'Code review & quality check', file: '5-quality/reviewer.md', tier: 'Quality' },
|
|
594
|
+
{ name: 'testing', description: 'QA & test automation', file: '5-quality/testing.md', tier: 'Quality' },
|
|
595
|
+
// Specialist Tier
|
|
596
|
+
{ name: 'performance', description: 'Performance optimization', file: '6-specialist/performance.md', tier: 'Specialist' },
|
|
597
|
+
{ name: 'refactoring', description: 'Code quality & design patterns', file: '6-specialist/refactoring.md', tier: 'Specialist' },
|
|
566
598
|
];
|
|
567
599
|
|
|
568
600
|
program
|
|
569
601
|
.command('agents')
|
|
570
602
|
.description('List available AI agent prompts')
|
|
571
603
|
.action(() => {
|
|
572
|
-
console.log(chalk.bold('\n🤖
|
|
573
|
-
console.log(chalk.gray('
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
604
|
+
console.log(chalk.bold('\n🤖 Ultra-Dex AI Agents (15 Total)\n'));
|
|
605
|
+
console.log(chalk.gray('Organized by tier for production pipeline\n'));
|
|
606
|
+
|
|
607
|
+
let currentTier = '';
|
|
608
|
+
AGENTS.forEach((agent) => {
|
|
609
|
+
if (agent.tier !== currentTier) {
|
|
610
|
+
currentTier = agent.tier;
|
|
611
|
+
console.log(chalk.bold(`\n ${currentTier} Tier:`));
|
|
612
|
+
}
|
|
613
|
+
console.log(chalk.cyan(` ${agent.name}`) + chalk.gray(` - ${agent.description}`));
|
|
577
614
|
});
|
|
578
615
|
|
|
579
616
|
console.log('\n' + chalk.bold('Usage:'));
|
|
580
|
-
console.log(chalk.gray(' ultra-dex agent <name> Show agent prompt
|
|
581
|
-
console.log(chalk.gray(' ultra-dex agent backend Example: show backend agent
|
|
617
|
+
console.log(chalk.gray(' ultra-dex agent <name> Show agent prompt'));
|
|
618
|
+
console.log(chalk.gray(' ultra-dex agent backend Example: show backend agent'));
|
|
582
619
|
|
|
583
|
-
console.log('\n' + chalk.gray('
|
|
620
|
+
console.log('\n' + chalk.gray('Agent Index: https://github.com/Srujan0798/Ultra-Dex/blob/main/agents/00-AGENT_INDEX.md\n'));
|
|
584
621
|
});
|
|
585
622
|
|
|
586
623
|
program
|
|
@@ -607,12 +644,450 @@ program
|
|
|
607
644
|
console.log(chalk.gray('─'.repeat(60)));
|
|
608
645
|
console.log(chalk.bold('\n📋 Copy the above prompt and paste into your AI tool.\n'));
|
|
609
646
|
} catch (err) {
|
|
610
|
-
// Agent file not bundled (npm package)
|
|
647
|
+
// Agent file not bundled (npm package) - show URL instead
|
|
611
648
|
console.log(chalk.bold(`\n🤖 ${agent.name.toUpperCase()} Agent\n`));
|
|
612
|
-
console.log(chalk.
|
|
613
|
-
console.log(chalk.gray('\nDownload from GitHub:'));
|
|
649
|
+
console.log(chalk.gray('View full prompt on GitHub:'));
|
|
614
650
|
console.log(chalk.blue(` https://github.com/Srujan0798/Ultra-Dex/blob/main/agents/${agent.file}\n`));
|
|
615
651
|
}
|
|
616
652
|
});
|
|
617
653
|
|
|
654
|
+
// Workflow examples map
|
|
655
|
+
const WORKFLOWS = {
|
|
656
|
+
auth: {
|
|
657
|
+
name: 'Authentication',
|
|
658
|
+
agents: ['@Planner', '@Research', '@CTO', '@Database', '@Backend', '@Frontend', '@Security', '@DevOps'],
|
|
659
|
+
description: 'Complete authentication with email/password and OAuth',
|
|
660
|
+
example: 'supabase',
|
|
661
|
+
},
|
|
662
|
+
supabase: {
|
|
663
|
+
name: 'Supabase Authentication Setup',
|
|
664
|
+
agents: ['@Planner', '@Research', '@CTO', '@Database', '@Backend', '@Frontend', '@Security', '@DevOps'],
|
|
665
|
+
description: 'Set up Supabase auth with RLS policies',
|
|
666
|
+
steps: [
|
|
667
|
+
'1. Create Supabase project and get API keys',
|
|
668
|
+
'2. Set up database schema with RLS policies',
|
|
669
|
+
'3. Configure authentication providers (email + Google OAuth)',
|
|
670
|
+
'4. Implement backend auth middleware',
|
|
671
|
+
'5. Build frontend auth UI components',
|
|
672
|
+
'6. Test authentication flow',
|
|
673
|
+
],
|
|
674
|
+
},
|
|
675
|
+
payments: {
|
|
676
|
+
name: 'Payment Integration (Stripe)',
|
|
677
|
+
agents: ['@Planner', '@Research', '@CTO', '@Database', '@Backend', '@Frontend', '@Testing', '@Security', '@DevOps'],
|
|
678
|
+
description: 'Integrate Stripe for subscriptions and one-time payments',
|
|
679
|
+
steps: [
|
|
680
|
+
'1. Create Stripe account and get API keys',
|
|
681
|
+
'2. Design subscription/payment schema',
|
|
682
|
+
'3. Implement Stripe Checkout API',
|
|
683
|
+
'4. Handle webhooks for payment events',
|
|
684
|
+
'5. Build payment UI with checkout flow',
|
|
685
|
+
'6. Test with Stripe test cards',
|
|
686
|
+
],
|
|
687
|
+
},
|
|
688
|
+
deployment: {
|
|
689
|
+
name: 'Deployment Pipeline',
|
|
690
|
+
agents: ['@Planner', '@CTO', '@Frontend', '@DevOps'],
|
|
691
|
+
description: 'Deploy to Vercel with staging and production environments',
|
|
692
|
+
example: 'vercel',
|
|
693
|
+
},
|
|
694
|
+
vercel: {
|
|
695
|
+
name: 'Vercel Deployment Pipeline',
|
|
696
|
+
agents: ['@Planner', '@CTO', '@Frontend', '@DevOps'],
|
|
697
|
+
description: 'Deploy Next.js app to Vercel',
|
|
698
|
+
steps: [
|
|
699
|
+
'1. Set up Vercel project and link Git repository',
|
|
700
|
+
'2. Configure environment variables for staging/production',
|
|
701
|
+
'3. Set up custom domain',
|
|
702
|
+
'4. Configure preview deployments for PRs',
|
|
703
|
+
'5. Set up deployment protection rules',
|
|
704
|
+
'6. Test deployment pipeline',
|
|
705
|
+
],
|
|
706
|
+
},
|
|
707
|
+
cicd: {
|
|
708
|
+
name: 'GitHub Actions CI/CD',
|
|
709
|
+
agents: ['@Planner', '@CTO', '@Testing', '@DevOps'],
|
|
710
|
+
description: 'Automated testing and deployment with GitHub Actions',
|
|
711
|
+
steps: [
|
|
712
|
+
'1. Create workflow file for CI (tests + lint)',
|
|
713
|
+
'2. Add build verification job',
|
|
714
|
+
'3. Add deployment job for production',
|
|
715
|
+
'4. Configure secrets for deployment',
|
|
716
|
+
'5. Add status badges to README',
|
|
717
|
+
'6. Test workflow on PR',
|
|
718
|
+
],
|
|
719
|
+
},
|
|
720
|
+
database: {
|
|
721
|
+
name: 'Database Migration',
|
|
722
|
+
agents: ['@Planner', '@CTO', '@Database', '@Backend', '@Testing'],
|
|
723
|
+
description: 'Database schema migration and data sync',
|
|
724
|
+
steps: [
|
|
725
|
+
'1. Design new schema changes',
|
|
726
|
+
'2. Write migration scripts',
|
|
727
|
+
'3. Test migrations in staging',
|
|
728
|
+
'4. Back up production database',
|
|
729
|
+
'5. Run migrations in production',
|
|
730
|
+
'6. Verify data integrity',
|
|
731
|
+
],
|
|
732
|
+
},
|
|
733
|
+
email: {
|
|
734
|
+
name: 'Email Notification System',
|
|
735
|
+
agents: ['@Planner', '@Research', '@CTO', '@Backend', '@Frontend', '@Testing'],
|
|
736
|
+
description: 'Transactional emails with templates',
|
|
737
|
+
steps: [
|
|
738
|
+
'1. Choose email service (Resend, SendGrid)',
|
|
739
|
+
'2. Set up email templates',
|
|
740
|
+
'3. Implement email API endpoints',
|
|
741
|
+
'4. Add email queue for async sending',
|
|
742
|
+
'5. Test email delivery',
|
|
743
|
+
'6. Monitor deliverability',
|
|
744
|
+
],
|
|
745
|
+
},
|
|
746
|
+
realtime: {
|
|
747
|
+
name: 'Real-Time Features',
|
|
748
|
+
agents: ['@Planner', '@CTO', '@Backend', '@Frontend', '@Testing'],
|
|
749
|
+
description: 'Live notifications with WebSockets',
|
|
750
|
+
steps: [
|
|
751
|
+
'1. Choose WebSocket library (Socket.io, Pusher)',
|
|
752
|
+
'2. Set up WebSocket server',
|
|
753
|
+
'3. Implement event broadcasting',
|
|
754
|
+
'4. Build frontend listeners',
|
|
755
|
+
'5. Test real-time updates',
|
|
756
|
+
'6. Handle reconnection logic',
|
|
757
|
+
],
|
|
758
|
+
},
|
|
759
|
+
sentry: {
|
|
760
|
+
name: 'Sentry Error Tracking',
|
|
761
|
+
agents: ['@Planner', '@Research', '@CTO', '@Backend', '@Frontend', '@DevOps'],
|
|
762
|
+
description: 'Error monitoring with Sentry',
|
|
763
|
+
steps: [
|
|
764
|
+
'1. Create Sentry account and project',
|
|
765
|
+
'2. Install Sentry SDKs for frontend and backend',
|
|
766
|
+
'3. Configure error boundaries for React',
|
|
767
|
+
'4. Set up source maps for debugging',
|
|
768
|
+
'5. Configure alerts and notifications',
|
|
769
|
+
'6. Test error capture in development',
|
|
770
|
+
],
|
|
771
|
+
},
|
|
772
|
+
shopify: {
|
|
773
|
+
name: 'Shopify Product Integration',
|
|
774
|
+
agents: ['@Planner', '@Research', '@CTO', '@Database', '@Backend', '@DevOps'],
|
|
775
|
+
description: 'Sync products from Shopify store',
|
|
776
|
+
steps: [
|
|
777
|
+
'1. Create Shopify Partner account and development store',
|
|
778
|
+
'2. Set up Shopify app with Admin API access',
|
|
779
|
+
'3. Design database schema for products',
|
|
780
|
+
'4. Build product sync endpoint',
|
|
781
|
+
'5. Implement webhook handlers for product updates',
|
|
782
|
+
'6. Schedule full product sync (cron job)',
|
|
783
|
+
],
|
|
784
|
+
},
|
|
785
|
+
analytics: {
|
|
786
|
+
name: 'PostHog Analytics Integration',
|
|
787
|
+
agents: ['@Planner', '@Research', '@CTO', '@Backend', '@Frontend', '@DevOps'],
|
|
788
|
+
description: 'Track user behavior with PostHog',
|
|
789
|
+
steps: [
|
|
790
|
+
'1. Create PostHog account and project',
|
|
791
|
+
'2. Install PostHog SDKs for frontend and backend',
|
|
792
|
+
'3. Set up core event tracking (signup, login, feature usage)',
|
|
793
|
+
'4. Create conversion funnel dashboard',
|
|
794
|
+
'5. Set up feature flags (optional)',
|
|
795
|
+
'6. Configure user identification',
|
|
796
|
+
],
|
|
797
|
+
},
|
|
798
|
+
};
|
|
799
|
+
|
|
800
|
+
program
|
|
801
|
+
.command('workflow <feature>')
|
|
802
|
+
.description('Show workflow for common features (auth, payments, deployment, etc.)')
|
|
803
|
+
.action((feature) => {
|
|
804
|
+
const workflow = WORKFLOWS[feature.toLowerCase()];
|
|
805
|
+
|
|
806
|
+
if (!workflow) {
|
|
807
|
+
console.log(chalk.red(`\n❌ Workflow "${feature}" not found.\n`));
|
|
808
|
+
console.log(chalk.gray('Available workflows:'));
|
|
809
|
+
Object.keys(WORKFLOWS).forEach(key => {
|
|
810
|
+
console.log(chalk.cyan(` - ${key}`) + chalk.gray(` (${WORKFLOWS[key].name})`));
|
|
811
|
+
});
|
|
812
|
+
console.log('\n' + chalk.gray('Usage: ultra-dex workflow <feature>\n'));
|
|
813
|
+
process.exit(1);
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
console.log(chalk.bold(`\n📋 ${workflow.name} Workflow\n`));
|
|
817
|
+
console.log(chalk.gray(workflow.description));
|
|
818
|
+
|
|
819
|
+
console.log(chalk.bold('\n🤖 Agents Involved:\n'));
|
|
820
|
+
workflow.agents.forEach((agent, i) => {
|
|
821
|
+
console.log(chalk.cyan(` ${i + 1}. ${agent}`));
|
|
822
|
+
});
|
|
823
|
+
|
|
824
|
+
if (workflow.steps) {
|
|
825
|
+
console.log(chalk.bold('\n📝 Implementation Steps:\n'));
|
|
826
|
+
workflow.steps.forEach(step => {
|
|
827
|
+
console.log(chalk.gray(` ${step}`));
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
console.log(chalk.bold('\n📚 Full Example:\n'));
|
|
832
|
+
console.log(chalk.blue(' https://github.com/Srujan0798/Ultra-Dex/blob/main/guides/ADVANCED-WORKFLOWS.md'));
|
|
833
|
+
console.log(chalk.gray(` (Search for "Example: ${workflow.name}")\n`));
|
|
834
|
+
});
|
|
835
|
+
|
|
836
|
+
program
|
|
837
|
+
.command('suggest')
|
|
838
|
+
.description('Get AI agent suggestions for your task')
|
|
839
|
+
.action(async () => {
|
|
840
|
+
console.log(chalk.cyan('\n🤖 Ultra-Dex Agent Suggester\n'));
|
|
841
|
+
|
|
842
|
+
const answers = await inquirer.prompt([
|
|
843
|
+
{
|
|
844
|
+
type: 'list',
|
|
845
|
+
name: 'taskType',
|
|
846
|
+
message: 'What are you trying to build?',
|
|
847
|
+
choices: [
|
|
848
|
+
'New feature from scratch',
|
|
849
|
+
'Authentication system',
|
|
850
|
+
'Payment integration',
|
|
851
|
+
'Database changes',
|
|
852
|
+
'Bug fix',
|
|
853
|
+
'Performance optimization',
|
|
854
|
+
'Deployment/DevOps',
|
|
855
|
+
'API endpoint',
|
|
856
|
+
'UI component',
|
|
857
|
+
'Testing',
|
|
858
|
+
],
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
type: 'input',
|
|
862
|
+
name: 'description',
|
|
863
|
+
message: 'Briefly describe your task:',
|
|
864
|
+
default: '',
|
|
865
|
+
},
|
|
866
|
+
]);
|
|
867
|
+
|
|
868
|
+
console.log(chalk.bold('\n💡 Suggested Agent Workflow:\n'));
|
|
869
|
+
|
|
870
|
+
// Agent suggestions based on task type
|
|
871
|
+
let suggestedAgents = [];
|
|
872
|
+
let reasoning = '';
|
|
873
|
+
|
|
874
|
+
switch (answers.taskType) {
|
|
875
|
+
case 'New feature from scratch':
|
|
876
|
+
suggestedAgents = ['@Planner', '@CTO', '@Database', '@Backend', '@Frontend', '@Testing', '@Reviewer', '@DevOps'];
|
|
877
|
+
reasoning = 'Complete feature requires planning, architecture, implementation, testing, and deployment';
|
|
878
|
+
break;
|
|
879
|
+
|
|
880
|
+
case 'Authentication system':
|
|
881
|
+
suggestedAgents = ['@Planner', '@Research', '@CTO', '@Database', '@Backend', '@Frontend', '@Security', '@DevOps'];
|
|
882
|
+
reasoning = 'Auth requires research (providers), security review, and full-stack implementation';
|
|
883
|
+
break;
|
|
884
|
+
|
|
885
|
+
case 'Payment integration':
|
|
886
|
+
suggestedAgents = ['@Planner', '@Research', '@CTO', '@Database', '@Backend', '@Frontend', '@Testing', '@Security', '@DevOps'];
|
|
887
|
+
reasoning = 'Payments need provider research, webhook handling, testing, and security audit';
|
|
888
|
+
break;
|
|
889
|
+
|
|
890
|
+
case 'Database changes':
|
|
891
|
+
suggestedAgents = ['@Planner', '@CTO', '@Database', '@Backend', '@Testing'];
|
|
892
|
+
reasoning = 'Schema changes need planning, architecture review, migration, and testing';
|
|
893
|
+
break;
|
|
894
|
+
|
|
895
|
+
case 'Bug fix':
|
|
896
|
+
suggestedAgents = ['@Debugger', '@Testing', '@Reviewer'];
|
|
897
|
+
reasoning = 'Debug issue, add test to prevent regression, review fix';
|
|
898
|
+
break;
|
|
899
|
+
|
|
900
|
+
case 'Performance optimization':
|
|
901
|
+
suggestedAgents = ['@Performance', '@Backend', '@Frontend', '@Database', '@Testing'];
|
|
902
|
+
reasoning = 'Identify bottlenecks, optimize code/queries, verify improvements';
|
|
903
|
+
break;
|
|
904
|
+
|
|
905
|
+
case 'Deployment/DevOps':
|
|
906
|
+
suggestedAgents = ['@DevOps', '@CTO', '@Security'];
|
|
907
|
+
reasoning = 'Infrastructure setup with security review';
|
|
908
|
+
break;
|
|
909
|
+
|
|
910
|
+
case 'API endpoint':
|
|
911
|
+
suggestedAgents = ['@Backend', '@Database', '@Testing', '@Reviewer'];
|
|
912
|
+
reasoning = 'Implement endpoint, add tests, review code quality';
|
|
913
|
+
break;
|
|
914
|
+
|
|
915
|
+
case 'UI component':
|
|
916
|
+
suggestedAgents = ['@Frontend', '@Reviewer'];
|
|
917
|
+
reasoning = 'Build component, review for quality and accessibility';
|
|
918
|
+
break;
|
|
919
|
+
|
|
920
|
+
case 'Testing':
|
|
921
|
+
suggestedAgents = ['@Testing', '@Reviewer'];
|
|
922
|
+
reasoning = 'Write tests, review coverage';
|
|
923
|
+
break;
|
|
924
|
+
|
|
925
|
+
default:
|
|
926
|
+
suggestedAgents = ['@Planner', '@CTO'];
|
|
927
|
+
reasoning = 'Start with planning and architecture review';
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
console.log(chalk.gray(reasoning + '\n'));
|
|
931
|
+
|
|
932
|
+
suggestedAgents.forEach((agent, i) => {
|
|
933
|
+
const agentName = agent.replace('@', '').toLowerCase();
|
|
934
|
+
const agentInfo = AGENTS.find(a => a.name === agentName);
|
|
935
|
+
const arrow = i < suggestedAgents.length - 1 ? ' →' : '';
|
|
936
|
+
console.log(chalk.cyan(` ${i + 1}. ${agent}`) + chalk.gray(` - ${agentInfo?.description || ''}`) + arrow);
|
|
937
|
+
});
|
|
938
|
+
|
|
939
|
+
console.log(chalk.bold('\n📚 Next Steps:\n'));
|
|
940
|
+
console.log(chalk.gray(` 1. Start with ${suggestedAgents[0]} to plan the task`));
|
|
941
|
+
console.log(chalk.gray(` 2. Hand off to each agent in sequence`));
|
|
942
|
+
console.log(chalk.gray(' 3. Use "ultra-dex agent <name>" to see full prompts\n'));
|
|
943
|
+
|
|
944
|
+
console.log(chalk.bold('🔗 Related Workflows:\n'));
|
|
945
|
+
if (answers.taskType === 'Authentication system') {
|
|
946
|
+
console.log(chalk.blue(' ultra-dex workflow auth'));
|
|
947
|
+
console.log(chalk.blue(' ultra-dex workflow supabase\n'));
|
|
948
|
+
} else if (answers.taskType === 'Payment integration') {
|
|
949
|
+
console.log(chalk.blue(' ultra-dex workflow payments\n'));
|
|
950
|
+
} else if (answers.taskType === 'Deployment/DevOps') {
|
|
951
|
+
console.log(chalk.blue(' ultra-dex workflow vercel'));
|
|
952
|
+
console.log(chalk.blue(' ultra-dex workflow cicd\n'));
|
|
953
|
+
} else {
|
|
954
|
+
console.log(chalk.gray(' Use "ultra-dex workflow <feature>" to see examples\n'));
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
|
|
958
|
+
program
|
|
959
|
+
.command('validate')
|
|
960
|
+
.description('Validate project structure against Ultra-Dex standards')
|
|
961
|
+
.option('-d, --dir <directory>', 'Project directory to validate', '.')
|
|
962
|
+
.action(async (options) => {
|
|
963
|
+
console.log(chalk.cyan('\n✅ Ultra-Dex Structure Validator\n'));
|
|
964
|
+
|
|
965
|
+
const projectDir = path.resolve(options.dir);
|
|
966
|
+
let passed = 0;
|
|
967
|
+
let failed = 0;
|
|
968
|
+
const warnings = [];
|
|
969
|
+
|
|
970
|
+
// Helper to check file/directory exists
|
|
971
|
+
async function checkExists(itemPath, type = 'file') {
|
|
972
|
+
try {
|
|
973
|
+
const stats = await fs.stat(path.join(projectDir, itemPath));
|
|
974
|
+
if (type === 'file' && stats.isFile()) return true;
|
|
975
|
+
if (type === 'dir' && stats.isDirectory()) return true;
|
|
976
|
+
return false;
|
|
977
|
+
} catch {
|
|
978
|
+
return false;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
console.log(chalk.bold('Checking required files...\n'));
|
|
983
|
+
|
|
984
|
+
// Check core planning files
|
|
985
|
+
const coreFiles = [
|
|
986
|
+
{ path: 'QUICK-START.md', required: true },
|
|
987
|
+
{ path: 'IMPLEMENTATION-PLAN.md', required: true },
|
|
988
|
+
{ path: 'CONTEXT.md', required: false },
|
|
989
|
+
{ path: 'README.md', required: false },
|
|
990
|
+
];
|
|
991
|
+
|
|
992
|
+
for (const file of coreFiles) {
|
|
993
|
+
const exists = await checkExists(file.path);
|
|
994
|
+
if (exists) {
|
|
995
|
+
passed++;
|
|
996
|
+
console.log(chalk.green(` ✅ ${file.path}`));
|
|
997
|
+
} else if (file.required) {
|
|
998
|
+
failed++;
|
|
999
|
+
console.log(chalk.red(` ❌ ${file.path} (required)`));
|
|
1000
|
+
} else {
|
|
1001
|
+
warnings.push(file.path);
|
|
1002
|
+
console.log(chalk.yellow(` ⚠️ ${file.path} (recommended)`));
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
console.log(chalk.bold('\nChecking directory structure...\n'));
|
|
1007
|
+
|
|
1008
|
+
const directories = [
|
|
1009
|
+
{ path: 'docs', required: false },
|
|
1010
|
+
{ path: '.agents', required: false },
|
|
1011
|
+
{ path: '.cursor/rules', required: false },
|
|
1012
|
+
];
|
|
1013
|
+
|
|
1014
|
+
for (const dir of directories) {
|
|
1015
|
+
const exists = await checkExists(dir.path, 'dir');
|
|
1016
|
+
if (exists) {
|
|
1017
|
+
passed++;
|
|
1018
|
+
console.log(chalk.green(` ✅ ${dir.path}/`));
|
|
1019
|
+
} else {
|
|
1020
|
+
warnings.push(dir.path);
|
|
1021
|
+
console.log(chalk.yellow(` ⚠️ ${dir.path}/ (optional)`));
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
console.log(chalk.bold('\nValidating content quality...\n'));
|
|
1026
|
+
|
|
1027
|
+
// Check if QUICK-START has key sections
|
|
1028
|
+
try {
|
|
1029
|
+
const quickStart = await fs.readFile(path.join(projectDir, 'QUICK-START.md'), 'utf-8');
|
|
1030
|
+
|
|
1031
|
+
const sections = ['idea', 'problem', 'feature', 'tech stack', 'tasks'];
|
|
1032
|
+
let sectionsFound = 0;
|
|
1033
|
+
|
|
1034
|
+
sections.forEach(section => {
|
|
1035
|
+
if (quickStart.toLowerCase().includes(section)) {
|
|
1036
|
+
sectionsFound++;
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
|
|
1040
|
+
if (sectionsFound >= 4) {
|
|
1041
|
+
passed++;
|
|
1042
|
+
console.log(chalk.green(` ✅ QUICK-START.md has ${sectionsFound}/${sections.length} key sections`));
|
|
1043
|
+
} else {
|
|
1044
|
+
failed++;
|
|
1045
|
+
console.log(chalk.red(` ❌ QUICK-START.md missing key sections (${sectionsFound}/${sections.length})`));
|
|
1046
|
+
}
|
|
1047
|
+
} catch {
|
|
1048
|
+
console.log(chalk.gray(' ⊘ Could not validate QUICK-START.md content'));
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
// Check if implementation plan has content
|
|
1052
|
+
try {
|
|
1053
|
+
const implPlan = await fs.readFile(path.join(projectDir, 'IMPLEMENTATION-PLAN.md'), 'utf-8');
|
|
1054
|
+
|
|
1055
|
+
if (implPlan.length > 500) {
|
|
1056
|
+
passed++;
|
|
1057
|
+
console.log(chalk.green(` ✅ IMPLEMENTATION-PLAN.md has substantial content`));
|
|
1058
|
+
} else {
|
|
1059
|
+
warnings.push('IMPLEMENTATION-PLAN.md needs more detail');
|
|
1060
|
+
console.log(chalk.yellow(` ⚠️ IMPLEMENTATION-PLAN.md is sparse (${implPlan.length} chars)`));
|
|
1061
|
+
}
|
|
1062
|
+
} catch {
|
|
1063
|
+
console.log(chalk.gray(' ⊘ Could not validate IMPLEMENTATION-PLAN.md content'));
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
// Summary
|
|
1067
|
+
console.log('\n' + chalk.bold('─'.repeat(50)));
|
|
1068
|
+
console.log(chalk.bold('\nValidation Summary:\n'));
|
|
1069
|
+
console.log(chalk.green(` ✅ Passed: ${passed}`));
|
|
1070
|
+
console.log(chalk.red(` ❌ Failed: ${failed}`));
|
|
1071
|
+
console.log(chalk.yellow(` ⚠️ Warnings: ${warnings.length}`));
|
|
1072
|
+
|
|
1073
|
+
// Overall status
|
|
1074
|
+
if (failed === 0) {
|
|
1075
|
+
console.log(chalk.bold.green('\n✅ VALIDATION PASSED\n'));
|
|
1076
|
+
console.log(chalk.gray('Your project structure follows Ultra-Dex standards.'));
|
|
1077
|
+
} else {
|
|
1078
|
+
console.log(chalk.bold.yellow('\n⚠️ VALIDATION INCOMPLETE\n'));
|
|
1079
|
+
console.log(chalk.gray('Fix required files to meet Ultra-Dex standards.'));
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
// Recommendations
|
|
1083
|
+
if (warnings.length > 0) {
|
|
1084
|
+
console.log(chalk.bold('\n💡 Recommendations:\n'));
|
|
1085
|
+
warnings.slice(0, 3).forEach(w => {
|
|
1086
|
+
console.log(chalk.cyan(` → Consider adding ${w}`));
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
console.log('\n' + chalk.gray('Run "ultra-dex init" to set up a proper Ultra-Dex project.\n'));
|
|
1091
|
+
});
|
|
1092
|
+
|
|
618
1093
|
program.parse();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra-dex",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "CLI for Ultra-Dex SaaS Implementation Framework",
|
|
3
|
+
"version": "1.7.1",
|
|
4
|
+
"description": "CLI for Ultra-Dex SaaS Implementation Framework with 15 Production Agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"saas",
|
|
7
7
|
"template",
|