forgedev 1.2.0 → 1.3.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.
Files changed (171) hide show
  1. package/README.md +57 -10
  2. package/bin/chainproof.js +126 -0
  3. package/package.json +25 -7
  4. package/src/chainproof-bridge.js +330 -0
  5. package/src/ci-mode.js +85 -0
  6. package/src/claude-configurator.js +86 -49
  7. package/src/cli.js +30 -7
  8. package/src/composer.js +159 -34
  9. package/src/doctor-checks-chainproof.js +106 -0
  10. package/src/doctor-checks.js +39 -20
  11. package/src/doctor-prompts.js +9 -9
  12. package/src/doctor.js +37 -4
  13. package/src/guided.js +3 -3
  14. package/src/index.js +31 -10
  15. package/src/init-mode.js +64 -11
  16. package/src/menu.js +178 -0
  17. package/src/prompts.js +5 -12
  18. package/src/recommender.js +134 -10
  19. package/src/scanner.js +57 -2
  20. package/src/uat-generator.js +204 -189
  21. package/src/update-check.js +9 -4
  22. package/src/update.js +1 -1
  23. package/src/utils.js +64 -5
  24. package/templates/ai/guardrails-py/backend/app/ai/__init__.py +29 -0
  25. package/templates/ai/guardrails-py/backend/app/ai/audit_log.py +133 -0
  26. package/templates/ai/guardrails-py/backend/app/ai/client.py.template +323 -0
  27. package/templates/ai/guardrails-py/backend/app/ai/health.py.template +157 -0
  28. package/templates/ai/guardrails-py/backend/app/ai/input_guard.py +98 -0
  29. package/templates/ai/guardrails-ts/src/lib/ai/audit-log.ts.template +164 -0
  30. package/templates/ai/guardrails-ts/src/lib/ai/client.ts.template +403 -0
  31. package/templates/ai/guardrails-ts/src/lib/ai/health.ts.template +165 -0
  32. package/templates/ai/guardrails-ts/src/lib/ai/index.ts.template +17 -0
  33. package/templates/ai/guardrails-ts/src/lib/ai/input-guard.ts.template +124 -0
  34. package/templates/auth/nextauth/src/lib/auth.ts.template +12 -7
  35. package/templates/backend/express/Dockerfile.template +18 -0
  36. package/templates/backend/express/package.json.template +33 -0
  37. package/templates/backend/express/src/index.ts.template +34 -0
  38. package/templates/backend/express/src/routes/health.ts.template +27 -0
  39. package/templates/backend/express/tsconfig.json +17 -0
  40. package/templates/backend/fastapi/backend/Dockerfile.template +5 -0
  41. package/templates/backend/fastapi/backend/app/api/health.py.template +1 -1
  42. package/templates/backend/fastapi/backend/app/core/config.py.template +1 -1
  43. package/templates/backend/fastapi/backend/app/core/errors.py +1 -1
  44. package/templates/backend/fastapi/backend/app/main.py.template +3 -1
  45. package/templates/backend/fastapi/backend/requirements.txt.template +2 -0
  46. package/templates/backend/hono/Dockerfile.template +18 -0
  47. package/templates/backend/hono/package.json.template +31 -0
  48. package/templates/backend/hono/src/index.ts.template +32 -0
  49. package/templates/backend/hono/src/routes/health.ts.template +27 -0
  50. package/templates/backend/hono/tsconfig.json +18 -0
  51. package/templates/base/docs/uat/UAT_TEMPLATE.md.template +1 -1
  52. package/templates/chainproof/base/.chainproof/config.json.template +11 -0
  53. package/templates/chainproof/base/.chainproof/mcp-server.mjs +310 -0
  54. package/templates/chainproof/base/.mcp.json +9 -0
  55. package/templates/chainproof/fastapi/.chainproof/middleware.json.template +14 -0
  56. package/templates/chainproof/nextjs/.chainproof/hooks.json.template +19 -0
  57. package/templates/chainproof/polyglot/.chainproof/config.json.template +21 -0
  58. package/templates/claude-code/agents/architect.md +25 -11
  59. package/templates/claude-code/agents/build-error-resolver.md +19 -5
  60. package/templates/claude-code/agents/chief-of-staff.md +42 -8
  61. package/templates/claude-code/agents/code-quality-reviewer.md +14 -0
  62. package/templates/claude-code/agents/database-reviewer.md +15 -1
  63. package/templates/claude-code/agents/deep-reviewer.md +191 -0
  64. package/templates/claude-code/agents/doc-updater.md +19 -5
  65. package/templates/claude-code/agents/docs-lookup.md +19 -5
  66. package/templates/claude-code/agents/e2e-runner.md +26 -12
  67. package/templates/claude-code/agents/enforcement-gate.md +102 -0
  68. package/templates/claude-code/agents/frontend-builder.md +188 -0
  69. package/templates/claude-code/agents/harness-optimizer.md +36 -1
  70. package/templates/claude-code/agents/loop-operator.md +27 -13
  71. package/templates/claude-code/agents/planner.md +21 -7
  72. package/templates/claude-code/agents/product-strategist.md +24 -10
  73. package/templates/claude-code/agents/production-readiness.md +14 -0
  74. package/templates/claude-code/agents/prompt-auditor.md +115 -0
  75. package/templates/claude-code/agents/refactor-cleaner.md +22 -8
  76. package/templates/claude-code/agents/security-reviewer.md +14 -0
  77. package/templates/claude-code/agents/spec-validator.md +15 -1
  78. package/templates/claude-code/agents/tdd-guide.md +21 -7
  79. package/templates/claude-code/agents/uat-validator.md +14 -0
  80. package/templates/claude-code/claude-md/base.md +14 -7
  81. package/templates/claude-code/claude-md/fastapi.md +8 -8
  82. package/templates/claude-code/claude-md/fullstack.md +6 -6
  83. package/templates/claude-code/claude-md/hono.md +18 -0
  84. package/templates/claude-code/claude-md/nextjs.md +5 -5
  85. package/templates/claude-code/claude-md/remix.md +18 -0
  86. package/templates/claude-code/commands/audit-security.md +14 -0
  87. package/templates/claude-code/commands/audit-spec.md +14 -0
  88. package/templates/claude-code/commands/audit-wiring.md +14 -0
  89. package/templates/claude-code/commands/build-fix.md +28 -0
  90. package/templates/claude-code/commands/build-ui.md +59 -0
  91. package/templates/claude-code/commands/code-review.md +53 -31
  92. package/templates/claude-code/commands/fix-loop.md +211 -0
  93. package/templates/claude-code/commands/full-audit.md +36 -8
  94. package/templates/claude-code/commands/generate-prd.md +1 -1
  95. package/templates/claude-code/commands/generate-sdd.md +74 -0
  96. package/templates/claude-code/commands/generate-uat.md +107 -35
  97. package/templates/claude-code/commands/help.md +68 -0
  98. package/templates/claude-code/commands/live-uat.md +268 -0
  99. package/templates/claude-code/commands/optimize-claude-md.md +15 -1
  100. package/templates/claude-code/commands/plan.md +3 -3
  101. package/templates/claude-code/commands/pre-pr.md +57 -19
  102. package/templates/claude-code/commands/product-strategist.md +21 -0
  103. package/templates/claude-code/commands/resume-session.md +10 -10
  104. package/templates/claude-code/commands/run-uat.md +59 -2
  105. package/templates/claude-code/commands/save-session.md +10 -10
  106. package/templates/claude-code/commands/simplify.md +36 -0
  107. package/templates/claude-code/commands/tdd.md +17 -18
  108. package/templates/claude-code/commands/verify-all.md +24 -0
  109. package/templates/claude-code/commands/verify-intent.md +55 -0
  110. package/templates/claude-code/commands/workflows.md +52 -40
  111. package/templates/claude-code/hooks/polyglot.json +10 -1
  112. package/templates/claude-code/hooks/python.json +10 -1
  113. package/templates/claude-code/hooks/scripts/autofix-polyglot.mjs +2 -2
  114. package/templates/claude-code/hooks/scripts/autofix-python.mjs +1 -1
  115. package/templates/claude-code/hooks/scripts/autofix-typescript.mjs +1 -1
  116. package/templates/claude-code/hooks/scripts/code-hygiene.mjs +293 -0
  117. package/templates/claude-code/hooks/scripts/pre-commit-gate.mjs +207 -0
  118. package/templates/claude-code/hooks/typescript.json +10 -1
  119. package/templates/claude-code/skills/ai-prompts/SKILL.md +119 -41
  120. package/templates/claude-code/skills/git-workflow/SKILL.md +5 -5
  121. package/templates/claude-code/skills/nextjs/SKILL.md +1 -1
  122. package/templates/claude-code/skills/playwright/SKILL.md +5 -5
  123. package/templates/claude-code/skills/security-api/SKILL.md +1 -1
  124. package/templates/claude-code/skills/security-web/SKILL.md +1 -1
  125. package/templates/claude-code/skills/testing-patterns/SKILL.md +9 -9
  126. package/templates/database/prisma-postgres/{.env.example → .env.example.template} +1 -0
  127. package/templates/database/sqlalchemy-postgres/{.env.example → .env.example.template} +1 -0
  128. package/templates/docs-portal/fastapi/backend/app/portal/__pycache__/docs_reader.cpython-314.pyc +0 -0
  129. package/templates/docs-portal/fastapi/backend/app/portal/docs_reader.py +201 -0
  130. package/templates/docs-portal/fastapi/backend/app/portal/html_renderer.py +229 -0
  131. package/templates/docs-portal/fastapi/backend/app/portal/router.py.template +35 -0
  132. package/templates/docs-portal/nextjs/src/app/portal/[category]/[slug]/page.tsx +81 -0
  133. package/templates/docs-portal/nextjs/src/app/portal/[category]/page.tsx +65 -0
  134. package/templates/docs-portal/nextjs/src/app/portal/layout.tsx.template +54 -0
  135. package/templates/docs-portal/nextjs/src/app/portal/page.tsx +85 -0
  136. package/templates/docs-portal/nextjs/src/components/portal/markdown-renderer.tsx +101 -0
  137. package/templates/docs-portal/nextjs/src/components/portal/mobile-portal-nav.tsx +81 -0
  138. package/templates/docs-portal/nextjs/src/components/portal/portal-nav.tsx +86 -0
  139. package/templates/docs-portal/nextjs/src/lib/docs.ts +139 -0
  140. package/templates/frontend/nextjs/package.json.template +3 -1
  141. package/templates/frontend/react/index.html.template +12 -0
  142. package/templates/frontend/react/package.json.template +34 -0
  143. package/templates/frontend/react/src/App.tsx.template +10 -0
  144. package/templates/frontend/react/src/index.css +1 -0
  145. package/templates/frontend/react/src/main.tsx +10 -0
  146. package/templates/frontend/react/tsconfig.json +17 -0
  147. package/templates/frontend/react/vite.config.ts.template +15 -0
  148. package/templates/frontend/react/vitest.config.ts +9 -0
  149. package/templates/frontend/remix/app/root.tsx.template +31 -0
  150. package/templates/frontend/remix/app/routes/_index.tsx.template +19 -0
  151. package/templates/frontend/remix/app/routes/api.health.ts.template +10 -0
  152. package/templates/frontend/remix/app/tailwind.css +1 -0
  153. package/templates/frontend/remix/package.json.template +39 -0
  154. package/templates/frontend/remix/tsconfig.json +18 -0
  155. package/templates/frontend/remix/vite.config.ts.template +7 -0
  156. package/templates/infra/github-actions/.github/workflows/ci.yml.template +3 -0
  157. package/docs/00-README.md +0 -310
  158. package/docs/01-universal-prompt-library.md +0 -1049
  159. package/docs/02-claude-code-mastery-playbook.md +0 -283
  160. package/docs/03-multi-agent-verification.md +0 -565
  161. package/docs/04-errata-and-verification-checklist.md +0 -284
  162. package/docs/05-universal-scaffolder-vision.md +0 -452
  163. package/docs/06-confidence-assessment-and-repo-prompt.md +0 -407
  164. package/docs/errata.md +0 -58
  165. package/docs/multi-agent-verification.md +0 -66
  166. package/docs/playbook.md +0 -95
  167. package/docs/prompt-library.md +0 -160
  168. package/docs/uat/UAT_CHECKLIST.csv +0 -9
  169. package/docs/uat/UAT_TEMPLATE.md +0 -163
  170. package/templates/claude-code/commands/done.md +0 -19
  171. /package/{docs/plans/.gitkeep → templates/docs-portal/fastapi/backend/app/portal/__init__.py} +0 -0
@@ -1,452 +0,0 @@
1
- # Project Init → Universal AI-First Project Scaffolder
2
- ## Vision: Describe what you're building. Get the right stack, scaffold, AND Claude Code infrastructure.
3
-
4
- ---
5
-
6
- ## The Idea
7
-
8
- Today: `npx create-next-init my-app` → always Next.js.
9
-
10
- Tomorrow: `npx create-init my-app` → asks what you're building → recommends
11
- the right stack → scaffolds it → ships with Claude Code infrastructure
12
- (CLAUDE.md, hooks, agents, skills) tailored to THAT stack.
13
-
14
- The user describes their service. The tool figures out the rest.
15
-
16
- ---
17
-
18
- ## How It Would Work
19
-
20
- ```
21
- $ npx create-init my-app
22
-
23
- 🚀 Welcome to Project Init!
24
-
25
- What are you building?
26
-
27
- 1. Web app (SPA / SSR / static site)
28
- 2. API / backend service
29
- 3. Full-stack app (frontend + backend)
30
- 4. Mobile app (iOS / Android / cross-platform)
31
- 5. CLI tool / developer utility
32
- 6. AI/ML service
33
- 7. Desktop app
34
- 8. Chrome / browser extension
35
- 9. Microservice / serverless function
36
- 10. Let me describe it (free text → AI recommends)
37
-
38
- > 10
39
-
40
- Describe what you're building:
41
- > A SaaS platform for managing compliance questionnaires with AI-powered
42
- auto-responses, role-based access, and PDF report generation
43
-
44
- 🤖 Based on your description, I recommend:
45
-
46
- Frontend: Next.js 16 (App Router) + TypeScript + Tailwind + Shadcn/ui
47
- Backend: FastAPI (Python) + SQLAlchemy 2.0 + Pydantic v2
48
- Database: PostgreSQL + pgvector (for AI embeddings)
49
- Auth: NextAuth.js (frontend) + JWT (backend)
50
- AI: Gemini API via structured output
51
- Testing: Vitest (unit) + Playwright (E2E) + Pytest (backend)
52
- CI/CD: GitHub Actions
53
- Infra: Docker Compose (dev) + Cloud Run (prod)
54
-
55
- Include Claude Code infrastructure?
56
- ✓ CLAUDE.md (tailored to this stack)
57
- ✓ Hooks (lint, typecheck, protected files)
58
- ✓ Skills (frontend, backend, testing, security, AI prompts)
59
- ✓ Agents (code-quality, security, spec-validator, production-readiness)
60
- ✓ Commands (audit-spec, audit-wiring, pre-pr)
61
-
62
- Proceed? (y/n)
63
- ```
64
-
65
- ---
66
-
67
- ## Architecture
68
-
69
- ### The Stack Decision Engine
70
-
71
- The core of this tool isn't templates — it's a **decision tree** that maps
72
- what you're building to what you should build it with.
73
-
74
- ```
75
- User Input (what they're building)
76
-
77
- Classifier (service type + requirements)
78
-
79
- Stack Recommender (best-fit tech for each layer)
80
-
81
- Template Composer (assembles from modular pieces)
82
-
83
- Claude Code Configurator (generates .claude/ for that stack)
84
-
85
- Scaffold Output (ready-to-run project)
86
- ```
87
-
88
- ### Service Type → Stack Mapping
89
-
90
- | Service Type | Frontend | Backend | Database | Testing | Notes |
91
- |-------------|----------|---------|----------|---------|-------|
92
- | Static site / blog | Astro or Next.js (SSG) | — | — | Playwright | Simplest option |
93
- | SPA (client-heavy) | React + Vite / Next.js | — or API route | — | Vitest + Playwright | |
94
- | SSR web app | Next.js (App Router) | Next.js API routes | PostgreSQL / SQLite | Vitest + Playwright | Monolith |
95
- | API service (Python) | — | FastAPI + SQLAlchemy | PostgreSQL | Pytest | |
96
- | API service (Node) | — | Hono / Express / NestJS | PostgreSQL | Vitest | |
97
- | API service (Go) | — | Gin / Echo / Chi | PostgreSQL | Go test | |
98
- | API service (Rust) | — | Axum / Actix | PostgreSQL | cargo test | |
99
- | Full-stack (JS monolith) | Next.js | Next.js API / tRPC | PostgreSQL (Prisma) | Vitest + Playwright | T3-style |
100
- | Full-stack (polyglot) | Next.js / React + Vite | FastAPI / Go / Rust | PostgreSQL | Per-language + Playwright | Separate repos or monorepo |
101
- | Mobile (cross-platform) | React Native (Expo) | — or API | SQLite / Supabase | Detox / Maestro | |
102
- | Mobile (native iOS) | SwiftUI | — or API | CoreData / CloudKit | XCTest | |
103
- | Mobile (native Android) | Jetpack Compose | — or API | Room / Firebase | Espresso | |
104
- | CLI tool (Node) | — | — | — | Vitest | |
105
- | CLI tool (Python) | — | — | — | Pytest | |
106
- | CLI tool (Go) | — | — | — | Go test | Best for cross-platform CLI |
107
- | CLI tool (Rust) | — | — | — | cargo test | Best for performance CLI |
108
- | AI/ML service | Streamlit / Gradio / Next.js | FastAPI + LangChain / custom | PostgreSQL + pgvector | Pytest + golden datasets | |
109
- | Desktop app | Tauri (Rust + web) or Electron | — | SQLite | Playwright | Tauri preferred (smaller) |
110
- | Browser extension | HTML/CSS/JS or React | — | chrome.storage | Playwright | Manifest V3 |
111
- | Microservice / Lambda | — | Language of choice | DynamoDB / PostgreSQL | Per-language | Serverless framework |
112
-
113
- ### Modifier Questions (Refine the Recommendation)
114
-
115
- After picking the service type, the tool asks refinement questions:
116
-
117
- ```
118
- Do you need real-time features (websockets, live updates)?
119
- → Adds Socket.io / WebSocket layer
120
-
121
- Do you need AI/LLM integration?
122
- → Adds AI service layer, prompt patterns, vector DB
123
-
124
- Do you need authentication?
125
- → Adds auth layer (NextAuth, Clerk, Supabase Auth, etc.)
126
-
127
- Do you need file uploads / storage?
128
- → Adds S3/Cloud Storage integration
129
-
130
- Do you need payment processing?
131
- → Adds Stripe integration
132
-
133
- What's your deployment target?
134
- → Docker, Vercel, AWS, GCP, self-hosted
135
- → Generates appropriate config
136
-
137
- Monorepo or separate repos?
138
- → Turborepo / Nx for monorepo, separate Git repos otherwise
139
- ```
140
-
141
- ### The Claude Code Configurator
142
-
143
- This is the differentiator. For EVERY stack combination, the tool generates:
144
-
145
- **1. CLAUDE.md** — tailored to the actual tech:
146
- ```markdown
147
- # [Project Name]
148
-
149
- ## WHAT
150
- - [Exact stack the tool selected]
151
- - [Folder structure it created]
152
-
153
- ## HOW
154
- - Lint: [actual lint command for this stack]
155
- - Type check: [actual type check command]
156
- - Test: [actual test command]
157
- - Build: [actual build command]
158
-
159
- ## RULES
160
- - [Stack-specific conventions]
161
- ```
162
-
163
- **2. Hooks** — using the actual commands:
164
- ```json
165
- {
166
- "hooks": {
167
- "PostToolUse": [{
168
- "matcher": "Write|Edit|MultiEdit",
169
- "hooks": [{"type": "command", "command": "[actual lint command for file type]"}]
170
- }],
171
- "Stop": [{
172
- "hooks": [{"type": "command", "command": "[actual validation script for this stack]"}]
173
- }]
174
- }
175
- }
176
- ```
177
-
178
- **3. Skills** — for the specific frameworks:
179
- ```
180
- .claude/skills/
181
- nextjs/SKILL.md ← if Next.js was selected
182
- fastapi/SKILL.md ← if FastAPI was selected
183
- playwright/SKILL.md ← if Playwright was selected
184
- prisma/SKILL.md ← if Prisma was selected
185
- etc.
186
- ```
187
-
188
- **4. Agents** — with stack-aware checklists:
189
- ```
190
- .claude/agents/
191
- code-quality-reviewer.md ← checks for THIS stack's patterns
192
- security-reviewer.md ← checks for THIS stack's vulnerabilities
193
- spec-validator.md ← generic (works for any stack)
194
- production-readiness.md ← checks for THIS stack's deploy concerns
195
- ```
196
-
197
- **5. Commands** — with the right audit paths:
198
- ```
199
- .claude/commands/
200
- verify-all.md
201
- audit-spec.md
202
- pre-pr.md
203
- ```
204
-
205
- ---
206
-
207
- ## Modular Template Architecture
208
-
209
- Instead of one monolithic template per stack, use composable modules:
210
-
211
- ```
212
- templates/
213
- ├── base/ # Every project gets this
214
- │ ├── .gitignore
215
- │ ├── README.md.template
216
- │ ├── .claude/
217
- │ │ ├── commands/ # Universal commands
218
- │ │ └── agents/ # Universal agents
219
- │ └── docs/
220
- │ └── plans/ # Empty plans directory
221
-
222
- ├── frontend/
223
- │ ├── nextjs/ # Next.js 16 template
224
- │ ├── react-vite/ # React + Vite template
225
- │ ├── astro/ # Astro template
226
- │ ├── expo/ # React Native / Expo template
227
- │ └── _shared/ # Shared frontend pieces
228
- │ ├── tailwind/
229
- │ ├── shadcn/
230
- │ └── .claude/skills/frontend/
231
-
232
- ├── backend/
233
- │ ├── fastapi/ # FastAPI template
234
- │ ├── hono/ # Hono template
235
- │ ├── nestjs/ # NestJS template
236
- │ ├── gin/ # Go + Gin template
237
- │ ├── axum/ # Rust + Axum template
238
- │ ├── spring-boot/ # Java Spring Boot template
239
- │ └── _shared/
240
- │ └── .claude/skills/backend/
241
-
242
- ├── database/
243
- │ ├── prisma-postgres/
244
- │ ├── sqlalchemy-postgres/
245
- │ ├── drizzle-postgres/
246
- │ └── mongodb/
247
-
248
- ├── auth/
249
- │ ├── nextauth/
250
- │ ├── clerk/
251
- │ ├── supabase-auth/
252
- │ └── jwt-custom/
253
-
254
- ├── ai/
255
- │ ├── gemini/
256
- │ ├── openai/
257
- │ ├── anthropic/
258
- │ └── _shared/
259
- │ └── .claude/skills/ai-integration/
260
-
261
- ├── testing/
262
- │ ├── vitest/
263
- │ ├── playwright/
264
- │ ├── cypress/
265
- │ ├── pytest/
266
- │ ├── go-test/
267
- │ └── cargo-test/
268
-
269
- ├── infra/
270
- │ ├── docker-compose/
271
- │ ├── github-actions/
272
- │ ├── vercel/
273
- │ ├── cloud-run/
274
- │ └── serverless/
275
-
276
- └── claude-code/ # Claude Code infrastructure modules
277
- ├── hooks/
278
- │ ├── typescript.json # Hooks for TS projects
279
- │ ├── python.json # Hooks for Python projects
280
- │ ├── go.json # Hooks for Go projects
281
- │ ├── rust.json # Hooks for Rust projects
282
- │ └── polyglot.json # Hooks for multi-language projects
283
- ├── skills/
284
- │ ├── nextjs/SKILL.md
285
- │ ├── fastapi/SKILL.md
286
- │ ├── playwright/SKILL.md
287
- │ ├── prisma/SKILL.md
288
- │ ├── security-web/SKILL.md
289
- │ ├── security-api/SKILL.md
290
- │ └── ai-prompts/SKILL.md
291
- └── agents/
292
- ├── code-quality/
293
- │ ├── typescript.md
294
- │ ├── python.md
295
- │ ├── go.md
296
- │ └── rust.md
297
- ├── security/
298
- │ ├── web-app.md
299
- │ ├── api-service.md
300
- │ └── full-stack.md
301
- └── universal/
302
- ├── spec-validator.md
303
- └── production-readiness.md
304
- ```
305
-
306
- The scaffold engine composes: `base + frontend/nextjs + backend/fastapi + database/sqlalchemy-postgres + auth/nextauth + testing/playwright + testing/pytest + infra/docker-compose + claude-code/hooks/polyglot + claude-code/skills/nextjs + claude-code/skills/fastapi + ...`
307
-
308
- ---
309
-
310
- ## Free-Text → AI Recommendation (Option 10)
311
-
312
- When the user describes what they're building in free text, use Claude's API
313
- to classify and recommend:
314
-
315
- ```javascript
316
- const response = await anthropic.messages.create({
317
- model: "claude-sonnet-4-20250514",
318
- system: `You are a senior software architect. Given a project description,
319
- recommend the optimal tech stack. Return ONLY valid JSON.`,
320
- messages: [{
321
- role: "user",
322
- content: `Project description: "${userDescription}"
323
-
324
- Return JSON:
325
- {
326
- "service_type": "web_app|api_service|full_stack|mobile|cli|ai_service|desktop|extension|microservice",
327
- "frontend": { "framework": "...", "language": "...", "styling": "...", "ui_library": "..." } | null,
328
- "backend": { "framework": "...", "language": "...", "orm": "..." } | null,
329
- "database": { "type": "...", "extras": ["pgvector", "redis", ...] } | null,
330
- "auth": "nextauth|clerk|supabase|jwt|none",
331
- "ai": { "provider": "...", "needs_embeddings": bool, "needs_structured_output": bool } | null,
332
- "testing": { "unit": "...", "e2e": "...", "backend": "..." },
333
- "deployment": "vercel|docker|cloud_run|serverless|self_hosted",
334
- "extras": ["websockets", "file_uploads", "payments", "email", ...],
335
- "reasoning": "Brief explanation of why this stack fits"
336
- }`
337
- }]
338
- });
339
- ```
340
-
341
- ---
342
-
343
- ## Implementation Roadmap
344
-
345
- ### Phase 1: Core CLI + Decision Engine (Week 1-2)
346
- - Interactive CLI with Inquirer.js
347
- - Service type selection (10 options)
348
- - Stack mapping (hardcoded decision tree, no AI yet)
349
- - Base template generation (project structure, configs, README)
350
-
351
- ### Phase 2: First 3 Stack Templates (Week 3-4)
352
- - Next.js full-stack (what next-init already does, enhanced)
353
- - FastAPI backend service
354
- - React + Vite SPA
355
- - Each ships with Claude Code infrastructure
356
-
357
- ### Phase 3: Claude Code Infrastructure Generation (Week 5-6)
358
- - Dynamic CLAUDE.md generation based on selected stack
359
- - Hook generation with actual commands for the stack
360
- - Skill generation for selected frameworks
361
- - Agent generation with stack-specific checklists
362
-
363
- ### Phase 4: AI Recommendation (Week 7-8)
364
- - Free-text description → Claude API → stack recommendation
365
- - User confirms or adjusts recommendation
366
- - Template composition from modular pieces
367
-
368
- ### Phase 5: Expand Stack Coverage (Ongoing)
369
- - Go + Gin backend
370
- - Rust + Axum backend
371
- - React Native / Expo mobile
372
- - Tauri desktop
373
- - Browser extensions
374
- - Community-contributed templates
375
-
376
- ### Phase 6: Plugin Ecosystem (Future)
377
- - Community templates via GitHub repos
378
- - `create-init plugin add [github-url]`
379
- - Template marketplace
380
-
381
- ---
382
-
383
- ## What Makes This Different From Existing Tools
384
-
385
- | Tool | What It Does | What's Missing |
386
- |------|-------------|----------------|
387
- | create-next-app | Scaffolds Next.js only | No stack choice, no AI infra |
388
- | create-vite | Scaffolds Vite projects | Frontend only, no AI infra |
389
- | Yeoman | Language-agnostic scaffolding | No AI recommendation, no Claude Code |
390
- | Blueprint | Multi-language scaffolding | No AI recommendation, no Claude Code |
391
- | LobeHub scaffolding skill | 70+ project types | It's a Claude Code skill, not a standalone CLI |
392
- | **create-init (this)** | **AI-recommended stack + Claude Code infra** | **Nothing. That's the point.** |
393
-
394
- The unique value: you describe what you're building, get the right stack
395
- recommended, and ship with the full AI-assisted development infrastructure
396
- (hooks, agents, skills, commands) already configured for THAT stack.
397
-
398
- No one else is doing: service description → stack recommendation → scaffold
399
- → AI development infrastructure — in one tool.
400
-
401
- ---
402
-
403
- ## Naming Options
404
-
405
- | Name | Command | Available? |
406
- |------|---------|-----------|
407
- | create-init | `npx create-init my-app` | Check npm registry |
408
- | create-scaffold | `npx create-scaffold my-app` | Check npm registry |
409
- | create-project-ai | `npx create-project-ai my-app` | Check npm registry |
410
- | create-stack | `npx create-stack my-app` | Check npm registry |
411
- | project-init | `npx project-init my-app` | Check npm registry |
412
-
413
- ---
414
-
415
- ## The Prompt to Start Building This
416
-
417
- Use this with Claude Code to begin:
418
-
419
- ```
420
- I'm evolving my existing next-init repo (https://github.com/babaphemy/next-init)
421
- into a universal project scaffolding CLI.
422
-
423
- Read the current codebase thoroughly. Then:
424
-
425
- 1. Plan the architecture for a modular template system that supports:
426
- - Multiple frontend frameworks (Next.js, React+Vite, Astro, Expo)
427
- - Multiple backend frameworks (FastAPI, Hono, NestJS, Go/Gin, Rust/Axum)
428
- - Multiple databases (PostgreSQL+Prisma, PostgreSQL+SQLAlchemy, MongoDB)
429
- - Composable features (auth, AI, payments, file uploads, websockets)
430
- - Claude Code infrastructure generation (.claude/ directory) for any stack
431
-
432
- 2. The CLI should:
433
- - Ask what the user is building (10 service types + free text)
434
- - Recommend the optimal stack based on service type
435
- - Let the user adjust the recommendation
436
- - Compose the project from modular template pieces
437
- - Generate Claude Code infrastructure (CLAUDE.md, hooks, skills, agents)
438
- tailored to the selected stack
439
-
440
- 3. Start by refactoring the existing setup.js into:
441
- - A service type selector
442
- - A stack recommender
443
- - A template composer
444
- - A Claude Code configurator
445
-
446
- Keep the existing Next.js template as the first module.
447
- Build the architecture so adding new stack templates is straightforward.
448
- Do NOT implement all stacks yet — just the architecture and Next.js.
449
-
450
- Save your plan to docs/plans/universal-scaffolder-plan.md.
451
- DO NOT write code until I approve the plan.
452
- ```