forgedev 1.0.0 → 1.0.1
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 +246 -246
- package/bin/devforge.js +4 -4
- package/package.json +33 -33
- package/src/claude-configurator.js +260 -260
- package/src/cli.js +119 -119
- package/src/composer.js +214 -214
- package/src/doctor-checks.js +743 -743
- package/src/doctor-prompts.js +295 -295
- package/src/doctor.js +281 -281
- package/src/guided.js +315 -315
- package/src/index.js +148 -148
- package/src/init-mode.js +138 -134
- package/src/prompts.js +155 -155
- package/src/scanner.js +368 -368
- package/templates/claude-code/agents/code-quality-reviewer.md +41 -41
- package/templates/claude-code/agents/production-readiness.md +55 -55
- package/templates/claude-code/agents/security-reviewer.md +41 -41
- package/templates/claude-code/agents/spec-validator.md +34 -34
- package/templates/claude-code/agents/uat-validator.md +37 -37
- package/templates/claude-code/claude-md/base.md +33 -33
- package/templates/claude-code/commands/done.md +19 -19
- package/templates/claude-code/commands/generate-prd.md +45 -45
- package/templates/claude-code/commands/generate-uat.md +35 -35
- package/templates/claude-code/commands/help.md +26 -26
- package/templates/claude-code/commands/next.md +20 -20
- package/templates/claude-code/commands/optimize-claude-md.md +31 -31
- package/templates/claude-code/commands/status.md +24 -24
- package/templates/claude-code/hooks/polyglot.json +36 -36
- package/templates/claude-code/hooks/python.json +36 -36
- package/templates/claude-code/hooks/scripts/autofix-polyglot.sh +16 -16
- package/templates/claude-code/hooks/scripts/autofix-python.sh +14 -14
- package/templates/claude-code/hooks/scripts/autofix-typescript.sh +14 -14
- package/templates/claude-code/hooks/scripts/guard-protected-files.sh +21 -21
- package/templates/claude-code/hooks/typescript.json +36 -36
package/README.md
CHANGED
|
@@ -1,246 +1,246 @@
|
|
|
1
|
-
# DevForge
|
|
2
|
-
|
|
3
|
-
Universal, AI-first project scaffolding CLI. Describe what you're building, get the right stack recommended, and ship with Claude Code infrastructure pre-configured.
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# New project — guided (for beginners)
|
|
9
|
-
npx devforge new my-app
|
|
10
|
-
|
|
11
|
-
# New project — shorthand
|
|
12
|
-
npx devforge my-app
|
|
13
|
-
|
|
14
|
-
# Add dev guardrails to existing project
|
|
15
|
-
npx devforge init
|
|
16
|
-
|
|
17
|
-
# Diagnose and optimize existing project
|
|
18
|
-
npx devforge doctor
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Four Modes, Four Audiences
|
|
22
|
-
|
|
23
|
-
### 1. Guided Mode (beginners & non-developers)
|
|
24
|
-
|
|
25
|
-
Describe what you want in plain English. DevForge picks the stack.
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
$ npx devforge new my-app
|
|
29
|
-
|
|
30
|
-
🔨 DevForge — Let's build something.
|
|
31
|
-
|
|
32
|
-
? How would you like to start?
|
|
33
|
-
💬 Describe what you want to build (recommended for beginners)
|
|
34
|
-
⚡ I know my stack — let me pick (for developers)
|
|
35
|
-
|
|
36
|
-
> Describe
|
|
37
|
-
|
|
38
|
-
Tell me about what you want to build:
|
|
39
|
-
> I want an app where restaurants manage their menu and customers order food
|
|
40
|
-
|
|
41
|
-
Got it! Here's what I'll set up for you:
|
|
42
|
-
|
|
43
|
-
What you'll get:
|
|
44
|
-
├── A website where you can:
|
|
45
|
-
│ • Manage menu
|
|
46
|
-
│ • Manage orders
|
|
47
|
-
│
|
|
48
|
-
├── User accounts (with different roles like admin and user)
|
|
49
|
-
├── Payment processing for orders or subscriptions
|
|
50
|
-
├── Search and filtering
|
|
51
|
-
├── A database to store all your data
|
|
52
|
-
│
|
|
53
|
-
└── Developer tools:
|
|
54
|
-
• Code quality checks (catches errors automatically)
|
|
55
|
-
• Guided workflows (type /project:help anytime you're stuck)
|
|
56
|
-
• Testing templates
|
|
57
|
-
|
|
58
|
-
? Sound right? Yes — create it!
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Zero technical jargon. DevForge makes all the decisions. After scaffolding, generates `docs/getting-started.md` with a beginner-friendly walkthrough.
|
|
62
|
-
|
|
63
|
-
### 2. Developer Mode (developers who know their stack)
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
$ npx devforge new my-app
|
|
67
|
-
|
|
68
|
-
? How would you like to start?
|
|
69
|
-
⚡ I know my stack — let me pick
|
|
70
|
-
|
|
71
|
-
? What are you building? Full-stack app
|
|
72
|
-
? Backend language? Python (polyglot)
|
|
73
|
-
? Need authentication? Yes
|
|
74
|
-
? Deployment target? Docker
|
|
75
|
-
|
|
76
|
-
Recommended stack:
|
|
77
|
-
Frontend: nextjs + typescript + tailwind + shadcn
|
|
78
|
-
Backend: fastapi + python + sqlalchemy
|
|
79
|
-
Database: postgresql (both)
|
|
80
|
-
Auth: both
|
|
81
|
-
Testing: vitest + playwright + pytest
|
|
82
|
-
Deploy: docker
|
|
83
|
-
Claude: CLAUDE.md + hooks + skills + agents + commands
|
|
84
|
-
|
|
85
|
-
? Proceed with this stack? Yes
|
|
86
|
-
|
|
87
|
-
✓ Done! Your project is ready.
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### 3. Init Mode (add guardrails to existing projects)
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
$ cd my-existing-project
|
|
94
|
-
$ npx devforge init
|
|
95
|
-
|
|
96
|
-
🔨 DevForge — Adding dev guardrails
|
|
97
|
-
|
|
98
|
-
Scanning...
|
|
99
|
-
|
|
100
|
-
Detected: nextjs (typescript) + fastapi (python) + postgresql (prisma) + vitest + playwright + pytest
|
|
101
|
-
|
|
102
|
-
Installing:
|
|
103
|
-
✓ .claude/hooks/ — auto-lint, quality gate, file protection
|
|
104
|
-
✓ .claude/agents/ — code quality, security, spec validator
|
|
105
|
-
✓ .claude/commands/ — help, status, next, done, audit, pre-pr
|
|
106
|
-
✓ .claude/skills/ — framework-specific knowledge
|
|
107
|
-
✓ docs/uat/ — acceptance test templates
|
|
108
|
-
⊘ CLAUDE.md — exists (tip: run /project:optimize-claude-md to slim it)
|
|
109
|
-
|
|
110
|
-
Done. Type /project:help to get started.
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Zero questions. Scans, detects, installs.
|
|
114
|
-
|
|
115
|
-
### 4. Doctor Mode (diagnose & optimize existing projects)
|
|
116
|
-
|
|
117
|
-
```
|
|
118
|
-
$ npx devforge doctor
|
|
119
|
-
|
|
120
|
-
🔨 DevForge Doctor — Project Health Check
|
|
121
|
-
|
|
122
|
-
Scanning...
|
|
123
|
-
|
|
124
|
-
📊 Project Vitals:
|
|
125
|
-
Frontend: nextjs (typescript)
|
|
126
|
-
Backend: fastapi (python)
|
|
127
|
-
Database: postgresql (sqlalchemy)
|
|
128
|
-
Testing: vitest + playwright + pytest
|
|
129
|
-
|
|
130
|
-
Health Issues Found:
|
|
131
|
-
|
|
132
|
-
🔴 CRITICAL
|
|
133
|
-
1. CLAUDE.md is 647 lines (recommended limit: 150)
|
|
134
|
-
→ Instructions are being dropped
|
|
135
|
-
2. 4 endpoints have no authentication
|
|
136
|
-
→ Security vulnerability
|
|
137
|
-
|
|
138
|
-
🟡 WARNING
|
|
139
|
-
3. No health check endpoint
|
|
140
|
-
4. No UAT scenarios
|
|
141
|
-
5. 3 bare except: blocks
|
|
142
|
-
|
|
143
|
-
? What would you like to do?
|
|
144
|
-
🚑 Fix critical issues (guided, one at a time)
|
|
145
|
-
📋 Generate a full report (save to docs/doctor-report.md)
|
|
146
|
-
⚡ Auto-fix what's safe to auto-fix
|
|
147
|
-
📖 Just show me what to do (generates prompts for Claude Code)
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Doctor diagnoses problems and generates the exact Claude Code prompt to fix each one.
|
|
151
|
-
|
|
152
|
-
## Supported Stacks (V1)
|
|
153
|
-
|
|
154
|
-
| Selection | Stack |
|
|
155
|
-
|---|---|
|
|
156
|
-
| Web app / Full-stack + TypeScript | Next.js 15 + Prisma + PostgreSQL + NextAuth + Vitest + Playwright |
|
|
157
|
-
| API service + Python | FastAPI + SQLAlchemy 2.0 + PostgreSQL + Alembic + Pytest |
|
|
158
|
-
| Full-stack + TS + Python | Next.js frontend + FastAPI backend (polyglot monorepo) |
|
|
159
|
-
| AI/ML service | Polyglot full-stack with AI integration flag |
|
|
160
|
-
|
|
161
|
-
## What Gets Generated
|
|
162
|
-
|
|
163
|
-
Every project includes:
|
|
164
|
-
|
|
165
|
-
- **Project scaffold** with working code, configs, and dependencies
|
|
166
|
-
- **Health check endpoints** (`/health`, `/healthz`)
|
|
167
|
-
- **Graceful shutdown handlers**
|
|
168
|
-
- **Database connection retry** with exponential backoff
|
|
169
|
-
- **Structured error responses** (never leaks stack traces)
|
|
170
|
-
|
|
171
|
-
With Claude Code infrastructure enabled (default):
|
|
172
|
-
|
|
173
|
-
- **CLAUDE.md** tailored to your stack
|
|
174
|
-
- **Hooks** — auto-lint on edit, quality gate on stop
|
|
175
|
-
- **Skills** — framework-specific knowledge
|
|
176
|
-
- **Agents** — 5-agent verification chain
|
|
177
|
-
- **Commands** — verify-all, audit-spec, audit-wiring, audit-security, pre-pr, run-uat, generate-prd, generate-uat, optimize-claude-md
|
|
178
|
-
- **UAT templates** — scenario packs and CSV checklists
|
|
179
|
-
- **Prompt library** — the complete development prompt library
|
|
180
|
-
|
|
181
|
-
## Development
|
|
182
|
-
|
|
183
|
-
```bash
|
|
184
|
-
npm install
|
|
185
|
-
npm test # run unit tests
|
|
186
|
-
node bin/devforge.js test-output # manual smoke test (guided + developer)
|
|
187
|
-
node bin/devforge.js init # test init mode (from any project dir)
|
|
188
|
-
node bin/devforge.js doctor # test doctor mode (from any project dir)
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
## Project Structure
|
|
192
|
-
|
|
193
|
-
```
|
|
194
|
-
devforge/
|
|
195
|
-
├── bin/devforge.js # CLI entry point
|
|
196
|
-
├── src/
|
|
197
|
-
│ ├── cli.js # Command router (new, init, doctor)
|
|
198
|
-
│ ├── index.js # New project orchestrator (guided + developer)
|
|
199
|
-
│ ├── guided.js # Guided mode (description → stack)
|
|
200
|
-
│ ├── prompts.js # Interactive prompts (Inquirer.js)
|
|
201
|
-
│ ├── recommender.js # Service type → stack recommendation
|
|
202
|
-
│ ├── composer.js # Template composition engine
|
|
203
|
-
│ ├── claude-configurator.js # Generates .claude/ infrastructure
|
|
204
|
-
│ ├── uat-generator.js # Generates UAT templates
|
|
205
|
-
│ ├── scanner.js # Project scanner (for init + doctor)
|
|
206
|
-
│ ├── init-mode.js # Init mode orchestrator
|
|
207
|
-
│ ├── doctor.js # Doctor mode orchestrator
|
|
208
|
-
│ ├── doctor-checks.js # Diagnostic check functions
|
|
209
|
-
│ ├── doctor-prompts.js # Fix prompt generators
|
|
210
|
-
│ └── utils.js # File ops, logging, colors
|
|
211
|
-
├── templates/ # Scaffold templates by category
|
|
212
|
-
│ ├── base/ # Every project gets this
|
|
213
|
-
│ ├── frontend/nextjs/ # Next.js App Router
|
|
214
|
-
│ ├── backend/fastapi/ # FastAPI + SQLAlchemy
|
|
215
|
-
│ ├── database/ # Prisma, SQLAlchemy
|
|
216
|
-
│ ├── auth/ # NextAuth, JWT
|
|
217
|
-
│ ├── testing/ # Vitest, Playwright, Pytest
|
|
218
|
-
│ ├── infra/ # Docker Compose, GitHub Actions
|
|
219
|
-
│ └── claude-code/ # Hooks, CLAUDE.md, skills, agents, commands
|
|
220
|
-
├── tests/ # Vitest tests
|
|
221
|
-
└── docs/ # Reference documentation
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
## Claude Code Commands
|
|
225
|
-
|
|
226
|
-
| Command | What It Does |
|
|
227
|
-
|---------|-------------|
|
|
228
|
-
| `/project:help` | Asks your situation, gives the exact prompt |
|
|
229
|
-
| `/project:status` | Project dashboard — tests, branch, changes |
|
|
230
|
-
| `/project:next` | Figures out your next task |
|
|
231
|
-
| `/project:done` | Verifies task completion |
|
|
232
|
-
| `/project:generate-prd` | Generates a PRD with Mermaid diagrams |
|
|
233
|
-
| `/project:generate-uat` | Generates UAT scenarios from codebase |
|
|
234
|
-
| `/project:optimize-claude-md` | Proposes splitting an oversized CLAUDE.md |
|
|
235
|
-
|
|
236
|
-
## Roadmap
|
|
237
|
-
|
|
238
|
-
- [ ] Go + Gin/Chi backend
|
|
239
|
-
- [ ] Rust + Axum backend
|
|
240
|
-
- [ ] React + Vite SPA (frontend-only)
|
|
241
|
-
- [ ] React Native / Expo mobile
|
|
242
|
-
- [ ] Plugin ecosystem for community templates
|
|
243
|
-
|
|
244
|
-
## License
|
|
245
|
-
|
|
246
|
-
MIT
|
|
1
|
+
# DevForge
|
|
2
|
+
|
|
3
|
+
Universal, AI-first project scaffolding CLI. Describe what you're building, get the right stack recommended, and ship with Claude Code infrastructure pre-configured.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# New project — guided (for beginners)
|
|
9
|
+
npx devforge new my-app
|
|
10
|
+
|
|
11
|
+
# New project — shorthand
|
|
12
|
+
npx devforge my-app
|
|
13
|
+
|
|
14
|
+
# Add dev guardrails to existing project
|
|
15
|
+
npx devforge init
|
|
16
|
+
|
|
17
|
+
# Diagnose and optimize existing project
|
|
18
|
+
npx devforge doctor
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Four Modes, Four Audiences
|
|
22
|
+
|
|
23
|
+
### 1. Guided Mode (beginners & non-developers)
|
|
24
|
+
|
|
25
|
+
Describe what you want in plain English. DevForge picks the stack.
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
$ npx devforge new my-app
|
|
29
|
+
|
|
30
|
+
🔨 DevForge — Let's build something.
|
|
31
|
+
|
|
32
|
+
? How would you like to start?
|
|
33
|
+
💬 Describe what you want to build (recommended for beginners)
|
|
34
|
+
⚡ I know my stack — let me pick (for developers)
|
|
35
|
+
|
|
36
|
+
> Describe
|
|
37
|
+
|
|
38
|
+
Tell me about what you want to build:
|
|
39
|
+
> I want an app where restaurants manage their menu and customers order food
|
|
40
|
+
|
|
41
|
+
Got it! Here's what I'll set up for you:
|
|
42
|
+
|
|
43
|
+
What you'll get:
|
|
44
|
+
├── A website where you can:
|
|
45
|
+
│ • Manage menu
|
|
46
|
+
│ • Manage orders
|
|
47
|
+
│
|
|
48
|
+
├── User accounts (with different roles like admin and user)
|
|
49
|
+
├── Payment processing for orders or subscriptions
|
|
50
|
+
├── Search and filtering
|
|
51
|
+
├── A database to store all your data
|
|
52
|
+
│
|
|
53
|
+
└── Developer tools:
|
|
54
|
+
• Code quality checks (catches errors automatically)
|
|
55
|
+
• Guided workflows (type /project:help anytime you're stuck)
|
|
56
|
+
• Testing templates
|
|
57
|
+
|
|
58
|
+
? Sound right? Yes — create it!
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Zero technical jargon. DevForge makes all the decisions. After scaffolding, generates `docs/getting-started.md` with a beginner-friendly walkthrough.
|
|
62
|
+
|
|
63
|
+
### 2. Developer Mode (developers who know their stack)
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
$ npx devforge new my-app
|
|
67
|
+
|
|
68
|
+
? How would you like to start?
|
|
69
|
+
⚡ I know my stack — let me pick
|
|
70
|
+
|
|
71
|
+
? What are you building? Full-stack app
|
|
72
|
+
? Backend language? Python (polyglot)
|
|
73
|
+
? Need authentication? Yes
|
|
74
|
+
? Deployment target? Docker
|
|
75
|
+
|
|
76
|
+
Recommended stack:
|
|
77
|
+
Frontend: nextjs + typescript + tailwind + shadcn
|
|
78
|
+
Backend: fastapi + python + sqlalchemy
|
|
79
|
+
Database: postgresql (both)
|
|
80
|
+
Auth: both
|
|
81
|
+
Testing: vitest + playwright + pytest
|
|
82
|
+
Deploy: docker
|
|
83
|
+
Claude: CLAUDE.md + hooks + skills + agents + commands
|
|
84
|
+
|
|
85
|
+
? Proceed with this stack? Yes
|
|
86
|
+
|
|
87
|
+
✓ Done! Your project is ready.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 3. Init Mode (add guardrails to existing projects)
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
$ cd my-existing-project
|
|
94
|
+
$ npx devforge init
|
|
95
|
+
|
|
96
|
+
🔨 DevForge — Adding dev guardrails
|
|
97
|
+
|
|
98
|
+
Scanning...
|
|
99
|
+
|
|
100
|
+
Detected: nextjs (typescript) + fastapi (python) + postgresql (prisma) + vitest + playwright + pytest
|
|
101
|
+
|
|
102
|
+
Installing:
|
|
103
|
+
✓ .claude/hooks/ — auto-lint, quality gate, file protection
|
|
104
|
+
✓ .claude/agents/ — code quality, security, spec validator
|
|
105
|
+
✓ .claude/commands/ — help, status, next, done, audit, pre-pr
|
|
106
|
+
✓ .claude/skills/ — framework-specific knowledge
|
|
107
|
+
✓ docs/uat/ — acceptance test templates
|
|
108
|
+
⊘ CLAUDE.md — exists (tip: run /project:optimize-claude-md to slim it)
|
|
109
|
+
|
|
110
|
+
Done. Type /project:help to get started.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Zero questions. Scans, detects, installs.
|
|
114
|
+
|
|
115
|
+
### 4. Doctor Mode (diagnose & optimize existing projects)
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
$ npx devforge doctor
|
|
119
|
+
|
|
120
|
+
🔨 DevForge Doctor — Project Health Check
|
|
121
|
+
|
|
122
|
+
Scanning...
|
|
123
|
+
|
|
124
|
+
📊 Project Vitals:
|
|
125
|
+
Frontend: nextjs (typescript)
|
|
126
|
+
Backend: fastapi (python)
|
|
127
|
+
Database: postgresql (sqlalchemy)
|
|
128
|
+
Testing: vitest + playwright + pytest
|
|
129
|
+
|
|
130
|
+
Health Issues Found:
|
|
131
|
+
|
|
132
|
+
🔴 CRITICAL
|
|
133
|
+
1. CLAUDE.md is 647 lines (recommended limit: 150)
|
|
134
|
+
→ Instructions are being dropped
|
|
135
|
+
2. 4 endpoints have no authentication
|
|
136
|
+
→ Security vulnerability
|
|
137
|
+
|
|
138
|
+
🟡 WARNING
|
|
139
|
+
3. No health check endpoint
|
|
140
|
+
4. No UAT scenarios
|
|
141
|
+
5. 3 bare except: blocks
|
|
142
|
+
|
|
143
|
+
? What would you like to do?
|
|
144
|
+
🚑 Fix critical issues (guided, one at a time)
|
|
145
|
+
📋 Generate a full report (save to docs/doctor-report.md)
|
|
146
|
+
⚡ Auto-fix what's safe to auto-fix
|
|
147
|
+
📖 Just show me what to do (generates prompts for Claude Code)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Doctor diagnoses problems and generates the exact Claude Code prompt to fix each one.
|
|
151
|
+
|
|
152
|
+
## Supported Stacks (V1)
|
|
153
|
+
|
|
154
|
+
| Selection | Stack |
|
|
155
|
+
|---|---|
|
|
156
|
+
| Web app / Full-stack + TypeScript | Next.js 15 + Prisma + PostgreSQL + NextAuth + Vitest + Playwright |
|
|
157
|
+
| API service + Python | FastAPI + SQLAlchemy 2.0 + PostgreSQL + Alembic + Pytest |
|
|
158
|
+
| Full-stack + TS + Python | Next.js frontend + FastAPI backend (polyglot monorepo) |
|
|
159
|
+
| AI/ML service | Polyglot full-stack with AI integration flag |
|
|
160
|
+
|
|
161
|
+
## What Gets Generated
|
|
162
|
+
|
|
163
|
+
Every project includes:
|
|
164
|
+
|
|
165
|
+
- **Project scaffold** with working code, configs, and dependencies
|
|
166
|
+
- **Health check endpoints** (`/health`, `/healthz`)
|
|
167
|
+
- **Graceful shutdown handlers**
|
|
168
|
+
- **Database connection retry** with exponential backoff
|
|
169
|
+
- **Structured error responses** (never leaks stack traces)
|
|
170
|
+
|
|
171
|
+
With Claude Code infrastructure enabled (default):
|
|
172
|
+
|
|
173
|
+
- **CLAUDE.md** tailored to your stack
|
|
174
|
+
- **Hooks** — auto-lint on edit, quality gate on stop
|
|
175
|
+
- **Skills** — framework-specific knowledge
|
|
176
|
+
- **Agents** — 5-agent verification chain
|
|
177
|
+
- **Commands** — verify-all, audit-spec, audit-wiring, audit-security, pre-pr, run-uat, generate-prd, generate-uat, optimize-claude-md
|
|
178
|
+
- **UAT templates** — scenario packs and CSV checklists
|
|
179
|
+
- **Prompt library** — the complete development prompt library
|
|
180
|
+
|
|
181
|
+
## Development
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
npm install
|
|
185
|
+
npm test # run unit tests
|
|
186
|
+
node bin/devforge.js test-output # manual smoke test (guided + developer)
|
|
187
|
+
node bin/devforge.js init # test init mode (from any project dir)
|
|
188
|
+
node bin/devforge.js doctor # test doctor mode (from any project dir)
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Project Structure
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
devforge/
|
|
195
|
+
├── bin/devforge.js # CLI entry point
|
|
196
|
+
├── src/
|
|
197
|
+
│ ├── cli.js # Command router (new, init, doctor)
|
|
198
|
+
│ ├── index.js # New project orchestrator (guided + developer)
|
|
199
|
+
│ ├── guided.js # Guided mode (description → stack)
|
|
200
|
+
│ ├── prompts.js # Interactive prompts (Inquirer.js)
|
|
201
|
+
│ ├── recommender.js # Service type → stack recommendation
|
|
202
|
+
│ ├── composer.js # Template composition engine
|
|
203
|
+
│ ├── claude-configurator.js # Generates .claude/ infrastructure
|
|
204
|
+
│ ├── uat-generator.js # Generates UAT templates
|
|
205
|
+
│ ├── scanner.js # Project scanner (for init + doctor)
|
|
206
|
+
│ ├── init-mode.js # Init mode orchestrator
|
|
207
|
+
│ ├── doctor.js # Doctor mode orchestrator
|
|
208
|
+
│ ├── doctor-checks.js # Diagnostic check functions
|
|
209
|
+
│ ├── doctor-prompts.js # Fix prompt generators
|
|
210
|
+
│ └── utils.js # File ops, logging, colors
|
|
211
|
+
├── templates/ # Scaffold templates by category
|
|
212
|
+
│ ├── base/ # Every project gets this
|
|
213
|
+
│ ├── frontend/nextjs/ # Next.js App Router
|
|
214
|
+
│ ├── backend/fastapi/ # FastAPI + SQLAlchemy
|
|
215
|
+
│ ├── database/ # Prisma, SQLAlchemy
|
|
216
|
+
│ ├── auth/ # NextAuth, JWT
|
|
217
|
+
│ ├── testing/ # Vitest, Playwright, Pytest
|
|
218
|
+
│ ├── infra/ # Docker Compose, GitHub Actions
|
|
219
|
+
│ └── claude-code/ # Hooks, CLAUDE.md, skills, agents, commands
|
|
220
|
+
├── tests/ # Vitest tests
|
|
221
|
+
└── docs/ # Reference documentation
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Claude Code Commands
|
|
225
|
+
|
|
226
|
+
| Command | What It Does |
|
|
227
|
+
|---------|-------------|
|
|
228
|
+
| `/project:help` | Asks your situation, gives the exact prompt |
|
|
229
|
+
| `/project:status` | Project dashboard — tests, branch, changes |
|
|
230
|
+
| `/project:next` | Figures out your next task |
|
|
231
|
+
| `/project:done` | Verifies task completion |
|
|
232
|
+
| `/project:generate-prd` | Generates a PRD with Mermaid diagrams |
|
|
233
|
+
| `/project:generate-uat` | Generates UAT scenarios from codebase |
|
|
234
|
+
| `/project:optimize-claude-md` | Proposes splitting an oversized CLAUDE.md |
|
|
235
|
+
|
|
236
|
+
## Roadmap
|
|
237
|
+
|
|
238
|
+
- [ ] Go + Gin/Chi backend
|
|
239
|
+
- [ ] Rust + Axum backend
|
|
240
|
+
- [ ] React + Vite SPA (frontend-only)
|
|
241
|
+
- [ ] React Native / Expo mobile
|
|
242
|
+
- [ ] Plugin ecosystem for community templates
|
|
243
|
+
|
|
244
|
+
## License
|
|
245
|
+
|
|
246
|
+
MIT
|
package/bin/devforge.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { parseCommand } from '../src/cli.js';
|
|
3
|
-
|
|
4
|
-
parseCommand(process.argv.slice(2));
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { parseCommand } from '../src/cli.js';
|
|
3
|
+
|
|
4
|
+
parseCommand(process.argv.slice(2));
|
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "forgedev",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Universal, AI-first project scaffolding CLI with Claude Code infrastructure",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"forgedev": "bin/devforge.js",
|
|
8
|
-
"devforge": "bin/devforge.js"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"test": "vitest run",
|
|
12
|
-
"test:watch": "vitest"
|
|
13
|
-
},
|
|
14
|
-
"keywords": [
|
|
15
|
-
"scaffolding",
|
|
16
|
-
"cli",
|
|
17
|
-
"project-generator",
|
|
18
|
-
"claude-code",
|
|
19
|
-
"ai-first"
|
|
20
|
-
],
|
|
21
|
-
"author": "",
|
|
22
|
-
"license": "MIT",
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"chalk": "^5.4.1",
|
|
25
|
-
"@inquirer/prompts": "^7.10.0"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"vitest": "^3.1.1"
|
|
29
|
-
},
|
|
30
|
-
"engines": {
|
|
31
|
-
"node": ">=18.0.0"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "forgedev",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Universal, AI-first project scaffolding CLI with Claude Code infrastructure",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"forgedev": "bin/devforge.js",
|
|
8
|
+
"devforge": "bin/devforge.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "vitest run",
|
|
12
|
+
"test:watch": "vitest"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"scaffolding",
|
|
16
|
+
"cli",
|
|
17
|
+
"project-generator",
|
|
18
|
+
"claude-code",
|
|
19
|
+
"ai-first"
|
|
20
|
+
],
|
|
21
|
+
"author": "",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"chalk": "^5.4.1",
|
|
25
|
+
"@inquirer/prompts": "^7.10.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"vitest": "^3.1.1"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=18.0.0"
|
|
32
|
+
}
|
|
33
|
+
}
|