ultra-dex 2.2.1 → 3.1.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 +84 -128
- package/assets/agents/00-AGENT_INDEX.md +1 -1
- 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 +95 -4
- package/lib/commands/advanced.js +471 -0
- package/lib/commands/agent-builder.js +226 -0
- package/lib/commands/agents.js +99 -42
- package/lib/commands/auto-implement.js +68 -0
- package/lib/commands/build.js +73 -187
- 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 +397 -0
- package/lib/commands/export.js +408 -0
- package/lib/commands/fix.js +96 -0
- package/lib/commands/generate.js +96 -72
- package/lib/commands/hooks.js +251 -76
- package/lib/commands/init.js +53 -1
- 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/serve.js +177 -146
- package/lib/commands/state.js +354 -0
- package/lib/commands/swarm.js +284 -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/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/custom-agent.md +10 -0
- package/lib/utils/files.js +14 -0
- package/lib/utils/graph.js +108 -0
- package/package.json +22 -13
package/README.md
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
# Ultra-Dex CLI
|
|
2
2
|
|
|
3
|
-
> Scaffold Ultra-Dex projects from the command line, now with **AI-powered plan generation
|
|
3
|
+
> Scaffold Ultra-Dex projects from the command line, now with **AI-powered plan generation** and **God Mode** autonomous agents.
|
|
4
4
|
|
|
5
|
-
## What's New in v2.
|
|
5
|
+
## What's New in v2.2+ (God Mode)
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
#
|
|
9
|
-
npx ultra-dex
|
|
8
|
+
# 🤖 Autonomous feature implementation (Plan -> Code -> Verify)
|
|
9
|
+
npx ultra-dex auto-implement "Add Stripe checkout"
|
|
10
10
|
|
|
11
|
-
#
|
|
12
|
-
npx ultra-dex
|
|
11
|
+
# 🔄 Real-time State & Graph Synchronization
|
|
12
|
+
npx ultra-dex sync --push --target ./s3-bucket
|
|
13
13
|
|
|
14
|
-
#
|
|
15
|
-
npx ultra-dex
|
|
14
|
+
# 🛡️ Self-Healing CI/CD Monitor
|
|
15
|
+
npx ultra-dex ci-monitor --port 3003
|
|
16
16
|
|
|
17
|
-
#
|
|
18
|
-
npx ultra-dex
|
|
17
|
+
# 🧠 Structural Graph Health Check
|
|
18
|
+
npx ultra-dex check
|
|
19
|
+
|
|
20
|
+
# 🖥️ Live Dashboard with Brain Visualization
|
|
21
|
+
npx ultra-dex dashboard
|
|
19
22
|
```
|
|
20
23
|
|
|
21
24
|
## First 10 Minutes
|
|
@@ -40,164 +43,134 @@ npm install -g ultra-dex
|
|
|
40
43
|
ultra-dex generate "Your idea"
|
|
41
44
|
```
|
|
42
45
|
|
|
43
|
-
## AI Commands (
|
|
46
|
+
## AI Commands (God Mode)
|
|
44
47
|
|
|
45
|
-
### `
|
|
48
|
+
### `auto-implement` - Autonomous Engineer
|
|
46
49
|
|
|
47
|
-
|
|
50
|
+
Fully autonomous feature implementation loop:
|
|
48
51
|
|
|
49
52
|
```bash
|
|
50
|
-
#
|
|
51
|
-
npx ultra-dex
|
|
53
|
+
# Implement a feature from scratch
|
|
54
|
+
npx ultra-dex auto-implement "Create a user profile page with Avatar upload"
|
|
52
55
|
|
|
53
|
-
#
|
|
54
|
-
npx ultra-dex
|
|
55
|
-
|
|
56
|
-
# Preview without calling AI
|
|
57
|
-
npx ultra-dex generate "idea" --dry-run
|
|
56
|
+
# Preview the plan without coding
|
|
57
|
+
npx ultra-dex auto-implement "Migrate to Tailwind" --dry-run
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
| `-o, --output` | Output directory | current |
|
|
66
|
-
| `-k, --key` | API key | env variable |
|
|
67
|
-
| `--dry-run` | Show structure only | false |
|
|
60
|
+
**How it works:**
|
|
61
|
+
1. **Structural Analysis:** Scans the Code Property Graph (CPG) for impact.
|
|
62
|
+
2. **Planning:** @Planner breaks down the task.
|
|
63
|
+
3. **Execution:** @Backend/@Frontend implement the code.
|
|
64
|
+
4. **Verification:** @Testing verifies the changes.
|
|
68
65
|
|
|
69
|
-
### `
|
|
66
|
+
### `sync` - State Synchronization
|
|
70
67
|
|
|
71
|
-
|
|
68
|
+
Keep your project's "Brain" (Context + Graph) in sync across devices:
|
|
72
69
|
|
|
73
70
|
```bash
|
|
74
|
-
#
|
|
75
|
-
npx ultra-dex
|
|
71
|
+
# Push state to a shared location
|
|
72
|
+
npx ultra-dex sync --push --target ./shared-drive
|
|
76
73
|
|
|
77
|
-
#
|
|
78
|
-
npx ultra-dex
|
|
79
|
-
|
|
80
|
-
# Copy to clipboard for external AI
|
|
81
|
-
npx ultra-dex build --agent planner --copy
|
|
74
|
+
# Pull state from a shared location
|
|
75
|
+
npx ultra-dex sync --pull --target ./shared-drive
|
|
82
76
|
```
|
|
83
77
|
|
|
84
|
-
|
|
85
|
-
| Agent | Role |
|
|
86
|
-
|-------|------|
|
|
87
|
-
| `planner` | Break down features into atomic tasks |
|
|
88
|
-
| `cto` | Architecture decisions |
|
|
89
|
-
| `backend` | API endpoints and business logic |
|
|
90
|
-
| `frontend` | UI components and pages |
|
|
91
|
-
| `database` | Schema design and migrations |
|
|
92
|
-
| `auth` | Authentication and authorization |
|
|
93
|
-
| `security` | Security audit |
|
|
94
|
-
| `testing` | Write and run tests |
|
|
95
|
-
| `reviewer` | Code review |
|
|
96
|
-
| `devops` | Deployment and CI/CD |
|
|
78
|
+
### `ci-monitor` - Self-Healing CI/CD
|
|
97
79
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
Check code alignment with plan:
|
|
80
|
+
Listen for build failures and automatically fix them:
|
|
101
81
|
|
|
102
82
|
```bash
|
|
103
|
-
npx ultra-dex
|
|
104
|
-
npx ultra-dex review --dir ./src
|
|
83
|
+
npx ultra-dex ci-monitor --port 3003
|
|
105
84
|
```
|
|
85
|
+
*Configure your CI provider (GitHub Actions) to send webhooks to this port.*
|
|
106
86
|
|
|
107
|
-
### `
|
|
87
|
+
### `watch` - Real-time Daemon
|
|
108
88
|
|
|
109
|
-
|
|
89
|
+
Keep the Code Property Graph updated as you code:
|
|
110
90
|
|
|
111
91
|
```bash
|
|
112
|
-
npx ultra-dex
|
|
113
|
-
npx ultra-dex align --json # Machine-readable output
|
|
92
|
+
npx ultra-dex watch
|
|
114
93
|
```
|
|
115
94
|
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
ANTHROPIC_API_KEY=sk-ant-... # Claude (recommended)
|
|
119
|
-
OPENAI_API_KEY=sk-... # OpenAI
|
|
120
|
-
GOOGLE_AI_KEY=... # Gemini
|
|
121
|
-
```
|
|
95
|
+
## Core Commands
|
|
122
96
|
|
|
123
|
-
### `
|
|
97
|
+
### `generate` - AI Plan Generation
|
|
124
98
|
|
|
125
|
-
|
|
99
|
+
Generate a complete implementation plan using AI:
|
|
126
100
|
|
|
127
101
|
```bash
|
|
128
|
-
|
|
102
|
+
# Basic usage
|
|
103
|
+
npx ultra-dex generate "A booking platform for dog groomers"
|
|
104
|
+
|
|
105
|
+
# With options
|
|
106
|
+
npx ultra-dex generate "idea" --provider openai --output ./my-project
|
|
129
107
|
```
|
|
130
108
|
|
|
131
|
-
|
|
109
|
+
### `build` - AI-Assisted Development
|
|
132
110
|
|
|
133
|
-
|
|
134
|
-
npx ultra-dex init --live --stack next15-prisma-clerk
|
|
135
|
-
```
|
|
111
|
+
Start development with AI agents (Interactive Mode):
|
|
136
112
|
|
|
137
|
-
|
|
113
|
+
```bash
|
|
114
|
+
# Interactive agent selection
|
|
115
|
+
npx ultra-dex build
|
|
138
116
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
| `-n, --name <name>` | Project name (skips prompt) |
|
|
143
|
-
| `-d, --dir <directory>` | Output directory (default: current) |
|
|
144
|
-
| `--preview` | Preview files without creating them |
|
|
145
|
-
| `--live` | Generate a runnable scaffold |
|
|
146
|
-
| `--stack <preset>` | Preset: next15-prisma-clerk, remix-supabase, sveltekit-drizzle |
|
|
117
|
+
# Specific agent
|
|
118
|
+
npx ultra-dex build --agent backend --task "Create user API endpoints"
|
|
119
|
+
```
|
|
147
120
|
|
|
148
|
-
### `
|
|
121
|
+
### `review` - Graph-Aware Code Review
|
|
149
122
|
|
|
150
|
-
|
|
123
|
+
Audit code against the plan using structural graph analysis:
|
|
151
124
|
|
|
152
125
|
```bash
|
|
153
|
-
npx ultra-dex
|
|
126
|
+
npx ultra-dex review
|
|
154
127
|
```
|
|
155
128
|
|
|
156
|
-
### `
|
|
129
|
+
### `align` - Quick Score
|
|
157
130
|
|
|
158
|
-
|
|
131
|
+
Get alignment score (Files + Plan + Graph Integrity):
|
|
159
132
|
|
|
160
133
|
```bash
|
|
161
|
-
npx ultra-dex
|
|
162
|
-
npx ultra-dex agent backend # Show specific agent
|
|
134
|
+
npx ultra-dex align
|
|
163
135
|
```
|
|
164
136
|
|
|
165
|
-
### `
|
|
137
|
+
### `check` - System Health
|
|
166
138
|
|
|
167
|
-
|
|
139
|
+
Verify repository health and graph consistency:
|
|
168
140
|
|
|
169
141
|
```bash
|
|
170
|
-
npx ultra-dex
|
|
171
|
-
npx ultra-dex fetch --agents --rules
|
|
142
|
+
npx ultra-dex check
|
|
172
143
|
```
|
|
173
144
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
Serve context (MCP-compatible):
|
|
145
|
+
## Environment Variables
|
|
177
146
|
|
|
178
147
|
```bash
|
|
179
|
-
|
|
148
|
+
ANTHROPIC_API_KEY=sk-ant-... # Claude (recommended for complex tasks)
|
|
149
|
+
OPENAI_API_KEY=sk-... # OpenAI
|
|
150
|
+
GOOGLE_AI_KEY=... # Gemini
|
|
151
|
+
ULTRA_DEX_DEFAULT_PROVIDER=router # Use "router" for hybrid local/cloud intelligence
|
|
180
152
|
```
|
|
181
153
|
|
|
182
|
-
|
|
154
|
+
## All Commands
|
|
183
155
|
|
|
184
156
|
| Command | Description |
|
|
185
157
|
|---------|-------------|
|
|
158
|
+
| `generate` | Generate full SaaS plan from idea |
|
|
159
|
+
| `auto-implement` | **(NEW)** Autonomously implement a feature |
|
|
160
|
+
| `build` | Interactive AI agent development loop |
|
|
161
|
+
| `review` | Review code against plan (Graph-Aware) |
|
|
162
|
+
| `align` | Quick alignment score |
|
|
163
|
+
| `sync` | **(NEW)** Sync project state across devices |
|
|
164
|
+
| `check` | **(NEW)** Verify repository health |
|
|
165
|
+
| `watch` | **(NEW)** Real-time graph synchronization daemon |
|
|
166
|
+
| `ci-monitor` | **(NEW)** Self-healing CI/CD webhook listener |
|
|
167
|
+
| `dashboard` | Start the JARVIS web dashboard |
|
|
186
168
|
| `init` | Initialize a new project |
|
|
187
|
-
| `init --preview` | Preview files without creating them |
|
|
188
|
-
| `init --live` | Generate a runnable scaffold |
|
|
189
169
|
| `audit` | Audit project for completeness |
|
|
190
|
-
| `examples` | List available examples |
|
|
191
170
|
| `agents` | List AI agents |
|
|
192
|
-
| `
|
|
193
|
-
| `hooks` | Set up git pre-commit hooks |
|
|
171
|
+
| `team` | Team collaboration (local) |
|
|
194
172
|
| `fetch` | Download assets for offline |
|
|
195
|
-
| `serve` | Serve context
|
|
196
|
-
| `validate` | Validate project structure |
|
|
197
|
-
| `workflow <feature>` | Show workflow for a feature |
|
|
198
|
-
| `suggest` | Get AI agent suggestions |
|
|
199
|
-
| `--help` | Show help |
|
|
200
|
-
| `--version` | Show version |
|
|
173
|
+
| `serve` | Serve context (MCP-compatible) |
|
|
201
174
|
|
|
202
175
|
## Example: AI Generation
|
|
203
176
|
|
|
@@ -210,21 +183,10 @@ $ npx ultra-dex generate "A booking platform for dog groomers"
|
|
|
210
183
|
|
|
211
184
|
📝 Idea: "A booking platform for dog groomers"
|
|
212
185
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
📊 Estimated Generation:
|
|
216
|
-
Input tokens: ~2,650
|
|
217
|
-
Output tokens: ~40,000
|
|
218
|
-
Estimated cost: ~$0.45
|
|
219
|
-
|
|
220
|
-
? Proceed with generation? Yes
|
|
221
|
-
|
|
222
|
-
⚡ Generating 34-section implementation plan...
|
|
223
|
-
|
|
224
|
-
✔ Generation complete!
|
|
186
|
+
...
|
|
225
187
|
|
|
226
188
|
✅ All 34 sections generated
|
|
227
|
-
Tokens used: 42,350 tokens
|
|
189
|
+
Tokens used: 42,350 tokens
|
|
228
190
|
Actual cost: $0.52
|
|
229
191
|
|
|
230
192
|
📦 Project: GroomBook
|
|
@@ -232,13 +194,7 @@ $ npx ultra-dex generate "A booking platform for dog groomers"
|
|
|
232
194
|
✓ Created ./IMPLEMENTATION-PLAN.md
|
|
233
195
|
✓ Created ./QUICK-START.md
|
|
234
196
|
✓ Created ./CONTEXT.md
|
|
235
|
-
|
|
236
|
-
🎉 Generation complete!
|
|
237
|
-
|
|
238
|
-
Next steps:
|
|
239
|
-
1. Review IMPLEMENTATION-PLAN.md
|
|
240
|
-
2. Customize sections as needed
|
|
241
|
-
3. Start building with: npx ultra-dex init
|
|
197
|
+
✓ Created .ultra/state.json (GOD MODE ACTIVE)
|
|
242
198
|
```
|
|
243
199
|
|
|
244
200
|
## Links
|
|
@@ -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
|
@@ -7,13 +7,38 @@ import { registerInitCommand } from '../lib/commands/init.js';
|
|
|
7
7
|
import { registerAuditCommand } from '../lib/commands/audit.js';
|
|
8
8
|
import { registerExamplesCommand } from '../lib/commands/examples.js';
|
|
9
9
|
import { registerAgentsCommand, registerPackCommand } from '../lib/commands/agents.js';
|
|
10
|
-
import {
|
|
10
|
+
import { registerAgentBuilderCommand } from '../lib/commands/agent-builder.js';
|
|
11
|
+
import { registerGenerateCommand } from '../lib/commands/generate.js';
|
|
12
|
+
import { registerBuildCommand } from '../lib/commands/build.js';
|
|
13
|
+
import { registerReviewCommand } from '../lib/commands/review.js';
|
|
14
|
+
import { registerRunCommand, registerSwarmCommand } from '../lib/commands/run.js';
|
|
15
|
+
import { registerAutoImplementCommand } from '../lib/commands/auto-implement.js';
|
|
16
|
+
import { registerCiMonitorCommand } from '../lib/commands/ci-monitor.js';
|
|
17
|
+
import { registerAlignCommand, registerStatusCommand, registerPreCommitCommand, registerStateCommand } from '../lib/commands/state.js';
|
|
18
|
+
import { registerDoctorCommand } from '../lib/commands/doctor.js';
|
|
19
|
+
import { registerDashboardCommand } from '../lib/commands/dashboard.js';
|
|
20
|
+
import { registerCheckCommand } from '../lib/commands/advanced.js';
|
|
11
21
|
import { registerServeCommand } from '../lib/commands/serve.js';
|
|
22
|
+
import { registerVerifyCommand } from '../lib/commands/verify.js';
|
|
23
|
+
|
|
24
|
+
// v3.0 Commands
|
|
25
|
+
import { swarmCommand } from '../lib/commands/swarm.js';
|
|
26
|
+
import { watchCommand } from '../lib/commands/watch.js';
|
|
27
|
+
import { diffCommand } from '../lib/commands/diff.js';
|
|
28
|
+
import { exportCommand } from '../lib/commands/export.js';
|
|
29
|
+
import { upgradeCommand } from '../lib/commands/upgrade.js';
|
|
30
|
+
import { configCommand } from '../lib/commands/config.js';
|
|
31
|
+
|
|
12
32
|
import { registerWorkflowCommand } from '../lib/commands/workflows.js';
|
|
33
|
+
import { registerPlanCommand } from '../lib/commands/plan.js';
|
|
13
34
|
import { registerSuggestCommand } from '../lib/commands/suggest.js';
|
|
14
35
|
import { registerValidateCommand } from '../lib/commands/validate.js';
|
|
36
|
+
import { registerFixCommand } from '../lib/commands/fix.js';
|
|
15
37
|
import { registerHooksCommand } from '../lib/commands/hooks.js';
|
|
16
38
|
import { registerFetchCommand } from '../lib/commands/fetch.js';
|
|
39
|
+
import { registerSyncCommand } from '../lib/commands/sync.js';
|
|
40
|
+
import { registerTeamCommand } from '../lib/commands/team.js';
|
|
41
|
+
import { registerMemoryCommand } from '../lib/commands/memory.js';
|
|
17
42
|
|
|
18
43
|
const program = new Command();
|
|
19
44
|
program.banner = banner;
|
|
@@ -21,19 +46,85 @@ program.banner = banner;
|
|
|
21
46
|
program
|
|
22
47
|
.name('ultra-dex')
|
|
23
48
|
.description('CLI for Ultra-Dex SaaS Implementation Framework')
|
|
24
|
-
.version('
|
|
49
|
+
.version('3.1.0');
|
|
25
50
|
|
|
26
51
|
registerInitCommand(program);
|
|
27
52
|
registerAuditCommand(program);
|
|
28
53
|
registerExamplesCommand(program);
|
|
29
54
|
registerAgentsCommand(program);
|
|
30
|
-
|
|
55
|
+
registerGenerateCommand(program);
|
|
56
|
+
registerBuildCommand(program);
|
|
57
|
+
registerReviewCommand(program);
|
|
58
|
+
registerRunCommand(program);
|
|
59
|
+
|
|
60
|
+
// v3.0 Commands
|
|
61
|
+
program
|
|
62
|
+
.command('swarm <task>')
|
|
63
|
+
.description('Run autonomous agent pipeline')
|
|
64
|
+
.option('--dry-run', 'Show pipeline without executing')
|
|
65
|
+
.option('--parallel', 'Run implementation tier agents in parallel')
|
|
66
|
+
.action(swarmCommand);
|
|
67
|
+
|
|
68
|
+
program
|
|
69
|
+
.command('watch')
|
|
70
|
+
.description('Auto-update state on file changes')
|
|
71
|
+
.option('--interval <ms>', 'Debounce interval in milliseconds', '500')
|
|
72
|
+
.action(watchCommand);
|
|
73
|
+
|
|
74
|
+
program
|
|
75
|
+
.command('diff')
|
|
76
|
+
.description('Compare plan vs implemented code')
|
|
77
|
+
.option('--json', 'Output as JSON')
|
|
78
|
+
.action(diffCommand);
|
|
79
|
+
|
|
80
|
+
program
|
|
81
|
+
.command('export')
|
|
82
|
+
.description('Export project context')
|
|
83
|
+
.option('--format <type>', 'Output format: json, html, markdown, pdf', 'json')
|
|
84
|
+
.option('--output <path>', 'Output file path')
|
|
85
|
+
.option('--include-agents', 'Bundle all agent prompts')
|
|
86
|
+
.action(exportCommand);
|
|
87
|
+
|
|
88
|
+
program
|
|
89
|
+
.command('upgrade')
|
|
90
|
+
.description('Check for CLI updates')
|
|
91
|
+
.option('--check', 'Check only, do not show install instructions')
|
|
92
|
+
.option('--install', 'Automatically install latest version')
|
|
93
|
+
.action(upgradeCommand);
|
|
94
|
+
|
|
95
|
+
program
|
|
96
|
+
.command('config')
|
|
97
|
+
.description('Show or generate configuration')
|
|
98
|
+
.option('--mcp', 'Generate MCP config for Claude Desktop')
|
|
99
|
+
.option('--cursor', 'Generate Cursor IDE rules')
|
|
100
|
+
.option('--vscode', 'Generate VS Code settings.json')
|
|
101
|
+
.option('--show', 'Display current Ultra-Dex config')
|
|
102
|
+
.option('--set <key=value>', 'Set a config value')
|
|
103
|
+
.option('--get <key>', 'Get a specific config value')
|
|
104
|
+
.action(configCommand);
|
|
105
|
+
|
|
106
|
+
registerAutoImplementCommand(program);
|
|
107
|
+
registerCiMonitorCommand(program);
|
|
108
|
+
registerAlignCommand(program);
|
|
109
|
+
registerStatusCommand(program);
|
|
110
|
+
registerPreCommitCommand(program);
|
|
111
|
+
registerStateCommand(program);
|
|
112
|
+
registerDoctorCommand(program);
|
|
113
|
+
registerDashboardCommand(program);
|
|
114
|
+
registerCheckCommand(program);
|
|
31
115
|
registerServeCommand(program);
|
|
116
|
+
registerVerifyCommand(program);
|
|
32
117
|
registerPackCommand(program);
|
|
33
118
|
registerWorkflowCommand(program);
|
|
119
|
+
registerPlanCommand(program);
|
|
34
120
|
registerSuggestCommand(program);
|
|
35
121
|
registerValidateCommand(program);
|
|
122
|
+
registerFixCommand(program);
|
|
36
123
|
registerHooksCommand(program);
|
|
37
124
|
registerFetchCommand(program);
|
|
125
|
+
registerSyncCommand(program);
|
|
126
|
+
registerAgentBuilderCommand(program);
|
|
127
|
+
registerTeamCommand(program);
|
|
128
|
+
registerMemoryCommand(program);
|
|
38
129
|
|
|
39
|
-
program.parse();
|
|
130
|
+
program.parse();
|