forge-workflow 1.0.0 → 1.1.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/commands/status.md +1 -1
- package/.claude/settings.local.json +14 -0
- package/AGENTS.md +217 -0
- package/README.md +786 -131
- package/bin/forge.js +1846 -115
- package/docs/TOOLCHAIN.md +760 -0
- package/install.sh +1036 -62
- package/package.json +22 -9
|
@@ -0,0 +1,760 @@
|
|
|
1
|
+
# Forge Toolchain Reference
|
|
2
|
+
|
|
3
|
+
Complete reference for all tools integrated with the Forge workflow.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
9
|
+
│ FORGE TOOLCHAIN │
|
|
10
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
11
|
+
│ │
|
|
12
|
+
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
|
|
13
|
+
│ │ BEADS │ │ OPENSPEC │ │ EXTERNAL SERVICES │ │
|
|
14
|
+
│ │ (bd) │ │ (opsx) │ │ │ │
|
|
15
|
+
│ │ │ │ │ │ Parallel AI │ │
|
|
16
|
+
│ │ Git-backed │ │ Spec-driven │ │ Greptile │ │
|
|
17
|
+
│ │ Issue │ │ Development │ │ SonarCloud │ │
|
|
18
|
+
│ │ Tracking │ │ │ │ GitHub CLI │ │
|
|
19
|
+
│ └─────────────┘ └─────────────┘ └─────────────────────┘ │
|
|
20
|
+
│ │ │ │ │
|
|
21
|
+
│ └─────────────────┴─────────────────────┘ │
|
|
22
|
+
│ │ │
|
|
23
|
+
│ ┌─────▼─────┐ │
|
|
24
|
+
│ │ FORGE │ │
|
|
25
|
+
│ │ 9-Stage │ │
|
|
26
|
+
│ │ Workflow │ │
|
|
27
|
+
│ └───────────┘ │
|
|
28
|
+
│ │
|
|
29
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Beads - Git-Backed Issue Tracking
|
|
35
|
+
|
|
36
|
+
**Package**: `@beads/bd`
|
|
37
|
+
**Repository**: [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
|
|
38
|
+
**Purpose**: Distributed issue tracking designed for AI coding agents
|
|
39
|
+
|
|
40
|
+
### Why Beads?
|
|
41
|
+
|
|
42
|
+
- **Persists across sessions** - Issues survive context clearing, compaction, new chats
|
|
43
|
+
- **Git-backed** - Version controlled, mergeable, team-shareable
|
|
44
|
+
- **Dependency tracking** - Know what blocks what
|
|
45
|
+
- **Ready detection** - `bd ready` finds unblocked work automatically
|
|
46
|
+
- **AI-optimized** - JSON output, semantic compaction, audit trails
|
|
47
|
+
|
|
48
|
+
### Installation
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# npm (recommended)
|
|
52
|
+
npm install -g @beads/bd
|
|
53
|
+
|
|
54
|
+
# Or with bunx (no global install)
|
|
55
|
+
bunx @beads/bd init
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### File Structure
|
|
59
|
+
|
|
60
|
+
After `bd init`, creates `.beads/` directory:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
.beads/
|
|
64
|
+
├── issues.jsonl # Issue data (git-tracked, one JSON per line)
|
|
65
|
+
├── beads.db # SQLite cache (git-ignored, fast queries)
|
|
66
|
+
├── metadata.json # Database metadata
|
|
67
|
+
├── config.yaml # User configuration
|
|
68
|
+
├── interactions.jsonl # Agent audit log
|
|
69
|
+
└── .gitignore # Ignores beads.db
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Dual-database architecture**: JSONL for git versioning, SQLite for fast local queries. Background daemon keeps them in sync.
|
|
73
|
+
|
|
74
|
+
### Complete Command Reference
|
|
75
|
+
|
|
76
|
+
#### Initialization
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
bd init # Initialize in project
|
|
80
|
+
bd init --stealth # Local-only (don't commit to repo)
|
|
81
|
+
bd init --contributor # Contributor mode
|
|
82
|
+
bd init --prefix PROJ # Custom issue prefix (PROJ-xxx)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
#### Issue Management
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Create issues
|
|
89
|
+
bd create "Title" # Basic issue
|
|
90
|
+
bd create "Title" --type feature # With type (feature, bug, chore, etc.)
|
|
91
|
+
bd create "Title" --priority 1 # With priority (0=critical, 4=backlog)
|
|
92
|
+
bd create "Title" -p 0 -l "urgent,backend" # P0 with labels
|
|
93
|
+
|
|
94
|
+
# View issues
|
|
95
|
+
bd show <id> # Detailed view with audit trail
|
|
96
|
+
bd list # All issues
|
|
97
|
+
bd list --status open # Filter by status
|
|
98
|
+
bd list --priority 1 # Filter by priority
|
|
99
|
+
bd list --assignee bob # Filter by assignee
|
|
100
|
+
bd list --label bug # Filter by label (AND logic)
|
|
101
|
+
bd list --label-any bug,urgent # Filter by label (OR logic)
|
|
102
|
+
bd list --type feature # Filter by type
|
|
103
|
+
bd list --title-contains "auth" # Search titles
|
|
104
|
+
bd list --limit 10 # Limit results
|
|
105
|
+
|
|
106
|
+
# Update issues
|
|
107
|
+
bd update <id> --status in_progress # Change status
|
|
108
|
+
bd update <id> --priority 2 # Change priority
|
|
109
|
+
bd update <id> --assignee bob # Assign
|
|
110
|
+
bd update <id> --title "New title" # Update title
|
|
111
|
+
bd update <id> --description "..." # Update description
|
|
112
|
+
bd update <id> --notes "..." # Add notes
|
|
113
|
+
bd update <id> --label-add urgent # Add label
|
|
114
|
+
|
|
115
|
+
# Complete issues
|
|
116
|
+
bd close <id> # Close single issue
|
|
117
|
+
bd close <id1> <id2> <id3> # Close multiple (efficient)
|
|
118
|
+
bd close <id> --reason "Completed auth" # Close with reason
|
|
119
|
+
bd delete <id> # Delete issue
|
|
120
|
+
bd delete <id> --cascade # Delete with dependents
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
#### Workflow Commands
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Find work
|
|
127
|
+
bd ready # Issues with NO open blockers (start here!)
|
|
128
|
+
bd ready --priority 1 # Filter ready work by priority
|
|
129
|
+
bd blocked # Issues that ARE blocked
|
|
130
|
+
|
|
131
|
+
# Dependencies
|
|
132
|
+
bd dep add <child> <parent> # child depends on parent (blocks)
|
|
133
|
+
bd dep add <child> <parent> --type related # Soft reference (no blocking)
|
|
134
|
+
bd dep add <child> <parent> --type parent-child # Hierarchical
|
|
135
|
+
bd dep remove <child> <parent> # Remove dependency
|
|
136
|
+
bd dep tree <id> # Visualize dependency tree
|
|
137
|
+
bd dep cycles # Detect cycles
|
|
138
|
+
|
|
139
|
+
# Comments
|
|
140
|
+
bd comments <id> # View comments
|
|
141
|
+
bd comments <id> "Comment text" # Add comment
|
|
142
|
+
|
|
143
|
+
# Git sync
|
|
144
|
+
bd sync # Export to JSONL, commit, push
|
|
145
|
+
bd sync --status # Check sync status
|
|
146
|
+
bd hooks install # Install git hooks for auto-sync
|
|
147
|
+
|
|
148
|
+
# Maintenance
|
|
149
|
+
bd stats # Project statistics
|
|
150
|
+
bd doctor # Check for issues
|
|
151
|
+
bd admin compact --days 90 # Compact old closed issues
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
#### Issue Statuses
|
|
155
|
+
|
|
156
|
+
- `open` - Not started
|
|
157
|
+
- `in_progress` - Being worked on
|
|
158
|
+
- `blocked` - Waiting on something
|
|
159
|
+
- `completed` - Done
|
|
160
|
+
- `on_hold` - Paused
|
|
161
|
+
- `cancelled` - Won't do
|
|
162
|
+
|
|
163
|
+
#### Priority Levels
|
|
164
|
+
|
|
165
|
+
| Priority | Meaning | Usage |
|
|
166
|
+
|----------|---------|-------|
|
|
167
|
+
| 0 (P0) | Critical | Drop everything, fix now |
|
|
168
|
+
| 1 (P1) | High | Do this sprint |
|
|
169
|
+
| 2 (P2) | Medium | Planned work |
|
|
170
|
+
| 3 (P3) | Low | Nice to have |
|
|
171
|
+
| 4 (P4) | Backlog | Someday/maybe |
|
|
172
|
+
|
|
173
|
+
#### Dependency Types
|
|
174
|
+
|
|
175
|
+
| Type | Blocks Ready? | Use Case |
|
|
176
|
+
|------|---------------|----------|
|
|
177
|
+
| `blocks` | YES | Hard dependency |
|
|
178
|
+
| `related` | NO | Soft reference |
|
|
179
|
+
| `parent-child` | YES | Hierarchy |
|
|
180
|
+
| `discovered-from` | NO | Found during work |
|
|
181
|
+
|
|
182
|
+
### Session Workflow
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
# Start of session
|
|
186
|
+
bd ready # What can I work on?
|
|
187
|
+
bd show <id> # Review the issue
|
|
188
|
+
bd update <id> --status in_progress
|
|
189
|
+
|
|
190
|
+
# During work
|
|
191
|
+
bd comments <id> "Progress update"
|
|
192
|
+
bd update <id> --notes "Found edge case"
|
|
193
|
+
|
|
194
|
+
# End of session
|
|
195
|
+
bd close <id> # If done, or:
|
|
196
|
+
bd update <id> --status blocked --comment "Needs API response"
|
|
197
|
+
bd sync # Always sync at end!
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## OpenSpec - Spec-Driven Development
|
|
203
|
+
|
|
204
|
+
**Package**: `@fission-ai/openspec`
|
|
205
|
+
**Repository**: [github.com/Fission-AI/OpenSpec](https://github.com/Fission-AI/OpenSpec)
|
|
206
|
+
**Website**: [openspec.dev](https://openspec.dev)
|
|
207
|
+
**Purpose**: Structured specifications for AI-assisted development
|
|
208
|
+
|
|
209
|
+
### Why OpenSpec?
|
|
210
|
+
|
|
211
|
+
- **Specs before code** - AI reads requirements, not just vibes
|
|
212
|
+
- **Non-linear workflow** - Commands execute in any order
|
|
213
|
+
- **Git-native** - Specs versioned like code
|
|
214
|
+
- **Multi-agent** - Works with 21+ AI tools
|
|
215
|
+
- **Zero dependencies** - No API keys, no external services
|
|
216
|
+
|
|
217
|
+
### Installation
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# npm (requires Node.js 20.19+)
|
|
221
|
+
npm install -g @fission-ai/openspec
|
|
222
|
+
|
|
223
|
+
# Or with bunx
|
|
224
|
+
bunx @fission-ai/openspec init
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### File Structure
|
|
228
|
+
|
|
229
|
+
After `openspec init`:
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
openspec/
|
|
233
|
+
├── specs/
|
|
234
|
+
│ └── [domain]/
|
|
235
|
+
│ └── spec.md # Source of truth for each domain
|
|
236
|
+
│
|
|
237
|
+
├── changes/
|
|
238
|
+
│ ├── [change-name]/
|
|
239
|
+
│ │ ├── proposal.md # Intent, scope, rationale
|
|
240
|
+
│ │ ├── design.md # Technical approach
|
|
241
|
+
│ │ ├── tasks.md # Implementation checklist
|
|
242
|
+
│ │ └── specs/
|
|
243
|
+
│ │ └── [domain]/
|
|
244
|
+
│ │ └── spec.md # Delta specifications
|
|
245
|
+
│ └── archive/ # Completed changes
|
|
246
|
+
│
|
|
247
|
+
├── schemas/
|
|
248
|
+
│ └── default.yaml # Workflow schema
|
|
249
|
+
│
|
|
250
|
+
└── config.yaml # Project configuration
|
|
251
|
+
|
|
252
|
+
.agent/
|
|
253
|
+
└── AGENTS.md # AI instructions
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### CLI Commands
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
# Setup
|
|
260
|
+
openspec init [path] # Initialize OpenSpec
|
|
261
|
+
openspec update # Update after CLI upgrade
|
|
262
|
+
|
|
263
|
+
# Browse
|
|
264
|
+
openspec list # Display changes/specs
|
|
265
|
+
openspec view # Interactive terminal dashboard
|
|
266
|
+
openspec show [name] # Show detailed content
|
|
267
|
+
openspec status # Artifact completion progress
|
|
268
|
+
|
|
269
|
+
# Validation
|
|
270
|
+
openspec validate [name] # Check structural integrity
|
|
271
|
+
openspec validate --strict # Strict validation
|
|
272
|
+
|
|
273
|
+
# Lifecycle
|
|
274
|
+
openspec sync # Merge delta specs into main specs
|
|
275
|
+
openspec archive [name] # Finalize completed changes
|
|
276
|
+
|
|
277
|
+
# Schema
|
|
278
|
+
openspec schema init # Create new schema
|
|
279
|
+
openspec schema fork # Fork existing schema
|
|
280
|
+
openspec schema validate # Validate schema
|
|
281
|
+
openspec schemas # List available schemas
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### AI Slash Commands (Claude Code, Cursor, Windsurf)
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
/opsx:explore # Think through ideas, investigate
|
|
288
|
+
/opsx:new # Start a new change initiative
|
|
289
|
+
/opsx:continue # Create next artifact (incremental)
|
|
290
|
+
/opsx:ff # Fast-forward: generate all planning artifacts
|
|
291
|
+
/opsx:apply # Implement tasks
|
|
292
|
+
/opsx:sync # Merge delta specs into main specs
|
|
293
|
+
/opsx:archive # Mark change complete
|
|
294
|
+
/opsx:verify # Validate implementation matches specs
|
|
295
|
+
/opsx:onboard # Interactive tutorial
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### Spec Format
|
|
299
|
+
|
|
300
|
+
OpenSpec uses structured markdown with normative language:
|
|
301
|
+
|
|
302
|
+
```markdown
|
|
303
|
+
# Authentication Specification
|
|
304
|
+
|
|
305
|
+
## Purpose
|
|
306
|
+
Enable secure user identity verification and session management
|
|
307
|
+
|
|
308
|
+
## Requirements
|
|
309
|
+
|
|
310
|
+
### Requirement: Session Token Validation
|
|
311
|
+
The system SHALL validate session tokens on every request
|
|
312
|
+
|
|
313
|
+
#### Scenario: Valid Session
|
|
314
|
+
- **GIVEN** user has authenticated
|
|
315
|
+
- **WHEN** request includes valid session token
|
|
316
|
+
- **THEN** process the request
|
|
317
|
+
- **AND** update token expiration time
|
|
318
|
+
|
|
319
|
+
#### Scenario: Expired Session
|
|
320
|
+
- **GIVEN** user had authenticated but 24 hours have passed
|
|
321
|
+
- **WHEN** request includes expired session token
|
|
322
|
+
- **THEN** invalidate the token
|
|
323
|
+
- **AND** redirect to login
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Delta Format
|
|
327
|
+
|
|
328
|
+
Changes use ADDED/MODIFIED/REMOVED notation:
|
|
329
|
+
|
|
330
|
+
```markdown
|
|
331
|
+
# Delta for Authentication
|
|
332
|
+
|
|
333
|
+
## ADDED Requirements
|
|
334
|
+
### Requirement: Two-Factor Authentication
|
|
335
|
+
The system SHALL support optional 2FA
|
|
336
|
+
|
|
337
|
+
#### Scenario: 2FA Enrollment
|
|
338
|
+
- **GIVEN** user enables 2FA in settings
|
|
339
|
+
- **WHEN** they scan QR code with authenticator app
|
|
340
|
+
- **THEN** 2FA is activated for their account
|
|
341
|
+
|
|
342
|
+
## MODIFIED Requirements
|
|
343
|
+
### Requirement: Session Token Validation
|
|
344
|
+
[Updated content here]
|
|
345
|
+
|
|
346
|
+
## REMOVED Requirements
|
|
347
|
+
### Requirement: Remember Me Cookie
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### When to Use OpenSpec
|
|
351
|
+
|
|
352
|
+
| Scope | Use OpenSpec? | Example |
|
|
353
|
+
|-------|---------------|---------|
|
|
354
|
+
| **Tactical** (< 1 day) | No | Bug fix, small feature |
|
|
355
|
+
| **Strategic** (architecture) | Yes | New service, API redesign |
|
|
356
|
+
| **Breaking changes** | Yes | Schema migrations |
|
|
357
|
+
| **Multi-session work** | Yes | Large features |
|
|
358
|
+
|
|
359
|
+
### Workflow Example
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
# 1. Start new change
|
|
363
|
+
/opsx:new
|
|
364
|
+
# Describe: "Add payment processing with Stripe"
|
|
365
|
+
# Select schema: default
|
|
366
|
+
|
|
367
|
+
# 2. Generate all planning docs
|
|
368
|
+
/opsx:ff
|
|
369
|
+
# Creates: proposal.md, design.md, tasks.md, specs/
|
|
370
|
+
|
|
371
|
+
# 3. Implement
|
|
372
|
+
/opsx:apply
|
|
373
|
+
# AI writes code following tasks.md
|
|
374
|
+
|
|
375
|
+
# 4. Verify
|
|
376
|
+
/opsx:verify
|
|
377
|
+
# Confirms implementation matches specs
|
|
378
|
+
|
|
379
|
+
# 5. Finalize
|
|
380
|
+
/opsx:sync # Merge deltas into main specs
|
|
381
|
+
/opsx:archive # Move to archive
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## MCP Servers
|
|
387
|
+
|
|
388
|
+
### Context7 - Library Documentation
|
|
389
|
+
|
|
390
|
+
**Package**: `@upstash/context7-mcp@latest`
|
|
391
|
+
**Purpose**: Up-to-date documentation and code examples for any programming library
|
|
392
|
+
**Used in**: `/research` stage, any library lookup
|
|
393
|
+
|
|
394
|
+
Context7 provides current documentation that may be more recent than the AI's training data.
|
|
395
|
+
|
|
396
|
+
**Installation (Claude Code)**:
|
|
397
|
+
|
|
398
|
+
Add to `.mcp.json` in your project root:
|
|
399
|
+
|
|
400
|
+
```json
|
|
401
|
+
{
|
|
402
|
+
"mcpServers": {
|
|
403
|
+
"context7": {
|
|
404
|
+
"command": "npx",
|
|
405
|
+
"args": ["-y", "@upstash/context7-mcp@latest"]
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
**Or with bunx**:
|
|
412
|
+
```json
|
|
413
|
+
{
|
|
414
|
+
"mcpServers": {
|
|
415
|
+
"context7": {
|
|
416
|
+
"command": "bunx",
|
|
417
|
+
"args": ["--bun", "@upstash/context7-mcp@latest"]
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
**Usage**:
|
|
424
|
+
```
|
|
425
|
+
# The AI will automatically use Context7 when you ask about libraries
|
|
426
|
+
"How do I use React Query's useMutation hook?"
|
|
427
|
+
"What's the latest Next.js App Router API?"
|
|
428
|
+
"Show me Supabase RLS policy examples"
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
**When to use Context7**:
|
|
432
|
+
- Before implementing a library feature
|
|
433
|
+
- When official docs may have changed since AI training
|
|
434
|
+
- To verify API signatures and patterns
|
|
435
|
+
- For current best practices
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## External Services
|
|
440
|
+
|
|
441
|
+
### Parallel AI - Web Research
|
|
442
|
+
|
|
443
|
+
**Website**: [platform.parallel.ai](https://platform.parallel.ai)
|
|
444
|
+
**Used in**: `/research` stage
|
|
445
|
+
|
|
446
|
+
4 APIs for research:
|
|
447
|
+
- **Search** - Web search with AI analysis
|
|
448
|
+
- **Extract** - Scrape specific URLs
|
|
449
|
+
- **Task** - Structured data enrichment
|
|
450
|
+
- **Deep Research** - Multi-source analysis
|
|
451
|
+
|
|
452
|
+
```bash
|
|
453
|
+
# Setup
|
|
454
|
+
# 1. Get key from https://platform.parallel.ai
|
|
455
|
+
# 2. Add to .env.local
|
|
456
|
+
PARALLEL_API_KEY=your-key
|
|
457
|
+
|
|
458
|
+
# Test
|
|
459
|
+
API_KEY=$(grep "^PARALLEL_API_KEY=" .env.local | cut -d= -f2)
|
|
460
|
+
curl -s -X POST "https://api.parallel.ai/v1beta/search" \
|
|
461
|
+
-H "x-api-key: $API_KEY" \
|
|
462
|
+
-H "Content-Type: application/json" \
|
|
463
|
+
-H "parallel-beta: search-extract-2025-10-10" \
|
|
464
|
+
-d '{"objective": "Next.js authentication best practices 2026"}'
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
---
|
|
468
|
+
|
|
469
|
+
## Code Review Tools
|
|
470
|
+
|
|
471
|
+
Choose ONE code review tool based on your needs:
|
|
472
|
+
|
|
473
|
+
| Tool | Pricing | Best For | Setup |
|
|
474
|
+
|------|---------|----------|-------|
|
|
475
|
+
| **GitHub Code Quality** | FREE | All GitHub repos | Built-in, zero setup |
|
|
476
|
+
| **CodeRabbit** | FREE (OSS) | Open source projects | GitHub App |
|
|
477
|
+
| **Greptile** | $99+/mo | Enterprise | API key |
|
|
478
|
+
|
|
479
|
+
### Option 1: GitHub Code Quality (FREE, Recommended)
|
|
480
|
+
|
|
481
|
+
**Status**: Built-in to GitHub
|
|
482
|
+
**Used in**: `/review` stage
|
|
483
|
+
|
|
484
|
+
Zero setup required - GitHub's code quality features are enabled by default.
|
|
485
|
+
|
|
486
|
+
Features:
|
|
487
|
+
- Automatic code scanning
|
|
488
|
+
- Dependency vulnerability alerts
|
|
489
|
+
- Secret scanning
|
|
490
|
+
- Code navigation
|
|
491
|
+
|
|
492
|
+
### Option 2: CodeRabbit (FREE for Open Source)
|
|
493
|
+
|
|
494
|
+
**Website**: [coderabbit.ai](https://coderabbit.ai)
|
|
495
|
+
**Used in**: `/review` stage
|
|
496
|
+
|
|
497
|
+
AI-powered code review with deep context understanding.
|
|
498
|
+
|
|
499
|
+
```bash
|
|
500
|
+
# Setup
|
|
501
|
+
# 1. Go to https://coderabbit.ai
|
|
502
|
+
# 2. Install the GitHub App
|
|
503
|
+
# 3. Enable for your repositories
|
|
504
|
+
|
|
505
|
+
# Configuration (optional)
|
|
506
|
+
# Create .coderabbit.yaml in repo root
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
### Option 3: Greptile (Paid - Enterprise)
|
|
510
|
+
|
|
511
|
+
**Website**: [greptile.com](https://greptile.com)
|
|
512
|
+
**Used in**: `/review` stage
|
|
513
|
+
|
|
514
|
+
Enterprise-grade AI code review that understands your codebase.
|
|
515
|
+
|
|
516
|
+
```bash
|
|
517
|
+
# Setup
|
|
518
|
+
# 1. Get key from https://app.greptile.com
|
|
519
|
+
# 2. Add to .env.local
|
|
520
|
+
GREPTILE_API_KEY=your-key
|
|
521
|
+
|
|
522
|
+
# 3. Index repository (one-time)
|
|
523
|
+
curl -X POST "https://api.greptile.com/v2/repositories" \
|
|
524
|
+
-H "Authorization: Bearer $GREPTILE_API_KEY" \
|
|
525
|
+
-H "Content-Type: application/json" \
|
|
526
|
+
-d '{"remote": "github", "repository": "owner/repo"}'
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
---
|
|
530
|
+
|
|
531
|
+
## Code Quality Tools
|
|
532
|
+
|
|
533
|
+
Choose ONE code quality scanner based on your needs:
|
|
534
|
+
|
|
535
|
+
| Tool | Pricing | Best For | Requirement |
|
|
536
|
+
|------|---------|----------|-------------|
|
|
537
|
+
| **ESLint** | FREE | All projects | Built-in |
|
|
538
|
+
| **SonarCloud** | 50k LoC free | Cloud-first teams | API key |
|
|
539
|
+
| **SonarQube Community** | FREE | Self-hosted, unlimited | Docker |
|
|
540
|
+
|
|
541
|
+
### Option 1: ESLint Only (FREE, Recommended)
|
|
542
|
+
|
|
543
|
+
**Status**: Built-in
|
|
544
|
+
**Used in**: `/check` stage
|
|
545
|
+
|
|
546
|
+
No external server required - uses your project's linting configuration.
|
|
547
|
+
|
|
548
|
+
```bash
|
|
549
|
+
# Already configured via package.json or eslint.config.js
|
|
550
|
+
npm run lint # or bun run lint
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
### Option 2: SonarCloud (Cloud-Hosted)
|
|
554
|
+
|
|
555
|
+
**Website**: [sonarcloud.io](https://sonarcloud.io)
|
|
556
|
+
**Used in**: `/check` stage
|
|
557
|
+
**Free Tier**: 50,000 lines of code
|
|
558
|
+
|
|
559
|
+
Static analysis for bugs, vulnerabilities, code smells.
|
|
560
|
+
|
|
561
|
+
```bash
|
|
562
|
+
# Setup
|
|
563
|
+
# 1. Create project at https://sonarcloud.io
|
|
564
|
+
# 2. Get token from Security settings
|
|
565
|
+
# 3. Add to .env.local
|
|
566
|
+
SONAR_TOKEN=your-token
|
|
567
|
+
SONAR_ORGANIZATION=your-org
|
|
568
|
+
SONAR_PROJECT_KEY=your-project
|
|
569
|
+
|
|
570
|
+
# 4. Create sonar-project.properties
|
|
571
|
+
echo "sonar.organization=$SONAR_ORGANIZATION
|
|
572
|
+
sonar.projectKey=$SONAR_PROJECT_KEY
|
|
573
|
+
sonar.sources=src" > sonar-project.properties
|
|
574
|
+
|
|
575
|
+
# 5. Run analysis
|
|
576
|
+
npx sonarqube-scanner
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
### Option 3: SonarQube Community (Self-Hosted, FREE)
|
|
580
|
+
|
|
581
|
+
**Website**: [sonarqube.org](https://www.sonarsource.com/products/sonarqube/)
|
|
582
|
+
**Used in**: `/check` stage
|
|
583
|
+
**Pricing**: FREE, unlimited lines of code
|
|
584
|
+
|
|
585
|
+
Self-hosted code quality analysis - no cloud dependency.
|
|
586
|
+
|
|
587
|
+
```bash
|
|
588
|
+
# Setup with Docker
|
|
589
|
+
docker run -d --name sonarqube \
|
|
590
|
+
-p 9000:9000 \
|
|
591
|
+
sonarqube:community
|
|
592
|
+
|
|
593
|
+
# Access at http://localhost:9000
|
|
594
|
+
# Default credentials: admin/admin
|
|
595
|
+
|
|
596
|
+
# Add to .env.local
|
|
597
|
+
SONARQUBE_URL=http://localhost:9000
|
|
598
|
+
SONARQUBE_TOKEN=your-token # Generate in SonarQube UI
|
|
599
|
+
|
|
600
|
+
# Create sonar-project.properties
|
|
601
|
+
echo "sonar.host.url=$SONARQUBE_URL
|
|
602
|
+
sonar.login=$SONARQUBE_TOKEN
|
|
603
|
+
sonar.projectKey=your-project
|
|
604
|
+
sonar.sources=src" > sonar-project.properties
|
|
605
|
+
|
|
606
|
+
# Run analysis
|
|
607
|
+
npx sonarqube-scanner
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
**Docker Compose (Production)**:
|
|
611
|
+
```yaml
|
|
612
|
+
# docker-compose.yml
|
|
613
|
+
version: '3'
|
|
614
|
+
services:
|
|
615
|
+
sonarqube:
|
|
616
|
+
image: sonarqube:community
|
|
617
|
+
ports:
|
|
618
|
+
- "9000:9000"
|
|
619
|
+
environment:
|
|
620
|
+
- SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true
|
|
621
|
+
volumes:
|
|
622
|
+
- sonarqube_data:/opt/sonarqube/data
|
|
623
|
+
- sonarqube_logs:/opt/sonarqube/logs
|
|
624
|
+
|
|
625
|
+
volumes:
|
|
626
|
+
sonarqube_data:
|
|
627
|
+
sonarqube_logs:
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
---
|
|
631
|
+
|
|
632
|
+
### GitHub CLI - PR Workflow
|
|
633
|
+
|
|
634
|
+
**Installation**: [cli.github.com](https://cli.github.com)
|
|
635
|
+
**Used in**: `/ship`, `/review`, `/merge` stages
|
|
636
|
+
|
|
637
|
+
```bash
|
|
638
|
+
# Install
|
|
639
|
+
# macOS: brew install gh
|
|
640
|
+
# Windows: winget install GitHub.cli
|
|
641
|
+
# Linux: sudo apt install gh
|
|
642
|
+
|
|
643
|
+
# Authenticate
|
|
644
|
+
gh auth login
|
|
645
|
+
|
|
646
|
+
# Common commands
|
|
647
|
+
gh pr create --title "..." --body "..."
|
|
648
|
+
gh pr view <number>
|
|
649
|
+
gh pr checks <number>
|
|
650
|
+
gh pr merge <number> --squash --delete-branch
|
|
651
|
+
gh issue create --title "..." --body "..."
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
---
|
|
655
|
+
|
|
656
|
+
## Integration with Forge Stages
|
|
657
|
+
|
|
658
|
+
| Stage | Tools Used |
|
|
659
|
+
|-------|------------|
|
|
660
|
+
| `/status` | `bd ready`, `bd list`, `git status`, `openspec list` |
|
|
661
|
+
| `/research` | Parallel AI, codebase exploration |
|
|
662
|
+
| `/plan` | `bd create`, `openspec` (if strategic), `git checkout -b` |
|
|
663
|
+
| `/dev` | Tests, code, `bd update`, `/tasks save` |
|
|
664
|
+
| `/check` | Type check, lint, tests, SonarCloud |
|
|
665
|
+
| `/ship` | `bd update --status done`, `gh pr create` |
|
|
666
|
+
| `/review` | `gh pr view`, Greptile, SonarCloud |
|
|
667
|
+
| `/merge` | `gh pr merge`, `openspec archive`, `bd sync` |
|
|
668
|
+
| `/verify` | Documentation cross-check |
|
|
669
|
+
|
|
670
|
+
---
|
|
671
|
+
|
|
672
|
+
## Quick Reference Card
|
|
673
|
+
|
|
674
|
+
### Beads (Issue Tracking)
|
|
675
|
+
|
|
676
|
+
```bash
|
|
677
|
+
bd init # Initialize
|
|
678
|
+
bd ready # Find unblocked work
|
|
679
|
+
bd create "Title" # Create issue
|
|
680
|
+
bd show <id> # View details
|
|
681
|
+
bd update <id> --status X # Update status
|
|
682
|
+
bd dep add <a> <b> # a depends on b
|
|
683
|
+
bd close <id> # Complete
|
|
684
|
+
bd sync # Git sync
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
### OpenSpec (Specifications)
|
|
688
|
+
|
|
689
|
+
```bash
|
|
690
|
+
openspec init # Initialize
|
|
691
|
+
/opsx:new # Start change (AI)
|
|
692
|
+
/opsx:ff # Generate all docs (AI)
|
|
693
|
+
/opsx:apply # Implement (AI)
|
|
694
|
+
openspec validate <name> # Validate
|
|
695
|
+
openspec archive <name> # Complete
|
|
696
|
+
```
|
|
697
|
+
|
|
698
|
+
### GitHub CLI
|
|
699
|
+
|
|
700
|
+
```bash
|
|
701
|
+
gh auth login # Authenticate
|
|
702
|
+
gh pr create # Create PR
|
|
703
|
+
gh pr view <n> # View PR
|
|
704
|
+
gh pr checks <n> # Check status
|
|
705
|
+
gh pr merge <n> --squash # Merge
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
---
|
|
709
|
+
|
|
710
|
+
## Troubleshooting
|
|
711
|
+
|
|
712
|
+
### Beads
|
|
713
|
+
|
|
714
|
+
**"bd: command not found"**
|
|
715
|
+
```bash
|
|
716
|
+
npm install -g @beads/bd
|
|
717
|
+
# Or use bunx @beads/bd <command>
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
**"database locked"**
|
|
721
|
+
```bash
|
|
722
|
+
bd sync --force
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
**Issues not showing after git pull**
|
|
726
|
+
```bash
|
|
727
|
+
bd sync # Re-imports from JSONL
|
|
728
|
+
```
|
|
729
|
+
|
|
730
|
+
### OpenSpec
|
|
731
|
+
|
|
732
|
+
**"openspec: command not found"**
|
|
733
|
+
```bash
|
|
734
|
+
npm install -g @fission-ai/openspec
|
|
735
|
+
# Or use bunx @fission-ai/openspec <command>
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
**Validation errors**
|
|
739
|
+
```bash
|
|
740
|
+
openspec validate <name> --verbose
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
### GitHub CLI
|
|
744
|
+
|
|
745
|
+
**"gh: not authenticated"**
|
|
746
|
+
```bash
|
|
747
|
+
gh auth login
|
|
748
|
+
gh auth status
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
---
|
|
752
|
+
|
|
753
|
+
## Resources
|
|
754
|
+
|
|
755
|
+
- **Beads**: [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
|
|
756
|
+
- **OpenSpec**: [openspec.dev](https://openspec.dev) | [github.com/Fission-AI/OpenSpec](https://github.com/Fission-AI/OpenSpec)
|
|
757
|
+
- **Parallel AI**: [platform.parallel.ai](https://platform.parallel.ai)
|
|
758
|
+
- **Greptile**: [greptile.com](https://greptile.com)
|
|
759
|
+
- **SonarCloud**: [sonarcloud.io](https://sonarcloud.io)
|
|
760
|
+
- **GitHub CLI**: [cli.github.com](https://cli.github.com)
|