ultra-dex 2.2.1 → 3.2.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.
- package/README.md +112 -151
- package/assets/agents/00-AGENT_INDEX.md +1 -1
- package/assets/code-patterns/clerk-middleware.ts +138 -0
- package/assets/code-patterns/prisma-schema.prisma +224 -0
- package/assets/code-patterns/rls-policies.sql +246 -0
- package/assets/code-patterns/server-actions.ts +191 -0
- package/assets/code-patterns/trpc-router.ts +258 -0
- package/assets/cursor-rules/13-ai-integration.mdc +155 -0
- package/assets/cursor-rules/14-server-components.mdc +81 -0
- package/assets/cursor-rules/15-server-actions.mdc +102 -0
- package/assets/cursor-rules/16-edge-middleware.mdc +105 -0
- package/assets/cursor-rules/17-streaming-ssr.mdc +138 -0
- package/assets/docs/LAUNCH-POSTS.md +1 -1
- package/assets/docs/QUICK-REFERENCE.md +9 -4
- package/assets/docs/VISION-V2.md +1 -1
- package/assets/hooks/pre-commit +98 -0
- package/assets/saas-plan/04-Imp-Template.md +1 -1
- package/bin/ultra-dex.js +132 -4
- package/lib/commands/advanced.js +471 -0
- package/lib/commands/agent-builder.js +226 -0
- package/lib/commands/agents.js +102 -42
- package/lib/commands/auto-implement.js +68 -0
- package/lib/commands/banner.js +43 -21
- package/lib/commands/build.js +78 -183
- package/lib/commands/ci-monitor.js +84 -0
- package/lib/commands/config.js +207 -0
- package/lib/commands/dashboard.js +770 -0
- package/lib/commands/diff.js +233 -0
- package/lib/commands/doctor.js +416 -0
- package/lib/commands/export.js +408 -0
- package/lib/commands/fix.js +96 -0
- package/lib/commands/generate.js +105 -78
- package/lib/commands/hooks.js +251 -76
- package/lib/commands/init.js +102 -54
- package/lib/commands/memory.js +80 -0
- package/lib/commands/plan.js +82 -0
- package/lib/commands/review.js +34 -5
- package/lib/commands/run.js +233 -0
- package/lib/commands/scaffold.js +151 -0
- package/lib/commands/serve.js +179 -146
- package/lib/commands/state.js +327 -0
- package/lib/commands/swarm.js +306 -0
- package/lib/commands/sync.js +82 -23
- package/lib/commands/team.js +275 -0
- package/lib/commands/upgrade.js +190 -0
- package/lib/commands/validate.js +34 -0
- package/lib/commands/verify.js +81 -0
- package/lib/commands/watch.js +79 -0
- package/lib/config/theme.js +47 -0
- package/lib/mcp/graph.js +92 -0
- package/lib/mcp/memory.js +95 -0
- package/lib/mcp/resources.js +152 -0
- package/lib/mcp/server.js +34 -0
- package/lib/mcp/tools.js +481 -0
- package/lib/mcp/websocket.js +117 -0
- package/lib/providers/index.js +49 -4
- package/lib/providers/ollama.js +136 -0
- package/lib/providers/router.js +63 -0
- package/lib/quality/scanner.js +128 -0
- package/lib/swarm/coordinator.js +97 -0
- package/lib/swarm/index.js +598 -0
- package/lib/swarm/protocol.js +677 -0
- package/lib/swarm/tiers.js +485 -0
- package/lib/templates/code/clerk-middleware.ts +138 -0
- package/lib/templates/code/prisma-schema.prisma +224 -0
- package/lib/templates/code/rls-policies.sql +246 -0
- package/lib/templates/code/server-actions.ts +191 -0
- package/lib/templates/code/trpc-router.ts +258 -0
- package/lib/templates/custom-agent.md +10 -0
- package/lib/themes/doomsday.js +229 -0
- package/lib/ui/index.js +5 -0
- package/lib/ui/interface.js +241 -0
- package/lib/ui/spinners.js +116 -0
- package/lib/ui/theme.js +183 -0
- package/lib/utils/agents.js +32 -0
- package/lib/utils/files.js +14 -0
- package/lib/utils/graph.js +108 -0
- package/lib/utils/help.js +64 -0
- package/lib/utils/messages.js +35 -0
- package/lib/utils/progress.js +24 -0
- package/lib/utils/prompts.js +47 -0
- package/lib/utils/spinners.js +46 -0
- package/lib/utils/status.js +31 -0
- package/lib/utils/tables.js +41 -0
- package/lib/utils/theme-state.js +9 -0
- package/lib/utils/version-display.js +32 -0
- package/package.json +31 -13
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Streaming SSR (Next.js 15)
|
|
2
|
+
|
|
3
|
+
> Stream UI to the client progressively. Show content as it loads.
|
|
4
|
+
|
|
5
|
+
## Suspense Boundaries
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
// app/dashboard/page.tsx
|
|
9
|
+
import { Suspense } from 'react';
|
|
10
|
+
import { UserProfile } from './user-profile';
|
|
11
|
+
import { Analytics } from './analytics';
|
|
12
|
+
import { RecentActivity } from './recent-activity';
|
|
13
|
+
|
|
14
|
+
export default function DashboardPage() {
|
|
15
|
+
return (
|
|
16
|
+
<div className="grid grid-cols-3 gap-4">
|
|
17
|
+
{/* Loads first - critical content */}
|
|
18
|
+
<Suspense fallback={<ProfileSkeleton />}>
|
|
19
|
+
<UserProfile />
|
|
20
|
+
</Suspense>
|
|
21
|
+
|
|
22
|
+
{/* Loads second - important but slower */}
|
|
23
|
+
<Suspense fallback={<AnalyticsSkeleton />}>
|
|
24
|
+
<Analytics />
|
|
25
|
+
</Suspense>
|
|
26
|
+
|
|
27
|
+
{/* Loads last - can wait */}
|
|
28
|
+
<Suspense fallback={<ActivitySkeleton />}>
|
|
29
|
+
<RecentActivity />
|
|
30
|
+
</Suspense>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Loading States
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
// app/dashboard/loading.tsx
|
|
40
|
+
export default function Loading() {
|
|
41
|
+
return (
|
|
42
|
+
<div className="animate-pulse">
|
|
43
|
+
<div className="h-8 bg-gray-200 rounded w-1/4 mb-4" />
|
|
44
|
+
<div className="h-64 bg-gray-200 rounded" />
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Streaming with Data
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
// Server Component that fetches data
|
|
54
|
+
async function SlowDataComponent() {
|
|
55
|
+
// This will stream when ready
|
|
56
|
+
const data = await fetch('https://api.example.com/slow-endpoint', {
|
|
57
|
+
next: { revalidate: 60 },
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
return <DataDisplay data={data} />;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Usage with Suspense
|
|
64
|
+
export default function Page() {
|
|
65
|
+
return (
|
|
66
|
+
<Suspense fallback={<LoadingSpinner />}>
|
|
67
|
+
<SlowDataComponent />
|
|
68
|
+
</Suspense>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Parallel Data Fetching
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
// Fetch in parallel, stream as each resolves
|
|
77
|
+
export default async function Page() {
|
|
78
|
+
// Start all fetches immediately
|
|
79
|
+
const userPromise = getUser();
|
|
80
|
+
const postsPromise = getPosts();
|
|
81
|
+
const analyticsPromise = getAnalytics();
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<div>
|
|
85
|
+
<Suspense fallback={<UserSkeleton />}>
|
|
86
|
+
<UserSection promise={userPromise} />
|
|
87
|
+
</Suspense>
|
|
88
|
+
|
|
89
|
+
<Suspense fallback={<PostsSkeleton />}>
|
|
90
|
+
<PostsSection promise={postsPromise} />
|
|
91
|
+
</Suspense>
|
|
92
|
+
|
|
93
|
+
<Suspense fallback={<AnalyticsSkeleton />}>
|
|
94
|
+
<AnalyticsSection promise={analyticsPromise} />
|
|
95
|
+
</Suspense>
|
|
96
|
+
</div>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Component that awaits the promise
|
|
101
|
+
async function UserSection({ promise }: { promise: Promise<User> }) {
|
|
102
|
+
const user = await promise;
|
|
103
|
+
return <div>{user.name}</div>;
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Error Boundaries
|
|
108
|
+
|
|
109
|
+
```tsx
|
|
110
|
+
// app/dashboard/error.tsx
|
|
111
|
+
'use client';
|
|
112
|
+
|
|
113
|
+
export default function Error({
|
|
114
|
+
error,
|
|
115
|
+
reset,
|
|
116
|
+
}: {
|
|
117
|
+
error: Error;
|
|
118
|
+
reset: () => void;
|
|
119
|
+
}) {
|
|
120
|
+
return (
|
|
121
|
+
<div className="p-4 bg-red-50 rounded">
|
|
122
|
+
<h2>Something went wrong!</h2>
|
|
123
|
+
<p>{error.message}</p>
|
|
124
|
+
<button onClick={reset}>Try again</button>
|
|
125
|
+
</div>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Rules
|
|
131
|
+
|
|
132
|
+
- Wrap slow components in Suspense
|
|
133
|
+
- Show meaningful loading states (skeletons > spinners)
|
|
134
|
+
- Place Suspense boundaries at logical UI sections
|
|
135
|
+
- Use error.tsx for error boundaries
|
|
136
|
+
- Start data fetches as early as possible
|
|
137
|
+
- Don't nest too many Suspense boundaries (causes waterfall)
|
|
138
|
+
- Consider using loading.tsx for route-level loading
|
|
@@ -77,7 +77,7 @@ Built Ultra-Dex to fix this:
|
|
|
77
77
|
- 21-step verification checklist per task
|
|
78
78
|
- 3 filled examples to learn from
|
|
79
79
|
- CLI: `npx ultra-dex init`
|
|
80
|
-
-
|
|
80
|
+
- 13 Cursor rules for AI coding
|
|
81
81
|
|
|
82
82
|
**Key feature:** Phased approach. Fill 8 sections, code, fill more as needed. Not waterfall.
|
|
83
83
|
|
|
@@ -19,7 +19,7 @@ npx ultra-dex agent backend
|
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
## 🤖
|
|
22
|
+
## 🤖 16 AI Agents by Tier
|
|
23
23
|
|
|
24
24
|
| Tier | Agent | Use When |
|
|
25
25
|
|------|-------|----------|
|
|
@@ -38,6 +38,7 @@ npx ultra-dex agent backend
|
|
|
38
38
|
| | @Debugger | Bug fixing & troubleshooting |
|
|
39
39
|
| **6. Specialist** | @Performance | Performance optimization |
|
|
40
40
|
| | @Refactoring | Code quality & design patterns |
|
|
41
|
+
| **0. Orchestration** | @Orchestrator | Multi-agent coordination |
|
|
41
42
|
|
|
42
43
|
**Full Index:** [agents/00-AGENT_INDEX.md](./agents/00-AGENT_INDEX.md)
|
|
43
44
|
|
|
@@ -136,13 +137,17 @@ Task type:
|
|
|
136
137
|
```bash
|
|
137
138
|
# Project Setup
|
|
138
139
|
npx ultra-dex init # Interactive setup
|
|
139
|
-
npx ultra-dex init --yes # Use defaults
|
|
140
140
|
|
|
141
141
|
# Agents
|
|
142
142
|
npx ultra-dex agents # List all 16 agents
|
|
143
143
|
npx ultra-dex agent backend # Show backend agent
|
|
144
144
|
npx ultra-dex agent cto # Show CTO agent
|
|
145
145
|
|
|
146
|
+
# Team
|
|
147
|
+
npx ultra-dex team init # Initialize team config
|
|
148
|
+
npx ultra-dex team add dev@acme.com --role admin
|
|
149
|
+
npx ultra-dex team list
|
|
150
|
+
|
|
146
151
|
# Validation
|
|
147
152
|
npx ultra-dex audit # Check project completeness
|
|
148
153
|
|
|
@@ -312,7 +317,7 @@ Use different AI tools for different tasks:
|
|
|
312
317
|
|
|
313
318
|
## 📊 Project Statistics
|
|
314
319
|
|
|
315
|
-
- **
|
|
320
|
+
- **16 Agents** - 7 tiers, production pipeline coverage
|
|
316
321
|
- **6 Guides** - 3,283 lines, 83 KB of documentation
|
|
317
322
|
- **2 Templates** - MASTER-PLAN (800 lines), PHASE-TRACKER (329 lines)
|
|
318
323
|
- **34 Sections** - Complete implementation template
|
|
@@ -333,6 +338,6 @@ Use different AI tools for different tasks:
|
|
|
333
338
|
|
|
334
339
|
---
|
|
335
340
|
|
|
336
|
-
*Ultra-Dex
|
|
341
|
+
*Ultra-Dex v2.1.0 - Professional AI Orchestration Meta Layer*
|
|
337
342
|
|
|
338
343
|
**Print this page for quick reference while coding!**
|
package/assets/docs/VISION-V2.md
CHANGED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Ultra-Dex Pre-Commit Hook v3.0
|
|
3
|
+
# Validates project alignment and structure before allowing commits
|
|
4
|
+
# Install with: npx ultra-dex hooks install
|
|
5
|
+
# Remove with: npx ultra-dex hooks remove
|
|
6
|
+
|
|
7
|
+
set -e
|
|
8
|
+
|
|
9
|
+
echo ""
|
|
10
|
+
echo "🎯 Ultra-Dex: Running pre-commit validation..."
|
|
11
|
+
echo ""
|
|
12
|
+
|
|
13
|
+
# Configuration
|
|
14
|
+
MIN_ALIGNMENT_SCORE=70
|
|
15
|
+
VALIDATION_LOG="/tmp/ultra-dex-validate.log"
|
|
16
|
+
ALIGN_LOG="/tmp/ultra-dex-align.log"
|
|
17
|
+
|
|
18
|
+
# Check if ultra-dex is available
|
|
19
|
+
if ! command -v ultra-dex &> /dev/null && ! npx ultra-dex --version &> /dev/null 2>&1; then
|
|
20
|
+
echo "⚠️ Ultra-Dex not found. Skipping validation."
|
|
21
|
+
echo " Install with: npm install -g ultra-dex"
|
|
22
|
+
exit 0
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
# Run alignment check and capture score
|
|
26
|
+
echo "📊 Checking alignment score..."
|
|
27
|
+
npx ultra-dex align --dir . > "$ALIGN_LOG" 2>&1 || true
|
|
28
|
+
|
|
29
|
+
# Extract score from output (looking for percentage)
|
|
30
|
+
SCORE=$(grep -oE '[0-9]+%' "$ALIGN_LOG" | head -1 | tr -d '%' || echo "0")
|
|
31
|
+
|
|
32
|
+
if [ -z "$SCORE" ] || [ "$SCORE" = "0" ]; then
|
|
33
|
+
# Try alternative extraction
|
|
34
|
+
SCORE=$(grep -oE 'Score: [0-9]+' "$ALIGN_LOG" | grep -oE '[0-9]+' | head -1 || echo "85")
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
echo " Current alignment score: ${SCORE}%"
|
|
38
|
+
|
|
39
|
+
# Check minimum score threshold
|
|
40
|
+
if [ "$SCORE" -lt "$MIN_ALIGNMENT_SCORE" ]; then
|
|
41
|
+
echo ""
|
|
42
|
+
echo "❌ COMMIT BLOCKED: Alignment score ($SCORE%) is below minimum ($MIN_ALIGNMENT_SCORE%)"
|
|
43
|
+
echo ""
|
|
44
|
+
echo "📋 To fix this:"
|
|
45
|
+
echo " 1. Run: npx ultra-dex validate"
|
|
46
|
+
echo " 2. Run: npx ultra-dex fix (to auto-fix issues)"
|
|
47
|
+
echo " 3. Review and commit again"
|
|
48
|
+
echo ""
|
|
49
|
+
echo "🔓 To bypass (not recommended):"
|
|
50
|
+
echo " git commit --no-verify"
|
|
51
|
+
echo ""
|
|
52
|
+
exit 1
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# Run validation
|
|
56
|
+
echo "🔍 Running validation checks..."
|
|
57
|
+
npx ultra-dex validate --dir . --scan > "$VALIDATION_LOG" 2>&1
|
|
58
|
+
VALIDATE_RESULT=$?
|
|
59
|
+
|
|
60
|
+
if [ $VALIDATE_RESULT -ne 0 ]; then
|
|
61
|
+
echo ""
|
|
62
|
+
echo "❌ COMMIT BLOCKED: Validation failed"
|
|
63
|
+
echo ""
|
|
64
|
+
cat "$VALIDATION_LOG"
|
|
65
|
+
echo ""
|
|
66
|
+
echo "📋 Run 'npx ultra-dex validate' for details"
|
|
67
|
+
echo "🔓 To bypass: git commit --no-verify"
|
|
68
|
+
echo ""
|
|
69
|
+
exit 1
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
# Check for required documentation
|
|
73
|
+
WARNINGS=""
|
|
74
|
+
|
|
75
|
+
if [ ! -f "IMPLEMENTATION-PLAN.md" ]; then
|
|
76
|
+
WARNINGS="${WARNINGS} ⚠️ IMPLEMENTATION-PLAN.md not found\n"
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
if [ ! -f "README.md" ]; then
|
|
80
|
+
WARNINGS="${WARNINGS} ⚠️ README.md not found\n"
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
if [ -n "$WARNINGS" ]; then
|
|
84
|
+
echo ""
|
|
85
|
+
echo "📝 Warnings (commit allowed):"
|
|
86
|
+
printf "$WARNINGS"
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
# Success
|
|
90
|
+
echo ""
|
|
91
|
+
echo "✅ Ultra-Dex validation passed!"
|
|
92
|
+
echo " Score: ${SCORE}% (minimum: ${MIN_ALIGNMENT_SCORE}%)"
|
|
93
|
+
echo ""
|
|
94
|
+
|
|
95
|
+
# Cleanup
|
|
96
|
+
rm -f "$VALIDATION_LOG" "$ALIGN_LOG" 2>/dev/null || true
|
|
97
|
+
|
|
98
|
+
exit 0
|
package/bin/ultra-dex.js
CHANGED
|
@@ -1,19 +1,80 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
process.env.FORCE_COLOR = '3';
|
|
4
|
+
|
|
3
5
|
import { Command } from 'commander';
|
|
6
|
+
import updateNotifier from 'update-notifier';
|
|
7
|
+
import boxen from 'boxen';
|
|
8
|
+
import chalk from 'chalk';
|
|
9
|
+
import { setDoomsdayMode } from '../lib/utils/theme-state.js';
|
|
10
|
+
|
|
11
|
+
// Check for doomsday flag early
|
|
12
|
+
if (process.argv.includes('--doomsday')) {
|
|
13
|
+
setDoomsdayMode(true);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
import { showHelp as showDoomsdayHelp } from '../lib/themes/doomsday.js';
|
|
17
|
+
|
|
18
|
+
if (process.argv.includes('--help') && process.argv.includes('--doomsday')) {
|
|
19
|
+
showDoomsdayHelp();
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Check for updates
|
|
24
|
+
const pkg = { name: 'ultra-dex', version: '3.2.0' };
|
|
25
|
+
const notifier = updateNotifier({ pkg, updateCheckInterval: 1000 * 60 * 60 * 24 });
|
|
26
|
+
|
|
27
|
+
if (notifier.update) {
|
|
28
|
+
console.log(boxen(
|
|
29
|
+
`Update available! ${chalk.dim(notifier.update.current)} → ${chalk.green(notifier.update.latest)}\n` +
|
|
30
|
+
`Run ${chalk.cyan('npm install -g ultra-dex')} to update`,
|
|
31
|
+
{
|
|
32
|
+
padding: 1,
|
|
33
|
+
margin: 1,
|
|
34
|
+
borderStyle: 'round',
|
|
35
|
+
borderColor: 'yellow'
|
|
36
|
+
}
|
|
37
|
+
));
|
|
38
|
+
}
|
|
4
39
|
|
|
5
40
|
import { banner } from '../lib/commands/banner.js';
|
|
6
41
|
import { registerInitCommand } from '../lib/commands/init.js';
|
|
7
42
|
import { registerAuditCommand } from '../lib/commands/audit.js';
|
|
8
43
|
import { registerExamplesCommand } from '../lib/commands/examples.js';
|
|
9
44
|
import { registerAgentsCommand, registerPackCommand } from '../lib/commands/agents.js';
|
|
10
|
-
import {
|
|
45
|
+
import { registerAgentBuilderCommand } from '../lib/commands/agent-builder.js';
|
|
46
|
+
import { registerGenerateCommand } from '../lib/commands/generate.js';
|
|
47
|
+
import { registerBuildCommand } from '../lib/commands/build.js';
|
|
48
|
+
import { registerReviewCommand } from '../lib/commands/review.js';
|
|
49
|
+
import { registerRunCommand, registerSwarmCommand } from '../lib/commands/run.js';
|
|
50
|
+
import { registerAutoImplementCommand } from '../lib/commands/auto-implement.js';
|
|
51
|
+
import { registerCiMonitorCommand } from '../lib/commands/ci-monitor.js';
|
|
52
|
+
import { registerAlignCommand, registerStatusCommand, registerPreCommitCommand, registerStateCommand } from '../lib/commands/state.js';
|
|
53
|
+
import { registerDoctorCommand } from '../lib/commands/doctor.js';
|
|
54
|
+
import { registerDashboardCommand } from '../lib/commands/dashboard.js';
|
|
55
|
+
import { registerCheckCommand } from '../lib/commands/advanced.js';
|
|
11
56
|
import { registerServeCommand } from '../lib/commands/serve.js';
|
|
57
|
+
import { registerVerifyCommand } from '../lib/commands/verify.js';
|
|
58
|
+
|
|
59
|
+
// v3.0 Commands
|
|
60
|
+
import { swarmCommand } from '../lib/commands/swarm.js';
|
|
61
|
+
import { watchCommand } from '../lib/commands/watch.js';
|
|
62
|
+
import { diffCommand } from '../lib/commands/diff.js';
|
|
63
|
+
import { exportCommand } from '../lib/commands/export.js';
|
|
64
|
+
import { upgradeCommand } from '../lib/commands/upgrade.js';
|
|
65
|
+
import { configCommand } from '../lib/commands/config.js';
|
|
66
|
+
|
|
12
67
|
import { registerWorkflowCommand } from '../lib/commands/workflows.js';
|
|
68
|
+
import { registerPlanCommand } from '../lib/commands/plan.js';
|
|
13
69
|
import { registerSuggestCommand } from '../lib/commands/suggest.js';
|
|
14
70
|
import { registerValidateCommand } from '../lib/commands/validate.js';
|
|
71
|
+
import { registerFixCommand } from '../lib/commands/fix.js';
|
|
15
72
|
import { registerHooksCommand } from '../lib/commands/hooks.js';
|
|
16
73
|
import { registerFetchCommand } from '../lib/commands/fetch.js';
|
|
74
|
+
import { registerSyncCommand } from '../lib/commands/sync.js';
|
|
75
|
+
import { registerTeamCommand } from '../lib/commands/team.js';
|
|
76
|
+
import { registerMemoryCommand } from '../lib/commands/memory.js';
|
|
77
|
+
import { registerScaffoldCommand } from '../lib/commands/scaffold.js';
|
|
17
78
|
|
|
18
79
|
const program = new Command();
|
|
19
80
|
program.banner = banner;
|
|
@@ -21,19 +82,86 @@ program.banner = banner;
|
|
|
21
82
|
program
|
|
22
83
|
.name('ultra-dex')
|
|
23
84
|
.description('CLI for Ultra-Dex SaaS Implementation Framework')
|
|
24
|
-
.version('2.
|
|
85
|
+
.version('3.2.0');
|
|
25
86
|
|
|
26
87
|
registerInitCommand(program);
|
|
27
88
|
registerAuditCommand(program);
|
|
28
89
|
registerExamplesCommand(program);
|
|
29
90
|
registerAgentsCommand(program);
|
|
30
|
-
|
|
91
|
+
registerGenerateCommand(program);
|
|
92
|
+
registerBuildCommand(program);
|
|
93
|
+
registerReviewCommand(program);
|
|
94
|
+
registerRunCommand(program);
|
|
95
|
+
|
|
96
|
+
// v3.0 Commands
|
|
97
|
+
program
|
|
98
|
+
.command('swarm <task>')
|
|
99
|
+
.description('Run autonomous agent pipeline')
|
|
100
|
+
.option('--dry-run', 'Show pipeline without executing')
|
|
101
|
+
.option('--parallel', 'Run implementation tier agents in parallel')
|
|
102
|
+
.action(swarmCommand);
|
|
103
|
+
|
|
104
|
+
program
|
|
105
|
+
.command('watch')
|
|
106
|
+
.description('Auto-update state on file changes')
|
|
107
|
+
.option('--interval <ms>', 'Debounce interval in milliseconds', '500')
|
|
108
|
+
.action(watchCommand);
|
|
109
|
+
|
|
110
|
+
program
|
|
111
|
+
.command('diff')
|
|
112
|
+
.description('Compare plan vs implemented code')
|
|
113
|
+
.option('--json', 'Output as JSON')
|
|
114
|
+
.action(diffCommand);
|
|
115
|
+
|
|
116
|
+
program
|
|
117
|
+
.command('export')
|
|
118
|
+
.description('Export project context')
|
|
119
|
+
.option('--format <type>', 'Output format: json, html, markdown, pdf', 'json')
|
|
120
|
+
.option('--output <path>', 'Output file path')
|
|
121
|
+
.option('--include-agents', 'Bundle all agent prompts')
|
|
122
|
+
.action(exportCommand);
|
|
123
|
+
|
|
124
|
+
program
|
|
125
|
+
.command('upgrade')
|
|
126
|
+
.description('Check for CLI updates')
|
|
127
|
+
.option('--check', 'Check only, do not show install instructions')
|
|
128
|
+
.option('--install', 'Automatically install latest version')
|
|
129
|
+
.action(upgradeCommand);
|
|
130
|
+
|
|
131
|
+
program
|
|
132
|
+
.command('config')
|
|
133
|
+
.description('Show or generate configuration')
|
|
134
|
+
.option('--mcp', 'Generate MCP config for Claude Desktop')
|
|
135
|
+
.option('--cursor', 'Generate Cursor IDE rules')
|
|
136
|
+
.option('--vscode', 'Generate VS Code settings.json')
|
|
137
|
+
.option('--show', 'Display current Ultra-Dex config')
|
|
138
|
+
.option('--set <key=value>', 'Set a config value')
|
|
139
|
+
.option('--get <key>', 'Get a specific config value')
|
|
140
|
+
.action(configCommand);
|
|
141
|
+
|
|
142
|
+
registerAutoImplementCommand(program);
|
|
143
|
+
registerCiMonitorCommand(program);
|
|
144
|
+
registerAlignCommand(program);
|
|
145
|
+
registerStatusCommand(program);
|
|
146
|
+
registerPreCommitCommand(program);
|
|
147
|
+
registerStateCommand(program);
|
|
148
|
+
registerDoctorCommand(program);
|
|
149
|
+
registerDashboardCommand(program);
|
|
150
|
+
registerCheckCommand(program);
|
|
31
151
|
registerServeCommand(program);
|
|
152
|
+
registerVerifyCommand(program);
|
|
32
153
|
registerPackCommand(program);
|
|
33
154
|
registerWorkflowCommand(program);
|
|
155
|
+
registerPlanCommand(program);
|
|
34
156
|
registerSuggestCommand(program);
|
|
35
157
|
registerValidateCommand(program);
|
|
158
|
+
registerFixCommand(program);
|
|
36
159
|
registerHooksCommand(program);
|
|
37
160
|
registerFetchCommand(program);
|
|
161
|
+
registerSyncCommand(program);
|
|
162
|
+
registerAgentBuilderCommand(program);
|
|
163
|
+
registerTeamCommand(program);
|
|
164
|
+
registerMemoryCommand(program);
|
|
165
|
+
registerScaffoldCommand(program);
|
|
38
166
|
|
|
39
|
-
program.parse();
|
|
167
|
+
program.parse();
|