ultra-dex 1.7.3 → 2.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 +160 -127
- package/assets/agents/0-orchestration/orchestrator.md +225 -0
- package/assets/agents/00-AGENT_INDEX.md +138 -0
- package/assets/agents/1-leadership/cto.md +186 -0
- package/assets/agents/1-leadership/planner.md +205 -0
- package/assets/agents/1-leadership/research.md +285 -0
- package/assets/agents/2-development/backend.md +472 -0
- package/assets/agents/2-development/database.md +516 -0
- package/assets/agents/2-development/frontend.md +144 -0
- package/assets/agents/3-security/auth.md +168 -0
- package/assets/agents/3-security/security.md +335 -0
- package/assets/agents/4-devops/devops.md +587 -0
- package/assets/agents/5-quality/debugger.md +188 -0
- package/assets/agents/5-quality/documentation.md +167 -0
- package/assets/agents/5-quality/reviewer.md +213 -0
- package/assets/agents/5-quality/testing.md +280 -0
- package/assets/agents/6-specialist/performance.md +323 -0
- package/assets/agents/6-specialist/refactoring.md +343 -0
- package/assets/agents/AGENT-INSTRUCTIONS.md +315 -0
- package/assets/agents/README.md +232 -0
- package/assets/cursor-rules/00-ultra-dex-core.mdc +48 -0
- package/assets/cursor-rules/01-database.mdc +50 -0
- package/assets/cursor-rules/02-api.mdc +81 -0
- package/assets/cursor-rules/03-auth.mdc +70 -0
- package/assets/cursor-rules/04-frontend.mdc +92 -0
- package/assets/cursor-rules/05-payments.mdc +88 -0
- package/assets/cursor-rules/06-testing.mdc +104 -0
- package/assets/cursor-rules/07-security.mdc +94 -0
- package/assets/cursor-rules/08-deployment.mdc +92 -0
- package/assets/cursor-rules/09-error-handling.mdc +137 -0
- package/assets/cursor-rules/10-performance.mdc +123 -0
- package/assets/cursor-rules/11-nextjs-v15.mdc +307 -0
- package/assets/cursor-rules/12-multi-tenancy.mdc +282 -0
- package/assets/cursor-rules/README.md +78 -0
- package/assets/cursor-rules/load.ps1 +108 -0
- package/assets/cursor-rules/load.sh +102 -0
- package/assets/docs/BUILD-AUTH-30M.md +113 -0
- package/assets/docs/CHECKLIST-21-STEP.md +86 -0
- package/assets/docs/CODEMAP.md +229 -0
- package/assets/docs/CUSTOMIZATION.md +127 -0
- package/assets/docs/LAUNCH-POSTS.md +238 -0
- package/assets/docs/QUICK-REFERENCE.md +338 -0
- package/assets/docs/README.md +21 -0
- package/assets/docs/ROADMAP.md +480 -0
- package/assets/docs/TROUBLESHOOTING.md +148 -0
- package/assets/docs/TUTORIAL.md +182 -0
- package/assets/docs/VERIFICATION.md +108 -0
- package/assets/docs/VISION-V2.md +187 -0
- package/assets/docs/WORKFLOW-DIAGRAMS.md +463 -0
- package/assets/docs/index.html +550 -0
- package/assets/live-templates/next15-prisma-clerk/.env.example +3 -0
- package/assets/live-templates/next15-prisma-clerk/README.md +10 -0
- package/assets/live-templates/next15-prisma-clerk/app/layout.tsx +7 -0
- package/assets/live-templates/next15-prisma-clerk/app/page.tsx +8 -0
- package/assets/live-templates/next15-prisma-clerk/next.config.js +6 -0
- package/assets/live-templates/next15-prisma-clerk/package.json +22 -0
- package/assets/live-templates/next15-prisma-clerk/prisma/schema.prisma +34 -0
- package/assets/live-templates/remix-supabase/.env.example +2 -0
- package/assets/live-templates/remix-supabase/README.md +9 -0
- package/assets/live-templates/remix-supabase/app/root.tsx +19 -0
- package/assets/live-templates/remix-supabase/app/routes/_index.tsx +8 -0
- package/assets/live-templates/remix-supabase/app/utils/supabase.server.ts +6 -0
- package/assets/live-templates/remix-supabase/package.json +20 -0
- package/assets/live-templates/remix-supabase/remix.config.js +6 -0
- package/assets/live-templates/sveltekit-drizzle/.env.example +1 -0
- package/assets/live-templates/sveltekit-drizzle/README.md +9 -0
- package/assets/live-templates/sveltekit-drizzle/drizzle/schema.ts +7 -0
- package/assets/live-templates/sveltekit-drizzle/drizzle.config.ts +5 -0
- package/assets/live-templates/sveltekit-drizzle/package.json +21 -0
- package/assets/live-templates/sveltekit-drizzle/src/lib/db.ts +5 -0
- package/assets/live-templates/sveltekit-drizzle/src/routes/+page.svelte +2 -0
- package/assets/live-templates/sveltekit-drizzle/svelte.config.js +5 -0
- package/assets/live-templates/sveltekit-drizzle/vite.config.js +5 -0
- package/assets/saas-plan/04-Imp-Template.md +5546 -0
- package/assets/templates/CASE-STUDY-TEMPLATE.md +139 -0
- package/assets/templates/MASTER-PLAN-TEMPLATE.md +647 -0
- package/assets/templates/ORDER-TRACKER-TEMPLATE.md +731 -0
- package/assets/templates/PHASE-TRACKER-TEMPLATE.md +577 -0
- package/assets/templates/README.md +419 -0
- package/bin/ultra-dex.js +1078 -422
- package/lib/commands/agents.js +154 -0
- package/lib/commands/audit.js +135 -0
- package/lib/commands/banner.js +21 -0
- package/lib/commands/build.js +214 -0
- package/lib/commands/examples.js +34 -0
- package/lib/commands/fetch.js +186 -0
- package/lib/commands/generate.js +217 -0
- package/lib/commands/hooks.js +105 -0
- package/lib/commands/init.js +337 -0
- package/lib/commands/placeholders.js +11 -0
- package/lib/commands/review.js +287 -0
- package/lib/commands/serve.js +56 -0
- package/lib/commands/suggest.js +126 -0
- package/lib/commands/validate.js +140 -0
- package/lib/commands/workflows.js +185 -0
- package/lib/config/paths.js +9 -0
- package/lib/config/urls.js +16 -0
- package/lib/providers/base.js +82 -0
- package/lib/providers/claude.js +177 -0
- package/lib/providers/gemini.js +170 -0
- package/lib/providers/index.js +93 -0
- package/lib/providers/openai.js +163 -0
- package/lib/templates/context.js +26 -0
- package/lib/templates/embedded.js +141 -0
- package/lib/templates/prompts/generate-plan.js +147 -0
- package/lib/templates/prompts/review-code.js +57 -0
- package/lib/templates/prompts/section-prompts.js +275 -0
- package/lib/templates/prompts/system-prompt.md +58 -0
- package/lib/templates/quick-start.js +43 -0
- package/lib/utils/build-helpers.js +257 -0
- package/lib/utils/fallback.js +36 -0
- package/lib/utils/files.js +67 -0
- package/lib/utils/network.js +18 -0
- package/lib/utils/output.js +20 -0
- package/lib/utils/parser.js +155 -0
- package/lib/utils/prompt-builder.js +93 -0
- package/lib/utils/review-helpers.js +334 -0
- package/lib/utils/validation.js +34 -0
- package/package.json +19 -5
package/README.md
CHANGED
|
@@ -1,205 +1,238 @@
|
|
|
1
1
|
# Ultra-Dex CLI
|
|
2
2
|
|
|
3
|
-
> Scaffold Ultra-Dex projects from the command line
|
|
3
|
+
> Scaffold Ultra-Dex projects from the command line, now with **AI-powered plan generation**.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## What's New in v2.1
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
#
|
|
9
|
-
npx ultra-dex
|
|
8
|
+
# 🚀 Generate a complete 34-section plan with AI
|
|
9
|
+
npx ultra-dex generate "A task management SaaS for remote teams"
|
|
10
|
+
|
|
11
|
+
# 🔧 Start AI-assisted development
|
|
12
|
+
npx ultra-dex build --agent planner
|
|
10
13
|
|
|
11
|
-
#
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
# 🔍 Review code against plan
|
|
15
|
+
npx ultra-dex review
|
|
16
|
+
|
|
17
|
+
# 📊 Quick alignment check
|
|
18
|
+
npx ultra-dex align
|
|
19
|
+
```
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
npx degit Srujan0798/Ultra-Dex/cursor-rules .cursor/rules
|
|
17
|
-
# Then: cd .cursor/rules && ./load.sh database api auth
|
|
21
|
+
## First 10 Minutes
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
#
|
|
21
|
-
|
|
23
|
+
```bash
|
|
24
|
+
# Option 1: AI-Generated Plan (Recommended)
|
|
25
|
+
export ANTHROPIC_API_KEY=your-key # or OPENAI_API_KEY or GOOGLE_AI_KEY
|
|
26
|
+
npx ultra-dex generate "Your SaaS idea here"
|
|
22
27
|
|
|
23
|
-
#
|
|
28
|
+
# Option 2: Manual Setup
|
|
29
|
+
npx ultra-dex init
|
|
24
30
|
```
|
|
25
31
|
|
|
26
32
|
## Installation
|
|
27
33
|
|
|
28
34
|
```bash
|
|
29
35
|
# Run directly with npx (no installation needed)
|
|
30
|
-
npx ultra-dex
|
|
36
|
+
npx ultra-dex generate "Your idea"
|
|
31
37
|
|
|
32
38
|
# Or install globally
|
|
33
39
|
npm install -g ultra-dex
|
|
34
|
-
ultra-dex
|
|
40
|
+
ultra-dex generate "Your idea"
|
|
35
41
|
```
|
|
36
42
|
|
|
37
|
-
##
|
|
43
|
+
## AI Commands (v2.0+)
|
|
44
|
+
|
|
45
|
+
### `generate` - AI Plan Generation
|
|
38
46
|
|
|
39
|
-
|
|
47
|
+
Generate a complete implementation plan using AI:
|
|
40
48
|
|
|
41
49
|
```bash
|
|
42
|
-
|
|
50
|
+
# Basic usage
|
|
51
|
+
npx ultra-dex generate "A booking platform for dog groomers"
|
|
52
|
+
|
|
53
|
+
# With options
|
|
54
|
+
npx ultra-dex generate "idea" --provider openai --output ./my-project
|
|
55
|
+
|
|
56
|
+
# Preview without calling AI
|
|
57
|
+
npx ultra-dex generate "idea" --dry-run
|
|
43
58
|
```
|
|
44
59
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
60
|
+
**Options:**
|
|
61
|
+
| Option | Description | Default |
|
|
62
|
+
|--------|-------------|---------|
|
|
63
|
+
| `-p, --provider` | AI provider (claude, openai, gemini) | claude |
|
|
64
|
+
| `-m, --model` | Specific model to use | provider default |
|
|
65
|
+
| `-o, --output` | Output directory | current |
|
|
66
|
+
| `-k, --key` | API key | env variable |
|
|
67
|
+
| `--dry-run` | Show structure only | false |
|
|
52
68
|
|
|
53
|
-
###
|
|
69
|
+
### `build` - AI-Assisted Development
|
|
70
|
+
|
|
71
|
+
Start development with AI agents:
|
|
54
72
|
|
|
55
73
|
```bash
|
|
56
|
-
|
|
74
|
+
# Interactive agent selection
|
|
75
|
+
npx ultra-dex build
|
|
76
|
+
|
|
77
|
+
# Specific agent
|
|
78
|
+
npx ultra-dex build --agent backend --task "Create user API endpoints"
|
|
79
|
+
|
|
80
|
+
# Copy to clipboard for external AI
|
|
81
|
+
npx ultra-dex build --agent planner --copy
|
|
57
82
|
```
|
|
58
83
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
84
|
+
**Available Agents:**
|
|
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 |
|
|
97
|
+
|
|
98
|
+
### `review` - Code Review
|
|
63
99
|
|
|
64
|
-
|
|
100
|
+
Check code alignment with plan:
|
|
65
101
|
|
|
66
102
|
```bash
|
|
67
|
-
npx ultra-dex
|
|
103
|
+
npx ultra-dex review
|
|
104
|
+
npx ultra-dex review --dir ./src
|
|
68
105
|
```
|
|
69
106
|
|
|
70
|
-
|
|
71
|
-
- Required files (QUICK-START.md, CONTEXT.md, etc.)
|
|
72
|
-
- Key sections (idea, problem, MVP, tech stack)
|
|
73
|
-
- Implementation details (database, API, auth)
|
|
107
|
+
### `align` - Quick Score
|
|
74
108
|
|
|
75
|
-
|
|
109
|
+
Get alignment score instantly:
|
|
76
110
|
|
|
77
|
-
|
|
111
|
+
```bash
|
|
112
|
+
npx ultra-dex align
|
|
113
|
+
npx ultra-dex align --json # Machine-readable output
|
|
114
|
+
```
|
|
78
115
|
|
|
116
|
+
**Environment Variables:**
|
|
79
117
|
```bash
|
|
80
|
-
|
|
118
|
+
ANTHROPIC_API_KEY=sk-ant-... # Claude (recommended)
|
|
119
|
+
OPENAI_API_KEY=sk-... # OpenAI
|
|
120
|
+
GOOGLE_AI_KEY=... # Gemini
|
|
81
121
|
```
|
|
82
122
|
|
|
83
|
-
|
|
84
|
-
- CTO, Backend, Frontend, Database
|
|
85
|
-
- Auth, DevOps, Reviewer, Debugger, Planner
|
|
123
|
+
### `init`
|
|
86
124
|
|
|
87
|
-
|
|
125
|
+
Interactive project setup:
|
|
88
126
|
|
|
89
127
|
```bash
|
|
90
|
-
npx ultra-dex
|
|
128
|
+
npx ultra-dex init
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Generate a runnable scaffold:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npx ultra-dex init --live --stack next15-prisma-clerk
|
|
91
135
|
```
|
|
92
136
|
|
|
93
|
-
|
|
137
|
+
Presets: `next15-prisma-clerk`, `remix-supabase`, `sveltekit-drizzle`.
|
|
94
138
|
|
|
95
|
-
###
|
|
139
|
+
### `audit`
|
|
140
|
+
|
|
141
|
+
Check project completeness:
|
|
96
142
|
|
|
97
143
|
```bash
|
|
98
|
-
npx ultra-dex
|
|
144
|
+
npx ultra-dex audit
|
|
99
145
|
```
|
|
100
146
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
- Can be bypassed with `git commit --no-verify`
|
|
147
|
+
### `agents`
|
|
148
|
+
|
|
149
|
+
List and use AI agent prompts:
|
|
105
150
|
|
|
106
|
-
|
|
151
|
+
```bash
|
|
152
|
+
npx ultra-dex agents # List all agents
|
|
153
|
+
npx ultra-dex agent backend # Show specific agent
|
|
154
|
+
npx ultra-dex pack backend # Package context + agent
|
|
155
|
+
```
|
|
107
156
|
|
|
108
|
-
###
|
|
157
|
+
### `fetch`
|
|
158
|
+
|
|
159
|
+
Download assets for offline use:
|
|
109
160
|
|
|
110
161
|
```bash
|
|
111
162
|
npx ultra-dex fetch
|
|
163
|
+
npx ultra-dex fetch --agents --rules
|
|
112
164
|
```
|
|
113
165
|
|
|
114
|
-
|
|
115
|
-
- Cursor rules (12 .mdc files)
|
|
116
|
-
- Agent prompts (16 agents)
|
|
117
|
-
- Documentation and guides
|
|
166
|
+
### `sync`
|
|
118
167
|
|
|
119
|
-
|
|
120
|
-
- `--dir <path>` - Target directory (default: `.ultra-dex`)
|
|
121
|
-
- `--agents` - Fetch only agent prompts
|
|
122
|
-
- `--rules` - Fetch only cursor rules
|
|
123
|
-
- `--docs` - Fetch only documentation
|
|
168
|
+
Auto-update CONTEXT.md with a codebase snapshot:
|
|
124
169
|
|
|
125
|
-
After fetching, copy to your project:
|
|
126
170
|
```bash
|
|
127
|
-
|
|
128
|
-
cp -r .ultra-dex/agents .agents
|
|
171
|
+
npx ultra-dex sync
|
|
129
172
|
```
|
|
130
173
|
|
|
131
|
-
|
|
174
|
+
### Other Commands
|
|
132
175
|
|
|
133
176
|
| Command | Description |
|
|
134
177
|
|---------|-------------|
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
137
|
-
| `
|
|
138
|
-
| `
|
|
139
|
-
| `
|
|
140
|
-
| `
|
|
141
|
-
| `
|
|
142
|
-
| `
|
|
143
|
-
| `
|
|
144
|
-
| `
|
|
145
|
-
| `
|
|
146
|
-
| `
|
|
147
|
-
| `
|
|
178
|
+
| `init` | Initialize a new project |
|
|
179
|
+
| `init --preview` | Preview files without creating them |
|
|
180
|
+
| `init --live` | Generate a runnable scaffold |
|
|
181
|
+
| `audit` | Audit project for completeness |
|
|
182
|
+
| `examples` | List available examples |
|
|
183
|
+
| `agents` | List AI agents |
|
|
184
|
+
| `agent <name>` | Show specific agent prompt |
|
|
185
|
+
| `pack <agent>` | Package context + agent |
|
|
186
|
+
| `hooks` | Set up git pre-commit hooks |
|
|
187
|
+
| `fetch` | Download assets for offline |
|
|
188
|
+
| `serve` | Serve context over HTTP |
|
|
189
|
+
| `sync` | Auto-sync CONTEXT.md |
|
|
190
|
+
| `validate` | Validate project structure |
|
|
191
|
+
| `workflow <feature>` | Show workflow for a feature |
|
|
192
|
+
| `suggest` | Get AI agent suggestions |
|
|
193
|
+
| `--help` | Show help |
|
|
194
|
+
| `--version` | Show version |
|
|
195
|
+
|
|
196
|
+
## Example: AI Generation
|
|
148
197
|
|
|
149
|
-
|
|
198
|
+
```bash
|
|
199
|
+
$ npx ultra-dex generate "A booking platform for dog groomers"
|
|
150
200
|
|
|
151
|
-
|
|
201
|
+
🚀 Ultra-Dex AI Plan Generator
|
|
152
202
|
|
|
153
|
-
|
|
154
|
-
|--------|-------------|
|
|
155
|
-
| `-n, --name <name>` | Project name (skips prompt) |
|
|
156
|
-
| `-d, --dir <directory>` | Output directory (default: current) |
|
|
203
|
+
✔ AI modules loaded
|
|
157
204
|
|
|
158
|
-
|
|
205
|
+
📝 Idea: "A booking platform for dog groomers"
|
|
159
206
|
|
|
160
|
-
|
|
161
|
-
|--------|-------------|
|
|
162
|
-
| `-d, --dir <directory>` | Directory to audit (default: current) |
|
|
207
|
+
✓ Using Claude (Anthropic) (claude-sonnet-4-20250514)
|
|
163
208
|
|
|
164
|
-
|
|
209
|
+
📊 Estimated Generation:
|
|
210
|
+
Input tokens: ~2,650
|
|
211
|
+
Output tokens: ~40,000
|
|
212
|
+
Estimated cost: ~$0.45
|
|
165
213
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
? Frontend framework: Next.js
|
|
184
|
-
? Database: PostgreSQL
|
|
185
|
-
? Authentication: NextAuth
|
|
186
|
-
? Payments: Stripe
|
|
187
|
-
? Hosting: Vercel
|
|
188
|
-
|
|
189
|
-
✔ Project created successfully!
|
|
190
|
-
|
|
191
|
-
Files created:
|
|
192
|
-
my-saas/
|
|
193
|
-
├── QUICK-START.md
|
|
194
|
-
├── CONTEXT.md
|
|
195
|
-
├── IMPLEMENTATION-PLAN.md
|
|
196
|
-
├── .cursor/rules/ (11 AI rule files)
|
|
197
|
-
└── .agents/ (9 AI agent prompts)
|
|
214
|
+
? Proceed with generation? Yes
|
|
215
|
+
|
|
216
|
+
⚡ Generating 34-section implementation plan...
|
|
217
|
+
|
|
218
|
+
✔ Generation complete!
|
|
219
|
+
|
|
220
|
+
✅ All 34 sections generated
|
|
221
|
+
Tokens used: 42,350 tokens (2,650 in / 39,700 out)
|
|
222
|
+
Actual cost: $0.52
|
|
223
|
+
|
|
224
|
+
📦 Project: GroomBook
|
|
225
|
+
|
|
226
|
+
✓ Created ./IMPLEMENTATION-PLAN.md
|
|
227
|
+
✓ Created ./QUICK-START.md
|
|
228
|
+
✓ Created ./CONTEXT.md
|
|
229
|
+
|
|
230
|
+
🎉 Generation complete!
|
|
198
231
|
|
|
199
232
|
Next steps:
|
|
200
|
-
1.
|
|
201
|
-
2.
|
|
202
|
-
3. Start building
|
|
233
|
+
1. Review IMPLEMENTATION-PLAN.md
|
|
234
|
+
2. Customize sections as needed
|
|
235
|
+
3. Start building with: npx ultra-dex init
|
|
203
236
|
```
|
|
204
237
|
|
|
205
238
|
## Links
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# @Orchestrator - Meta Agent
|
|
2
|
+
|
|
3
|
+
> **Role**: Coordinate all 15 agents for complete feature implementation
|
|
4
|
+
> **When to Use**: Building a complete feature that spans architecture, implementation, security, testing, and deployment
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## System Prompt
|
|
9
|
+
|
|
10
|
+
You are the **Ultra-Dex Orchestrator**, a meta-agent that coordinates all 15 specialized agents to build complete, production-ready features. Your job is to break down features into agent handoffs and ensure nothing falls through the cracks.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Your Responsibilities
|
|
15
|
+
|
|
16
|
+
1. **Analyze** the feature request and identify all required components
|
|
17
|
+
2. **Plan** the agent workflow sequence
|
|
18
|
+
3. **Coordinate** handoffs between agents with clear context
|
|
19
|
+
4. **Verify** each phase before moving to the next
|
|
20
|
+
5. **Ensure** production readiness at the end
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Agent Workflow Template
|
|
25
|
+
|
|
26
|
+
For any feature, follow this sequence:
|
|
27
|
+
|
|
28
|
+
### Phase 1: Planning (Leadership Tier)
|
|
29
|
+
```
|
|
30
|
+
@Planner → Break down into atomic tasks (4-9 hours each)
|
|
31
|
+
@Research → Evaluate technology options if needed
|
|
32
|
+
@CTO → Approve architecture and tech decisions
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Phase 2: Implementation (Development Tier)
|
|
36
|
+
```
|
|
37
|
+
@Database → Schema design and migrations
|
|
38
|
+
@Backend → API endpoints and business logic
|
|
39
|
+
@Frontend → UI components and user flows
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Phase 3: Security (Security Tier)
|
|
43
|
+
```
|
|
44
|
+
@Auth → Authentication and authorization
|
|
45
|
+
@Security → Security audit and vulnerability check
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Phase 4: Quality (Quality Tier)
|
|
49
|
+
```
|
|
50
|
+
@Testing → Write and run tests
|
|
51
|
+
@Reviewer → Code review and approval
|
|
52
|
+
@Documentation → Update docs if needed
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Phase 5: Deployment (DevOps Tier)
|
|
56
|
+
```
|
|
57
|
+
@DevOps → Deploy to staging → production
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Phase 6: Optimization (Specialist Tier - if needed)
|
|
61
|
+
```
|
|
62
|
+
@Performance → Optimize slow paths
|
|
63
|
+
@Refactoring → Clean up code debt
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Orchestration Prompt
|
|
69
|
+
|
|
70
|
+
Use this prompt to start any complete feature:
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
## Feature: [FEATURE NAME]
|
|
74
|
+
|
|
75
|
+
### 1. Requirements
|
|
76
|
+
- [What the feature does]
|
|
77
|
+
- [Who uses it]
|
|
78
|
+
- [Success criteria]
|
|
79
|
+
|
|
80
|
+
### 2. Agent Workflow
|
|
81
|
+
| Phase | Agent | Task | Status |
|
|
82
|
+
|-------|-------|------|--------|
|
|
83
|
+
| Planning | @Planner | Break down tasks | [ ] |
|
|
84
|
+
| Planning | @CTO | Architecture approval | [ ] |
|
|
85
|
+
| Implementation | @Database | Schema design | [ ] |
|
|
86
|
+
| Implementation | @Backend | API endpoints | [ ] |
|
|
87
|
+
| Implementation | @Frontend | UI components | [ ] |
|
|
88
|
+
| Security | @Auth | Auth implementation | [ ] |
|
|
89
|
+
| Security | @Security | Security audit | [ ] |
|
|
90
|
+
| Quality | @Testing | Write tests | [ ] |
|
|
91
|
+
| Quality | @Reviewer | Code review | [ ] |
|
|
92
|
+
| Deployment | @DevOps | Deploy to production | [ ] |
|
|
93
|
+
|
|
94
|
+
### 3. Current Phase
|
|
95
|
+
[PHASE NAME] - [AGENT] working on [TASK]
|
|
96
|
+
|
|
97
|
+
### 4. Handoff Context
|
|
98
|
+
[What the next agent needs to know]
|
|
99
|
+
|
|
100
|
+
### 5. Blockers
|
|
101
|
+
[Any issues preventing progress]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Example: Authentication Feature
|
|
107
|
+
|
|
108
|
+
```markdown
|
|
109
|
+
## Feature: User Authentication with Email + OAuth
|
|
110
|
+
|
|
111
|
+
### 1. Requirements
|
|
112
|
+
- Email/password login
|
|
113
|
+
- Google OAuth
|
|
114
|
+
- Protected routes
|
|
115
|
+
- Session management
|
|
116
|
+
|
|
117
|
+
### 2. Agent Workflow
|
|
118
|
+
| Phase | Agent | Task | Status |
|
|
119
|
+
|-------|-------|------|--------|
|
|
120
|
+
| Planning | @Planner | Break into 6 tasks | [x] |
|
|
121
|
+
| Planning | @CTO | Approve Clerk vs NextAuth | [x] |
|
|
122
|
+
| Implementation | @Database | User schema + sessions | [x] |
|
|
123
|
+
| Implementation | @Backend | Auth API routes | [x] |
|
|
124
|
+
| Implementation | @Frontend | Login/signup pages | [x] |
|
|
125
|
+
| Security | @Auth | Middleware + RLS | [x] |
|
|
126
|
+
| Security | @Security | Security audit | [x] |
|
|
127
|
+
| Quality | @Testing | Auth tests | [ ] |
|
|
128
|
+
| Quality | @Reviewer | Code review | [ ] |
|
|
129
|
+
| Deployment | @DevOps | Deploy with env vars | [ ] |
|
|
130
|
+
|
|
131
|
+
### 3. Current Phase
|
|
132
|
+
Quality - @Testing working on auth tests
|
|
133
|
+
|
|
134
|
+
### 4. Handoff Context
|
|
135
|
+
Auth implementation complete with:
|
|
136
|
+
- Clerk integration (auth.ts)
|
|
137
|
+
- Protected middleware (middleware.ts)
|
|
138
|
+
- Login page (app/login/page.tsx)
|
|
139
|
+
- User dashboard (app/dashboard/page.tsx)
|
|
140
|
+
Test coverage needed for: login, logout, OAuth, protected routes
|
|
141
|
+
|
|
142
|
+
### 5. Blockers
|
|
143
|
+
None
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Quick Orchestration Commands
|
|
149
|
+
|
|
150
|
+
**Complete Feature:**
|
|
151
|
+
```
|
|
152
|
+
Orchestrate: [Feature Name]
|
|
153
|
+
- Start from planning
|
|
154
|
+
- Full agent workflow
|
|
155
|
+
- Deploy when ready
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Partial Feature (skip planning):**
|
|
159
|
+
```
|
|
160
|
+
Orchestrate: [Feature Name]
|
|
161
|
+
- Architecture: [Already decided]
|
|
162
|
+
- Start from: @Database
|
|
163
|
+
- End at: @Reviewer (no deploy yet)
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Hotfix (minimal workflow):**
|
|
167
|
+
```
|
|
168
|
+
Orchestrate Hotfix: [Bug Description]
|
|
169
|
+
- @Debugger → @Testing → @DevOps
|
|
170
|
+
- Skip planning/architecture
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Handoff Protocol
|
|
176
|
+
|
|
177
|
+
When transitioning between agents:
|
|
178
|
+
|
|
179
|
+
1. **Summarize** what was completed
|
|
180
|
+
2. **List** all files changed/created
|
|
181
|
+
3. **Specify** what the next agent needs to do
|
|
182
|
+
4. **Include** any constraints or decisions made
|
|
183
|
+
5. **Link** to relevant documentation
|
|
184
|
+
|
|
185
|
+
Example handoff:
|
|
186
|
+
```markdown
|
|
187
|
+
## Handoff: @Database → @Backend
|
|
188
|
+
|
|
189
|
+
### Completed
|
|
190
|
+
- User schema with multi-tenancy (orgId)
|
|
191
|
+
- Session table for auth
|
|
192
|
+
- Migration: 20240115_add_users.sql
|
|
193
|
+
|
|
194
|
+
### Files Changed
|
|
195
|
+
- prisma/schema.prisma (User, Session, Organization models)
|
|
196
|
+
- prisma/migrations/20240115_add_users/
|
|
197
|
+
|
|
198
|
+
### For @Backend
|
|
199
|
+
- Create CRUD endpoints for User
|
|
200
|
+
- Implement org-scoped queries (WHERE orgId = ?)
|
|
201
|
+
- Auth middleware should set orgId from session
|
|
202
|
+
|
|
203
|
+
### Constraints
|
|
204
|
+
- All queries must be org-scoped (multi-tenant)
|
|
205
|
+
- Use Prisma client, not raw SQL
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## When NOT to Use Orchestrator
|
|
211
|
+
|
|
212
|
+
- **Simple bug fix**: Just use @Debugger
|
|
213
|
+
- **Documentation update**: Just use @Documentation
|
|
214
|
+
- **Performance tuning**: Just use @Performance
|
|
215
|
+
- **Single component**: Use the specific agent directly
|
|
216
|
+
|
|
217
|
+
**Use Orchestrator when:**
|
|
218
|
+
- Building a complete new feature
|
|
219
|
+
- Feature spans multiple tiers (DB + API + UI)
|
|
220
|
+
- Security-sensitive features (auth, payments)
|
|
221
|
+
- Features requiring deployment coordination
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
*Ultra-Dex v1.7.0 - Meta Orchestration for Production Features*
|