forge-workflow 1.4.0 → 1.4.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/.claude/settings.json +4 -1
- package/.claude/settings.local.json +7 -1
- package/README.md +217 -761
- package/docs/EXAMPLES.md +750 -0
- package/docs/README-v1.3.md +860 -0
- package/docs/SETUP.md +723 -0
- package/package.json +1 -1
package/docs/SETUP.md
ADDED
|
@@ -0,0 +1,723 @@
|
|
|
1
|
+
# Forge Setup Guide
|
|
2
|
+
|
|
3
|
+
Complete setup instructions for all AI agents and optional toolchain.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Installation Options](#installation-options)
|
|
10
|
+
- [Agent-Specific Setup](#agent-specific-setup)
|
|
11
|
+
- [Prerequisites](#prerequisites)
|
|
12
|
+
- [Toolchain Setup](#toolchain-setup)
|
|
13
|
+
- [External Services](#external-services)
|
|
14
|
+
- [Troubleshooting](#troubleshooting)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Installation Options
|
|
19
|
+
|
|
20
|
+
### Option 1: npm (Recommended)
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Step 1: Install the package
|
|
24
|
+
npm install forge-workflow
|
|
25
|
+
|
|
26
|
+
# Step 2: Interactive setup
|
|
27
|
+
npx forge setup
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**What gets created**:
|
|
31
|
+
- `AGENTS.md` - Universal instructions (always)
|
|
32
|
+
- Agent-specific files based on your selection
|
|
33
|
+
- `docs/` folder with workflow guides
|
|
34
|
+
|
|
35
|
+
### Option 2: Specify Agents Directly
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Install for specific agents
|
|
39
|
+
npx forge setup --agents claude,cursor,windsurf
|
|
40
|
+
|
|
41
|
+
# Install for all agents
|
|
42
|
+
npx forge setup --all
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Option 3: curl (One-Command Install)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
curl -fsSL https://raw.githubusercontent.com/harshanandak/forge/main/install.sh | bash
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Interactive prompts**:
|
|
52
|
+
1. Which agents do you use?
|
|
53
|
+
2. Install Beads? (y/n)
|
|
54
|
+
3. Install OpenSpec? (y/n)
|
|
55
|
+
|
|
56
|
+
### Option 4: bun
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
bun add forge-workflow
|
|
60
|
+
bunx forge setup
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Agent-Specific Setup
|
|
66
|
+
|
|
67
|
+
### Claude Code
|
|
68
|
+
|
|
69
|
+
**Files created**:
|
|
70
|
+
- `CLAUDE.md` → Linked to `AGENTS.md`
|
|
71
|
+
- `.claude/commands/` → 9 slash commands
|
|
72
|
+
- `.claude/rules/workflow.md` → Workflow rules
|
|
73
|
+
- `.claude/skills/forge-workflow/` → Skill files
|
|
74
|
+
|
|
75
|
+
**Usage**:
|
|
76
|
+
```bash
|
|
77
|
+
/status
|
|
78
|
+
/research feature-name
|
|
79
|
+
/plan feature-name
|
|
80
|
+
/dev
|
|
81
|
+
# ... etc
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Skills available**:
|
|
85
|
+
- `forge-workflow` - All 9 stages
|
|
86
|
+
- `parallel-ai` - Web research (if API key configured)
|
|
87
|
+
- `sonarcloud` - Code quality (if token configured)
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### Cursor
|
|
92
|
+
|
|
93
|
+
**Files created**:
|
|
94
|
+
- `.cursorrules` → Linked to `AGENTS.md`
|
|
95
|
+
- `.cursor/rules/forge-workflow.mdc` → MDC rules
|
|
96
|
+
- `.cursor/skills/forge-workflow/` → Skill files
|
|
97
|
+
|
|
98
|
+
**Usage**:
|
|
99
|
+
Cursor reads `.cursorrules` and follows the 9-stage workflow.
|
|
100
|
+
|
|
101
|
+
**Commands**:
|
|
102
|
+
Use Composer or Chat to reference stages:
|
|
103
|
+
```
|
|
104
|
+
"I'm at the /dev stage - help me write tests first"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
### Windsurf
|
|
110
|
+
|
|
111
|
+
**Files created**:
|
|
112
|
+
- `.windsurfrules` → Linked to `AGENTS.md`
|
|
113
|
+
- `.windsurf/workflows/` → Workflow files
|
|
114
|
+
- `.windsurf/skills/forge-workflow/` → Skill files
|
|
115
|
+
|
|
116
|
+
**Usage**:
|
|
117
|
+
```bash
|
|
118
|
+
/status
|
|
119
|
+
/research feature-name
|
|
120
|
+
# ... etc
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Windsurf has native slash command support similar to Claude Code.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
### GitHub Copilot
|
|
128
|
+
|
|
129
|
+
**Files created**:
|
|
130
|
+
- `.github/copilot-instructions.md` → Linked to `AGENTS.md`
|
|
131
|
+
- `.github/prompts/` → Workflow prompts
|
|
132
|
+
|
|
133
|
+
**Usage**:
|
|
134
|
+
Copilot reads instructions from `.github/copilot-instructions.md`.
|
|
135
|
+
|
|
136
|
+
**In Copilot Chat**:
|
|
137
|
+
```
|
|
138
|
+
@workspace I'm starting a new feature, help me with the /research stage
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
### Google Antigravity
|
|
144
|
+
|
|
145
|
+
**Files created**:
|
|
146
|
+
- `GEMINI.md` → Linked to `AGENTS.md`
|
|
147
|
+
- `.agent/workflows/` → Workflow files
|
|
148
|
+
- `.agent/skills/forge-workflow/` → Skill files
|
|
149
|
+
|
|
150
|
+
**Usage**:
|
|
151
|
+
```bash
|
|
152
|
+
/status
|
|
153
|
+
/research feature-name
|
|
154
|
+
# ... etc
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
### Kilo Code, OpenCode, Continue, Cline, Roo Code, Aider
|
|
160
|
+
|
|
161
|
+
**Files created**:
|
|
162
|
+
- Agent-specific config pointing to `AGENTS.md`
|
|
163
|
+
- Skill files in agent's skill directory
|
|
164
|
+
|
|
165
|
+
**Usage**:
|
|
166
|
+
All agents read `AGENTS.md` and follow the documented workflow.
|
|
167
|
+
|
|
168
|
+
**Example (any agent)**:
|
|
169
|
+
```
|
|
170
|
+
"Let's follow the Forge workflow. I want to add a login button.
|
|
171
|
+
Start with the /research stage."
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Prerequisites
|
|
177
|
+
|
|
178
|
+
### Required
|
|
179
|
+
|
|
180
|
+
#### Git
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
# Verify installation
|
|
184
|
+
git --version
|
|
185
|
+
|
|
186
|
+
# If not installed:
|
|
187
|
+
# macOS: brew install git
|
|
188
|
+
# Windows: winget install Git.Git
|
|
189
|
+
# Linux: sudo apt install git
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
#### GitHub CLI
|
|
193
|
+
|
|
194
|
+
**Required for** `/ship`, `/review`, `/merge` commands.
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# macOS
|
|
198
|
+
brew install gh
|
|
199
|
+
|
|
200
|
+
# Windows
|
|
201
|
+
winget install GitHub.cli
|
|
202
|
+
|
|
203
|
+
# Linux
|
|
204
|
+
sudo apt install gh
|
|
205
|
+
|
|
206
|
+
# Authenticate
|
|
207
|
+
gh auth login
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Follow prompts**:
|
|
211
|
+
1. Select "GitHub.com"
|
|
212
|
+
2. Select "HTTPS"
|
|
213
|
+
3. Select "Login with a web browser"
|
|
214
|
+
4. Copy one-time code and paste in browser
|
|
215
|
+
|
|
216
|
+
**Verify**:
|
|
217
|
+
```bash
|
|
218
|
+
gh auth status
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
### Recommended
|
|
224
|
+
|
|
225
|
+
#### Beads - Issue Tracking
|
|
226
|
+
|
|
227
|
+
**Recommended for**: Multi-session work, team collaboration
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
# Install globally
|
|
231
|
+
npm install -g @beads/bd
|
|
232
|
+
|
|
233
|
+
# Initialize in your project
|
|
234
|
+
cd your-project
|
|
235
|
+
bd init
|
|
236
|
+
|
|
237
|
+
# Verify
|
|
238
|
+
bd list
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**What it does**:
|
|
242
|
+
- Git-backed issue tracking
|
|
243
|
+
- Survives context clearing
|
|
244
|
+
- Dependency tracking
|
|
245
|
+
- Team-shareable
|
|
246
|
+
|
|
247
|
+
[Full Beads guide in TOOLCHAIN.md](TOOLCHAIN.md#beads---issue-tracking-across-sessions)
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
### Optional
|
|
252
|
+
|
|
253
|
+
#### OpenSpec - Spec-Driven Development
|
|
254
|
+
|
|
255
|
+
**Use for**: Architecture changes, breaking changes, multi-session features
|
|
256
|
+
|
|
257
|
+
**Requirements**: Node.js 20.19+
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# Check Node version
|
|
261
|
+
node --version
|
|
262
|
+
|
|
263
|
+
# Install globally
|
|
264
|
+
npm install -g @fission-ai/openspec
|
|
265
|
+
|
|
266
|
+
# Initialize in project
|
|
267
|
+
cd your-project
|
|
268
|
+
openspec init
|
|
269
|
+
|
|
270
|
+
# Verify
|
|
271
|
+
openspec list
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**What it does**:
|
|
275
|
+
- Proposal system for architecture changes
|
|
276
|
+
- Generates planning docs automatically
|
|
277
|
+
- Task tracking with delta specs
|
|
278
|
+
|
|
279
|
+
[Full OpenSpec guide in TOOLCHAIN.md](TOOLCHAIN.md#openspec---spec-driven-development)
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Toolchain Setup
|
|
284
|
+
|
|
285
|
+
### Beads Configuration
|
|
286
|
+
|
|
287
|
+
After `bd init`, customize `.beads/config.yaml`:
|
|
288
|
+
|
|
289
|
+
```yaml
|
|
290
|
+
# .beads/config.yaml
|
|
291
|
+
project:
|
|
292
|
+
name: "your-project"
|
|
293
|
+
prefix: "PROJ" # Issue IDs: PROJ-1, PROJ-2, etc.
|
|
294
|
+
|
|
295
|
+
priorities:
|
|
296
|
+
0: "critical"
|
|
297
|
+
1: "high"
|
|
298
|
+
2: "medium"
|
|
299
|
+
3: "low"
|
|
300
|
+
4: "backlog"
|
|
301
|
+
|
|
302
|
+
statuses:
|
|
303
|
+
- "open"
|
|
304
|
+
- "in_progress"
|
|
305
|
+
- "blocked"
|
|
306
|
+
- "done"
|
|
307
|
+
|
|
308
|
+
labels:
|
|
309
|
+
- "bug"
|
|
310
|
+
- "feature"
|
|
311
|
+
- "chore"
|
|
312
|
+
- "security"
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**Custom prefix**:
|
|
316
|
+
```bash
|
|
317
|
+
bd init --prefix MYPROJ
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
**Stealth mode** (local only, don't commit):
|
|
321
|
+
```bash
|
|
322
|
+
bd init --stealth
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
### OpenSpec Configuration
|
|
328
|
+
|
|
329
|
+
After `openspec init`, customize `openspec.config.json`:
|
|
330
|
+
|
|
331
|
+
```json
|
|
332
|
+
{
|
|
333
|
+
"specsDir": "openspec/specs",
|
|
334
|
+
"changesDir": "openspec/changes",
|
|
335
|
+
"archiveDir": "openspec/archive",
|
|
336
|
+
"templates": {
|
|
337
|
+
"proposal": "default",
|
|
338
|
+
"design": "default",
|
|
339
|
+
"tasks": "default"
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## External Services
|
|
347
|
+
|
|
348
|
+
Forge integrates with external services for enhanced capabilities. **All are optional** - Forge works standalone.
|
|
349
|
+
|
|
350
|
+
### Code Review Tools
|
|
351
|
+
|
|
352
|
+
| Tool | Pricing | Best For | Setup Time |
|
|
353
|
+
|------|---------|----------|------------|
|
|
354
|
+
| **GitHub Code Quality** | FREE | All repos | 0 min (built-in) |
|
|
355
|
+
| **CodeRabbit** | FREE (OSS) | Open source | 2 min |
|
|
356
|
+
| **Greptile** | $99+/mo | Enterprise | 5 min |
|
|
357
|
+
|
|
358
|
+
**Recommendation**: Start with GitHub Code Quality (FREE, no setup).
|
|
359
|
+
|
|
360
|
+
#### GitHub Code Quality Setup
|
|
361
|
+
|
|
362
|
+
**Already enabled!** Zero configuration required.
|
|
363
|
+
|
|
364
|
+
GitHub provides built-in code quality features:
|
|
365
|
+
- Code scanning
|
|
366
|
+
- Dependabot alerts
|
|
367
|
+
- Secret scanning
|
|
368
|
+
- Pull request checks
|
|
369
|
+
|
|
370
|
+
#### CodeRabbit Setup (FREE for Open Source)
|
|
371
|
+
|
|
372
|
+
```bash
|
|
373
|
+
# 1. Visit https://coderabbit.ai
|
|
374
|
+
# 2. Click "Sign in with GitHub"
|
|
375
|
+
# 3. Install GitHub App
|
|
376
|
+
# 4. Select repositories
|
|
377
|
+
|
|
378
|
+
# Done! CodeRabbit reviews all PRs automatically.
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
#### Greptile Setup (Paid - Enterprise)
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
# 1. Get API key from https://app.greptile.com
|
|
385
|
+
# 2. Add to .env.local
|
|
386
|
+
GREPTILE_API_KEY=your-key
|
|
387
|
+
CODE_REVIEW_TOOL=greptile
|
|
388
|
+
|
|
389
|
+
# 3. Index repository (one-time)
|
|
390
|
+
curl -X POST "https://api.greptile.com/v2/repositories" \
|
|
391
|
+
-H "Authorization: Bearer $GREPTILE_API_KEY" \
|
|
392
|
+
-H "Content-Type: application/json" \
|
|
393
|
+
-d '{
|
|
394
|
+
"remote": "github",
|
|
395
|
+
"repository": "owner/repo",
|
|
396
|
+
"branch": "main"
|
|
397
|
+
}'
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
### Code Quality Tools
|
|
403
|
+
|
|
404
|
+
| Tool | Pricing | Best For | Setup Time |
|
|
405
|
+
|------|---------|----------|------------|
|
|
406
|
+
| **ESLint** | FREE | All projects | 0 min (built-in) |
|
|
407
|
+
| **SonarCloud** | 50k LoC FREE | Cloud hosting | 10 min |
|
|
408
|
+
| **SonarQube** | FREE | Self-hosted | 15 min |
|
|
409
|
+
|
|
410
|
+
**Recommendation**: Start with ESLint (FREE, already in your project).
|
|
411
|
+
|
|
412
|
+
#### ESLint Setup
|
|
413
|
+
|
|
414
|
+
**Already configured!** Just run:
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
npm run lint
|
|
418
|
+
# or
|
|
419
|
+
bun run lint
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
#### SonarCloud Setup
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
# 1. Create account at https://sonarcloud.io
|
|
426
|
+
# 2. Create new project, select your repo
|
|
427
|
+
# 3. Get token from Account → Security
|
|
428
|
+
# 4. Add to .env.local
|
|
429
|
+
SONAR_TOKEN=your-token
|
|
430
|
+
SONAR_ORGANIZATION=your-org
|
|
431
|
+
SONAR_PROJECT_KEY=your-project
|
|
432
|
+
CODE_QUALITY_TOOL=sonarcloud
|
|
433
|
+
|
|
434
|
+
# 5. Create sonar-project.properties
|
|
435
|
+
cat > sonar-project.properties << EOF
|
|
436
|
+
sonar.organization=$SONAR_ORGANIZATION
|
|
437
|
+
sonar.projectKey=$SONAR_PROJECT_KEY
|
|
438
|
+
sonar.sources=src
|
|
439
|
+
sonar.tests=tests
|
|
440
|
+
sonar.test.inclusions=**/*.test.js,**/*.spec.js
|
|
441
|
+
sonar.javascript.lcov.reportPaths=coverage/lcov.info
|
|
442
|
+
EOF
|
|
443
|
+
|
|
444
|
+
# 6. Run analysis locally
|
|
445
|
+
npx sonarqube-scanner
|
|
446
|
+
|
|
447
|
+
# 7. Add to CI (.github/workflows/quality.yml)
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
**GitHub Actions**:
|
|
451
|
+
```yaml
|
|
452
|
+
# .github/workflows/quality.yml
|
|
453
|
+
name: Code Quality
|
|
454
|
+
on: [push, pull_request]
|
|
455
|
+
|
|
456
|
+
jobs:
|
|
457
|
+
sonarcloud:
|
|
458
|
+
runs-on: ubuntu-latest
|
|
459
|
+
steps:
|
|
460
|
+
- uses: actions/checkout@v3
|
|
461
|
+
with:
|
|
462
|
+
fetch-depth: 0
|
|
463
|
+
- uses: sonarsource/sonarcloud-github-action@master
|
|
464
|
+
env:
|
|
465
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
466
|
+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
#### SonarQube Setup (Self-Hosted)
|
|
470
|
+
|
|
471
|
+
```bash
|
|
472
|
+
# 1. Start SonarQube with Docker
|
|
473
|
+
docker run -d \
|
|
474
|
+
--name sonarqube \
|
|
475
|
+
-p 9000:9000 \
|
|
476
|
+
sonarqube:community
|
|
477
|
+
|
|
478
|
+
# 2. Access at http://localhost:9000
|
|
479
|
+
# Default login: admin/admin
|
|
480
|
+
# Change password when prompted
|
|
481
|
+
|
|
482
|
+
# 3. Create project in SonarQube UI
|
|
483
|
+
# 4. Generate token (Administration → Security → Users)
|
|
484
|
+
# 5. Add to .env.local
|
|
485
|
+
SONARQUBE_URL=http://localhost:9000
|
|
486
|
+
SONARQUBE_TOKEN=your-token
|
|
487
|
+
CODE_QUALITY_TOOL=sonarqube
|
|
488
|
+
|
|
489
|
+
# 6. Create sonar-project.properties
|
|
490
|
+
cat > sonar-project.properties << EOF
|
|
491
|
+
sonar.host.url=http://localhost:9000
|
|
492
|
+
sonar.login=$SONARQUBE_TOKEN
|
|
493
|
+
sonar.projectKey=your-project
|
|
494
|
+
sonar.sources=src
|
|
495
|
+
sonar.tests=tests
|
|
496
|
+
EOF
|
|
497
|
+
|
|
498
|
+
# 7. Run analysis
|
|
499
|
+
npx sonarqube-scanner
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
### Research Tools
|
|
505
|
+
|
|
506
|
+
#### Parallel AI (Optional - Paid)
|
|
507
|
+
|
|
508
|
+
**Used in** `/research` stage for deep web research.
|
|
509
|
+
|
|
510
|
+
```bash
|
|
511
|
+
# 1. Get API key from https://platform.parallel.ai
|
|
512
|
+
# 2. Add to .env.local
|
|
513
|
+
PARALLEL_API_KEY=your-key
|
|
514
|
+
|
|
515
|
+
# 3. Test
|
|
516
|
+
API_KEY=$(grep "^PARALLEL_API_KEY=" .env.local | cut -d= -f2)
|
|
517
|
+
curl -s -X POST "https://api.parallel.ai/v1beta/search" \
|
|
518
|
+
-H "x-api-key: $API_KEY" \
|
|
519
|
+
-H "Content-Type: application/json" \
|
|
520
|
+
-H "parallel-beta: search-extract-2025-10-10" \
|
|
521
|
+
-d '{"objective": "test query"}'
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
**Pricing**: Pay-as-you-go
|
|
525
|
+
**Alternative**: Manual web search (FREE)
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
## Environment Variables
|
|
530
|
+
|
|
531
|
+
### Configuration File
|
|
532
|
+
|
|
533
|
+
Create `.env.local` in your project root:
|
|
534
|
+
|
|
535
|
+
```bash
|
|
536
|
+
# .env.local (add to .gitignore!)
|
|
537
|
+
|
|
538
|
+
# ===== TOOL SELECTION =====
|
|
539
|
+
CODE_REVIEW_TOOL=github-code-quality # or: coderabbit, greptile, none
|
|
540
|
+
CODE_QUALITY_TOOL=eslint # or: sonarcloud, sonarqube, none
|
|
541
|
+
|
|
542
|
+
# ===== REQUIRED: GitHub =====
|
|
543
|
+
GITHUB_TOKEN=ghp_xxxxxxxxxxxx
|
|
544
|
+
|
|
545
|
+
# ===== OPTIONAL: Research =====
|
|
546
|
+
PARALLEL_API_KEY=your-parallel-ai-key
|
|
547
|
+
|
|
548
|
+
# ===== OPTIONAL: Code Review (Greptile) =====
|
|
549
|
+
GREPTILE_API_KEY=your-greptile-key
|
|
550
|
+
|
|
551
|
+
# ===== OPTIONAL: Code Quality (SonarCloud) =====
|
|
552
|
+
SONAR_TOKEN=your-sonarcloud-token
|
|
553
|
+
SONAR_ORGANIZATION=your-org
|
|
554
|
+
SONAR_PROJECT_KEY=your-project
|
|
555
|
+
|
|
556
|
+
# ===== OPTIONAL: Code Quality (SonarQube) =====
|
|
557
|
+
SONARQUBE_URL=http://localhost:9000
|
|
558
|
+
SONARQUBE_TOKEN=your-token
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
### Loading Variables
|
|
562
|
+
|
|
563
|
+
**Forge includes a helper**:
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
# Load all variables
|
|
567
|
+
source .claude/scripts/load-env.sh
|
|
568
|
+
|
|
569
|
+
# Or manually
|
|
570
|
+
export $(grep -v '^#' .env.local | xargs)
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
**In Claude Code** (automatic):
|
|
574
|
+
Variables are loaded when running commands.
|
|
575
|
+
|
|
576
|
+
**Security**:
|
|
577
|
+
```bash
|
|
578
|
+
# Add to .gitignore
|
|
579
|
+
echo ".env.local" >> .gitignore
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
---
|
|
583
|
+
|
|
584
|
+
## Directory Structure After Setup
|
|
585
|
+
|
|
586
|
+
```
|
|
587
|
+
your-project/
|
|
588
|
+
├── AGENTS.md # Universal (always created)
|
|
589
|
+
├── CLAUDE.md # If Claude selected
|
|
590
|
+
├── GEMINI.md # If Antigravity selected
|
|
591
|
+
├── .cursorrules # If Cursor selected
|
|
592
|
+
├── .windsurfrules # If Windsurf selected
|
|
593
|
+
├── .clinerules # If Cline/Roo selected
|
|
594
|
+
│
|
|
595
|
+
├── .claude/ # Claude Code files
|
|
596
|
+
│ ├── commands/ # 9 workflow commands
|
|
597
|
+
│ ├── rules/workflow.md
|
|
598
|
+
│ ├── skills/forge-workflow/
|
|
599
|
+
│ └── scripts/load-env.sh
|
|
600
|
+
│
|
|
601
|
+
├── .cursor/ # Cursor files
|
|
602
|
+
│ ├── rules/forge-workflow.mdc
|
|
603
|
+
│ └── skills/forge-workflow/
|
|
604
|
+
│
|
|
605
|
+
├── .windsurf/ # Windsurf files
|
|
606
|
+
│ ├── workflows/
|
|
607
|
+
│ └── skills/forge-workflow/
|
|
608
|
+
│
|
|
609
|
+
├── docs/
|
|
610
|
+
│ ├── WORKFLOW.md # Complete guide
|
|
611
|
+
│ ├── TOOLCHAIN.md # Tool reference
|
|
612
|
+
│ ├── SETUP.md # This file
|
|
613
|
+
│ ├── EXAMPLES.md # Real examples
|
|
614
|
+
│ ├── planning/PROGRESS.md # Progress tracking
|
|
615
|
+
│ └── research/TEMPLATE.md # Research template
|
|
616
|
+
│
|
|
617
|
+
├── .beads/ # If Beads installed
|
|
618
|
+
│ ├── issues.jsonl
|
|
619
|
+
│ ├── config.yaml
|
|
620
|
+
│ └── .gitignore
|
|
621
|
+
│
|
|
622
|
+
├── openspec/ # If OpenSpec installed
|
|
623
|
+
│ ├── specs/
|
|
624
|
+
│ ├── changes/
|
|
625
|
+
│ └── archive/
|
|
626
|
+
│
|
|
627
|
+
└── .env.local # Your configuration (add to .gitignore!)
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
---
|
|
631
|
+
|
|
632
|
+
## Troubleshooting
|
|
633
|
+
|
|
634
|
+
### "Command not found: npx forge"
|
|
635
|
+
|
|
636
|
+
```bash
|
|
637
|
+
# Ensure forge-workflow is installed
|
|
638
|
+
npm list forge-workflow
|
|
639
|
+
|
|
640
|
+
# If not, install
|
|
641
|
+
npm install forge-workflow
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
### "Permission denied: gh"
|
|
645
|
+
|
|
646
|
+
```bash
|
|
647
|
+
# Authenticate GitHub CLI
|
|
648
|
+
gh auth login
|
|
649
|
+
|
|
650
|
+
# Or check status
|
|
651
|
+
gh auth status
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
### "Beads: command not found"
|
|
655
|
+
|
|
656
|
+
```bash
|
|
657
|
+
# Install globally
|
|
658
|
+
npm install -g @beads/bd
|
|
659
|
+
|
|
660
|
+
# Verify
|
|
661
|
+
bd --version
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
### "OpenSpec requires Node.js 20.19+"
|
|
665
|
+
|
|
666
|
+
```bash
|
|
667
|
+
# Check version
|
|
668
|
+
node --version
|
|
669
|
+
|
|
670
|
+
# Upgrade Node.js
|
|
671
|
+
# macOS: brew upgrade node
|
|
672
|
+
# Windows: Download from nodejs.org
|
|
673
|
+
# Linux: Use nvm
|
|
674
|
+
```
|
|
675
|
+
|
|
676
|
+
### "SonarQube connection refused"
|
|
677
|
+
|
|
678
|
+
```bash
|
|
679
|
+
# Check if SonarQube is running
|
|
680
|
+
docker ps | grep sonarqube
|
|
681
|
+
|
|
682
|
+
# If not, start it
|
|
683
|
+
docker start sonarqube
|
|
684
|
+
|
|
685
|
+
# Or run fresh
|
|
686
|
+
docker run -d --name sonarqube -p 9000:9000 sonarqube:community
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
### "Greptile API rate limit"
|
|
690
|
+
|
|
691
|
+
**Wait** for rate limit to reset (usually 1 minute).
|
|
692
|
+
|
|
693
|
+
**Or upgrade** to higher tier at https://greptile.com/pricing
|
|
694
|
+
|
|
695
|
+
### "Parallel AI API key invalid"
|
|
696
|
+
|
|
697
|
+
```bash
|
|
698
|
+
# Verify key in .env.local
|
|
699
|
+
grep PARALLEL_API_KEY .env.local
|
|
700
|
+
|
|
701
|
+
# Test key
|
|
702
|
+
curl -s -X POST "https://api.parallel.ai/v1beta/search" \
|
|
703
|
+
-H "x-api-key: YOUR_KEY" \
|
|
704
|
+
-H "Content-Type: application/json" \
|
|
705
|
+
-H "parallel-beta: search-extract-2025-10-10" \
|
|
706
|
+
-d '{"objective": "test"}'
|
|
707
|
+
```
|
|
708
|
+
|
|
709
|
+
---
|
|
710
|
+
|
|
711
|
+
## Next Steps
|
|
712
|
+
|
|
713
|
+
✅ Setup complete? Try your [first feature](../QUICKSTART.md)
|
|
714
|
+
|
|
715
|
+
📖 Learn the workflow in [WORKFLOW.md](WORKFLOW.md)
|
|
716
|
+
|
|
717
|
+
🛠️ Explore toolchain in [TOOLCHAIN.md](TOOLCHAIN.md)
|
|
718
|
+
|
|
719
|
+
🎯 See examples in [EXAMPLES.md](EXAMPLES.md)
|
|
720
|
+
|
|
721
|
+
---
|
|
722
|
+
|
|
723
|
+
**Questions?** → [GitHub Discussions](https://github.com/harshanandak/forge/discussions)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forge-workflow",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "9-stage TDD workflow for ALL AI coding agents (Claude, Cursor, Windsurf, Kilo, OpenCode, Copilot, Cline, Roo, Aider, Continue, Antigravity)",
|
|
5
5
|
"bin": {
|
|
6
6
|
"forge": "bin/forge.js"
|