forge-workflow 0.0.4 → 0.0.6

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 (248) hide show
  1. package/.claude/commands/dev.md +345 -340
  2. package/.claude/commands/plan.md +566 -521
  3. package/.claude/commands/premerge.md +186 -176
  4. package/.claude/commands/research.md +42 -42
  5. package/.claude/commands/review.md +448 -442
  6. package/.claude/commands/rollback.md +721 -721
  7. package/.claude/commands/ship.md +212 -164
  8. package/.claude/commands/sonarcloud.md +152 -152
  9. package/.claude/commands/status.md +90 -48
  10. package/.claude/commands/validate.md +288 -282
  11. package/.claude/commands/verify.md +269 -221
  12. package/.claude/rules/greptile-review-process.md +285 -285
  13. package/.claude/rules/workflow.md +121 -105
  14. package/.claude/scripts/greptile-resolve.sh +558 -526
  15. package/.claude/scripts/load-env.sh +32 -32
  16. package/.cline/workflows/dev.md +342 -337
  17. package/.cline/workflows/plan.md +563 -518
  18. package/.cline/workflows/premerge.md +183 -173
  19. package/.cline/workflows/research.md +39 -39
  20. package/.cline/workflows/review.md +445 -439
  21. package/.cline/workflows/rollback.md +718 -718
  22. package/.cline/workflows/ship.md +209 -161
  23. package/.cline/workflows/sonarcloud.md +146 -146
  24. package/.cline/workflows/status.md +87 -45
  25. package/.cline/workflows/validate.md +285 -279
  26. package/.cline/workflows/verify.md +266 -218
  27. package/.codex/config.toml +11 -11
  28. package/.codex/skills/dev/SKILL.md +345 -340
  29. package/.codex/skills/plan/SKILL.md +566 -521
  30. package/.codex/skills/premerge/SKILL.md +186 -176
  31. package/.codex/skills/research/SKILL.md +42 -42
  32. package/.codex/skills/review/SKILL.md +448 -442
  33. package/.codex/skills/rollback/SKILL.md +721 -721
  34. package/.codex/skills/ship/SKILL.md +212 -164
  35. package/.codex/skills/sonarcloud/SKILL.md +149 -149
  36. package/.codex/skills/status/SKILL.md +90 -48
  37. package/.codex/skills/validate/SKILL.md +288 -282
  38. package/.codex/skills/verify/SKILL.md +269 -221
  39. package/.cursor/commands/dev.md +342 -337
  40. package/.cursor/commands/plan.md +563 -518
  41. package/.cursor/commands/premerge.md +183 -173
  42. package/.cursor/commands/research.md +39 -39
  43. package/.cursor/commands/review.md +445 -439
  44. package/.cursor/commands/rollback.md +718 -718
  45. package/.cursor/commands/ship.md +209 -161
  46. package/.cursor/commands/sonarcloud.md +146 -146
  47. package/.cursor/commands/status.md +87 -45
  48. package/.cursor/commands/validate.md +285 -279
  49. package/.cursor/commands/verify.md +266 -218
  50. package/.cursor/rules/permissions-guidance.mdc +37 -37
  51. package/.forge/hooks/check-tdd.js +240 -240
  52. package/.github/PLUGIN_TEMPLATE.json +32 -32
  53. package/.github/prompts/dev.prompt.md +347 -342
  54. package/.github/prompts/plan.prompt.md +568 -523
  55. package/.github/prompts/premerge.prompt.md +188 -178
  56. package/.github/prompts/research.prompt.md +44 -44
  57. package/.github/prompts/review.prompt.md +450 -444
  58. package/.github/prompts/rollback.prompt.md +723 -723
  59. package/.github/prompts/ship.prompt.md +214 -166
  60. package/.github/prompts/sonarcloud.prompt.md +151 -151
  61. package/.github/prompts/status.prompt.md +92 -50
  62. package/.github/prompts/validate.prompt.md +290 -284
  63. package/.github/prompts/verify.prompt.md +271 -223
  64. package/.github/workflows/beads-to-github.yml +56 -0
  65. package/.github/workflows/github-to-beads.yml +97 -0
  66. package/.kilocode/workflows/dev.md +346 -341
  67. package/.kilocode/workflows/plan.md +567 -522
  68. package/.kilocode/workflows/premerge.md +187 -177
  69. package/.kilocode/workflows/research.md +43 -43
  70. package/.kilocode/workflows/review.md +449 -443
  71. package/.kilocode/workflows/rollback.md +722 -722
  72. package/.kilocode/workflows/ship.md +213 -165
  73. package/.kilocode/workflows/sonarcloud.md +150 -150
  74. package/.kilocode/workflows/status.md +91 -49
  75. package/.kilocode/workflows/validate.md +289 -283
  76. package/.kilocode/workflows/verify.md +270 -222
  77. package/.mcp.json.example +12 -12
  78. package/.opencode/commands/dev.md +345 -340
  79. package/.opencode/commands/plan.md +566 -521
  80. package/.opencode/commands/premerge.md +186 -176
  81. package/.opencode/commands/research.md +42 -42
  82. package/.opencode/commands/review.md +448 -442
  83. package/.opencode/commands/rollback.md +721 -721
  84. package/.opencode/commands/ship.md +212 -164
  85. package/.opencode/commands/sonarcloud.md +149 -149
  86. package/.opencode/commands/status.md +90 -48
  87. package/.opencode/commands/validate.md +288 -282
  88. package/.opencode/commands/verify.md +269 -221
  89. package/.roo/commands/dev.md +346 -341
  90. package/.roo/commands/plan.md +567 -522
  91. package/.roo/commands/premerge.md +187 -177
  92. package/.roo/commands/research.md +43 -43
  93. package/.roo/commands/review.md +449 -443
  94. package/.roo/commands/rollback.md +722 -722
  95. package/.roo/commands/ship.md +213 -165
  96. package/.roo/commands/sonarcloud.md +150 -150
  97. package/.roo/commands/status.md +91 -49
  98. package/.roo/commands/validate.md +289 -283
  99. package/.roo/commands/verify.md +270 -222
  100. package/AGENTS.md +272 -175
  101. package/CLAUDE.md +110 -100
  102. package/README.md +429 -416
  103. package/bin/forge-cmd.js +317 -313
  104. package/bin/forge-preflight.js +322 -309
  105. package/bin/forge.js +4765 -4303
  106. package/docs/AGENT_INSTALL_PROMPT.md +342 -342
  107. package/docs/BEADS_GITHUB_SYNC.md +251 -251
  108. package/docs/ENHANCED_ONBOARDING.md +612 -602
  109. package/docs/EXAMPLES.md +482 -482
  110. package/docs/GREPTILE_SETUP.md +400 -400
  111. package/docs/MANUAL_REVIEW_GUIDE.md +106 -106
  112. package/docs/ROADMAP.md +359 -359
  113. package/docs/SETUP.md +663 -631
  114. package/docs/TOOLCHAIN.md +653 -630
  115. package/docs/VALIDATION.md +363 -363
  116. package/install.sh +40 -1056
  117. package/lefthook.yml +50 -39
  118. package/lib/agents/README.md +198 -198
  119. package/lib/agents/claude.plugin.json +28 -28
  120. package/lib/agents/cline.plugin.json +22 -22
  121. package/lib/agents/codex.plugin.json +19 -19
  122. package/lib/agents/copilot.plugin.json +24 -24
  123. package/lib/agents/cursor.plugin.json +25 -25
  124. package/lib/agents/kilocode.plugin.json +22 -22
  125. package/lib/agents/opencode.plugin.json +20 -20
  126. package/lib/agents/roo.plugin.json +23 -23
  127. package/lib/agents-config.js +2112 -2112
  128. package/lib/beads-health-check.js +143 -0
  129. package/lib/beads-setup.js +341 -0
  130. package/lib/beads-sync-scaffold.js +260 -0
  131. package/lib/commands/_registry.js +134 -0
  132. package/lib/commands/clean.js +181 -0
  133. package/lib/commands/dev.js +571 -513
  134. package/lib/commands/plan.js +692 -692
  135. package/lib/commands/push.js +196 -0
  136. package/lib/commands/recommend.js +119 -119
  137. package/lib/commands/ship.js +377 -377
  138. package/lib/commands/status.js +378 -378
  139. package/lib/commands/sync.js +55 -0
  140. package/lib/commands/team.js +37 -0
  141. package/lib/commands/test.js +207 -0
  142. package/lib/commands/validate.js +602 -602
  143. package/lib/commands/worktree.js +310 -0
  144. package/lib/context-merge.js +359 -359
  145. package/lib/dep-guard/analyzer.js +294 -294
  146. package/lib/dep-guard/behavior-detector.js +98 -98
  147. package/lib/dep-guard/contract-detector.js +162 -162
  148. package/lib/dep-guard/import-detector.js +498 -498
  149. package/lib/dep-guard/path-utils.js +13 -13
  150. package/lib/dep-guard/rubric.js +120 -120
  151. package/lib/dep-guard/task-parser.js +318 -318
  152. package/lib/detect-agent.js +191 -191
  153. package/lib/detect-worktree.js +47 -47
  154. package/lib/docs-command.js +51 -0
  155. package/lib/docs-copy.js +50 -0
  156. package/lib/file-hash.js +26 -26
  157. package/lib/freshness-token.js +148 -0
  158. package/lib/greptile-match.js +80 -0
  159. package/lib/husky-migration.js +450 -0
  160. package/lib/lefthook-check.js +65 -0
  161. package/lib/pat-setup.js +207 -0
  162. package/lib/plugin-catalog.js +350 -350
  163. package/lib/plugin-manager.js +166 -166
  164. package/lib/plugin-recommender.js +141 -141
  165. package/lib/project-discovery.js +491 -491
  166. package/lib/reset.js +309 -0
  167. package/lib/setup-action-log.js +139 -139
  168. package/lib/setup-summary-renderer.js +106 -106
  169. package/lib/setup-utils.js +96 -0
  170. package/lib/setup.js +192 -192
  171. package/lib/smart-merge.js +64 -0
  172. package/lib/symlink-utils.js +81 -0
  173. package/lib/task-ownership.js +117 -0
  174. package/lib/workflow-profiles.js +197 -197
  175. package/package.json +131 -128
  176. package/scripts/beads-context.sh +426 -0
  177. package/scripts/beads-context.test.js +567 -0
  178. package/scripts/behavioral-judge.sh +378 -0
  179. package/scripts/benchmark.js +85 -0
  180. package/scripts/branch-protection.js +183 -0
  181. package/scripts/check-agents.js +172 -0
  182. package/scripts/check-forge-token.js +98 -0
  183. package/scripts/commitlint.js +42 -0
  184. package/scripts/conflict-detect.sh +323 -0
  185. package/scripts/dep-guard-analyze.js +71 -0
  186. package/scripts/dep-guard.sh +789 -0
  187. package/scripts/eval_win.py +249 -0
  188. package/scripts/file-index.sh +493 -0
  189. package/scripts/forge-team/index.sh +86 -0
  190. package/scripts/forge-team/lib/agent-prompt.sh +52 -0
  191. package/scripts/forge-team/lib/claim.sh +256 -0
  192. package/scripts/forge-team/lib/dashboard.sh +341 -0
  193. package/scripts/forge-team/lib/epic.sh +332 -0
  194. package/scripts/forge-team/lib/hooks.sh +253 -0
  195. package/scripts/forge-team/lib/identity.sh +235 -0
  196. package/scripts/forge-team/lib/sync-github.sh +317 -0
  197. package/scripts/forge-team/lib/verify.sh +284 -0
  198. package/scripts/forge-team/lib/workload.sh +296 -0
  199. package/scripts/forge-team/tests/agent-prompt.test.sh +72 -0
  200. package/scripts/forge-team/tests/claim.test.sh +179 -0
  201. package/scripts/forge-team/tests/dashboard.test.sh +170 -0
  202. package/scripts/forge-team/tests/dispatcher.test.sh +79 -0
  203. package/scripts/forge-team/tests/epic.test.sh +176 -0
  204. package/scripts/forge-team/tests/hooks.test.sh +239 -0
  205. package/scripts/forge-team/tests/identity.test.sh +176 -0
  206. package/scripts/forge-team/tests/integration.test.sh +371 -0
  207. package/scripts/forge-team/tests/sync-github.test.sh +209 -0
  208. package/scripts/forge-team/tests/verify.test.sh +314 -0
  209. package/scripts/forge-team/tests/workflow-integration.test.sh +43 -0
  210. package/scripts/forge-team/tests/workload.test.sh +209 -0
  211. package/scripts/github-beads-sync/comment.mjs +64 -0
  212. package/scripts/github-beads-sync/config.mjs +148 -0
  213. package/scripts/github-beads-sync/github-api.mjs +131 -0
  214. package/scripts/github-beads-sync/index.mjs +332 -0
  215. package/scripts/github-beads-sync/label-mapper.mjs +54 -0
  216. package/scripts/github-beads-sync/mapping.mjs +78 -0
  217. package/scripts/github-beads-sync/reverse-sync-cli.mjs +31 -0
  218. package/scripts/github-beads-sync/reverse-sync.mjs +138 -0
  219. package/scripts/github-beads-sync/run-bd.mjs +159 -0
  220. package/scripts/github-beads-sync/sanitize.mjs +121 -0
  221. package/scripts/github-beads-sync.config.json +26 -0
  222. package/scripts/improve-command.js +375 -0
  223. package/scripts/lib/eval-runner.js +268 -0
  224. package/scripts/lib/eval-schema.js +135 -0
  225. package/scripts/lib/eval-storage.js +78 -0
  226. package/scripts/lib/grading.js +203 -0
  227. package/scripts/lib/jsonl-lock.sh +48 -0
  228. package/scripts/lib/sanitize.sh +116 -0
  229. package/scripts/lib/transcript-parser.js +63 -0
  230. package/scripts/lint.js +47 -0
  231. package/scripts/migrate-to-bun-test.js +412 -0
  232. package/scripts/pr-coordinator.sh +706 -0
  233. package/scripts/run-command-eval.js +236 -0
  234. package/scripts/smart-status.sh +809 -0
  235. package/scripts/sync-commands.js +571 -0
  236. package/scripts/sync-utils.sh +455 -0
  237. package/scripts/test-dashboard.js +123 -0
  238. package/scripts/test.js +46 -0
  239. package/scripts/validate.sh +94 -0
  240. package/skills/parallel-deep-research/SKILL.md +108 -108
  241. package/skills/parallel-deep-research/evals/README.md +27 -27
  242. package/skills/parallel-deep-research/evals/evals.json +62 -62
  243. package/skills/sonarcloud-analysis/SKILL.md +171 -171
  244. package/skills/sonarcloud-analysis/evals/README.md +27 -27
  245. package/skills/sonarcloud-analysis/evals/evals.json +50 -50
  246. package/skills/sonarcloud-analysis/references/api-reference.md +466 -466
  247. package/.cursor/hooks/state/continual-learning-index.json +0 -19
  248. package/.cursor/hooks/state/continual-learning.json +0 -8
package/docs/TOOLCHAIN.md CHANGED
@@ -1,630 +1,653 @@
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 │ │ EXTERNAL SERVICES │ │
14
- │ │ (bd) │ │ │ │
15
- │ │ │ │ Parallel AI │ │
16
- │ │ Git-backed │ │ Greptile │ │
17
- │ │ Issue │ │ SonarCloud │ │
18
- │ │ Tracking │ │ GitHub CLI │ │
19
- │ └─────────────┘ └─────────────────────┘ │
20
- │ │ │ │
21
- │ └─────────────────────┘ │
22
- │ │ │
23
- │ ┌─────▼─────┐ │
24
- │ │ FORGE │ │
25
- │ │ 7-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
- **Auto-installation** (Recommended):
51
- ```bash
52
- bunx forge setup
53
- # Prompts: "Install Beads? (y/n)"
54
- # Automatically installs and initializes
55
- # On Windows: uses PowerShell installer (npm @beads/bd has an EPERM bug on Windows)
56
- ```
57
-
58
- **Manual installation**:
59
- ```bash
60
- # macOS / Linux (global)
61
- bun add -g @beads/bd
62
- bd init
63
-
64
- # macOS / Linux (local)
65
- bun add -d @beads/bd
66
- bunx bd init
67
-
68
- # Windows (global) — use PowerShell installer, NOT npm/bun add -g
69
- irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
70
- bd init
71
-
72
- # Or with bunx (macOS/Linux, no install needed)
73
- bunx @beads/bd init
74
- ```
75
-
76
- > **Windows note**: The `npm install -g @beads/bd` postinstall script uses `Expand-Archive`, which triggers an EPERM file-locking error on Windows (issue #1031, closed "not planned"). Use the PowerShell installer above instead.
77
-
78
- ### File Structure
79
-
80
- After `bd init`, creates `.beads/` directory:
81
-
82
- ```
83
- .beads/
84
- ├── issues.jsonl # Issue data (git-tracked, one JSON per line)
85
- ├── beads.db # SQLite cache (git-ignored, fast queries)
86
- ├── metadata.json # Database metadata
87
- ├── config.yaml # User configuration
88
- ├── interactions.jsonl # Agent audit log
89
- └── .gitignore # Ignores beads.db
90
- ```
91
-
92
- **Dual-database architecture**: JSONL for git versioning, SQLite for fast local queries. Background daemon keeps them in sync.
93
-
94
- ### Complete Command Reference
95
-
96
- #### Initialization
97
-
98
- ```bash
99
- bd init # Initialize in project
100
- bd init --stealth # Local-only (don't commit to repo)
101
- bd init --contributor # Contributor mode
102
- bd init --prefix PROJ # Custom issue prefix (PROJ-xxx)
103
- ```
104
-
105
- #### Issue Management
106
-
107
- ```bash
108
- # Create issues
109
- bd create "Title" # Basic issue
110
- bd create "Title" --type feature # With type (feature, bug, chore, etc.)
111
- bd create "Title" --priority 1 # With priority (0=critical, 4=backlog)
112
- bd create "Title" -p 0 -l "urgent,backend" # P0 with labels
113
-
114
- # View issues
115
- bd show <id> # Detailed view with audit trail
116
- bd list # All issues
117
- bd list --status open # Filter by status
118
- bd list --priority 1 # Filter by priority
119
- bd list --assignee bob # Filter by assignee
120
- bd list --label bug # Filter by label (AND logic)
121
- bd list --label-any bug,urgent # Filter by label (OR logic)
122
- bd list --type feature # Filter by type
123
- bd list --title-contains "auth" # Search titles
124
- bd list --limit 10 # Limit results
125
-
126
- # Update issues
127
- bd update <id> --status in_progress # Change status
128
- bd update <id> --priority 2 # Change priority
129
- bd update <id> --assignee bob # Assign
130
- bd update <id> --title "New title" # Update title
131
- bd update <id> --description "..." # Update description
132
- bd update <id> --notes "..." # Add notes
133
- bd update <id> --label-add urgent # Add label
134
-
135
- # Complete issues
136
- bd close <id> # Close single issue
137
- bd close <id1> <id2> <id3> # Close multiple (efficient)
138
- bd close <id> --reason "Completed auth" # Close with reason
139
- bd delete <id> # Delete issue
140
- bd delete <id> --cascade # Delete with dependents
141
- ```
142
-
143
- #### Workflow Commands
144
-
145
- ```bash
146
- # Find work
147
- bd ready # Issues with NO open blockers (start here!)
148
- bd ready --priority 1 # Filter ready work by priority
149
- bd blocked # Issues that ARE blocked
150
-
151
- # Dependencies
152
- bd dep add <child> <parent> # child depends on parent (blocks)
153
- bd dep add <child> <parent> --type related # Soft reference (no blocking)
154
- bd dep add <child> <parent> --type parent-child # Hierarchical
155
- bd dep remove <child> <parent> # Remove dependency
156
- bd dep tree <id> # Visualize dependency tree
157
- bd dep cycles # Detect cycles
158
-
159
- # Comments
160
- bd comments <id> # View comments
161
- bd comments <id> "Comment text" # Add comment
162
-
163
- # Git sync
164
- bd sync # Export to JSONL, commit, push
165
- bd sync --status # Check sync status
166
- bd hooks install # Install git hooks for auto-sync
167
-
168
- # Maintenance
169
- bd stats # Project statistics
170
- bd doctor # Check for issues
171
- bd admin compact --days 90 # Compact old closed issues
172
- ```
173
-
174
- #### Issue Statuses
175
-
176
- - `open` - Not started
177
- - `in_progress` - Being worked on
178
- - `blocked` - Waiting on something
179
- - `completed` - Done
180
- - `on_hold` - Paused
181
- - `cancelled` - Won't do
182
-
183
- #### Priority Levels
184
-
185
- | Priority | Meaning | Usage |
186
- |----------|---------|-------|
187
- | 0 (P0) | Critical | Drop everything, fix now |
188
- | 1 (P1) | High | Do this sprint |
189
- | 2 (P2) | Medium | Planned work |
190
- | 3 (P3) | Low | Nice to have |
191
- | 4 (P4) | Backlog | Someday/maybe |
192
-
193
- #### Dependency Types
194
-
195
- | Type | Blocks Ready? | Use Case |
196
- |------|---------------|----------|
197
- | `blocks` | YES | Hard dependency |
198
- | `related` | NO | Soft reference |
199
- | `parent-child` | YES | Hierarchy |
200
- | `discovered-from` | NO | Found during work |
201
-
202
- ### Session Workflow
203
-
204
- ```bash
205
- # Start of session
206
- bd ready # What can I work on?
207
- bd show <id> # Review the issue
208
- bd update <id> --status in_progress
209
-
210
- # During work
211
- bd comments <id> "Progress update"
212
- bd update <id> --notes "Found edge case"
213
-
214
- # End of session
215
- bd close <id> # If done, or:
216
- bd update <id> --status blocked --comment "Needs API response"
217
- bd sync # Always sync at end!
218
- ```
219
-
220
- ---
221
-
222
- ## MCP Servers
223
-
224
- ### Context7 - Library Documentation
225
-
226
- **Package**: `@upstash/context7-mcp@2` (pin to major version, not `@latest`)
227
- **Purpose**: Up-to-date documentation and code examples for any programming library
228
- **Used in**: `/plan` stage (Phase 2 research); any library lookup
229
-
230
- Context7 provides current documentation that may be more recent than the AI's training data.
231
-
232
- **Installation**:
233
-
234
- **Claude Code**: Add to `.mcp.json` in your project root:
235
-
236
-
237
- ```json
238
- {
239
- "mcpServers": {
240
- "context7": {
241
- "command": "bunx",
242
- "args": ["--bun", "@upstash/context7-mcp@latest"]
243
- }
244
- }
245
- }
246
- ```
247
-
248
- **Cline (VSCode)**:
249
- 1. Open VSCode Settings
250
- 2. Search for "Cline MCP"
251
- 3. Add Context7 server configuration
252
-
253
- **Cursor**: Check Cursor Settings → MCP Servers for configuration options
254
-
255
- **Other agents**: If your agent supports MCP, configure using the JSON format above
256
-
257
- **Usage**:
258
- ```
259
- # The AI will automatically use Context7 when you ask about libraries
260
- "How do I use React Query's useMutation hook?"
261
- "What's the latest Next.js App Router API?"
262
- "Show me Supabase RLS policy examples"
263
- ```
264
-
265
- **When to use Context7**:
266
- - Before implementing a library feature
267
- - When official docs may have changed since AI training
268
- - To verify API signatures and patterns
269
- - For current best practices
270
-
271
- ### grep.app - Code Search
272
-
273
- **Package**: `@ai-tools-all/grep_app_mcp` (recommended) or `@galprz/grep-mcp`
274
- **Website**: [grep.app](https://grep.app)
275
- **Purpose**: Search across 1M+ public GitHub repositories for real-world code examples
276
- **Used in**: `/plan` stage (Phase 2 research); finding implementation patterns
277
-
278
- grep.app provides code search across public GitHub repositories to find real-world examples and patterns.
279
-
280
- **Installation (Claude Code)**:
281
-
282
- Add to `.mcp.json` in your project root:
283
-
284
- ```json
285
- {
286
- "mcpServers": {
287
- "context7": {
288
- "command": "bunx",
289
- "args": ["--bun", "@upstash/context7-mcp@latest"]
290
- },
291
- "grep-app": {
292
- "command": "bunx",
293
- "args": ["--bun", "@ai-tools-all/grep_app_mcp"]
294
- }
295
- }
296
- }
297
- ```
298
-
299
- **Usage**:
300
- ```
301
- # The AI will use grep.app when you need real-world examples
302
- "Find examples of React useEffect cleanup patterns"
303
- "Show me how others implement JWT authentication in Express"
304
- "Search for rate limiting implementations in Node.js"
305
- ```
306
-
307
- **When to use grep.app**:
308
-
309
- - Finding real-world implementation examples
310
- - Discovering coding patterns in production code
311
- - Validating implementation approaches
312
- - Learning from open source projects
313
-
314
- **Context7 vs grep.app**:
315
-
316
- | Tool | Purpose | Use When |
317
- |----------------|--------------------------------|-------------------------------------------|
318
- | **Context7** | Official library documentation | You need API reference, official patterns |
319
- | **grep.app** | Real code in the wild | You want to see how others solve problems |
320
-
321
- ---
322
-
323
- ## External Services
324
-
325
- ### Parallel AI - Web Research
326
-
327
- **Website**: [platform.parallel.ai](https://platform.parallel.ai)
328
- **Used in**: `/plan` stage (Phase 2 research)
329
-
330
- 4 APIs for research:
331
- - **Search** - Web search with AI analysis
332
- - **Extract** - Scrape specific URLs
333
- - **Task** - Structured data enrichment
334
- - **Deep Research** - Multi-source analysis
335
-
336
- ```bash
337
- # Setup
338
- # 1. Get key from https://platform.parallel.ai
339
- # 2. Add to .env.local
340
- PARALLEL_API_KEY=your-key
341
-
342
- # Test
343
- API_KEY=$(grep "^PARALLEL_API_KEY=" .env.local | cut -d= -f2)
344
- curl -s -X POST "https://api.parallel.ai/v1beta/search" \
345
- -H "x-api-key: $API_KEY" \
346
- -H "Content-Type: application/json" \
347
- -H "parallel-beta: search-extract-2025-10-10" \
348
- -d '{"objective": "Next.js authentication best practices 2026"}'
349
- ```
350
-
351
- ---
352
-
353
- ## Code Review Tools
354
-
355
- Choose ONE code review tool based on your needs:
356
-
357
- | Tool | Pricing | Best For | Setup |
358
- |------|---------|----------|-------|
359
- | **GitHub Code Quality** | FREE | All GitHub repos | Built-in, zero setup |
360
- | **CodeRabbit** | FREE (OSS) | Open source projects | GitHub App |
361
- | **Greptile** | $99+/mo | Enterprise | API key |
362
-
363
- ### Option 1: GitHub Code Quality (FREE, Recommended)
364
-
365
- **Status**: Built-in to GitHub
366
- **Used in**: `/review` stage
367
-
368
- Zero setup required - GitHub's code quality features are enabled by default.
369
-
370
- Features:
371
- - Automatic code scanning
372
- - Dependency vulnerability alerts
373
- - Secret scanning
374
- - Code navigation
375
-
376
- ### Option 2: CodeRabbit (FREE for Open Source)
377
-
378
- **Website**: [coderabbit.ai](https://coderabbit.ai)
379
- **Used in**: `/review` stage
380
-
381
- AI-powered code review with deep context understanding.
382
-
383
- ```bash
384
- # Setup
385
- # 1. Go to https://coderabbit.ai
386
- # 2. Install the GitHub App
387
- # 3. Enable for your repositories
388
-
389
- # Configuration (optional)
390
- # Create .coderabbit.yaml in repo root
391
- ```
392
-
393
- ### Option 3: Greptile (Paid - Enterprise)
394
-
395
- **Website**: [greptile.com](https://greptile.com)
396
- **Used in**: `/review` stage
397
-
398
- Enterprise-grade AI code review that understands your codebase.
399
-
400
- ```bash
401
- # Setup
402
- # 1. Get key from https://app.greptile.com
403
- # 2. Add to .env.local
404
- GREPTILE_API_KEY=your-key
405
-
406
- # 3. Index repository (one-time)
407
- curl -X POST "https://api.greptile.com/v2/repositories" \
408
- -H "Authorization: Bearer $GREPTILE_API_KEY" \
409
- -H "Content-Type: application/json" \
410
- -d '{"remote": "github", "repository": "owner/repo"}'
411
- ```
412
-
413
- ---
414
-
415
- ## Code Quality Tools
416
-
417
- Choose ONE code quality scanner based on your needs:
418
-
419
- | Tool | Pricing | Best For | Requirement |
420
- |------|---------|----------|-------------|
421
- | **ESLint** | FREE | All projects | Built-in |
422
- | **SonarCloud** | 50k LoC free | Cloud-first teams | API key |
423
- | **SonarQube Community** | FREE | Self-hosted, unlimited | Docker |
424
-
425
- ### Option 1: ESLint Only (FREE, Recommended)
426
-
427
- **Status**: Built-in
428
- **Used in**: `/validate` stage
429
-
430
- No external server required - uses your project's linting configuration.
431
-
432
- ```bash
433
- # Already configured via package.json or eslint.config.js
434
- bun run lint
435
- ```
436
-
437
- ### Option 2: SonarCloud (Cloud-Hosted)
438
-
439
- **Website**: [sonarcloud.io](https://sonarcloud.io)
440
- **Used in**: `/validate` stage
441
- **Free Tier**: 50,000 lines of code
442
-
443
- Static analysis for bugs, vulnerabilities, code smells.
444
-
445
- ```bash
446
- # Setup
447
- # 1. Create project at https://sonarcloud.io
448
- # 2. Get token from Security settings
449
- # 3. Add to .env.local
450
- SONAR_TOKEN=your-token
451
- SONAR_ORGANIZATION=your-org
452
- SONAR_PROJECT_KEY=your-project
453
-
454
- # 4. Create sonar-project.properties
455
- echo "sonar.organization=$SONAR_ORGANIZATION
456
- sonar.projectKey=$SONAR_PROJECT_KEY
457
- sonar.sources=src" > sonar-project.properties
458
-
459
- # 5. Run analysis
460
- bunx sonarqube-scanner
461
- ```
462
-
463
- ### Option 3: SonarQube Community (Self-Hosted, FREE)
464
-
465
- **Website**: [sonarqube.org](https://www.sonarsource.com/products/sonarqube/)
466
- **Used in**: `/validate` stage
467
- **Pricing**: FREE, unlimited lines of code
468
-
469
- Self-hosted code quality analysis - no cloud dependency.
470
-
471
- ```bash
472
- # Setup with Docker
473
- docker run -d --name sonarqube \
474
- -p 9000:9000 \
475
- sonarqube:community
476
-
477
- # Access at http://localhost:9000
478
- # Default credentials: admin/admin
479
-
480
- # Add to .env.local
481
- SONARQUBE_URL=http://localhost:9000
482
- SONARQUBE_TOKEN=your-token # Generate in SonarQube UI
483
-
484
- # Create sonar-project.properties
485
- echo "sonar.host.url=$SONARQUBE_URL
486
- sonar.login=$SONARQUBE_TOKEN
487
- sonar.projectKey=your-project
488
- sonar.sources=src" > sonar-project.properties
489
-
490
- # Run analysis
491
- bunx sonarqube-scanner
492
- ```
493
-
494
- **Docker Compose (Production)**:
495
- ```yaml
496
- # docker-compose.yml
497
- version: '3'
498
- services:
499
- sonarqube:
500
- image: sonarqube:community
501
- ports:
502
- - "9000:9000"
503
- environment:
504
- - SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true
505
- volumes:
506
- - sonarqube_data:/opt/sonarqube/data
507
- - sonarqube_logs:/opt/sonarqube/logs
508
-
509
- volumes:
510
- sonarqube_data:
511
- sonarqube_logs:
512
- ```
513
-
514
- ---
515
-
516
- ### GitHub CLI - PR Workflow
517
-
518
- **Installation**: [cli.github.com](https://cli.github.com)
519
- **Used in**: `/ship`, `/review`, `/premerge` stages
520
-
521
- ```bash
522
- # Install
523
- # macOS: brew install gh
524
- # Windows: winget install GitHub.cli
525
- # Linux: sudo apt install gh
526
-
527
- # Authenticate
528
- gh auth login
529
-
530
- # Common commands
531
- gh pr create --title "..." --body "..."
532
- gh pr view <number>
533
- gh pr checks <number>
534
- gh pr merge <number> --squash --delete-branch
535
- gh issue create --title "..." --body "..."
536
- ```
537
-
538
- ---
539
-
540
- ## Integration with Forge Stages
541
-
542
- | Stage | Tools Used |
543
- |-------|------------|
544
- | `/status` | `bd ready`, `bd list`, `git status` |
545
- | `/plan` (Phase 2) | Parallel AI, Context7, grep.app, codebase exploration |
546
- | `/plan` | `bd create`, `git checkout -b` |
547
- | `/dev` | Tests, code, `bd update`, `/tasks save` |
548
- | `/validate` | Type check, lint, tests, SonarCloud |
549
- | `/ship` | `bd update --status done`, `gh pr create` |
550
- | `/review` | `gh pr view`, Greptile, SonarCloud |
551
- | `/premerge` | `bd sync`, doc updates, hand off PR |
552
- | `/verify` | Documentation cross-check |
553
-
554
- ---
555
-
556
- ## Quick Reference Card
557
-
558
- ### Beads (Issue Tracking)
559
-
560
- ```bash
561
- bd init # Initialize
562
- bd ready # Find unblocked work
563
- bd create "Title" # Create issue
564
- bd show <id> # View details
565
- bd update <id> --status X # Update status
566
- bd dep add <a> <b> # a depends on b
567
- bd close <id> # Complete
568
- bd sync # Git sync
569
- ```
570
-
571
- ### GitHub CLI
572
-
573
- ```bash
574
- gh auth login # Authenticate
575
- gh pr create # Create PR
576
- gh pr view <n> # View PR
577
- gh pr checks <n> # Check status
578
- gh pr merge <n> --squash # Merge
579
- ```
580
-
581
- ---
582
-
583
- ## Troubleshooting
584
-
585
- ### Beads
586
-
587
- **"bd: command not found"**
588
- ```bash
589
- # macOS / Linux
590
- bun add -g @beads/bd
591
- # Or use bunx @beads/bd <command>
592
-
593
- # Windows — use PowerShell installer
594
- irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
595
- ```
596
-
597
- **Windows EPERM error during `npm install -g @beads/bd`**
598
- ```bash
599
- # npm @beads/bd has a known EPERM bug on Windows (Issue #1031)
600
- # Use the PowerShell installer instead:
601
- irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
602
- ```
603
-
604
- **"database locked"**
605
- ```bash
606
- bd sync --force
607
- ```
608
-
609
- **Issues not showing after git pull**
610
- ```bash
611
- bd sync # Re-imports from JSONL
612
- ```
613
-
614
- ### GitHub CLI
615
-
616
- **"gh: not authenticated"**
617
- ```bash
618
- gh auth login
619
- gh auth status
620
- ```
621
-
622
- ---
623
-
624
- ## Resources
625
-
626
- - **Beads**: [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
627
- - **Parallel AI**: [platform.parallel.ai](https://platform.parallel.ai)
628
- - **Greptile**: [greptile.com](https://greptile.com)
629
- - **SonarCloud**: [sonarcloud.io](https://sonarcloud.io)
630
- - **GitHub CLI**: [cli.github.com](https://cli.github.com)
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 │ │ EXTERNAL SERVICES │ │
14
+ │ │ (bd) │ │ │ │
15
+ │ │ │ │ Parallel AI │ │
16
+ │ │ Git-backed │ │ Greptile │ │
17
+ │ │ Issue │ │ SonarCloud │ │
18
+ │ │ Tracking │ │ GitHub CLI │ │
19
+ │ └─────────────┘ └─────────────────────┘ │
20
+ │ │ │ │
21
+ │ └─────────────────────┘ │
22
+ │ │ │
23
+ │ ┌─────▼─────┐ │
24
+ │ │ FORGE │ │
25
+ │ │ 7-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
+ **Auto-installation** (Recommended):
51
+ ```bash
52
+ bunx forge setup
53
+ # Prompts: "Install Beads? (y/n)"
54
+ # Automatically installs and initializes
55
+ # On Windows: uses PowerShell installer (npm @beads/bd has an EPERM bug on Windows)
56
+ ```
57
+
58
+ **Manual installation**:
59
+ ```bash
60
+ # macOS / Linux (global)
61
+ bun add -g @beads/bd
62
+ bd init
63
+
64
+ # macOS / Linux (local)
65
+ bun add -d @beads/bd
66
+ bunx bd init
67
+
68
+ # Windows (global) — use PowerShell installer, NOT npm/bun add -g
69
+ irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
70
+ bd init
71
+
72
+ # Or with bunx (macOS/Linux, no install needed)
73
+ bunx @beads/bd init
74
+ ```
75
+
76
+ > **Windows note**: The `npm install -g @beads/bd` postinstall script uses `Expand-Archive`, which triggers an EPERM file-locking error on Windows (issue #1031, closed "not planned"). Use the PowerShell installer above instead.
77
+
78
+ ### File Structure
79
+
80
+ After `bd init`, creates `.beads/` directory:
81
+
82
+ ```
83
+ .beads/
84
+ ├── issues.jsonl # Issue data (git-tracked, one JSON per line)
85
+ ├── beads.db # SQLite cache (git-ignored, fast queries)
86
+ ├── metadata.json # Database metadata
87
+ ├── config.yaml # User configuration
88
+ ├── interactions.jsonl # Agent audit log
89
+ └── .gitignore # Ignores beads.db
90
+ ```
91
+
92
+ **Dual-database architecture**: JSONL for git versioning, SQLite for fast local queries. Background daemon keeps them in sync.
93
+
94
+ ### Complete Command Reference
95
+
96
+ #### Initialization
97
+
98
+ ```bash
99
+ bd init # Initialize in project
100
+ bd init --stealth # Local-only (don't commit to repo)
101
+ bd init --contributor # Contributor mode
102
+ bd init --prefix PROJ # Custom issue prefix (PROJ-xxx)
103
+ ```
104
+
105
+ #### Issue Management
106
+
107
+ ```bash
108
+ # Create issues
109
+ bd create "Title" # Basic issue
110
+ bd create "Title" --type feature # With type (feature, bug, chore, etc.)
111
+ bd create "Title" --priority 1 # With priority (0=critical, 4=backlog)
112
+ bd create "Title" -p 0 -l "urgent,backend" # P0 with labels
113
+
114
+ # View issues
115
+ bd show <id> # Detailed view with audit trail
116
+ bd list # All issues
117
+ bd list --status open # Filter by status
118
+ bd list --priority 1 # Filter by priority
119
+ bd list --assignee bob # Filter by assignee
120
+ bd list --label bug # Filter by label (AND logic)
121
+ bd list --label-any bug,urgent # Filter by label (OR logic)
122
+ bd list --type feature # Filter by type
123
+ bd list --title-contains "auth" # Search titles
124
+ bd list --limit 10 # Limit results
125
+
126
+ # Update issues
127
+ bd update <id> --status in_progress # Change status
128
+ bd update <id> --priority 2 # Change priority
129
+ bd update <id> --assignee bob # Assign
130
+ bd update <id> --title "New title" # Update title
131
+ bd update <id> --description "..." # Update description
132
+ bd update <id> --notes "..." # Add notes
133
+ bd update <id> --label-add urgent # Add label
134
+
135
+ # Complete issues
136
+ bd close <id> # Close single issue
137
+ bd close <id1> <id2> <id3> # Close multiple (efficient)
138
+ bd close <id> --reason "Completed auth" # Close with reason
139
+ bd delete <id> # Delete issue
140
+ bd delete <id> --cascade # Delete with dependents
141
+ ```
142
+
143
+ #### Workflow Commands
144
+
145
+ ```bash
146
+ # Find work
147
+ bd ready # Issues with NO open blockers (start here!)
148
+ bd ready --priority 1 # Filter ready work by priority
149
+ bd blocked # Issues that ARE blocked
150
+
151
+ # Dependencies
152
+ bd dep add <child> <parent> # child depends on parent (blocks)
153
+ bd dep add <child> <parent> --type related # Soft reference (no blocking)
154
+ bd dep add <child> <parent> --type parent-child # Hierarchical
155
+ bd dep remove <child> <parent> # Remove dependency
156
+ bd dep tree <id> # Visualize dependency tree
157
+ bd dep cycles # Detect cycles
158
+
159
+ # Comments
160
+ bd comments <id> # View comments
161
+ bd comments <id> "Comment text" # Add comment
162
+
163
+ # Git sync
164
+ bd sync # Export to JSONL, commit, push
165
+ bd sync --status # Check sync status
166
+ bd hooks install # Install git hooks for auto-sync
167
+
168
+ # Maintenance
169
+ bd stats # Project statistics
170
+ bd doctor # Check for issues
171
+ bd admin compact --days 90 # Compact old closed issues
172
+ ```
173
+
174
+ #### Issue Statuses
175
+
176
+ - `open` - Not started
177
+ - `in_progress` - Being worked on
178
+ - `blocked` - Waiting on something
179
+ - `completed` - Done
180
+ - `on_hold` - Paused
181
+ - `cancelled` - Won't do
182
+
183
+ #### Priority Levels
184
+
185
+ | Priority | Meaning | Usage |
186
+ |----------|---------|-------|
187
+ | 0 (P0) | Critical | Drop everything, fix now |
188
+ | 1 (P1) | High | Do this sprint |
189
+ | 2 (P2) | Medium | Planned work |
190
+ | 3 (P3) | Low | Nice to have |
191
+ | 4 (P4) | Backlog | Someday/maybe |
192
+
193
+ #### Dependency Types
194
+
195
+ | Type | Blocks Ready? | Use Case |
196
+ |------|---------------|----------|
197
+ | `blocks` | YES | Hard dependency |
198
+ | `related` | NO | Soft reference |
199
+ | `parent-child` | YES | Hierarchy |
200
+ | `discovered-from` | NO | Found during work |
201
+
202
+ ### Session Workflow
203
+
204
+ ```bash
205
+ # Start of session
206
+ bd ready # What can I work on?
207
+ bd show <id> # Review the issue
208
+ bd update <id> --status in_progress
209
+
210
+ # During work
211
+ bd comments <id> "Progress update"
212
+ bd update <id> --notes "Found edge case"
213
+
214
+ # End of session
215
+ bd close <id> # If done, or:
216
+ bd update <id> --status blocked --comment "Needs API response"
217
+ bd sync # Always sync at end!
218
+ ```
219
+
220
+ ---
221
+
222
+ ## MCP Servers
223
+
224
+ ### Context7 - Library Documentation
225
+
226
+ **Package**: `@upstash/context7-mcp@2` (pin to major version, not `@latest`)
227
+ **Purpose**: Up-to-date documentation and code examples for any programming library
228
+ **Used in**: `/plan` stage (Phase 2 research); any library lookup
229
+
230
+ Context7 provides current documentation that may be more recent than the AI's training data.
231
+
232
+ **Installation**:
233
+
234
+ **Claude Code**: Add to `.mcp.json` in your project root:
235
+
236
+
237
+ ```json
238
+ {
239
+ "mcpServers": {
240
+ "context7": {
241
+ "command": "bunx",
242
+ "args": ["--bun", "@upstash/context7-mcp@latest"]
243
+ }
244
+ }
245
+ }
246
+ ```
247
+
248
+ **Cline (VSCode)**:
249
+ 1. Open VSCode Settings
250
+ 2. Search for "Cline MCP"
251
+ 3. Add Context7 server configuration
252
+
253
+ **Cursor**: Check Cursor Settings → MCP Servers for configuration options
254
+
255
+ **Other agents**: If your agent supports MCP, configure using the JSON format above
256
+
257
+ **Usage**:
258
+ ```
259
+ # The AI will automatically use Context7 when you ask about libraries
260
+ "How do I use React Query's useMutation hook?"
261
+ "What's the latest Next.js App Router API?"
262
+ "Show me Supabase RLS policy examples"
263
+ ```
264
+
265
+ **When to use Context7**:
266
+ - Before implementing a library feature
267
+ - When official docs may have changed since AI training
268
+ - To verify API signatures and patterns
269
+ - For current best practices
270
+
271
+ ### grep.app - Code Search
272
+
273
+ **Package**: `@ai-tools-all/grep_app_mcp` (recommended) or `@galprz/grep-mcp`
274
+ **Website**: [grep.app](https://grep.app)
275
+ **Purpose**: Search across 1M+ public GitHub repositories for real-world code examples
276
+ **Used in**: `/plan` stage (Phase 2 research); finding implementation patterns
277
+
278
+ grep.app provides code search across public GitHub repositories to find real-world examples and patterns.
279
+
280
+ **Installation (Claude Code)**:
281
+
282
+ Add to `.mcp.json` in your project root:
283
+
284
+ ```json
285
+ {
286
+ "mcpServers": {
287
+ "context7": {
288
+ "command": "bunx",
289
+ "args": ["--bun", "@upstash/context7-mcp@latest"]
290
+ },
291
+ "grep-app": {
292
+ "command": "bunx",
293
+ "args": ["--bun", "@ai-tools-all/grep_app_mcp"]
294
+ }
295
+ }
296
+ }
297
+ ```
298
+
299
+ **Usage**:
300
+ ```
301
+ # The AI will use grep.app when you need real-world examples
302
+ "Find examples of React useEffect cleanup patterns"
303
+ "Show me how others implement JWT authentication in Express"
304
+ "Search for rate limiting implementations in Node.js"
305
+ ```
306
+
307
+ **When to use grep.app**:
308
+
309
+ - Finding real-world implementation examples
310
+ - Discovering coding patterns in production code
311
+ - Validating implementation approaches
312
+ - Learning from open source projects
313
+
314
+ **Context7 vs grep.app**:
315
+
316
+ | Tool | Purpose | Use When |
317
+ |----------------|--------------------------------|-------------------------------------------|
318
+ | **Context7** | Official library documentation | You need API reference, official patterns |
319
+ | **grep.app** | Real code in the wild | You want to see how others solve problems |
320
+
321
+ ---
322
+
323
+ ## External Services
324
+
325
+ ### Parallel AI - Web Research
326
+
327
+ **Website**: [platform.parallel.ai](https://platform.parallel.ai)
328
+ **Used in**: `/plan` stage (Phase 2 research)
329
+
330
+ 4 APIs for research:
331
+ - **Search** - Web search with AI analysis
332
+ - **Extract** - Scrape specific URLs
333
+ - **Task** - Structured data enrichment
334
+ - **Deep Research** - Multi-source analysis
335
+
336
+ ```bash
337
+ # Setup
338
+ # 1. Get key from https://platform.parallel.ai
339
+ # 2. Add to .env.local
340
+ PARALLEL_API_KEY=your-key
341
+
342
+ # Test
343
+ API_KEY=$(grep "^PARALLEL_API_KEY=" .env.local | cut -d= -f2)
344
+ curl -s -X POST "https://api.parallel.ai/v1beta/search" \
345
+ -H "x-api-key: $API_KEY" \
346
+ -H "Content-Type: application/json" \
347
+ -H "parallel-beta: search-extract-2025-10-10" \
348
+ -d '{"objective": "Next.js authentication best practices 2026"}'
349
+ ```
350
+
351
+ ---
352
+
353
+ ## Code Review Tools
354
+
355
+ Choose ONE code review tool based on your needs:
356
+
357
+ | Tool | Pricing | Best For | Setup |
358
+ |------|---------|----------|-------|
359
+ | **GitHub Code Quality** | FREE | All GitHub repos | Built-in, zero setup |
360
+ | **CodeRabbit** | FREE (OSS) | Open source projects | GitHub App |
361
+ | **Greptile** | $99+/mo | Enterprise | API key |
362
+
363
+ ### Option 1: GitHub Code Quality (FREE, Recommended)
364
+
365
+ **Status**: Built-in to GitHub
366
+ **Used in**: `/review` stage
367
+
368
+ Zero setup required - GitHub's code quality features are enabled by default.
369
+
370
+ Features:
371
+ - Automatic code scanning
372
+ - Dependency vulnerability alerts
373
+ - Secret scanning
374
+ - Code navigation
375
+
376
+ ### Option 2: CodeRabbit (FREE for Open Source)
377
+
378
+ **Website**: [coderabbit.ai](https://coderabbit.ai)
379
+ **Used in**: `/review` stage
380
+
381
+ AI-powered code review with deep context understanding.
382
+
383
+ ```bash
384
+ # Setup
385
+ # 1. Go to https://coderabbit.ai
386
+ # 2. Install the GitHub App
387
+ # 3. Enable for your repositories
388
+
389
+ # Configuration (optional)
390
+ # Create .coderabbit.yaml in repo root
391
+ ```
392
+
393
+ ### Option 3: Greptile (Paid - Enterprise)
394
+
395
+ **Website**: [greptile.com](https://greptile.com)
396
+ **Used in**: `/review` stage
397
+
398
+ Enterprise-grade AI code review that understands your codebase.
399
+
400
+ ```bash
401
+ # Setup
402
+ # 1. Get key from https://app.greptile.com
403
+ # 2. Add to .env.local
404
+ GREPTILE_API_KEY=your-key
405
+
406
+ # 3. Index repository (one-time)
407
+ curl -X POST "https://api.greptile.com/v2/repositories" \
408
+ -H "Authorization: Bearer $GREPTILE_API_KEY" \
409
+ -H "Content-Type: application/json" \
410
+ -d '{"remote": "github", "repository": "owner/repo"}'
411
+ ```
412
+
413
+ ---
414
+
415
+ ## Code Quality Tools
416
+
417
+ Choose ONE code quality scanner based on your needs:
418
+
419
+ | Tool | Pricing | Best For | Requirement |
420
+ |------|---------|----------|-------------|
421
+ | **ESLint** | FREE | All projects | Built-in |
422
+ | **SonarCloud** | 50k LoC free | Cloud-first teams | API key |
423
+ | **SonarQube Community** | FREE | Self-hosted, unlimited | Docker |
424
+
425
+ ### Option 1: ESLint Only (FREE, Recommended)
426
+
427
+ **Status**: Built-in
428
+ **Used in**: `/validate` stage
429
+
430
+ No external server required - uses your project's linting configuration.
431
+
432
+ ```bash
433
+ # Already configured via package.json or eslint.config.js
434
+ bun run lint
435
+ ```
436
+
437
+ ### Option 2: SonarCloud (Cloud-Hosted)
438
+
439
+ **Website**: [sonarcloud.io](https://sonarcloud.io)
440
+ **Used in**: `/validate` stage
441
+ **Free Tier**: 50,000 lines of code
442
+
443
+ Static analysis for bugs, vulnerabilities, code smells.
444
+
445
+ ```bash
446
+ # Setup
447
+ # 1. Create project at https://sonarcloud.io
448
+ # 2. Get token from Security settings
449
+ # 3. Add to .env.local
450
+ SONAR_TOKEN=your-token
451
+ SONAR_ORGANIZATION=your-org
452
+ SONAR_PROJECT_KEY=your-project
453
+
454
+ # 4. Create sonar-project.properties
455
+ echo "sonar.organization=$SONAR_ORGANIZATION
456
+ sonar.projectKey=$SONAR_PROJECT_KEY
457
+ sonar.sources=src" > sonar-project.properties
458
+
459
+ # 5. Run analysis
460
+ bunx sonarqube-scanner
461
+ ```
462
+
463
+ ### Option 3: SonarQube Community (Self-Hosted, FREE)
464
+
465
+ **Website**: [sonarqube.org](https://www.sonarsource.com/products/sonarqube/)
466
+ **Used in**: `/validate` stage
467
+ **Pricing**: FREE, unlimited lines of code
468
+
469
+ Self-hosted code quality analysis - no cloud dependency.
470
+
471
+ ```bash
472
+ # Setup with Docker
473
+ docker run -d --name sonarqube \
474
+ -p 9000:9000 \
475
+ sonarqube:community
476
+
477
+ # Access at http://localhost:9000
478
+ # Default credentials: admin/admin
479
+
480
+ # Add to .env.local
481
+ SONARQUBE_URL=http://localhost:9000
482
+ SONARQUBE_TOKEN=your-token # Generate in SonarQube UI
483
+
484
+ # Create sonar-project.properties
485
+ echo "sonar.host.url=$SONARQUBE_URL
486
+ sonar.login=$SONARQUBE_TOKEN
487
+ sonar.projectKey=your-project
488
+ sonar.sources=src" > sonar-project.properties
489
+
490
+ # Run analysis
491
+ bunx sonarqube-scanner
492
+ ```
493
+
494
+ **Docker Compose (Production)**:
495
+ ```yaml
496
+ # docker-compose.yml
497
+ version: '3'
498
+ services:
499
+ sonarqube:
500
+ image: sonarqube:community
501
+ ports:
502
+ - "9000:9000"
503
+ environment:
504
+ - SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true
505
+ volumes:
506
+ - sonarqube_data:/opt/sonarqube/data
507
+ - sonarqube_logs:/opt/sonarqube/logs
508
+
509
+ volumes:
510
+ sonarqube_data:
511
+ sonarqube_logs:
512
+ ```
513
+
514
+ ---
515
+
516
+ ### GitHub CLI - PR Workflow
517
+
518
+ **Installation**: [cli.github.com](https://cli.github.com)
519
+ **Used in**: `/ship`, `/review`, `/premerge` stages
520
+
521
+ ```bash
522
+ # Install
523
+ # macOS: brew install gh
524
+ # Windows: winget install GitHub.cli
525
+ # Linux: sudo apt install gh
526
+
527
+ # Authenticate
528
+ gh auth login
529
+
530
+ # Common commands
531
+ gh pr create --title "..." --body "..."
532
+ gh pr view <number>
533
+ gh pr checks <number>
534
+ gh pr merge <number> --squash --delete-branch
535
+ gh issue create --title "..." --body "..."
536
+ ```
537
+
538
+ ---
539
+
540
+ ## Global CLI Tools
541
+
542
+ ### Beads (`bd`) Minimum Version
543
+
544
+ **Minimum version**: v0.49.x
545
+ **Check installed version**:
546
+ ```bash
547
+ bd --version
548
+ ```
549
+
550
+ **Install / Update**:
551
+ ```bash
552
+ # macOS / Linux
553
+ bun add -g @beads/bd
554
+
555
+ # Windows — use PowerShell installer (npm has EPERM bug)
556
+ irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
557
+ ```
558
+
559
+ > **Why v0.49.x?** Earlier versions lack the `bd ready` dependency-aware query, `bd sync --status`, and the dual-database (JSONL + SQLite) architecture that Forge relies on.
560
+
561
+ ---
562
+
563
+ ## Integration with Forge Stages
564
+
565
+ | Stage | Tools Used |
566
+ |-------|------------|
567
+ | `/status` | `bd ready`, `bd list`, `git status` |
568
+ | `/plan` (Phase 2) | Parallel AI, Context7, grep.app, codebase exploration |
569
+ | `/plan` | `bd create`, `git checkout -b` |
570
+ | `/dev` | Tests, code, `bd update`, `/tasks save` |
571
+ | `/validate` | Type check, lint, tests, SonarCloud |
572
+ | `/ship` | `bd update --status done`, `gh pr create` |
573
+ | `/review` | `gh pr view`, Greptile, SonarCloud |
574
+ | `/premerge` | `bd sync`, doc updates, hand off PR |
575
+ | `/verify` | Documentation cross-check |
576
+
577
+ ---
578
+
579
+ ## Quick Reference Card
580
+
581
+ ### Beads (Issue Tracking)
582
+
583
+ ```bash
584
+ bd init # Initialize
585
+ bd ready # Find unblocked work
586
+ bd create "Title" # Create issue
587
+ bd show <id> # View details
588
+ bd update <id> --status X # Update status
589
+ bd dep add <a> <b> # a depends on b
590
+ bd close <id> # Complete
591
+ bd sync # Git sync
592
+ ```
593
+
594
+ ### GitHub CLI
595
+
596
+ ```bash
597
+ gh auth login # Authenticate
598
+ gh pr create # Create PR
599
+ gh pr view <n> # View PR
600
+ gh pr checks <n> # Check status
601
+ gh pr merge <n> --squash # Merge
602
+ ```
603
+
604
+ ---
605
+
606
+ ## Troubleshooting
607
+
608
+ ### Beads
609
+
610
+ **"bd: command not found"**
611
+ ```bash
612
+ # macOS / Linux
613
+ bun add -g @beads/bd
614
+ # Or use bunx @beads/bd <command>
615
+
616
+ # Windows — use PowerShell installer
617
+ irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
618
+ ```
619
+
620
+ **Windows EPERM error during `npm install -g @beads/bd`**
621
+ ```bash
622
+ # npm @beads/bd has a known EPERM bug on Windows (Issue #1031)
623
+ # Use the PowerShell installer instead:
624
+ irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
625
+ ```
626
+
627
+ **"database locked"**
628
+ ```bash
629
+ bd sync --force
630
+ ```
631
+
632
+ **Issues not showing after git pull**
633
+ ```bash
634
+ bd sync # Re-imports from JSONL
635
+ ```
636
+
637
+ ### GitHub CLI
638
+
639
+ **"gh: not authenticated"**
640
+ ```bash
641
+ gh auth login
642
+ gh auth status
643
+ ```
644
+
645
+ ---
646
+
647
+ ## Resources
648
+
649
+ - **Beads**: [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
650
+ - **Parallel AI**: [platform.parallel.ai](https://platform.parallel.ai)
651
+ - **Greptile**: [greptile.com](https://greptile.com)
652
+ - **SonarCloud**: [sonarcloud.io](https://sonarcloud.io)
653
+ - **GitHub CLI**: [cli.github.com](https://cli.github.com)