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
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { githubTreeUrl } from '../config/urls.js';
|
|
2
|
+
|
|
3
|
+
export const CORE_CURSOR_RULE = `# Ultra-Dex Core Rules
|
|
4
|
+
|
|
5
|
+
> Load this as your base ruleset. Add domain-specific rules as needed.
|
|
6
|
+
|
|
7
|
+
## Project Philosophy
|
|
8
|
+
|
|
9
|
+
- Build production-ready from day 1
|
|
10
|
+
- Every task: 4-9 hours with clear acceptance criteria
|
|
11
|
+
- 21-step verification for features (simplified for fixes)
|
|
12
|
+
- Code > Documentation (but document decisions)
|
|
13
|
+
|
|
14
|
+
## Code Standards
|
|
15
|
+
|
|
16
|
+
- TypeScript strict mode always
|
|
17
|
+
- Zod validation at all API boundaries
|
|
18
|
+
- Error handling: never swallow errors silently
|
|
19
|
+
- Logging: structured JSON, include request IDs
|
|
20
|
+
- Tests: minimum 80% coverage for business logic
|
|
21
|
+
|
|
22
|
+
## Architecture Defaults
|
|
23
|
+
|
|
24
|
+
- Next.js App Router (or specified framework)
|
|
25
|
+
- PostgreSQL with Prisma ORM
|
|
26
|
+
- NextAuth.js for authentication
|
|
27
|
+
- Stripe for payments
|
|
28
|
+
- Vercel for deployment
|
|
29
|
+
|
|
30
|
+
## Task Completion Checklist (Quick 5-Step)
|
|
31
|
+
|
|
32
|
+
1. Does it work? (Manual test)
|
|
33
|
+
2. Are there tests? (Automated)
|
|
34
|
+
3. Is it secure? (No secrets exposed, inputs validated)
|
|
35
|
+
4. Is it documented? (Code comments for complex logic)
|
|
36
|
+
5. Is it deployable? (No breaking changes)
|
|
37
|
+
|
|
38
|
+
## When to Use Full 21-Step
|
|
39
|
+
|
|
40
|
+
- New features affecting multiple files
|
|
41
|
+
- Security-sensitive changes
|
|
42
|
+
- Database schema changes
|
|
43
|
+
- API contract changes
|
|
44
|
+
|
|
45
|
+
## File Naming
|
|
46
|
+
|
|
47
|
+
- Components: PascalCase (UserProfile.tsx)
|
|
48
|
+
- Utilities: camelCase (formatDate.ts)
|
|
49
|
+
- API routes: kebab-case (/api/user-profile)
|
|
50
|
+
- Database: snake_case (user_profiles)
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
export const AGENT_INSTRUCTIONS_EMBEDDED = `# Ultra-Dex AI Agent Quick Reference
|
|
54
|
+
|
|
55
|
+
## Agent Selection
|
|
56
|
+
|
|
57
|
+
| Task | Agent | Use When |
|
|
58
|
+
|------|-------|----------|
|
|
59
|
+
| Architecture decisions | @CTO | Tech stack, scaling, trade-offs |
|
|
60
|
+
| Task breakdown | @Planner | Feature to atomic tasks |
|
|
61
|
+
| API endpoints | @Backend | REST/GraphQL, middleware |
|
|
62
|
+
| React components | @Frontend | UI, state, forms |
|
|
63
|
+
| Schema design | @Database | Models, migrations, queries |
|
|
64
|
+
| Auth flows | @Security | Login, sessions, permissions |
|
|
65
|
+
| CI/CD setup | @DevOps | Deploy, monitoring, infra |
|
|
66
|
+
| Code review | @Reviewer | PR review, quality gates |
|
|
67
|
+
| Test coverage | @Testing | Unit, integration, E2E |
|
|
68
|
+
| Bug fixing | @Debugger | Root cause, fixes |
|
|
69
|
+
|
|
70
|
+
## Quick Start Prompts
|
|
71
|
+
|
|
72
|
+
### @Backend - API Endpoint
|
|
73
|
+
Act as @Backend. Context: [paste CONTEXT.md]
|
|
74
|
+
Task: Create POST /api/users endpoint with validation.
|
|
75
|
+
Requirements: Zod schema, error handling, rate limiting.
|
|
76
|
+
|
|
77
|
+
### @Database - Schema Design
|
|
78
|
+
Act as @Database. Context: [paste CONTEXT.md]
|
|
79
|
+
Task: Design User and Organization tables with relationships.
|
|
80
|
+
Requirements: Prisma schema, indexes, soft deletes.
|
|
81
|
+
|
|
82
|
+
### @Frontend - Component
|
|
83
|
+
Act as @Frontend. Context: [paste CONTEXT.md]
|
|
84
|
+
Task: Create UserProfile component with edit form.
|
|
85
|
+
Requirements: React Hook Form, Zod validation, loading states.
|
|
86
|
+
|
|
87
|
+
## 21-Step Verification (Quick 5)
|
|
88
|
+
|
|
89
|
+
1. Does it work? (Manual test)
|
|
90
|
+
2. Are there tests? (80%+ coverage)
|
|
91
|
+
3. Is it secure? (Inputs validated, no secrets)
|
|
92
|
+
4. Is it documented? (Complex logic commented)
|
|
93
|
+
5. Is it deployable? (No breaking changes)
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
Full agents: ${githubTreeUrl('agents')}
|
|
97
|
+
`;
|
|
98
|
+
|
|
99
|
+
export const VERIFICATION_CHECKLIST = `# Ultra-Dex 21-Step Verification Checklist
|
|
100
|
+
|
|
101
|
+
## Quick 5 (Every Task)
|
|
102
|
+
- [ ] 1. Does it work? (Manual test)
|
|
103
|
+
- [ ] 2. Are there tests? (Unit tests passing)
|
|
104
|
+
- [ ] 3. Is it secure? (No secrets, inputs validated)
|
|
105
|
+
- [ ] 4. Is it documented? (Comments for complex logic)
|
|
106
|
+
- [ ] 5. Is it deployable? (No breaking changes)
|
|
107
|
+
|
|
108
|
+
## Full 21 (New Features)
|
|
109
|
+
|
|
110
|
+
### Understanding (1-4)
|
|
111
|
+
- [ ] 1. Requirements clear?
|
|
112
|
+
- [ ] 2. Assumptions documented?
|
|
113
|
+
- [ ] 3. Logic flow mapped?
|
|
114
|
+
- [ ] 4. Subtasks identified?
|
|
115
|
+
|
|
116
|
+
### Implementation (5-10)
|
|
117
|
+
- [ ] 5. Setup complete?
|
|
118
|
+
- [ ] 6. Code written?
|
|
119
|
+
- [ ] 7. Comments added?
|
|
120
|
+
- [ ] 8. Unit tests passing?
|
|
121
|
+
- [ ] 9. Bugs fixed?
|
|
122
|
+
- [ ] 10. Integration verified?
|
|
123
|
+
|
|
124
|
+
### Quality (11-16)
|
|
125
|
+
- [ ] 11. Acceptance criteria met?
|
|
126
|
+
- [ ] 12. UX acceptable?
|
|
127
|
+
- [ ] 13. Performance acceptable?
|
|
128
|
+
- [ ] 14. Security reviewed?
|
|
129
|
+
- [ ] 15. Code refactored?
|
|
130
|
+
- [ ] 16. Errors handled?
|
|
131
|
+
|
|
132
|
+
### Delivery (17-21)
|
|
133
|
+
- [ ] 17. API documented?
|
|
134
|
+
- [ ] 18. Committed?
|
|
135
|
+
- [ ] 19. Build passing?
|
|
136
|
+
- [ ] 20. Deploy ready?
|
|
137
|
+
- [ ] 21. Final verified?
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
Use Quick 5 for bug fixes. Use Full 21 for new features.
|
|
141
|
+
`;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt templates for ultra-dex generate command
|
|
3
|
+
* Generates a full 34-section implementation plan from an idea
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const SYSTEM_PROMPT = `You are an expert SaaS architect and product strategist. Your job is to take a simple product idea and generate a complete, production-ready implementation plan.
|
|
7
|
+
|
|
8
|
+
You MUST output a complete plan covering all 34 sections of the Ultra-Dex framework. Each section must be actionable and specific - no generic placeholders.
|
|
9
|
+
|
|
10
|
+
QUALITY STANDARDS:
|
|
11
|
+
- All acceptance criteria MUST be measurable (not "should work well" → use "<200ms response time")
|
|
12
|
+
- All estimates MUST include buffer (+20% for unknowns)
|
|
13
|
+
- All code examples MUST be production-ready (error handling, edge cases)
|
|
14
|
+
- All API endpoints MUST include request/response examples
|
|
15
|
+
- All database schemas MUST include indexes and constraints
|
|
16
|
+
|
|
17
|
+
SPECIFICITY RULES:
|
|
18
|
+
- Product Vision: ≤15 words, memorable
|
|
19
|
+
- Feature descriptions: User story + acceptance criteria + edge cases
|
|
20
|
+
- Task definitions: Single responsibility, testable completion
|
|
21
|
+
- Time estimates: 4-9 hours per atomic task
|
|
22
|
+
|
|
23
|
+
OUTPUT FORMAT:
|
|
24
|
+
- Use markdown with proper headers (## Section X: Title)
|
|
25
|
+
- Use tables for structured data
|
|
26
|
+
- Use code blocks with language tags
|
|
27
|
+
- Use checkboxes (- [ ]) for action items`;
|
|
28
|
+
|
|
29
|
+
export const USER_PROMPT_TEMPLATE = `Generate a complete Ultra-Dex implementation plan for this idea:
|
|
30
|
+
|
|
31
|
+
**IDEA:** {{IDEA}}
|
|
32
|
+
|
|
33
|
+
Generate ALL 34 sections with specific, actionable content:
|
|
34
|
+
|
|
35
|
+
## SECTION 1: HIGH-LEVEL SUMMARY
|
|
36
|
+
### 1.1 Product Vision (One-liner)
|
|
37
|
+
### 1.2 Problem Statement
|
|
38
|
+
### 1.3 Solution Overview
|
|
39
|
+
### 1.4 Target Market
|
|
40
|
+
### 1.5 Unique Value Proposition
|
|
41
|
+
### 1.6 Success Metrics
|
|
42
|
+
|
|
43
|
+
## SECTION 2: CORE FEATURES
|
|
44
|
+
### 2.1 Core Production Features (P0)
|
|
45
|
+
### 2.2 Enhanced Features (P1)
|
|
46
|
+
### 2.3 Future Features (P2/P3)
|
|
47
|
+
|
|
48
|
+
## SECTION 3: PRODUCT DESCRIPTION
|
|
49
|
+
|
|
50
|
+
## SECTION 4: USER PERSONAS
|
|
51
|
+
(Include 2-3 detailed personas with goals, frustrations, tech comfort)
|
|
52
|
+
|
|
53
|
+
## SECTION 5: USER JOURNEYS
|
|
54
|
+
(Map key user flows with touchpoints)
|
|
55
|
+
|
|
56
|
+
## SECTION 6: SCREEN MAP
|
|
57
|
+
(List all screens/pages with purpose)
|
|
58
|
+
|
|
59
|
+
## SECTION 7: WIREFRAMES DESCRIPTION
|
|
60
|
+
(Describe layout for key screens)
|
|
61
|
+
|
|
62
|
+
## SECTION 8: NAVIGATION STRUCTURE
|
|
63
|
+
|
|
64
|
+
## SECTION 9: UI/UX SPECIFICATIONS
|
|
65
|
+
(Design tokens, component library choice, accessibility requirements)
|
|
66
|
+
|
|
67
|
+
## SECTION 10: DATA MODEL
|
|
68
|
+
(Complete database schema with Prisma syntax, indexes, relationships)
|
|
69
|
+
|
|
70
|
+
## SECTION 11: API BLUEPRINT
|
|
71
|
+
(REST endpoints with methods, request/response examples)
|
|
72
|
+
|
|
73
|
+
## SECTION 12: SYSTEM ARCHITECTURE
|
|
74
|
+
(Monolith/microservices decision, component diagram)
|
|
75
|
+
|
|
76
|
+
## SECTION 13: THIRD-PARTY INTEGRATIONS
|
|
77
|
+
(APIs, services with specific providers)
|
|
78
|
+
|
|
79
|
+
## SECTION 14: AUTHENTICATION & AUTHORIZATION
|
|
80
|
+
(Auth flow, RBAC, session management - be specific about provider)
|
|
81
|
+
|
|
82
|
+
## SECTION 15: TECH STACK
|
|
83
|
+
(Frontend, backend, database, hosting - with specific versions)
|
|
84
|
+
|
|
85
|
+
## SECTION 16: IMPLEMENTATION PLAN
|
|
86
|
+
(Atomic tasks with 4-9 hour estimates, dependencies)
|
|
87
|
+
|
|
88
|
+
## SECTION 17: MILESTONES & TIMELINE
|
|
89
|
+
(Sprint breakdown with deliverables)
|
|
90
|
+
|
|
91
|
+
## SECTION 18: RISK ASSESSMENT
|
|
92
|
+
(Technical and business risks with mitigations)
|
|
93
|
+
|
|
94
|
+
## SECTION 19: DEPLOYMENT PLAN
|
|
95
|
+
(CI/CD, environments, rollback strategy)
|
|
96
|
+
|
|
97
|
+
## SECTION 20: TESTING STRATEGY
|
|
98
|
+
(Unit, integration, E2E approach with coverage targets)
|
|
99
|
+
|
|
100
|
+
## SECTION 21: SECURITY GUIDELINES
|
|
101
|
+
(OWASP top 10 mitigations, data protection)
|
|
102
|
+
|
|
103
|
+
## SECTION 22: PERFORMANCE REQUIREMENTS
|
|
104
|
+
(Response times, concurrent users, optimization strategy)
|
|
105
|
+
|
|
106
|
+
## SECTION 23: MONITORING & LOGGING
|
|
107
|
+
(Observability stack, alerts, dashboards)
|
|
108
|
+
|
|
109
|
+
## SECTION 24: DOCUMENTATION PLAN
|
|
110
|
+
|
|
111
|
+
## SECTION 25: MAINTENANCE PLAN
|
|
112
|
+
|
|
113
|
+
## SECTION 26: COST ESTIMATION
|
|
114
|
+
(Infrastructure, API costs with specific pricing)
|
|
115
|
+
|
|
116
|
+
## SECTION 27: ERROR HANDLING
|
|
117
|
+
(Error codes, user messaging, recovery flows)
|
|
118
|
+
|
|
119
|
+
## SECTION 28: LEGAL & COMPLIANCE
|
|
120
|
+
(Privacy policy, ToS, GDPR considerations)
|
|
121
|
+
|
|
122
|
+
## SECTION 29: SEO STRATEGY
|
|
123
|
+
|
|
124
|
+
## SECTION 30: INTERNATIONALIZATION
|
|
125
|
+
|
|
126
|
+
## SECTION 31: FEATURE FLAGS
|
|
127
|
+
|
|
128
|
+
## SECTION 32: REAL-TIME FEATURES
|
|
129
|
+
(WebSocket/SSE architecture if needed)
|
|
130
|
+
|
|
131
|
+
## SECTION 33: AI/ML FEATURES
|
|
132
|
+
(If applicable)
|
|
133
|
+
|
|
134
|
+
## SECTION 34: SUPPORT SYSTEM
|
|
135
|
+
(Help docs, feedback collection)
|
|
136
|
+
|
|
137
|
+
Be thorough and specific. This plan will be used directly for implementation.`;
|
|
138
|
+
|
|
139
|
+
export function generateUserPrompt(idea) {
|
|
140
|
+
return USER_PROMPT_TEMPLATE.replace('{{IDEA}}', idea);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export default {
|
|
144
|
+
SYSTEM_PROMPT,
|
|
145
|
+
USER_PROMPT_TEMPLATE,
|
|
146
|
+
generateUserPrompt,
|
|
147
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt templates for ultra-dex review command
|
|
3
|
+
* Reviews code against the implementation plan
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const SYSTEM_PROMPT = `You are a code auditor for the Ultra-Dex framework. Your job is to compare the actual codebase against the implementation plan and report:
|
|
7
|
+
|
|
8
|
+
1. ALIGNMENT - What matches the plan
|
|
9
|
+
2. DEVIATIONS - What differs from the plan
|
|
10
|
+
3. GAPS - What's missing from the plan
|
|
11
|
+
4. SUGGESTIONS - How to get back on track
|
|
12
|
+
|
|
13
|
+
OUTPUT FORMAT:
|
|
14
|
+
Return a JSON object with this structure:
|
|
15
|
+
{
|
|
16
|
+
"alignmentScore": 0-100,
|
|
17
|
+
"summary": "One paragraph overview",
|
|
18
|
+
"sections": {
|
|
19
|
+
"database": { "score": 0-100, "status": "aligned|deviated|missing", "notes": "..." },
|
|
20
|
+
"api": { "score": 0-100, "status": "aligned|deviated|missing", "notes": "..." },
|
|
21
|
+
"auth": { "score": 0-100, "status": "aligned|deviated|missing", "notes": "..." },
|
|
22
|
+
"frontend": { "score": 0-100, "status": "aligned|deviated|missing", "notes": "..." },
|
|
23
|
+
"security": { "score": 0-100, "status": "aligned|deviated|missing", "notes": "..." },
|
|
24
|
+
"testing": { "score": 0-100, "status": "aligned|deviated|missing", "notes": "..." }
|
|
25
|
+
},
|
|
26
|
+
"criticalIssues": ["issue1", "issue2"],
|
|
27
|
+
"suggestions": ["suggestion1", "suggestion2"],
|
|
28
|
+
"nextSteps": ["step1", "step2"]
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
Be strict but fair. Focus on production-readiness.`;
|
|
32
|
+
|
|
33
|
+
export const USER_PROMPT_TEMPLATE = `Review this codebase against the implementation plan:
|
|
34
|
+
|
|
35
|
+
## IMPLEMENTATION PLAN:
|
|
36
|
+
{{PLAN}}
|
|
37
|
+
|
|
38
|
+
## CODEBASE STRUCTURE:
|
|
39
|
+
{{STRUCTURE}}
|
|
40
|
+
|
|
41
|
+
## KEY FILES:
|
|
42
|
+
{{FILES}}
|
|
43
|
+
|
|
44
|
+
Analyze alignment and return the JSON report.`;
|
|
45
|
+
|
|
46
|
+
export function generateReviewPrompt(plan, structure, files) {
|
|
47
|
+
return USER_PROMPT_TEMPLATE
|
|
48
|
+
.replace('{{PLAN}}', plan)
|
|
49
|
+
.replace('{{STRUCTURE}}', structure)
|
|
50
|
+
.replace('{{FILES}}', files);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default {
|
|
54
|
+
SYSTEM_PROMPT,
|
|
55
|
+
USER_PROMPT_TEMPLATE,
|
|
56
|
+
generateReviewPrompt,
|
|
57
|
+
};
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section Prompts for 34-Section Implementation Plan Generation
|
|
3
|
+
* These prompts guide the AI to generate each section properly
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const SECTION_STRUCTURE = `
|
|
7
|
+
## SECTION 1: HIGH-LEVEL SUMMARY
|
|
8
|
+
### 1.1 Product Vision (One-liner)
|
|
9
|
+
### 1.2 Problem Statement
|
|
10
|
+
### 1.3 Solution Overview
|
|
11
|
+
### 1.4 Target Market
|
|
12
|
+
### 1.5 Unique Value Proposition
|
|
13
|
+
### 1.6 Success Metrics (Key)
|
|
14
|
+
|
|
15
|
+
## SECTION 2: CORE FEATURES
|
|
16
|
+
### 2.1 Feature List (Priority-Ordered)
|
|
17
|
+
### 2.2 Feature Details
|
|
18
|
+
### 2.3 MVP Scope
|
|
19
|
+
### 2.4 Post-MVP Features
|
|
20
|
+
|
|
21
|
+
## SECTION 3: USER STORIES
|
|
22
|
+
### 3.1 User Journey Maps
|
|
23
|
+
### 3.2 User Stories by Role
|
|
24
|
+
### 3.3 Acceptance Criteria
|
|
25
|
+
|
|
26
|
+
## SECTION 4: USER PERSONAS
|
|
27
|
+
### 4.1 Primary Persona
|
|
28
|
+
### 4.2 Secondary Personas
|
|
29
|
+
### 4.3 Anti-Personas
|
|
30
|
+
|
|
31
|
+
## SECTION 5: COMPETITIVE ANALYSIS
|
|
32
|
+
### 5.1 Direct Competitors
|
|
33
|
+
### 5.2 Indirect Competitors
|
|
34
|
+
### 5.3 Differentiators
|
|
35
|
+
### 5.4 SWOT Analysis
|
|
36
|
+
|
|
37
|
+
## SECTION 6: SCREEN MAP
|
|
38
|
+
### 6.1 Information Architecture
|
|
39
|
+
### 6.2 Navigation Structure
|
|
40
|
+
### 6.3 Key Screens List
|
|
41
|
+
### 6.4 User Flows
|
|
42
|
+
|
|
43
|
+
## SECTION 7: WIREFRAMES
|
|
44
|
+
### 7.1 Low-Fidelity Wireframes
|
|
45
|
+
### 7.2 Key Screen Descriptions
|
|
46
|
+
### 7.3 Interaction Notes
|
|
47
|
+
|
|
48
|
+
## SECTION 8: DESIGN SYSTEM
|
|
49
|
+
### 8.1 Color Palette
|
|
50
|
+
### 8.2 Typography
|
|
51
|
+
### 8.3 Component Library
|
|
52
|
+
### 8.4 Accessibility Guidelines
|
|
53
|
+
|
|
54
|
+
## SECTION 9: UI/UX SPECIFICATIONS
|
|
55
|
+
### 9.1 Design Principles
|
|
56
|
+
### 9.2 Responsive Breakpoints
|
|
57
|
+
### 9.3 Animation Guidelines
|
|
58
|
+
### 9.4 Form Patterns
|
|
59
|
+
|
|
60
|
+
## SECTION 10: DATA MODEL
|
|
61
|
+
### 10.1 Entity Relationship Diagram
|
|
62
|
+
### 10.2 Database Schema
|
|
63
|
+
### 10.3 Indexes and Constraints
|
|
64
|
+
### 10.4 Data Migrations Strategy
|
|
65
|
+
|
|
66
|
+
## SECTION 11: API BLUEPRINT
|
|
67
|
+
### 11.1 API Architecture
|
|
68
|
+
### 11.2 Endpoint Documentation
|
|
69
|
+
### 11.3 Authentication Flow
|
|
70
|
+
### 11.4 Rate Limiting
|
|
71
|
+
|
|
72
|
+
## SECTION 12: SYSTEM ARCHITECTURE
|
|
73
|
+
### 12.1 High-Level Architecture
|
|
74
|
+
### 12.2 Component Diagram
|
|
75
|
+
### 12.3 Data Flow
|
|
76
|
+
### 12.4 Third-Party Integrations
|
|
77
|
+
|
|
78
|
+
## SECTION 13: AUTHENTICATION & AUTHORIZATION
|
|
79
|
+
### 13.1 Auth Strategy
|
|
80
|
+
### 13.2 Role-Based Access Control
|
|
81
|
+
### 13.3 Session Management
|
|
82
|
+
### 13.4 OAuth Providers
|
|
83
|
+
|
|
84
|
+
## SECTION 14: PAYMENT INTEGRATION
|
|
85
|
+
### 14.1 Payment Provider
|
|
86
|
+
### 14.2 Pricing Plans
|
|
87
|
+
### 14.3 Subscription Management
|
|
88
|
+
### 14.4 Billing Workflows
|
|
89
|
+
|
|
90
|
+
## SECTION 15: TECH STACK
|
|
91
|
+
### 15.1 Frontend
|
|
92
|
+
### 15.2 Backend
|
|
93
|
+
### 15.3 Database
|
|
94
|
+
### 15.4 Infrastructure
|
|
95
|
+
### 15.5 Development Tools
|
|
96
|
+
|
|
97
|
+
## SECTION 16: IMPLEMENTATION PLAN
|
|
98
|
+
### 16.1 Phase Breakdown
|
|
99
|
+
### 16.2 Sprint Planning
|
|
100
|
+
### 16.3 Task Breakdown (Atomic Tasks)
|
|
101
|
+
### 16.4 Dependencies
|
|
102
|
+
|
|
103
|
+
## SECTION 17: TIMELINE
|
|
104
|
+
### 17.1 Milestone Schedule
|
|
105
|
+
### 17.2 Critical Path
|
|
106
|
+
### 17.3 Buffer Time
|
|
107
|
+
|
|
108
|
+
## SECTION 18: RISK ASSESSMENT
|
|
109
|
+
### 18.1 Technical Risks
|
|
110
|
+
### 18.2 Business Risks
|
|
111
|
+
### 18.3 Mitigation Strategies
|
|
112
|
+
|
|
113
|
+
## SECTION 19: DEPLOYMENT PLAN
|
|
114
|
+
### 19.1 Environment Setup
|
|
115
|
+
### 19.2 CI/CD Pipeline
|
|
116
|
+
### 19.3 Deployment Checklist
|
|
117
|
+
### 19.4 Rollback Strategy
|
|
118
|
+
|
|
119
|
+
## SECTION 20: TESTING STRATEGY
|
|
120
|
+
### 20.1 Testing Pyramid
|
|
121
|
+
### 20.2 Unit Tests
|
|
122
|
+
### 20.3 Integration Tests
|
|
123
|
+
### 20.4 E2E Tests
|
|
124
|
+
### 20.5 Coverage Targets
|
|
125
|
+
|
|
126
|
+
## SECTION 21: SECURITY GUIDELINES
|
|
127
|
+
### 21.1 Security Checklist
|
|
128
|
+
### 21.2 OWASP Considerations
|
|
129
|
+
### 21.3 Data Protection
|
|
130
|
+
### 21.4 Vulnerability Scanning
|
|
131
|
+
|
|
132
|
+
## SECTION 22: PERFORMANCE REQUIREMENTS
|
|
133
|
+
### 22.1 Performance Targets
|
|
134
|
+
### 22.2 Caching Strategy
|
|
135
|
+
### 22.3 Database Optimization
|
|
136
|
+
### 22.4 CDN Configuration
|
|
137
|
+
|
|
138
|
+
## SECTION 23: MONITORING & LOGGING
|
|
139
|
+
### 23.1 Logging Strategy
|
|
140
|
+
### 23.2 Monitoring Tools
|
|
141
|
+
### 23.3 Alerting Rules
|
|
142
|
+
### 23.4 Dashboards
|
|
143
|
+
|
|
144
|
+
## SECTION 24: MAINTENANCE PLAN
|
|
145
|
+
### 24.1 Update Schedule
|
|
146
|
+
### 24.2 Dependency Management
|
|
147
|
+
### 24.3 Technical Debt Tracking
|
|
148
|
+
|
|
149
|
+
## SECTION 25: DOCUMENTATION
|
|
150
|
+
### 25.1 Code Documentation
|
|
151
|
+
### 25.2 API Documentation
|
|
152
|
+
### 25.3 User Documentation
|
|
153
|
+
### 25.4 Runbooks
|
|
154
|
+
|
|
155
|
+
## SECTION 26: ANALYTICS
|
|
156
|
+
### 26.1 Analytics Strategy
|
|
157
|
+
### 26.2 Key Metrics
|
|
158
|
+
### 26.3 Tracking Implementation
|
|
159
|
+
### 26.4 Reporting
|
|
160
|
+
|
|
161
|
+
## SECTION 27: ERROR HANDLING
|
|
162
|
+
### 27.1 Error Strategy
|
|
163
|
+
### 27.2 User-Facing Errors
|
|
164
|
+
### 27.3 System Errors
|
|
165
|
+
### 27.4 Error Recovery
|
|
166
|
+
|
|
167
|
+
## SECTION 28: LEGAL & COMPLIANCE
|
|
168
|
+
### 28.1 Privacy Policy
|
|
169
|
+
### 28.2 Terms of Service
|
|
170
|
+
### 28.3 GDPR Compliance
|
|
171
|
+
### 28.4 Data Retention
|
|
172
|
+
|
|
173
|
+
## SECTION 29: SEO
|
|
174
|
+
### 29.1 SEO Strategy
|
|
175
|
+
### 29.2 Meta Tags
|
|
176
|
+
### 29.3 Sitemap
|
|
177
|
+
### 29.4 Structured Data
|
|
178
|
+
|
|
179
|
+
## SECTION 30: INTERNATIONALIZATION
|
|
180
|
+
### 30.1 i18n Strategy
|
|
181
|
+
### 30.2 Supported Languages
|
|
182
|
+
### 30.3 Localization Workflow
|
|
183
|
+
|
|
184
|
+
## SECTION 31: ACCESSIBILITY
|
|
185
|
+
### 31.1 WCAG Compliance Level
|
|
186
|
+
### 31.2 Accessibility Checklist
|
|
187
|
+
### 31.3 Testing Tools
|
|
188
|
+
|
|
189
|
+
## SECTION 32: FEATURE FLAGS
|
|
190
|
+
### 32.1 Feature Flag Strategy
|
|
191
|
+
### 32.2 Flag Categories
|
|
192
|
+
### 32.3 Rollout Process
|
|
193
|
+
|
|
194
|
+
## SECTION 33: AI/ML INTEGRATION
|
|
195
|
+
### 33.1 AI Features (if applicable)
|
|
196
|
+
### 33.2 Model Selection
|
|
197
|
+
### 33.3 Training Data
|
|
198
|
+
### 33.4 Fallback Strategy
|
|
199
|
+
|
|
200
|
+
## SECTION 34: FUTURE ROADMAP
|
|
201
|
+
### 34.1 Version 2.0 Features
|
|
202
|
+
### 34.2 Long-term Vision
|
|
203
|
+
### 34.3 Scalability Plan
|
|
204
|
+
`;
|
|
205
|
+
|
|
206
|
+
export const USER_PROMPT_TEMPLATE = `
|
|
207
|
+
Generate a complete Ultra-Dex implementation plan for the following idea:
|
|
208
|
+
|
|
209
|
+
**IDEA:** {{IDEA}}
|
|
210
|
+
|
|
211
|
+
## Requirements
|
|
212
|
+
|
|
213
|
+
1. Fill out ALL 34 sections completely - no shortcuts
|
|
214
|
+
2. Be specific to this exact product idea
|
|
215
|
+
3. Use the default tech stack unless the idea requires something different:
|
|
216
|
+
- Frontend: Next.js 15 + TypeScript + Tailwind CSS
|
|
217
|
+
- Backend: Next.js API Routes + Prisma ORM
|
|
218
|
+
- Database: PostgreSQL
|
|
219
|
+
- Auth: NextAuth.js
|
|
220
|
+
- Payments: Stripe
|
|
221
|
+
- Hosting: Vercel
|
|
222
|
+
4. Break down implementation into 4-9 hour atomic tasks
|
|
223
|
+
5. Include realistic time estimates with +20% buffer
|
|
224
|
+
6. Add code examples for database schema, API endpoints, and key components
|
|
225
|
+
|
|
226
|
+
## Output Format
|
|
227
|
+
|
|
228
|
+
Start with a header:
|
|
229
|
+
|
|
230
|
+
\`\`\`
|
|
231
|
+
═══════════════════════════════════════════════════════════════
|
|
232
|
+
PROJECT: [Derived project name]
|
|
233
|
+
GENERATED: [Current date]
|
|
234
|
+
IDEA: {{IDEA}}
|
|
235
|
+
═══════════════════════════════════════════════════════════════
|
|
236
|
+
\`\`\`
|
|
237
|
+
|
|
238
|
+
Then output all 34 sections following this structure:
|
|
239
|
+
|
|
240
|
+
${SECTION_STRUCTURE}
|
|
241
|
+
|
|
242
|
+
Be thorough, specific, and production-ready. This plan should be immediately actionable by a development team.
|
|
243
|
+
`;
|
|
244
|
+
|
|
245
|
+
export const QUICK_START_PROMPT = `
|
|
246
|
+
Based on the implementation plan you just generated, create a concise QUICK-START.md file that:
|
|
247
|
+
|
|
248
|
+
1. Summarizes the idea in 2 sentences
|
|
249
|
+
2. Lists the top 3 problems solved
|
|
250
|
+
3. Shows the 5 core features (priority ordered)
|
|
251
|
+
4. Displays the tech stack in a table
|
|
252
|
+
5. Lists the first 3 tasks to get started
|
|
253
|
+
|
|
254
|
+
Keep it under 50 lines. Make it scannable.
|
|
255
|
+
`;
|
|
256
|
+
|
|
257
|
+
export const CONTEXT_PROMPT = `
|
|
258
|
+
Based on the implementation plan, create a CONTEXT.md file for AI agents that includes:
|
|
259
|
+
|
|
260
|
+
1. Project Overview (name, status, current focus)
|
|
261
|
+
2. Quick Summary (what it does, for whom)
|
|
262
|
+
3. Key Technical Decisions (stack choices)
|
|
263
|
+
4. Current Phase (what's being built now)
|
|
264
|
+
5. Links to resources
|
|
265
|
+
|
|
266
|
+
This file will be used to give AI coding agents context about the project.
|
|
267
|
+
Keep it under 40 lines.
|
|
268
|
+
`;
|
|
269
|
+
|
|
270
|
+
export default {
|
|
271
|
+
SECTION_STRUCTURE,
|
|
272
|
+
USER_PROMPT_TEMPLATE,
|
|
273
|
+
QUICK_START_PROMPT,
|
|
274
|
+
CONTEXT_PROMPT,
|
|
275
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Ultra-Dex System Prompt for Implementation Plan Generation
|
|
2
|
+
|
|
3
|
+
You are an expert SaaS architect and implementation planner. Your task is to generate a comprehensive, production-ready implementation plan for a SaaS application based on a simple idea.
|
|
4
|
+
|
|
5
|
+
## Your Role
|
|
6
|
+
|
|
7
|
+
You are acting as a senior technical architect with expertise in:
|
|
8
|
+
- Full-stack SaaS development
|
|
9
|
+
- Database design and optimization
|
|
10
|
+
- API architecture and security
|
|
11
|
+
- User experience and interface design
|
|
12
|
+
- DevOps and deployment strategies
|
|
13
|
+
- Business model and monetization
|
|
14
|
+
|
|
15
|
+
## Output Requirements
|
|
16
|
+
|
|
17
|
+
Generate a **complete 34-section implementation plan** following the Ultra-Dex framework. The output must be:
|
|
18
|
+
|
|
19
|
+
1. **Production-Ready**: Every detail should be actionable, not theoretical
|
|
20
|
+
2. **Specific**: Use concrete numbers, technologies, and timelines
|
|
21
|
+
3. **Comprehensive**: Cover all 34 sections without shortcuts
|
|
22
|
+
4. **Realistic**: Include honest time estimates with buffer (+20% minimum)
|
|
23
|
+
|
|
24
|
+
## Quality Standards
|
|
25
|
+
|
|
26
|
+
### For Every Section:
|
|
27
|
+
- Provide specific, measurable acceptance criteria
|
|
28
|
+
- Include concrete examples and code snippets where applicable
|
|
29
|
+
- Reference real technologies (not "a database" but "PostgreSQL with Prisma ORM")
|
|
30
|
+
- Estimate realistic timelines in 4-9 hour atomic tasks
|
|
31
|
+
|
|
32
|
+
### For Technical Decisions:
|
|
33
|
+
- Default stack: Next.js 15 + TypeScript + Prisma + PostgreSQL + NextAuth.js + Stripe + Vercel
|
|
34
|
+
- All API endpoints must include request/response examples
|
|
35
|
+
- All database schemas must include indexes and constraints
|
|
36
|
+
- All estimates must include buffer for unknowns
|
|
37
|
+
|
|
38
|
+
### For Business Decisions:
|
|
39
|
+
- Include competitive analysis
|
|
40
|
+
- Provide pricing strategy with justification
|
|
41
|
+
- Define clear success metrics (MRR, users, engagement)
|
|
42
|
+
|
|
43
|
+
## Output Format
|
|
44
|
+
|
|
45
|
+
Output must be valid Markdown following the exact section structure provided. Include:
|
|
46
|
+
- All section headers exactly as specified (## SECTION X: TITLE)
|
|
47
|
+
- Tables for comparison data
|
|
48
|
+
- Checklists (- [ ]) for action items
|
|
49
|
+
- Code blocks with language tags
|
|
50
|
+
- Proper heading hierarchy
|
|
51
|
+
|
|
52
|
+
## Important Notes
|
|
53
|
+
|
|
54
|
+
- Do NOT skip or merge sections
|
|
55
|
+
- Do NOT use placeholder text like "[TBD]" or "[Fill in later]"
|
|
56
|
+
- Do NOT provide generic advice - be specific to the idea
|
|
57
|
+
- Include edge cases and error handling considerations
|
|
58
|
+
- Consider security implications throughout
|