App Builder - Application Building Orchestrator
Purpose
Analyzes user's natural language requests, determines the appropriate tech stack, plans project structure, and coordinates expert agents to create a working application.
1. Project Type Detection
1.1 Keyword Matrix
| Keywords |
Project Type |
Template |
| blog, post, article |
Blog |
astro-static |
| e-commerce, product, cart, payment |
E-commerce |
nextjs-saas |
| dashboard, panel, management |
Admin Dashboard |
nextjs-fullstack |
| api, backend, service, rest |
API Service |
express-api |
| python, fastapi, django |
Python API |
python-fastapi |
| mobile, android, ios, react native |
Mobile App (RN) |
react-native-app |
| flutter, dart |
Mobile App (Flutter) |
flutter-app |
| portfolio, personal, cv |
Portfolio |
nextjs-static |
| crm, customer, sales |
CRM |
nextjs-fullstack |
| saas, subscription, stripe, payment |
SaaS |
nextjs-saas |
| landing, promotional, marketing |
Landing Page |
nextjs-static |
| docs, documentation, content |
Documentation |
astro-static |
| extension, plugin, chrome, browser |
Browser Extension |
chrome-extension |
| desktop, electron, windows, mac |
Desktop App |
electron-desktop |
| cli, command line, terminal, tool |
CLI Tool |
cli-tool |
| monorepo, workspace, multi-package |
Monorepo |
monorepo-turborepo |
1.2 Detection Process
1. Tokenize user request
2. Extract keywords
3. Determine project type
4. Detect missing information → forward to conversation-manager
5. Suggest tech stack
2. Tech Stack Selection
2.1 Default Stack (Web App - 2025)
Frontend:
framework: Next.js 15 (Stable)
language: TypeScript 5.7+
styling: Tailwind CSS v4 (Alpha/Stable)
state: React 19 Actions / Server Components
bundler: Turbopack (Stable for Dev)
Backend:
runtime: Node.js 23 (Native Test Runner)
framework: Next.js API Routes / Hono (for Edge)
validation: Zod / TypeBox
Database:
primary: PostgreSQL
orm: Prisma / Drizzle
hosting: Supabase / Neon
Auth:
provider: Auth.js (v5) / Clerk
Monorepo:
tool: Turborepo 2.0 (New Terminal UI)
2.2 Alternative Options
| Need |
Default |
Alternative |
| Real-time |
- |
Supabase Realtime, Socket.io |
| File storage |
- |
Cloudinary, S3 |
| Payment |
Stripe |
LemonSqueezy, Paddle |
| Email |
- |
Resend, SendGrid |
| Search |
- |
Algolia, Typesense |
3. Agent Coordination
3.1 Agent Pipeline
┌─────────────────────────────────────────────────────────────┐
│ APP BUILDER (Orchestrator) │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ PROJECT PLANNER │
│ • Task breakdown │
│ • Dependency graph │
│ • File structure planning │
└─────────────────────────────────────────────────────────────┘
│
┌───────────────────┼───────────────────┐
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ DATABASE │ │ BACKEND │ │ FRONTEND │
│ ARCHITECT │ │ SPECIALIST │ │ SPECIALIST │
│ │ │ │ │ │
│ • Schema design │ │ • API routes │ │ • Components │
│ • Migrations │ │ • Controllers │ │ • Pages │
│ • Seed data │ │ • Middleware │ │ • Styling │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
└───────────────────┼───────────────────┘
▼
┌─────────────────────────────────────────────────────────────┐
│ PARALLEL PHASE (Optional) │
│ • Security Auditor → Vulnerability check │
│ • Test Engineer → Unit tests │
│ • Performance Optimizer → Bundle analysis │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ DEVOPS ENGINEER │
│ • Environment setup │
│ • Preview deployment │
│ • Health check │
└─────────────────────────────────────────────────────────────┘
3.2 Execution Order
| Phase |
Agent(s) |
Parallel? |
Prerequisite |
| 1 |
Project Planner |
❌ |
- |
| 2 |
Database Architect |
❌ |
Plan ready |
| 3 |
Backend Specialist |
❌ |
Schema ready |
| 4 |
Frontend Specialist |
✅ |
API ready (partial) |
| 5 |
Security Auditor, Test Engineer |
✅ |
Code ready |
| 6 |
DevOps Engineer |
❌ |
All code ready |
4. Project Scaffolding
4.1 Directory Structure (Next.js Full-Stack)
project-name/
├── prisma/
│ ├── schema.prisma
│ ├── migrations/
│ └── seed.ts
├── src/
│ ├── app/
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ ├── globals.css
│ │ ├── api/
│ │ │ └── [resource]/
│ │ │ └── route.ts
│ │ └── [feature]/
│ │ └── page.tsx
│ ├── components/
│ │ ├── ui/
│ │ └── [feature]/
│ ├── lib/
│ │ ├── db.ts
│ │ ├── auth.ts
│ │ └── utils.ts
│ ├── hooks/
│ └── types/
├── public/
├── .env.example
├── .env.local
├── package.json
├── tailwind.config.ts
├── tsconfig.json
└── README.md
4.2 Core Files
Files automatically created for every project:
package.json - Dependencies
tsconfig.json - TypeScript config
tailwind.config.ts - Tailwind config
.env.example - Environment variables template
README.md - Project documentation
.gitignore - Git ignore rules
prisma/schema.prisma - Database schema
5. Feature Building
5.1 Feature Analysis
Request: "add payment system"
Analysis:
├── Required Changes:
│ ├── Database: orders, payments tables
│ ├── Backend: /api/checkout, /api/webhooks/stripe
│ ├── Frontend: CheckoutForm, PaymentSuccess
│ └── Config: Stripe API keys
│
├── Dependencies:
│ ├── stripe package
│ └── Existing user authentication
│
└── Estimated Time: 15-20 minutes
5.2 Iterative Enhancement
1. Analyze existing project
2. Create change plan
3. Present plan to user
4. Get approval
5. Apply changes
6. Test
7. Show preview
6. Context Management
6.1 Project State
{
"projectPath": "/path/to/project",
"projectType": "nextjs-ecommerce",
"techStack": {
"frontend": "next.js",
"database": "postgresql",
"auth": "clerk"
},
"features": ["product-listing", "cart", "checkout"],
"pendingFeatures": ["admin-panel"],
"lastModified": "2025-12-30T08:00:00Z"
}
6.2 Context Loading
At session start:
1. Read current-project.json
2. Load project state
3. Restore conversation history
4. Present summary to user (optional)
7. Error Handling
7.1 Build Errors
Error Type → Solution Strategy:
TypeScript Error → Fix type, add missing import
Missing Dependency → Run npm install
Port Conflict → Suggest alternative port
Database Error → Check migration, validate connection string
7.2 Recovery Strategy
1. Detect error
2. Try automatic fix
3. If failed, report to user
4. Suggest alternative
5. Rollback if necessary
8. Integration Points
This skill integrates with the following skills and agents:
| Component |
Role |
conversation-manager |
User communication, Q&A |
project-planner agent |
Task breakdown, dependency graph |
frontend-specialist agent |
UI components, pages |
backend-specialist agent |
API, business logic |
database-architect agent |
Schema, migrations |
devops-engineer agent |
Deployment, preview |
progress-reporter script |
Real-time status updates |
9. Usage Example
User: "Make an Instagram clone with photo sharing and likes"
App Builder Process:
1. Project type: Social Media App
2. Tech stack: Next.js + Prisma + Cloudinary + Clerk
3.
┌─ Create plan
├─ Database schema (users, posts, likes, follows)
├─ API routes (12 endpoints)
├─ Pages (feed, profile, upload)
└─ Components (PostCard, Feed, LikeButton)
4. Coordinate agents
5. Report progress
6. Start preview
7. Notify user when complete
1---2name: app-builder-23description: Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents. Use for creating new applications, scaffolding projects, or building features from scratch.4---5
6# App Builder - Application Building Orchestrator
7
8## Purpose
9Analyzes user's natural language requests, determines the appropriate tech stack, plans project structure, and coordinates expert agents to create a working application.
10
11---
12
13## 1. Project Type Detection
14
15### 1.1 Keyword Matrix
16
17| Keywords | Project Type | Template |
18|----------|--------------|----------|
19| blog, post, article | Blog | astro-static |
20| e-commerce, product, cart, payment | E-commerce | nextjs-saas |
21| dashboard, panel, management | Admin Dashboard | nextjs-fullstack |
22| api, backend, service, rest | API Service | express-api |
23| python, fastapi, django | Python API | python-fastapi |
24| mobile, android, ios, react native | Mobile App (RN) | react-native-app |
25| flutter, dart | Mobile App (Flutter) | flutter-app |
26| portfolio, personal, cv | Portfolio | nextjs-static |
27| crm, customer, sales | CRM | nextjs-fullstack |
28| saas, subscription, stripe, payment | SaaS | nextjs-saas |
29| landing, promotional, marketing | Landing Page | nextjs-static |
30| docs, documentation, content | Documentation | astro-static |
31| extension, plugin, chrome, browser | Browser Extension | chrome-extension |
32| desktop, electron, windows, mac | Desktop App | electron-desktop |
33| cli, command line, terminal, tool | CLI Tool | cli-tool |
34| monorepo, workspace, multi-package | Monorepo | monorepo-turborepo |
35
36### 1.2 Detection Process
37
38```
391. Tokenize user request
402. Extract keywords
413. Determine project type
424. Detect missing information → forward to conversation-manager
435. Suggest tech stack
44```
45
46---
47
48## 2. Tech Stack Selection
49
50### 2.1 Default Stack (Web App - 2025)
51
52```yaml
53Frontend:
54 framework: Next.js 15 (Stable)
55 language: TypeScript 5.7+
56 styling: Tailwind CSS v4 (Alpha/Stable)
57 state: React 19 Actions / Server Components
58 bundler: Turbopack (Stable for Dev)
59
60Backend:
61 runtime: Node.js 23 (Native Test Runner)
62 framework: Next.js API Routes / Hono (for Edge)
63 validation: Zod / TypeBox
64
65Database:
66 primary: PostgreSQL
67 orm: Prisma / Drizzle
68 hosting: Supabase / Neon
69
70Auth:
71 provider: Auth.js (v5) / Clerk
72
73Monorepo:
74 tool: Turborepo 2.0 (New Terminal UI)
75```
76
77### 2.2 Alternative Options
78
79| Need | Default | Alternative |
80|------|---------|-------------|
81| Real-time | - | Supabase Realtime, Socket.io |
82| File storage | - | Cloudinary, S3 |
83| Payment | Stripe | LemonSqueezy, Paddle |
84| Email | - | Resend, SendGrid |
85| Search | - | Algolia, Typesense |
86
87---
88
89## 3. Agent Coordination
90
91### 3.1 Agent Pipeline
92
93```
94┌─────────────────────────────────────────────────────────────┐
95│ APP BUILDER (Orchestrator) │
96└─────────────────────────────────────────────────────────────┘
97 │
98 ▼
99┌─────────────────────────────────────────────────────────────┐
100│ PROJECT PLANNER │
101│ • Task breakdown │
102│ • Dependency graph │
103│ • File structure planning │
104└─────────────────────────────────────────────────────────────┘
105 │
106 ┌───────────────────┼───────────────────┐
107 ▼ ▼ ▼
108┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
109│ DATABASE │ │ BACKEND │ │ FRONTEND │
110│ ARCHITECT │ │ SPECIALIST │ │ SPECIALIST │
111│ │ │ │ │ │
112│ • Schema design │ │ • API routes │ │ • Components │
113│ • Migrations │ │ • Controllers │ │ • Pages │
114│ • Seed data │ │ • Middleware │ │ • Styling │
115└─────────────────┘ └─────────────────┘ └─────────────────┘
116 │ │ │
117 └───────────────────┼───────────────────┘
118 ▼
119┌─────────────────────────────────────────────────────────────┐
120│ PARALLEL PHASE (Optional) │
121│ • Security Auditor → Vulnerability check │
122│ • Test Engineer → Unit tests │
123│ • Performance Optimizer → Bundle analysis │
124└─────────────────────────────────────────────────────────────┘
125 │
126 ▼
127┌─────────────────────────────────────────────────────────────┐
128│ DEVOPS ENGINEER │
129│ • Environment setup │
130│ • Preview deployment │
131│ • Health check │
132└─────────────────────────────────────────────────────────────┘
133```
134
135### 3.2 Execution Order
136
137| Phase | Agent(s) | Parallel? | Prerequisite |
138|-------|----------|-----------|--------------|
139| 1 | Project Planner | ❌ | - |
140| 2 | Database Architect | ❌ | Plan ready |
141| 3 | Backend Specialist | ❌ | Schema ready |
142| 4 | Frontend Specialist | ✅ | API ready (partial) |
143| 5 | Security Auditor, Test Engineer | ✅ | Code ready |
144| 6 | DevOps Engineer | ❌ | All code ready |
145
146---
147
148## 4. Project Scaffolding
149
150### 4.1 Directory Structure (Next.js Full-Stack)
151
152```
153project-name/
154├── prisma/
155│ ├── schema.prisma
156│ ├── migrations/
157│ └── seed.ts
158├── src/
159│ ├── app/
160│ │ ├── layout.tsx
161│ │ ├── page.tsx
162│ │ ├── globals.css
163│ │ ├── api/
164│ │ │ └── [resource]/
165│ │ │ └── route.ts
166│ │ └── [feature]/
167│ │ └── page.tsx
168│ ├── components/
169│ │ ├── ui/
170│ │ └── [feature]/
171│ ├── lib/
172│ │ ├── db.ts
173│ │ ├── auth.ts
174│ │ └── utils.ts
175│ ├── hooks/
176│ └── types/
177├── public/
178├── .env.example
179├── .env.local
180├── package.json
181├── tailwind.config.ts
182├── tsconfig.json
183└── README.md
184```
185
186### 4.2 Core Files
187
188Files automatically created for every project:
189- `package.json` - Dependencies
190- `tsconfig.json` - TypeScript config
191- `tailwind.config.ts` - Tailwind config
192- `.env.example` - Environment variables template
193- `README.md` - Project documentation
194- `.gitignore` - Git ignore rules
195- `prisma/schema.prisma` - Database schema
196
197---
198
199## 5. Feature Building
200
201### 5.1 Feature Analysis
202
203```
204Request: "add payment system"
205
206Analysis:
207├── Required Changes:
208│ ├── Database: orders, payments tables
209│ ├── Backend: /api/checkout, /api/webhooks/stripe
210│ ├── Frontend: CheckoutForm, PaymentSuccess
211│ └── Config: Stripe API keys
212│
213├── Dependencies:
214│ ├── stripe package
215│ └── Existing user authentication
216│
217└── Estimated Time: 15-20 minutes
218```
219
220### 5.2 Iterative Enhancement
221
222```
2231. Analyze existing project
2242. Create change plan
2253. Present plan to user
2264. Get approval
2275. Apply changes
2286. Test
2297. Show preview
230```
231
232---
233
234## 6. Context Management
235
236### 6.1 Project State
237
238```json
239{
240 "projectPath": "/path/to/project",
241 "projectType": "nextjs-ecommerce",
242 "techStack": {
243 "frontend": "next.js",
244 "database": "postgresql",
245 "auth": "clerk"
246 },
247 "features": ["product-listing", "cart", "checkout"],
248 "pendingFeatures": ["admin-panel"],
249 "lastModified": "2025-12-30T08:00:00Z"
250}
251```
252
253### 6.2 Context Loading
254
255```
256At session start:
2571. Read current-project.json
2582. Load project state
2593. Restore conversation history
2604. Present summary to user (optional)
261```
262
263---
264
265## 7. Error Handling
266
267### 7.1 Build Errors
268
269```
270Error Type → Solution Strategy:
271
272TypeScript Error → Fix type, add missing import
273Missing Dependency → Run npm install
274Port Conflict → Suggest alternative port
275Database Error → Check migration, validate connection string
276```
277
278### 7.2 Recovery Strategy
279
280```
2811. Detect error
2822. Try automatic fix
2833. If failed, report to user
2844. Suggest alternative
2855. Rollback if necessary
286```
287
288---
289
290## 8. Integration Points
291
292This skill integrates with the following skills and agents:
293
294| Component | Role |
295|-----------|------|
296| `conversation-manager` | User communication, Q&A |
297| `project-planner` agent | Task breakdown, dependency graph |
298| `frontend-specialist` agent | UI components, pages |
299| `backend-specialist` agent | API, business logic |
300| `database-architect` agent | Schema, migrations |
301| `devops-engineer` agent | Deployment, preview |
302| `progress-reporter` script | Real-time status updates |
303
304---
305
306## 9. Usage Example
307
308```
309User: "Make an Instagram clone with photo sharing and likes"
310
311App Builder Process:
3121. Project type: Social Media App
3132. Tech stack: Next.js + Prisma + Cloudinary + Clerk
3143.
315 ┌─ Create plan
316 ├─ Database schema (users, posts, likes, follows)
317 ├─ API routes (12 endpoints)
318 ├─ Pages (feed, profile, upload)
319 └─ Components (PostCard, Feed, LikeButton)
3204. Coordinate agents
3215. Report progress
3226. Start preview
3237. Notify user when complete
324```