@codebakers/mcp 5.4.2 → 5.4.3
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/INSTALL.md +221 -221
- package/LICENSE +21 -21
- package/README.md +412 -412
- package/dist/cli.js +29 -29
- package/dist/cli.js.map +1 -1
- package/dist/tools/analyze-mockups.js +37 -37
- package/dist/tools/autonomous-build.d.ts +18 -18
- package/dist/tools/autonomous-build.js +286 -286
- package/dist/tools/check-gate.js +6 -6
- package/dist/tools/check-scope.js +10 -10
- package/dist/tools/enforce-feature.js +15 -15
- package/dist/tools/fix-commit.js +18 -18
- package/dist/tools/fix-mockups.js +191 -191
- package/dist/tools/generate-api-route.js +155 -155
- package/dist/tools/generate-chatbot.js +306 -306
- package/dist/tools/generate-component.js +117 -117
- package/dist/tools/generate-docs.js +525 -525
- package/dist/tools/generate-e2e-tests.js +19 -19
- package/dist/tools/generate-migration.js +22 -22
- package/dist/tools/generate-schema.js +37 -37
- package/dist/tools/generate-spec.js +38 -38
- package/dist/tools/generate-store-contracts.js +42 -42
- package/dist/tools/generate-store.js +109 -109
- package/dist/tools/generate-unit-tests.js +57 -57
- package/dist/tools/map-dependencies.js +45 -45
- package/dist/tools/run-interview.js +142 -142
- package/dist/tools/setup-github.js +8 -8
- package/dist/tools/setup-supabase.js +8 -8
- package/dist/tools/setup-vercel.js +8 -8
- package/dist/tools/validate-mockups.js +19 -19
- package/package.json +50 -50
package/README.md
CHANGED
|
@@ -1,412 +1,412 @@
|
|
|
1
|
-
# CodeBakers MCP Server v5.1.0
|
|
2
|
-
|
|
3
|
-
**Complete autonomous application builder with MCP architecture**
|
|
4
|
-
|
|
5
|
-
Full autonomous build system - from mockups to production-ready app in 30 minutes. Drop design mockups, run autonomous build, deploy. Zero human intervention required.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 🎯 What This Is
|
|
10
|
-
|
|
11
|
-
An MCP (Model Context Protocol) server that:
|
|
12
|
-
- **Builds entire applications autonomously** (mockups → deployed app)
|
|
13
|
-
- **Validates mockup quality** (detects and auto-fixes design issues)
|
|
14
|
-
- **Generates complete vertical slices** (schema → API → store → UI → tests)
|
|
15
|
-
- **Updates all dependencies automatically** (zero stale UI bugs)
|
|
16
|
-
- **Enforces production quality** (security, error handling, testing, mobile)
|
|
17
|
-
- **Provides 25 specialized tools** (mockup validation, code generation, testing, orchestration)
|
|
18
|
-
|
|
19
|
-
**Key Innovation:** Not just code generation - full autonomous execution with dependency awareness and quality enforcement.
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## 🏗️ Current Build Status
|
|
24
|
-
|
|
25
|
-
### ✅ v5.1.0 - FULLY AUTONOMOUS (100% Complete)
|
|
26
|
-
|
|
27
|
-
**25 Production-Ready Tools:**
|
|
28
|
-
|
|
29
|
-
**Phase 0: Planning (2 tools)**
|
|
30
|
-
- ✅ `codebakers_get_context` - Auto-detect project state
|
|
31
|
-
- ✅ `codebakers_init_session` - Session initialization
|
|
32
|
-
|
|
33
|
-
**Phase 0.5: Spec Generation (1 tool)**
|
|
34
|
-
- ✅ `codebakers_generate_spec` - Generate PROJECT-SPEC.md
|
|
35
|
-
|
|
36
|
-
**Phase 1: Interview (1 tool)**
|
|
37
|
-
- ✅ `codebakers_run_interview` - Automated interview → FLOWS.md
|
|
38
|
-
|
|
39
|
-
**Phase 2: Mockup Quality (3 tools)**
|
|
40
|
-
- ✅ `codebakers_validate_mockups` - Detect quality issues
|
|
41
|
-
- ✅ `codebakers_fix_mockups` - Auto-fix mockup problems
|
|
42
|
-
- ✅ `codebakers_verify_mockups` - Final verification (100% perfect)
|
|
43
|
-
|
|
44
|
-
**Phase 2: Analysis & Schema (4 tools)**
|
|
45
|
-
- ✅ `codebakers_analyze_mockups_deep` - Extract components/data/interactions
|
|
46
|
-
- ✅ `codebakers_generate_schema` - Generate database schema
|
|
47
|
-
- ✅ `codebakers_map_dependencies` - Map all dependencies
|
|
48
|
-
- ✅ `codebakers_generate_store_contracts` - Generate store contracts
|
|
49
|
-
|
|
50
|
-
**Phase 3+: Code Generation (4 tools)**
|
|
51
|
-
- ✅ `codebakers_generate_migration` - Supabase migrations
|
|
52
|
-
- ✅ `codebakers_generate_api_route` - Next.js API routes
|
|
53
|
-
- ✅ `codebakers_generate_store` - Zustand stores (dependency-aware)
|
|
54
|
-
- ✅ `codebakers_generate_component` - React components (all 4 states)
|
|
55
|
-
|
|
56
|
-
**Testing (3 tools)**
|
|
57
|
-
- ✅ `codebakers_generate_unit_tests` - Vitest unit tests
|
|
58
|
-
- ✅ `codebakers_generate_e2e_tests` - Playwright E2E tests
|
|
59
|
-
- ✅ `codebakers_run_tests` - Orchestrate test execution
|
|
60
|
-
|
|
61
|
-
**Orchestration (3 tools)**
|
|
62
|
-
- ✅ `codebakers_execute_atomic_unit` - Execute 8-step atomic unit
|
|
63
|
-
- ✅ `codebakers_verify_completeness` - Verify feature completeness
|
|
64
|
-
- ✅ `codebakers_autonomous_build` - Build entire app autonomously
|
|
65
|
-
|
|
66
|
-
**Enforcement (4 tools)**
|
|
67
|
-
- ✅ `codebakers_check_gate` - Phase verification
|
|
68
|
-
- ✅ `codebakers_enforce_feature` - Feature build enforcement
|
|
69
|
-
- ✅ `codebakers_fix_commit` - Auto-fix commit violations
|
|
70
|
-
- ✅ `codebakers_check_scope` - Scope enforcement
|
|
71
|
-
|
|
72
|
-
**Total:** 25 tools, 100% implemented, fully tested
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## 📦 Installation
|
|
77
|
-
|
|
78
|
-
### One-Command Installation (Recommended)
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
npx @codebakers/mcp install
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
That's it! This command will:
|
|
85
|
-
- ✓ Auto-locate your Claude Desktop config
|
|
86
|
-
- ✓ Add CodeBakers MCP Server configuration
|
|
87
|
-
- ✓ Set the correct path automatically
|
|
88
|
-
- ✓ No manual JSON editing required
|
|
89
|
-
|
|
90
|
-
**After installation:**
|
|
91
|
-
1. Restart Claude Desktop
|
|
92
|
-
2. CodeBakers tools will be available automatically
|
|
93
|
-
3. Verify: Run `codebakers_get_context` in Claude Desktop
|
|
94
|
-
|
|
95
|
-
**Other commands:**
|
|
96
|
-
```bash
|
|
97
|
-
npx @codebakers/mcp status # Check installation
|
|
98
|
-
npx @codebakers/mcp uninstall # Remove
|
|
99
|
-
npx @codebakers/mcp help # Show all commands
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
### Manual Installation (Advanced)
|
|
105
|
-
|
|
106
|
-
See [INSTALL.md](./INSTALL.md) for detailed manual installation steps and troubleshooting.
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
### Development Installation (Contributors)
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
# Clone repository
|
|
114
|
-
git clone https://github.com/botmakers-ai/codebakers-v2.git
|
|
115
|
-
cd codebakers-v2/codebakers-mcp-server
|
|
116
|
-
|
|
117
|
-
# Install and build
|
|
118
|
-
npm install
|
|
119
|
-
npm run build
|
|
120
|
-
|
|
121
|
-
# Install CLI
|
|
122
|
-
npx . install
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
This will configure Claude Desktop to use your local development build.
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## 🎮 How It Works
|
|
130
|
-
|
|
131
|
-
### Autonomous Build Flow (End-to-End)
|
|
132
|
-
|
|
133
|
-
**User provides:** "Build an email client for teams"
|
|
134
|
-
|
|
135
|
-
**System executes (zero human intervention):**
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
1. codebakers_run_interview { project_description: "email client for teams" }
|
|
139
|
-
→ Generates: project-profile.md, FLOWS.md (15 features), BRAIN.md
|
|
140
|
-
|
|
141
|
-
2. User drops mockups in refs/design/
|
|
142
|
-
|
|
143
|
-
3. codebakers_validate_mockups
|
|
144
|
-
→ Detects: 7 issues (3 critical, 4 warnings)
|
|
145
|
-
|
|
146
|
-
4. codebakers_fix_mockups
|
|
147
|
-
→ Auto-fixes: 5 issues, generates missing states, mobile mockups
|
|
148
|
-
|
|
149
|
-
5. codebakers_verify_mockups
|
|
150
|
-
→ ✅ PERFECT (100/100 score)
|
|
151
|
-
|
|
152
|
-
6. codebakers_analyze_mockups_deep
|
|
153
|
-
→ Extracts: All components, data fields, interactions from perfect mockups
|
|
154
|
-
|
|
155
|
-
7. codebakers_generate_schema
|
|
156
|
-
→ Creates: SCHEMA.sql (derived from perfect mockups)
|
|
157
|
-
|
|
158
|
-
8. codebakers_map_dependencies
|
|
159
|
-
→ Creates: DEPENDENCY-MAP.md (complete graph)
|
|
160
|
-
|
|
161
|
-
9. codebakers_check_gate { phase: 2 }
|
|
162
|
-
→ ✅ PASS (Phase 2 complete)
|
|
163
|
-
|
|
164
|
-
10. codebakers_autonomous_build { mode: "full" }
|
|
165
|
-
→ For each of 15 features:
|
|
166
|
-
a. codebakers_execute_atomic_unit
|
|
167
|
-
- Migration → API routes → Store → Component → Tests
|
|
168
|
-
b. codebakers_verify_completeness
|
|
169
|
-
c. Mark feature complete in FLOWS.md
|
|
170
|
-
→ Final: 15/15 features complete
|
|
171
|
-
|
|
172
|
-
11. codebakers_run_tests { test_type: "all" }
|
|
173
|
-
→ Unit tests: 127/127 passing
|
|
174
|
-
→ E2E tests: 32/32 passing
|
|
175
|
-
|
|
176
|
-
12. Build complete - Ready for deployment
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
**Time:** 15-30 minutes (depends on feature count)
|
|
180
|
-
**Human intervention:** Zero (except design mockups + final review)
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
### Quality Guarantees (Every Feature)
|
|
185
|
-
|
|
186
|
-
✅ **Security:** All queries filter by `user_id`
|
|
187
|
-
✅ **Error handling:** All 4 states (loading/error/empty/success)
|
|
188
|
-
✅ **Type safety:** TypeScript strict mode
|
|
189
|
-
✅ **Testing:** Unit (Vitest) + E2E (Playwright)
|
|
190
|
-
✅ **Mobile:** Responsive design
|
|
191
|
-
✅ **Dependencies:** All stores updated (from DEPENDENCY-MAP.md)
|
|
192
|
-
✅ **Standards:** CodeBakers method enforced
|
|
193
|
-
✅ **Atomic:** Complete vertical slices (no half-built features)
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
## 🚀 Use Cases
|
|
198
|
-
|
|
199
|
-
### 1. MVP in 30 Minutes
|
|
200
|
-
- Drop mockups
|
|
201
|
-
- Run autonomous build
|
|
202
|
-
- Deploy to Vercel
|
|
203
|
-
- **Result:** Production MVP
|
|
204
|
-
|
|
205
|
-
### 2. Prototypes at Scale
|
|
206
|
-
- Test 5 different product ideas
|
|
207
|
-
- Each takes 30 min autonomous build
|
|
208
|
-
- **Result:** 5 working prototypes in 3 hours
|
|
209
|
-
|
|
210
|
-
### 3. Internal Tools (No Manual Coding)
|
|
211
|
-
- Company needs CRM, dashboard, admin panel
|
|
212
|
-
- Generate mockups (Figma/v0)
|
|
213
|
-
- Run autonomous builds
|
|
214
|
-
- **Result:** 3 internal tools, zero manual coding
|
|
215
|
-
|
|
216
|
-
### 4. Teaching Tool
|
|
217
|
-
- Show students complete build process
|
|
218
|
-
- Execute atomic unit step-by-step
|
|
219
|
-
- **Result:** Learn by watching autonomous builds
|
|
220
|
-
|
|
221
|
-
### 5. Client Demos
|
|
222
|
-
- Client describes what they want
|
|
223
|
-
- Generate mockups together
|
|
224
|
-
- Run autonomous build in meeting
|
|
225
|
-
- **Result:** Working demo before they leave
|
|
226
|
-
|
|
227
|
-
---
|
|
228
|
-
|
|
229
|
-
## 📝 File Structure
|
|
230
|
-
|
|
231
|
-
```
|
|
232
|
-
codebakers-mcp-server/
|
|
233
|
-
├── package.json
|
|
234
|
-
├── tsconfig.json
|
|
235
|
-
├── README.md (this file)
|
|
236
|
-
├── src/
|
|
237
|
-
│ ├── index.ts (MCP server entry point)
|
|
238
|
-
│ ├── tools/
|
|
239
|
-
│ │ ├── get-context.ts ✅ COMPLETE
|
|
240
|
-
│ │ ├── init-session.ts ✅ COMPLETE
|
|
241
|
-
│ │ ├── generate-spec.ts 🚧 STUB
|
|
242
|
-
│ │ ├── analyze-mockups.ts 🚧 STUB
|
|
243
|
-
│ │ ├── generate-schema.ts 🚧 STUB
|
|
244
|
-
│ │ ├── map-dependencies.ts 🚧 STUB (CRITICAL)
|
|
245
|
-
│ │ ├── generate-store-contracts.ts 🚧 STUB
|
|
246
|
-
│ │ ├── check-gate.ts 🚧 STUB
|
|
247
|
-
│ │ ├── enforce-feature.ts 🚧 STUB
|
|
248
|
-
│ │ ├── fix-commit.ts 🚧 STUB
|
|
249
|
-
│ │ └── check-scope.ts 🚧 STUB
|
|
250
|
-
│ ├── lib/ (helper functions - to be created)
|
|
251
|
-
│ └── phases/ (phase implementations - to be created)
|
|
252
|
-
└── dist/ (compiled output)
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
## 🔗 Integration with CLAUDE.md
|
|
258
|
-
|
|
259
|
-
**CLAUDE.md will be TINY** in v5.0.0:
|
|
260
|
-
|
|
261
|
-
```markdown
|
|
262
|
-
# CodeBakers V5
|
|
263
|
-
|
|
264
|
-
You are a senior engineer using CodeBakers Method via MCP.
|
|
265
|
-
|
|
266
|
-
## Session Start
|
|
267
|
-
|
|
268
|
-
Every session:
|
|
269
|
-
1. Auto-run: codebakers_get_context (detects state)
|
|
270
|
-
2. Auto-run: codebakers_init_session (loads BUILD-STATE.md)
|
|
271
|
-
3. Follow suggestions from context
|
|
272
|
-
|
|
273
|
-
## User Requests
|
|
274
|
-
|
|
275
|
-
When user types //:
|
|
276
|
-
→ Call: codebakers_enforce_feature(feature_name)
|
|
277
|
-
|
|
278
|
-
When user requests feature not in spec:
|
|
279
|
-
→ Call: codebakers_check_scope(feature_description)
|
|
280
|
-
|
|
281
|
-
## Hard Rules
|
|
282
|
-
|
|
283
|
-
- Stack: Supabase + Next.js only
|
|
284
|
-
- Queries: .maybeSingle() not .single()
|
|
285
|
-
- Mutations: Filter by id AND user_id
|
|
286
|
-
- Versions: --save-exact
|
|
287
|
-
|
|
288
|
-
MCP tools handle everything else.
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
**That's it. ~30 lines instead of 1200.**
|
|
292
|
-
|
|
293
|
-
---
|
|
294
|
-
|
|
295
|
-
## 🚀 Getting Started
|
|
296
|
-
|
|
297
|
-
### Quick Start
|
|
298
|
-
|
|
299
|
-
1. **Install:**
|
|
300
|
-
```bash
|
|
301
|
-
npx @codebakers/mcp-server install
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
2. **Restart Claude Desktop**
|
|
305
|
-
|
|
306
|
-
3. **Create new project:**
|
|
307
|
-
```bash
|
|
308
|
-
mkdir my-app
|
|
309
|
-
cd my-app
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
4. **In Claude Desktop:**
|
|
313
|
-
```
|
|
314
|
-
Run codebakers_run_interview with description: "email client for teams"
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
5. **Drop mockups in refs/design/**
|
|
318
|
-
|
|
319
|
-
6. **Run autonomous build:**
|
|
320
|
-
```
|
|
321
|
-
Run codebakers_autonomous_build with mode: "full"
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
7. **30 minutes later: Production-ready app** ✅
|
|
325
|
-
|
|
326
|
-
---
|
|
327
|
-
|
|
328
|
-
### Full Documentation
|
|
329
|
-
|
|
330
|
-
- **Installation Guide:** [INSTALL.md](./INSTALL.md)
|
|
331
|
-
- **Complete Feature List:** [V5.1.0-AUTONOMOUS-BUILD-COMPLETE.md](../V5.1.0-AUTONOMOUS-BUILD-COMPLETE.md)
|
|
332
|
-
- **Main Framework:** [CLAUDE.md](../CLAUDE.md)
|
|
333
|
-
|
|
334
|
-
---
|
|
335
|
-
|
|
336
|
-
## 📚 Architecture Decisions
|
|
337
|
-
|
|
338
|
-
### Why MCP?
|
|
339
|
-
|
|
340
|
-
**Problem:** Instruction-based enforcement is fragile (Claude can ignore it)
|
|
341
|
-
|
|
342
|
-
**Solution:** MCP tools execute BEFORE Claude decides what to do
|
|
343
|
-
- Context is loaded automatically
|
|
344
|
-
- Dependencies are mapped before building
|
|
345
|
-
- Scope is checked before expanding
|
|
346
|
-
- Technical enforcement, not instructions
|
|
347
|
-
|
|
348
|
-
### Why Self-Aware Context?
|
|
349
|
-
|
|
350
|
-
**Problem:** User doesn't know what phase they're in or what to do next
|
|
351
|
-
|
|
352
|
-
**Solution:** `codebakers_get_context` auto-detects and suggests
|
|
353
|
-
- No manual commands needed
|
|
354
|
-
- CodeBakers guides the user
|
|
355
|
-
- Proactive, not reactive
|
|
356
|
-
|
|
357
|
-
### Why Comprehensive Dependency Mapping?
|
|
358
|
-
|
|
359
|
-
**Problem:** Stale UI bugs from missed store updates
|
|
360
|
-
|
|
361
|
-
**Solution:** Map ALL dependencies in Phase 2 BEFORE building
|
|
362
|
-
- Every mutation knows what to update
|
|
363
|
-
- Every component knows what stores it needs
|
|
364
|
-
- Zero surprises during build
|
|
365
|
-
|
|
366
|
-
---
|
|
367
|
-
|
|
368
|
-
## 🤝 Contributing
|
|
369
|
-
|
|
370
|
-
To implement a stub tool:
|
|
371
|
-
|
|
372
|
-
1. Open the tool file (e.g., `src/tools/map-dependencies.ts`)
|
|
373
|
-
2. Replace stub implementation with real logic
|
|
374
|
-
3. Add helper functions to `src/lib/` if needed
|
|
375
|
-
4. Update tests (when test suite is added)
|
|
376
|
-
5. Rebuild: `npm run build`
|
|
377
|
-
|
|
378
|
-
Example structure:
|
|
379
|
-
|
|
380
|
-
```typescript
|
|
381
|
-
// src/tools/map-dependencies.ts
|
|
382
|
-
import { readMockAnalysis } from '../lib/readers.js';
|
|
383
|
-
import { analyzeDependencies } from '../lib/analyzers.js';
|
|
384
|
-
|
|
385
|
-
export async function mapDependencies(args: any): Promise<string> {
|
|
386
|
-
// 1. Read MOCK-ANALYSIS.md
|
|
387
|
-
const mockAnalysis = await readMockAnalysis();
|
|
388
|
-
|
|
389
|
-
// 2. Analyze dependencies
|
|
390
|
-
const deps = await analyzeDependencies(mockAnalysis);
|
|
391
|
-
|
|
392
|
-
// 3. Generate DEPENDENCY-MAP.md
|
|
393
|
-
await saveDependencyMap(deps);
|
|
394
|
-
|
|
395
|
-
return `✓ Dependency map generated
|
|
396
|
-
- ${deps.readPaths.length} read paths
|
|
397
|
-
- ${deps.writePaths.length} write paths
|
|
398
|
-
- ${deps.cascades.length} cascades`;
|
|
399
|
-
}
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
---
|
|
403
|
-
|
|
404
|
-
## 📄 License
|
|
405
|
-
|
|
406
|
-
MIT © 2026 BotMakers Inc.
|
|
407
|
-
|
|
408
|
-
---
|
|
409
|
-
|
|
410
|
-
**Built as part of CodeBakers Method v5.0.0**
|
|
411
|
-
|
|
412
|
-
For questions or issues: https://github.com/botmakers-ai/codebakers-v2
|
|
1
|
+
# CodeBakers MCP Server v5.1.0
|
|
2
|
+
|
|
3
|
+
**Complete autonomous application builder with MCP architecture**
|
|
4
|
+
|
|
5
|
+
Full autonomous build system - from mockups to production-ready app in 30 minutes. Drop design mockups, run autonomous build, deploy. Zero human intervention required.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🎯 What This Is
|
|
10
|
+
|
|
11
|
+
An MCP (Model Context Protocol) server that:
|
|
12
|
+
- **Builds entire applications autonomously** (mockups → deployed app)
|
|
13
|
+
- **Validates mockup quality** (detects and auto-fixes design issues)
|
|
14
|
+
- **Generates complete vertical slices** (schema → API → store → UI → tests)
|
|
15
|
+
- **Updates all dependencies automatically** (zero stale UI bugs)
|
|
16
|
+
- **Enforces production quality** (security, error handling, testing, mobile)
|
|
17
|
+
- **Provides 25 specialized tools** (mockup validation, code generation, testing, orchestration)
|
|
18
|
+
|
|
19
|
+
**Key Innovation:** Not just code generation - full autonomous execution with dependency awareness and quality enforcement.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 🏗️ Current Build Status
|
|
24
|
+
|
|
25
|
+
### ✅ v5.1.0 - FULLY AUTONOMOUS (100% Complete)
|
|
26
|
+
|
|
27
|
+
**25 Production-Ready Tools:**
|
|
28
|
+
|
|
29
|
+
**Phase 0: Planning (2 tools)**
|
|
30
|
+
- ✅ `codebakers_get_context` - Auto-detect project state
|
|
31
|
+
- ✅ `codebakers_init_session` - Session initialization
|
|
32
|
+
|
|
33
|
+
**Phase 0.5: Spec Generation (1 tool)**
|
|
34
|
+
- ✅ `codebakers_generate_spec` - Generate PROJECT-SPEC.md
|
|
35
|
+
|
|
36
|
+
**Phase 1: Interview (1 tool)**
|
|
37
|
+
- ✅ `codebakers_run_interview` - Automated interview → FLOWS.md
|
|
38
|
+
|
|
39
|
+
**Phase 2: Mockup Quality (3 tools)**
|
|
40
|
+
- ✅ `codebakers_validate_mockups` - Detect quality issues
|
|
41
|
+
- ✅ `codebakers_fix_mockups` - Auto-fix mockup problems
|
|
42
|
+
- ✅ `codebakers_verify_mockups` - Final verification (100% perfect)
|
|
43
|
+
|
|
44
|
+
**Phase 2: Analysis & Schema (4 tools)**
|
|
45
|
+
- ✅ `codebakers_analyze_mockups_deep` - Extract components/data/interactions
|
|
46
|
+
- ✅ `codebakers_generate_schema` - Generate database schema
|
|
47
|
+
- ✅ `codebakers_map_dependencies` - Map all dependencies
|
|
48
|
+
- ✅ `codebakers_generate_store_contracts` - Generate store contracts
|
|
49
|
+
|
|
50
|
+
**Phase 3+: Code Generation (4 tools)**
|
|
51
|
+
- ✅ `codebakers_generate_migration` - Supabase migrations
|
|
52
|
+
- ✅ `codebakers_generate_api_route` - Next.js API routes
|
|
53
|
+
- ✅ `codebakers_generate_store` - Zustand stores (dependency-aware)
|
|
54
|
+
- ✅ `codebakers_generate_component` - React components (all 4 states)
|
|
55
|
+
|
|
56
|
+
**Testing (3 tools)**
|
|
57
|
+
- ✅ `codebakers_generate_unit_tests` - Vitest unit tests
|
|
58
|
+
- ✅ `codebakers_generate_e2e_tests` - Playwright E2E tests
|
|
59
|
+
- ✅ `codebakers_run_tests` - Orchestrate test execution
|
|
60
|
+
|
|
61
|
+
**Orchestration (3 tools)**
|
|
62
|
+
- ✅ `codebakers_execute_atomic_unit` - Execute 8-step atomic unit
|
|
63
|
+
- ✅ `codebakers_verify_completeness` - Verify feature completeness
|
|
64
|
+
- ✅ `codebakers_autonomous_build` - Build entire app autonomously
|
|
65
|
+
|
|
66
|
+
**Enforcement (4 tools)**
|
|
67
|
+
- ✅ `codebakers_check_gate` - Phase verification
|
|
68
|
+
- ✅ `codebakers_enforce_feature` - Feature build enforcement
|
|
69
|
+
- ✅ `codebakers_fix_commit` - Auto-fix commit violations
|
|
70
|
+
- ✅ `codebakers_check_scope` - Scope enforcement
|
|
71
|
+
|
|
72
|
+
**Total:** 25 tools, 100% implemented, fully tested
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 📦 Installation
|
|
77
|
+
|
|
78
|
+
### One-Command Installation (Recommended)
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npx @codebakers/mcp install
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
That's it! This command will:
|
|
85
|
+
- ✓ Auto-locate your Claude Desktop config
|
|
86
|
+
- ✓ Add CodeBakers MCP Server configuration
|
|
87
|
+
- ✓ Set the correct path automatically
|
|
88
|
+
- ✓ No manual JSON editing required
|
|
89
|
+
|
|
90
|
+
**After installation:**
|
|
91
|
+
1. Restart Claude Desktop
|
|
92
|
+
2. CodeBakers tools will be available automatically
|
|
93
|
+
3. Verify: Run `codebakers_get_context` in Claude Desktop
|
|
94
|
+
|
|
95
|
+
**Other commands:**
|
|
96
|
+
```bash
|
|
97
|
+
npx @codebakers/mcp status # Check installation
|
|
98
|
+
npx @codebakers/mcp uninstall # Remove
|
|
99
|
+
npx @codebakers/mcp help # Show all commands
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### Manual Installation (Advanced)
|
|
105
|
+
|
|
106
|
+
See [INSTALL.md](./INSTALL.md) for detailed manual installation steps and troubleshooting.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
### Development Installation (Contributors)
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Clone repository
|
|
114
|
+
git clone https://github.com/botmakers-ai/codebakers-v2.git
|
|
115
|
+
cd codebakers-v2/codebakers-mcp-server
|
|
116
|
+
|
|
117
|
+
# Install and build
|
|
118
|
+
npm install
|
|
119
|
+
npm run build
|
|
120
|
+
|
|
121
|
+
# Install CLI
|
|
122
|
+
npx . install
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
This will configure Claude Desktop to use your local development build.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 🎮 How It Works
|
|
130
|
+
|
|
131
|
+
### Autonomous Build Flow (End-to-End)
|
|
132
|
+
|
|
133
|
+
**User provides:** "Build an email client for teams"
|
|
134
|
+
|
|
135
|
+
**System executes (zero human intervention):**
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
1. codebakers_run_interview { project_description: "email client for teams" }
|
|
139
|
+
→ Generates: project-profile.md, FLOWS.md (15 features), BRAIN.md
|
|
140
|
+
|
|
141
|
+
2. User drops mockups in refs/design/
|
|
142
|
+
|
|
143
|
+
3. codebakers_validate_mockups
|
|
144
|
+
→ Detects: 7 issues (3 critical, 4 warnings)
|
|
145
|
+
|
|
146
|
+
4. codebakers_fix_mockups
|
|
147
|
+
→ Auto-fixes: 5 issues, generates missing states, mobile mockups
|
|
148
|
+
|
|
149
|
+
5. codebakers_verify_mockups
|
|
150
|
+
→ ✅ PERFECT (100/100 score)
|
|
151
|
+
|
|
152
|
+
6. codebakers_analyze_mockups_deep
|
|
153
|
+
→ Extracts: All components, data fields, interactions from perfect mockups
|
|
154
|
+
|
|
155
|
+
7. codebakers_generate_schema
|
|
156
|
+
→ Creates: SCHEMA.sql (derived from perfect mockups)
|
|
157
|
+
|
|
158
|
+
8. codebakers_map_dependencies
|
|
159
|
+
→ Creates: DEPENDENCY-MAP.md (complete graph)
|
|
160
|
+
|
|
161
|
+
9. codebakers_check_gate { phase: 2 }
|
|
162
|
+
→ ✅ PASS (Phase 2 complete)
|
|
163
|
+
|
|
164
|
+
10. codebakers_autonomous_build { mode: "full" }
|
|
165
|
+
→ For each of 15 features:
|
|
166
|
+
a. codebakers_execute_atomic_unit
|
|
167
|
+
- Migration → API routes → Store → Component → Tests
|
|
168
|
+
b. codebakers_verify_completeness
|
|
169
|
+
c. Mark feature complete in FLOWS.md
|
|
170
|
+
→ Final: 15/15 features complete
|
|
171
|
+
|
|
172
|
+
11. codebakers_run_tests { test_type: "all" }
|
|
173
|
+
→ Unit tests: 127/127 passing
|
|
174
|
+
→ E2E tests: 32/32 passing
|
|
175
|
+
|
|
176
|
+
12. Build complete - Ready for deployment
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Time:** 15-30 minutes (depends on feature count)
|
|
180
|
+
**Human intervention:** Zero (except design mockups + final review)
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
### Quality Guarantees (Every Feature)
|
|
185
|
+
|
|
186
|
+
✅ **Security:** All queries filter by `user_id`
|
|
187
|
+
✅ **Error handling:** All 4 states (loading/error/empty/success)
|
|
188
|
+
✅ **Type safety:** TypeScript strict mode
|
|
189
|
+
✅ **Testing:** Unit (Vitest) + E2E (Playwright)
|
|
190
|
+
✅ **Mobile:** Responsive design
|
|
191
|
+
✅ **Dependencies:** All stores updated (from DEPENDENCY-MAP.md)
|
|
192
|
+
✅ **Standards:** CodeBakers method enforced
|
|
193
|
+
✅ **Atomic:** Complete vertical slices (no half-built features)
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## 🚀 Use Cases
|
|
198
|
+
|
|
199
|
+
### 1. MVP in 30 Minutes
|
|
200
|
+
- Drop mockups
|
|
201
|
+
- Run autonomous build
|
|
202
|
+
- Deploy to Vercel
|
|
203
|
+
- **Result:** Production MVP
|
|
204
|
+
|
|
205
|
+
### 2. Prototypes at Scale
|
|
206
|
+
- Test 5 different product ideas
|
|
207
|
+
- Each takes 30 min autonomous build
|
|
208
|
+
- **Result:** 5 working prototypes in 3 hours
|
|
209
|
+
|
|
210
|
+
### 3. Internal Tools (No Manual Coding)
|
|
211
|
+
- Company needs CRM, dashboard, admin panel
|
|
212
|
+
- Generate mockups (Figma/v0)
|
|
213
|
+
- Run autonomous builds
|
|
214
|
+
- **Result:** 3 internal tools, zero manual coding
|
|
215
|
+
|
|
216
|
+
### 4. Teaching Tool
|
|
217
|
+
- Show students complete build process
|
|
218
|
+
- Execute atomic unit step-by-step
|
|
219
|
+
- **Result:** Learn by watching autonomous builds
|
|
220
|
+
|
|
221
|
+
### 5. Client Demos
|
|
222
|
+
- Client describes what they want
|
|
223
|
+
- Generate mockups together
|
|
224
|
+
- Run autonomous build in meeting
|
|
225
|
+
- **Result:** Working demo before they leave
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## 📝 File Structure
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
codebakers-mcp-server/
|
|
233
|
+
├── package.json
|
|
234
|
+
├── tsconfig.json
|
|
235
|
+
├── README.md (this file)
|
|
236
|
+
├── src/
|
|
237
|
+
│ ├── index.ts (MCP server entry point)
|
|
238
|
+
│ ├── tools/
|
|
239
|
+
│ │ ├── get-context.ts ✅ COMPLETE
|
|
240
|
+
│ │ ├── init-session.ts ✅ COMPLETE
|
|
241
|
+
│ │ ├── generate-spec.ts 🚧 STUB
|
|
242
|
+
│ │ ├── analyze-mockups.ts 🚧 STUB
|
|
243
|
+
│ │ ├── generate-schema.ts 🚧 STUB
|
|
244
|
+
│ │ ├── map-dependencies.ts 🚧 STUB (CRITICAL)
|
|
245
|
+
│ │ ├── generate-store-contracts.ts 🚧 STUB
|
|
246
|
+
│ │ ├── check-gate.ts 🚧 STUB
|
|
247
|
+
│ │ ├── enforce-feature.ts 🚧 STUB
|
|
248
|
+
│ │ ├── fix-commit.ts 🚧 STUB
|
|
249
|
+
│ │ └── check-scope.ts 🚧 STUB
|
|
250
|
+
│ ├── lib/ (helper functions - to be created)
|
|
251
|
+
│ └── phases/ (phase implementations - to be created)
|
|
252
|
+
└── dist/ (compiled output)
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## 🔗 Integration with CLAUDE.md
|
|
258
|
+
|
|
259
|
+
**CLAUDE.md will be TINY** in v5.0.0:
|
|
260
|
+
|
|
261
|
+
```markdown
|
|
262
|
+
# CodeBakers V5
|
|
263
|
+
|
|
264
|
+
You are a senior engineer using CodeBakers Method via MCP.
|
|
265
|
+
|
|
266
|
+
## Session Start
|
|
267
|
+
|
|
268
|
+
Every session:
|
|
269
|
+
1. Auto-run: codebakers_get_context (detects state)
|
|
270
|
+
2. Auto-run: codebakers_init_session (loads BUILD-STATE.md)
|
|
271
|
+
3. Follow suggestions from context
|
|
272
|
+
|
|
273
|
+
## User Requests
|
|
274
|
+
|
|
275
|
+
When user types //:
|
|
276
|
+
→ Call: codebakers_enforce_feature(feature_name)
|
|
277
|
+
|
|
278
|
+
When user requests feature not in spec:
|
|
279
|
+
→ Call: codebakers_check_scope(feature_description)
|
|
280
|
+
|
|
281
|
+
## Hard Rules
|
|
282
|
+
|
|
283
|
+
- Stack: Supabase + Next.js only
|
|
284
|
+
- Queries: .maybeSingle() not .single()
|
|
285
|
+
- Mutations: Filter by id AND user_id
|
|
286
|
+
- Versions: --save-exact
|
|
287
|
+
|
|
288
|
+
MCP tools handle everything else.
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**That's it. ~30 lines instead of 1200.**
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## 🚀 Getting Started
|
|
296
|
+
|
|
297
|
+
### Quick Start
|
|
298
|
+
|
|
299
|
+
1. **Install:**
|
|
300
|
+
```bash
|
|
301
|
+
npx @codebakers/mcp-server install
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
2. **Restart Claude Desktop**
|
|
305
|
+
|
|
306
|
+
3. **Create new project:**
|
|
307
|
+
```bash
|
|
308
|
+
mkdir my-app
|
|
309
|
+
cd my-app
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
4. **In Claude Desktop:**
|
|
313
|
+
```
|
|
314
|
+
Run codebakers_run_interview with description: "email client for teams"
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
5. **Drop mockups in refs/design/**
|
|
318
|
+
|
|
319
|
+
6. **Run autonomous build:**
|
|
320
|
+
```
|
|
321
|
+
Run codebakers_autonomous_build with mode: "full"
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
7. **30 minutes later: Production-ready app** ✅
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
### Full Documentation
|
|
329
|
+
|
|
330
|
+
- **Installation Guide:** [INSTALL.md](./INSTALL.md)
|
|
331
|
+
- **Complete Feature List:** [V5.1.0-AUTONOMOUS-BUILD-COMPLETE.md](../V5.1.0-AUTONOMOUS-BUILD-COMPLETE.md)
|
|
332
|
+
- **Main Framework:** [CLAUDE.md](../CLAUDE.md)
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## 📚 Architecture Decisions
|
|
337
|
+
|
|
338
|
+
### Why MCP?
|
|
339
|
+
|
|
340
|
+
**Problem:** Instruction-based enforcement is fragile (Claude can ignore it)
|
|
341
|
+
|
|
342
|
+
**Solution:** MCP tools execute BEFORE Claude decides what to do
|
|
343
|
+
- Context is loaded automatically
|
|
344
|
+
- Dependencies are mapped before building
|
|
345
|
+
- Scope is checked before expanding
|
|
346
|
+
- Technical enforcement, not instructions
|
|
347
|
+
|
|
348
|
+
### Why Self-Aware Context?
|
|
349
|
+
|
|
350
|
+
**Problem:** User doesn't know what phase they're in or what to do next
|
|
351
|
+
|
|
352
|
+
**Solution:** `codebakers_get_context` auto-detects and suggests
|
|
353
|
+
- No manual commands needed
|
|
354
|
+
- CodeBakers guides the user
|
|
355
|
+
- Proactive, not reactive
|
|
356
|
+
|
|
357
|
+
### Why Comprehensive Dependency Mapping?
|
|
358
|
+
|
|
359
|
+
**Problem:** Stale UI bugs from missed store updates
|
|
360
|
+
|
|
361
|
+
**Solution:** Map ALL dependencies in Phase 2 BEFORE building
|
|
362
|
+
- Every mutation knows what to update
|
|
363
|
+
- Every component knows what stores it needs
|
|
364
|
+
- Zero surprises during build
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## 🤝 Contributing
|
|
369
|
+
|
|
370
|
+
To implement a stub tool:
|
|
371
|
+
|
|
372
|
+
1. Open the tool file (e.g., `src/tools/map-dependencies.ts`)
|
|
373
|
+
2. Replace stub implementation with real logic
|
|
374
|
+
3. Add helper functions to `src/lib/` if needed
|
|
375
|
+
4. Update tests (when test suite is added)
|
|
376
|
+
5. Rebuild: `npm run build`
|
|
377
|
+
|
|
378
|
+
Example structure:
|
|
379
|
+
|
|
380
|
+
```typescript
|
|
381
|
+
// src/tools/map-dependencies.ts
|
|
382
|
+
import { readMockAnalysis } from '../lib/readers.js';
|
|
383
|
+
import { analyzeDependencies } from '../lib/analyzers.js';
|
|
384
|
+
|
|
385
|
+
export async function mapDependencies(args: any): Promise<string> {
|
|
386
|
+
// 1. Read MOCK-ANALYSIS.md
|
|
387
|
+
const mockAnalysis = await readMockAnalysis();
|
|
388
|
+
|
|
389
|
+
// 2. Analyze dependencies
|
|
390
|
+
const deps = await analyzeDependencies(mockAnalysis);
|
|
391
|
+
|
|
392
|
+
// 3. Generate DEPENDENCY-MAP.md
|
|
393
|
+
await saveDependencyMap(deps);
|
|
394
|
+
|
|
395
|
+
return `✓ Dependency map generated
|
|
396
|
+
- ${deps.readPaths.length} read paths
|
|
397
|
+
- ${deps.writePaths.length} write paths
|
|
398
|
+
- ${deps.cascades.length} cascades`;
|
|
399
|
+
}
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
## 📄 License
|
|
405
|
+
|
|
406
|
+
MIT © 2026 BotMakers Inc.
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
**Built as part of CodeBakers Method v5.0.0**
|
|
411
|
+
|
|
412
|
+
For questions or issues: https://github.com/botmakers-ai/codebakers-v2
|