forge-workflow 0.0.10 → 0.1.0-beta.3

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 (468) hide show
  1. package/.claude/rules/{greptile-review-process.md → review-process.md} +56 -41
  2. package/.claude/scripts/{greptile-resolve.sh → review-resolve.sh} +13 -3
  3. package/.cursor/rules/permissions-guidance.mdc +2 -2
  4. package/.forge/hooks/check-tdd.js +82 -5
  5. package/.forge/hooks/forge-native-hook.js +431 -0
  6. package/.forge/protected-paths.yaml +157 -0
  7. package/AGENTS.md +151 -61
  8. package/CHANGELOG.md +709 -0
  9. package/CLAUDE.md +9 -118
  10. package/QUICKSTART.md +175 -0
  11. package/README.md +275 -365
  12. package/bin/forge-cmd.js +120 -9
  13. package/bin/forge-preflight.js +26 -5
  14. package/bin/forge.js +532 -489
  15. package/docs/INDEX.md +93 -0
  16. package/docs/PROJECT_DESIGN.md +685 -0
  17. package/docs/architecture/index.md +66 -0
  18. package/docs/architecture/notes/README.md +35 -0
  19. package/docs/architecture/subsystems/README.md +46 -0
  20. package/docs/forge/TOOLCHAIN.md +670 -0
  21. package/docs/forge/VALIDATION.md +82 -0
  22. package/docs/{AGENT_INSTALL_PROMPT.md → guides/AGENT_INSTALL_PROMPT.md} +3 -3
  23. package/docs/guides/BEADS_GITHUB_SYNC.md +32 -0
  24. package/docs/{ENHANCED_ONBOARDING.md → guides/ENHANCED_ONBOARDING.md} +16 -12
  25. package/docs/guides/GREPTILE_SETUP.md +46 -0
  26. package/docs/guides/MANUAL_REVIEW_GUIDE.md +58 -0
  27. package/docs/guides/MIGRATION.md +56 -0
  28. package/docs/guides/SETUP.md +121 -0
  29. package/docs/guides/SUPPORT.md +190 -0
  30. package/docs/guides/WORKFLOW_TEMPLATES.md +74 -0
  31. package/docs/guides/memory-backends.md +183 -0
  32. package/docs/reference/ADAPTERS.md +128 -0
  33. package/docs/reference/AGENT_SKILL_PARITY.md +175 -0
  34. package/docs/reference/COMMANDS.md +214 -0
  35. package/docs/reference/DECISION_DRIFT_GUARDS.md +97 -0
  36. package/docs/{EXAMPLES.md → reference/EXAMPLES.md} +7 -5
  37. package/docs/reference/FORGE_KERNEL_STORAGE_MODEL.md +135 -0
  38. package/docs/reference/HERMES_INTEGRATION.md +118 -0
  39. package/docs/reference/INSIGHTS_RECAP.md +63 -0
  40. package/docs/reference/INSTALL.md +164 -0
  41. package/docs/reference/KERNEL_TAXONOMY_VALIDATION.md +161 -0
  42. package/docs/reference/PROTECTED_PATH_MANIFEST.md +25 -0
  43. package/docs/reference/RELEASE.md +68 -0
  44. package/docs/reference/RESEARCH_TEMPLATE.md +292 -0
  45. package/docs/{ROADMAP.md → reference/ROADMAP.md} +12 -9
  46. package/docs/reference/SKILLS.md +35 -0
  47. package/docs/reference/STATUS_BOARD.md +80 -0
  48. package/docs/reference/TEMPLATES.md +106 -0
  49. package/docs/{TOOLCHAIN.md → reference/TOOLCHAIN.md} +62 -47
  50. package/docs/reference/VALIDATION.md +82 -0
  51. package/docs/reference/agent-permissions.md +169 -0
  52. package/docs/reference/beads-to-kernel-migration-ux.md +61 -0
  53. package/docs/reference/control-plane-guarantees.md +125 -0
  54. package/docs/reference/dependency-chain.md +331 -0
  55. package/docs/reference/forge-kernel-issue-command-contract.md +161 -0
  56. package/docs/reference/forge-kernel-schema.md +72 -0
  57. package/docs/reference/kernel-conflict-evaluators.md +27 -0
  58. package/docs/reference/patch-md-format.md +77 -0
  59. package/docs/reference/protected-state-surfaces.md +59 -0
  60. package/docs/reference/shepherd.md +155 -0
  61. package/docs/reference/superpowers-analysis.md +320 -0
  62. package/docs/reference/superpowers-integration-options.md +404 -0
  63. package/docs/reference/test-environment.md +519 -0
  64. package/docs/reference/upgrade-safety.md +59 -0
  65. package/lefthook.yml +18 -0
  66. package/lib/activation/ensure-forge-home.js +135 -0
  67. package/lib/adapter-cli.js +307 -0
  68. package/lib/adapters/beads-issue-adapter.js +127 -0
  69. package/lib/adapters/beads-kernel-compat.js +1109 -0
  70. package/lib/adapters/greptile-review-adapter.js +141 -0
  71. package/lib/adapters/kernel-issue-adapter.js +101 -0
  72. package/lib/adapters/pr-state-adapter.js +484 -0
  73. package/lib/adoption-profiles.js +139 -0
  74. package/lib/agents/README.md +2 -6
  75. package/lib/agents/claude.plugin.json +3 -8
  76. package/lib/agents/codex.plugin.json +9 -1
  77. package/lib/agents/cursor.plugin.json +2 -6
  78. package/lib/agents/hermes.plugin.json +22 -0
  79. package/lib/agents-config.js +39 -1236
  80. package/lib/audit-evidence.js +282 -0
  81. package/lib/beads-detect.js +60 -0
  82. package/lib/beads-nudge.js +91 -0
  83. package/lib/beads-setup.js +121 -0
  84. package/lib/beads-sync-scaffold.js +25 -101
  85. package/lib/codex-skills.js +51 -1
  86. package/lib/commands/_aliases.js +248 -0
  87. package/lib/commands/_issue.js +780 -77
  88. package/lib/commands/_manifest.js +93 -0
  89. package/lib/commands/_registry.js +99 -34
  90. package/lib/commands/_resolve-command-opts.js +230 -0
  91. package/lib/commands/_serve-security.js +270 -0
  92. package/lib/commands/adapter.js +12 -0
  93. package/lib/commands/add.js +118 -0
  94. package/lib/commands/audit.js +70 -0
  95. package/lib/commands/blocked.js +5 -0
  96. package/lib/commands/board.js +64 -0
  97. package/lib/commands/claim.js +21 -2
  98. package/lib/commands/claims.js +7 -0
  99. package/lib/commands/clean.js +485 -75
  100. package/lib/commands/close.js +2 -2
  101. package/lib/commands/comment.js +5 -0
  102. package/lib/commands/control.js +148 -0
  103. package/lib/commands/create.js +2 -2
  104. package/lib/commands/dev.js +185 -7
  105. package/lib/commands/doc-gate.js +336 -0
  106. package/lib/commands/doctor.js +156 -0
  107. package/lib/commands/explain.js +15 -0
  108. package/lib/commands/export.js +237 -0
  109. package/lib/commands/gate.js +209 -0
  110. package/lib/commands/hooks.js +377 -0
  111. package/lib/commands/inbox.js +118 -0
  112. package/lib/commands/init.js +604 -0
  113. package/lib/commands/insights.js +79 -0
  114. package/lib/commands/issue.js +12 -1
  115. package/lib/commands/issues.js +17 -0
  116. package/lib/commands/lint.js +5 -0
  117. package/lib/commands/list.js +2 -2
  118. package/lib/commands/memory.js +81 -0
  119. package/lib/commands/merge.js +312 -0
  120. package/lib/commands/migrate.js +362 -0
  121. package/lib/commands/new.js +12 -0
  122. package/lib/commands/options.js +241 -0
  123. package/lib/commands/orient.js +13 -0
  124. package/lib/commands/orphans.js +5 -0
  125. package/lib/commands/patch.js +67 -0
  126. package/lib/commands/plan.js +481 -29
  127. package/lib/commands/pr.js +88 -0
  128. package/lib/commands/preflight.js +211 -0
  129. package/lib/commands/prime.js +13 -0
  130. package/lib/commands/push.js +135 -2
  131. package/lib/commands/ready.js +2 -2
  132. package/lib/commands/recall.js +171 -0
  133. package/lib/commands/recap.js +75 -0
  134. package/lib/commands/recommend.js +0 -1
  135. package/lib/commands/release.js +104 -0
  136. package/lib/commands/remember.js +140 -0
  137. package/lib/commands/role.js +99 -0
  138. package/lib/commands/serve.js +581 -0
  139. package/lib/commands/setup.js +900 -971
  140. package/lib/commands/shepherd.js +501 -0
  141. package/lib/commands/ship.js +59 -1
  142. package/lib/commands/show.js +2 -2
  143. package/lib/commands/stage.js +192 -0
  144. package/lib/commands/stale.js +5 -0
  145. package/lib/commands/status.js +158 -21
  146. package/lib/commands/sync.js +34 -46
  147. package/lib/commands/team.js +4 -1
  148. package/lib/commands/test.js +43 -27
  149. package/lib/commands/update.js +2 -2
  150. package/lib/commands/upgrade.js +47 -0
  151. package/lib/commands/validate.js +43 -18
  152. package/lib/commands/worktree.js +362 -99
  153. package/lib/config-writer.js +202 -0
  154. package/lib/control-plane.js +236 -0
  155. package/lib/core/runtime-graph.js +977 -0
  156. package/lib/dep-guard/keyword-ripple.js +2 -2
  157. package/lib/deprecated-sync-cleanup.js +362 -0
  158. package/lib/detect-agent.js +2 -28
  159. package/lib/detect-worktree.js +35 -9
  160. package/lib/doc-gate/declaration.js +177 -0
  161. package/lib/doc-gate/detect.js +289 -0
  162. package/lib/doc-gate/gate.js +375 -0
  163. package/lib/doc-gate/okf-config.js +128 -0
  164. package/lib/doc-gate/okf.js +429 -0
  165. package/lib/docs-command.js +1161 -6
  166. package/lib/forge-issues.js +382 -11
  167. package/lib/forge-lock.js +262 -0
  168. package/lib/gate-events.js +192 -0
  169. package/lib/global-flags.js +104 -0
  170. package/lib/greptile-match.js +7 -63
  171. package/lib/grounding/context-events.js +230 -0
  172. package/lib/grounding/read-first.js +112 -0
  173. package/lib/harness-capability-matrix.js +380 -0
  174. package/lib/hook-global-installer.js +347 -0
  175. package/lib/hook-renderer.js +541 -0
  176. package/lib/inbox.js +391 -0
  177. package/lib/insights.js +397 -0
  178. package/lib/issue-adapter.js +156 -0
  179. package/lib/issue-backend.js +145 -0
  180. package/lib/issue-render.js +220 -0
  181. package/lib/kernel/backing-issue.js +311 -0
  182. package/lib/kernel/broker.js +1218 -0
  183. package/lib/kernel/cli-broker-factory.js +130 -0
  184. package/lib/kernel/conflict-signal.js +82 -0
  185. package/lib/kernel/evaluators.js +195 -0
  186. package/lib/kernel/fs-class.js +495 -0
  187. package/lib/kernel/issue-command-contract.js +559 -0
  188. package/lib/kernel/issue-id-resolver.js +186 -0
  189. package/lib/kernel/lease-enforcer.js +158 -0
  190. package/lib/kernel/migrations.js +333 -0
  191. package/lib/kernel/owned-kernel.js +43 -0
  192. package/lib/kernel/planning-buckets-schema.js +109 -0
  193. package/lib/kernel/projection-jsonl-writer.js +450 -0
  194. package/lib/kernel/readiness-model.js +329 -0
  195. package/lib/kernel/schema.js +356 -0
  196. package/lib/kernel/sqlite-driver.js +2540 -0
  197. package/lib/kernel/taxonomy-validator.js +394 -0
  198. package/lib/lefthook-check.js +3 -2
  199. package/lib/lefthook-wiring.js +413 -0
  200. package/lib/mcp-config-renderer.js +288 -0
  201. package/lib/memory/graphiti-mcp.js +106 -0
  202. package/lib/memory/router.js +387 -0
  203. package/lib/memory/typed-api.js +102 -0
  204. package/lib/memory-digest.js +195 -0
  205. package/lib/merge-rules.js +395 -0
  206. package/lib/migrate-dry-run.js +466 -0
  207. package/lib/orientation.js +863 -0
  208. package/lib/package-manager-remediation.js +103 -0
  209. package/lib/package-root.js +381 -0
  210. package/lib/patch-intent.js +890 -0
  211. package/lib/plugin-catalog.js +3 -4
  212. package/lib/plugin-manager.js +0 -5
  213. package/lib/pr-bundle.js +186 -0
  214. package/lib/pr-monitor/auto-actions.js +175 -0
  215. package/lib/pr-monitor/differ.js +195 -0
  216. package/lib/pr-monitor/digest.js +206 -0
  217. package/lib/pr-monitor/events.js +0 -0
  218. package/lib/pr-monitor/gather.js +124 -0
  219. package/lib/pr-monitor/journal.js +299 -0
  220. package/lib/pr-monitor/monitor.js +146 -0
  221. package/lib/pr-monitor/render-sticky.js +192 -0
  222. package/lib/pr-monitor/upsert-sticky.js +169 -0
  223. package/lib/pr-monitor/watch-lifecycle.js +95 -0
  224. package/lib/pr-monitor/watch.js +247 -0
  225. package/lib/pr-pull.js +1314 -0
  226. package/lib/pr-shepherd.js +494 -0
  227. package/lib/pr-state-validator.js +59 -0
  228. package/lib/preflight/gates.js +237 -0
  229. package/lib/preflight/runner.js +116 -0
  230. package/lib/project-discovery.js +0 -53
  231. package/lib/project-memory.js +99 -497
  232. package/lib/protected-path-manifest.js +281 -0
  233. package/lib/protected-state-surfaces.js +387 -0
  234. package/lib/release-readiness.js +2105 -0
  235. package/lib/reset.js +59 -45
  236. package/lib/review-adapter.js +68 -0
  237. package/lib/rules-sync.js +260 -0
  238. package/lib/runtime-health.js +241 -20
  239. package/lib/safety-config-renderer.js +268 -0
  240. package/lib/setup-action-log.js +1 -7
  241. package/lib/setup.js +27 -65
  242. package/lib/shell-utils.js +76 -6
  243. package/lib/skills-sync.js +330 -0
  244. package/lib/smart-status/scoring.js +17 -3
  245. package/lib/status/beads-snapshot.js +45 -2
  246. package/lib/status/presenter.js +169 -18
  247. package/lib/status/snapshot.js +186 -0
  248. package/lib/sync-backend.js +202 -0
  249. package/lib/untrusted-content.js +52 -0
  250. package/lib/upgrade-safety.js +251 -0
  251. package/lib/workflow/enforce-stage.js +351 -45
  252. package/lib/workflow/stage-transition.js +115 -0
  253. package/lib/workflow/stages.js +30 -6
  254. package/lib/workflow/state-manager.js +11 -22
  255. package/lib/workflow/state.js +23 -1
  256. package/lib/workflow-profiles.js +17 -5
  257. package/package.json +37 -35
  258. package/rules/documentation.md +19 -0
  259. package/rules/kernel-tracking.md +26 -0
  260. package/rules/security.md +22 -0
  261. package/rules/tdd.md +20 -0
  262. package/rules/workflow.md +27 -0
  263. package/scripts/auto-backing-issue.js +47 -0
  264. package/scripts/beads-context.sh +81 -57
  265. package/scripts/beads-upgrade-smoke.sh +24 -3
  266. package/scripts/bootstrap-windows-tools.sh +78 -0
  267. package/scripts/branch-protection.js +2 -3
  268. package/scripts/check-agents.js +34 -137
  269. package/scripts/commitlint.js +3 -1
  270. package/scripts/conflict-detect.sh +3 -0
  271. package/scripts/dep-guard.sh +22 -3
  272. package/scripts/file-index.sh +3 -0
  273. package/scripts/forge-team/lib/claim.sh +34 -18
  274. package/scripts/forge-team/lib/dashboard.sh +61 -86
  275. package/scripts/forge-team/lib/epic.sh +99 -263
  276. package/scripts/forge-team/lib/hooks.sh +26 -28
  277. package/scripts/forge-team/lib/identity.sh +4 -4
  278. package/scripts/forge-team/lib/sync-github.sh +49 -84
  279. package/scripts/forge-team/lib/verify.sh +93 -83
  280. package/scripts/forge-team/lib/workload.sh +41 -65
  281. package/scripts/forge-team/tests/claim.test.sh +25 -19
  282. package/scripts/forge-team/tests/dashboard.test.sh +31 -46
  283. package/scripts/forge-team/tests/epic.test.sh +52 -71
  284. package/scripts/forge-team/tests/hooks.test.sh +38 -50
  285. package/scripts/forge-team/tests/identity.test.sh +3 -3
  286. package/scripts/forge-team/tests/integration.test.sh +44 -66
  287. package/scripts/forge-team/tests/sync-github.test.sh +50 -83
  288. package/scripts/forge-team/tests/verify.test.sh +37 -46
  289. package/scripts/forge-team/tests/workflow-integration.test.sh +4 -4
  290. package/scripts/forge-team/tests/workload.test.sh +32 -66
  291. package/scripts/gen-command-manifest.js +153 -0
  292. package/scripts/gen-embedded-assets.mjs +129 -0
  293. package/scripts/install.ps1 +139 -0
  294. package/scripts/install.sh +268 -0
  295. package/scripts/lib/release-asset.mjs +84 -0
  296. package/scripts/parity-check.mjs +145 -0
  297. package/scripts/parity-check.test.mjs +58 -0
  298. package/scripts/pin-agentic-workflow-images.js +112 -0
  299. package/scripts/pr-auto-actions.js +93 -0
  300. package/scripts/pr-coordinator.sh +3 -0
  301. package/scripts/pr-verdict-label.js +50 -0
  302. package/scripts/preflight-sonar.eslint.config.mjs +44 -0
  303. package/scripts/preflight.sh +21 -94
  304. package/scripts/protected-state-check.js +104 -0
  305. package/scripts/smart-status.sh +60 -57
  306. package/scripts/spikes/config-race-bench.js +111 -0
  307. package/scripts/spikes/harness-capability-matrix.js +13 -0
  308. package/scripts/spikes/patch-anchor-stability-bench.js +125 -0
  309. package/scripts/spikes/protected-path-manifest.js +20 -0
  310. package/scripts/spikes/skill-auto-invoke-parity.js +292 -0
  311. package/scripts/sync-agent-skills.js +62 -0
  312. package/scripts/sync-utils.sh +3 -0
  313. package/scripts/test-ci-shard.js +13 -6
  314. package/scripts/test.js +95 -12
  315. package/skills/claim-safety/SKILL.md +102 -0
  316. package/skills/claim-safety/evals/evals.json +46 -0
  317. package/{.github/prompts/dev.prompt.md → skills/dev/SKILL.md} +44 -50
  318. package/skills/dev/evals/evals.json +50 -0
  319. package/skills/hermes-forge/SKILL.md +185 -0
  320. package/skills/hermes-forge/evals/evals.json +46 -0
  321. package/skills/issue-basics/SKILL.md +111 -0
  322. package/skills/issue-basics/evals/evals.json +46 -0
  323. package/skills/kernel/SKILL.md +166 -0
  324. package/skills/kernel/evals/evals.json +50 -0
  325. package/skills/memory/SKILL.md +102 -0
  326. package/skills/parallel-deep-research/SKILL.md +14 -11
  327. package/skills/parallel-deep-research/evals/evals.json +11 -27
  328. package/{.github/prompts/plan.prompt.md → skills/plan/SKILL.md} +132 -157
  329. package/skills/plan/evals/evals.json +42 -0
  330. package/skills/research/SKILL.md +195 -0
  331. package/skills/research/evals/evals.json +42 -0
  332. package/{.github/prompts/review.prompt.md → skills/review/SKILL.md} +98 -62
  333. package/skills/review/evals/evals.json +42 -0
  334. package/skills/rollback/SKILL.md +110 -0
  335. package/skills/rollback/evals/evals.json +46 -0
  336. package/skills/rollback/references/methods.md +204 -0
  337. package/{.cursor/commands/rollback.md → skills/rollback/references/workflow-integration.md} +10 -284
  338. package/skills/shepherd/SKILL.md +66 -0
  339. package/skills/shepherd/evals/evals.json +42 -0
  340. package/{.github/prompts/ship.prompt.md → skills/ship/SKILL.md} +81 -45
  341. package/skills/ship/evals/evals.json +42 -0
  342. package/skills/smith/SKILL.md +142 -0
  343. package/skills/smith/evals/evals.json +46 -0
  344. package/skills/smith/references/autonomy-and-gates.md +94 -0
  345. package/{.github/prompts/sonarcloud.prompt.md → skills/sonarcloud/SKILL.md} +14 -3
  346. package/skills/sonarcloud/evals/evals.json +46 -0
  347. package/skills/sonarcloud-analysis/SKILL.md +18 -13
  348. package/skills/sonarcloud-analysis/evals/evals.json +11 -15
  349. package/{.github/prompts/status.prompt.md → skills/status/SKILL.md} +20 -10
  350. package/skills/status/evals/evals.json +50 -0
  351. package/skills/triage-ready/SKILL.md +121 -0
  352. package/skills/triage-ready/evals/evals.json +42 -0
  353. package/{.github/prompts/validate.prompt.md → skills/validate/SKILL.md} +52 -29
  354. package/skills/validate/evals/evals.json +42 -0
  355. package/skills/verify/SKILL.md +299 -0
  356. package/skills/verify/evals/evals.json +50 -0
  357. package/.claude/commands/dev.md +0 -345
  358. package/.claude/commands/plan.md +0 -566
  359. package/.claude/commands/premerge.md +0 -186
  360. package/.claude/commands/research.md +0 -42
  361. package/.claude/commands/review.md +0 -451
  362. package/.claude/commands/rollback.md +0 -721
  363. package/.claude/commands/ship.md +0 -213
  364. package/.claude/commands/sonarcloud.md +0 -152
  365. package/.claude/commands/status.md +0 -90
  366. package/.claude/commands/validate.md +0 -288
  367. package/.claude/commands/verify.md +0 -269
  368. package/.claude/rules/workflow.md +0 -121
  369. package/.cline/workflows/dev.md +0 -342
  370. package/.cline/workflows/plan.md +0 -563
  371. package/.cline/workflows/premerge.md +0 -183
  372. package/.cline/workflows/research.md +0 -39
  373. package/.cline/workflows/review.md +0 -448
  374. package/.cline/workflows/rollback.md +0 -718
  375. package/.cline/workflows/ship.md +0 -210
  376. package/.cline/workflows/sonarcloud.md +0 -146
  377. package/.cline/workflows/status.md +0 -87
  378. package/.cline/workflows/validate.md +0 -285
  379. package/.cline/workflows/verify.md +0 -266
  380. package/.codex/config.toml +0 -11
  381. package/.codex/skills/dev/SKILL.md +0 -345
  382. package/.codex/skills/plan/SKILL.md +0 -566
  383. package/.codex/skills/premerge/SKILL.md +0 -186
  384. package/.codex/skills/research/SKILL.md +0 -42
  385. package/.codex/skills/review/SKILL.md +0 -451
  386. package/.codex/skills/rollback/SKILL.md +0 -721
  387. package/.codex/skills/ship/SKILL.md +0 -213
  388. package/.codex/skills/sonarcloud/SKILL.md +0 -149
  389. package/.codex/skills/status/SKILL.md +0 -90
  390. package/.codex/skills/validate/SKILL.md +0 -288
  391. package/.codex/skills/verify/SKILL.md +0 -269
  392. package/.cursor/commands/dev.md +0 -342
  393. package/.cursor/commands/plan.md +0 -563
  394. package/.cursor/commands/premerge.md +0 -183
  395. package/.cursor/commands/research.md +0 -39
  396. package/.cursor/commands/review.md +0 -448
  397. package/.cursor/commands/ship.md +0 -210
  398. package/.cursor/commands/sonarcloud.md +0 -146
  399. package/.cursor/commands/status.md +0 -87
  400. package/.cursor/commands/validate.md +0 -285
  401. package/.cursor/commands/verify.md +0 -266
  402. package/.cursorrules +0 -149
  403. package/.github/prompts/premerge.prompt.md +0 -188
  404. package/.github/prompts/research.prompt.md +0 -44
  405. package/.github/prompts/rollback.prompt.md +0 -723
  406. package/.github/prompts/verify.prompt.md +0 -271
  407. package/.github/workflows/beads-to-github.yml +0 -89
  408. package/.github/workflows/github-to-beads.yml +0 -100
  409. package/.kilocode/workflows/dev.md +0 -346
  410. package/.kilocode/workflows/plan.md +0 -567
  411. package/.kilocode/workflows/premerge.md +0 -187
  412. package/.kilocode/workflows/research.md +0 -43
  413. package/.kilocode/workflows/review.md +0 -452
  414. package/.kilocode/workflows/rollback.md +0 -722
  415. package/.kilocode/workflows/ship.md +0 -214
  416. package/.kilocode/workflows/sonarcloud.md +0 -150
  417. package/.kilocode/workflows/status.md +0 -91
  418. package/.kilocode/workflows/validate.md +0 -289
  419. package/.kilocode/workflows/verify.md +0 -270
  420. package/.opencode/commands/dev.md +0 -345
  421. package/.opencode/commands/plan.md +0 -566
  422. package/.opencode/commands/premerge.md +0 -186
  423. package/.opencode/commands/research.md +0 -42
  424. package/.opencode/commands/review.md +0 -451
  425. package/.opencode/commands/rollback.md +0 -721
  426. package/.opencode/commands/ship.md +0 -213
  427. package/.opencode/commands/sonarcloud.md +0 -149
  428. package/.opencode/commands/status.md +0 -90
  429. package/.opencode/commands/validate.md +0 -288
  430. package/.opencode/commands/verify.md +0 -269
  431. package/.roo/commands/dev.md +0 -346
  432. package/.roo/commands/plan.md +0 -567
  433. package/.roo/commands/premerge.md +0 -187
  434. package/.roo/commands/research.md +0 -43
  435. package/.roo/commands/review.md +0 -452
  436. package/.roo/commands/rollback.md +0 -722
  437. package/.roo/commands/ship.md +0 -214
  438. package/.roo/commands/sonarcloud.md +0 -150
  439. package/.roo/commands/status.md +0 -91
  440. package/.roo/commands/validate.md +0 -289
  441. package/.roo/commands/verify.md +0 -270
  442. package/docs/BEADS_GITHUB_SYNC.md +0 -281
  443. package/docs/GREPTILE_SETUP.md +0 -400
  444. package/docs/MANUAL_REVIEW_GUIDE.md +0 -106
  445. package/docs/SETUP.md +0 -663
  446. package/docs/VALIDATION.md +0 -363
  447. package/lib/agents/cline.plugin.json +0 -29
  448. package/lib/agents/copilot.plugin.json +0 -24
  449. package/lib/agents/kilocode.plugin.json +0 -22
  450. package/lib/agents/opencode.plugin.json +0 -23
  451. package/lib/agents/roo.plugin.json +0 -30
  452. package/lib/beads-bootstrap.js +0 -225
  453. package/lib/beads-health-check.js +0 -188
  454. package/lib/commands/commands-reset.js +0 -147
  455. package/opencode.json +0 -67
  456. package/scripts/beads-context.test.js +0 -584
  457. package/scripts/github-beads-sync/comment.mjs +0 -64
  458. package/scripts/github-beads-sync/config.mjs +0 -148
  459. package/scripts/github-beads-sync/github-api.mjs +0 -131
  460. package/scripts/github-beads-sync/index.mjs +0 -356
  461. package/scripts/github-beads-sync/label-mapper.mjs +0 -54
  462. package/scripts/github-beads-sync/mapping.mjs +0 -132
  463. package/scripts/github-beads-sync/reverse-sync-cli.mjs +0 -31
  464. package/scripts/github-beads-sync/reverse-sync.mjs +0 -162
  465. package/scripts/github-beads-sync/run-bd.mjs +0 -161
  466. package/scripts/github-beads-sync/sanitize.mjs +0 -121
  467. package/scripts/github-beads-sync.config.json +0 -26
  468. package/scripts/sync-commands.js +0 -600
package/docs/SETUP.md DELETED
@@ -1,663 +0,0 @@
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: Bun (Recommended)
21
-
22
- ```bash
23
- # Step 1: Install the package (as dev dependency)
24
- bun add -D forge-workflow
25
-
26
- # Step 2: Interactive setup
27
- bunx forge setup
28
- ```
29
-
30
- **Interactive prompts**:
31
- 1. Which agents do you use?
32
- 2. Install Beads? (y/n) - Git-backed issue tracking
33
- 3. Configure external services? (optional)
34
-
35
- **What gets created**:
36
- - `AGENTS.md` - Universal instructions (always)
37
- - Agent-specific files based on your selection
38
- - `docs/` folder with workflow guides
39
-
40
- ### Option 2: Specify Agents Directly
41
-
42
- ```bash
43
- # Install for specific agents
44
- bunx forge setup --agents claude,cursor,codex
45
-
46
- # Install for all agents
47
- bunx forge setup --all
48
- ```
49
-
50
- ### Option 3: curl (One-Command Install)
51
-
52
- ```bash
53
- curl -fsSL https://raw.githubusercontent.com/harshanandak/forge/main/install.sh | bash
54
- ```
55
-
56
- > **Note**: `install.sh` is a thin bootstrapper that installs forge-workflow and delegates to `bunx forge setup`. All setup logic lives in the npm package.
57
-
58
- **Interactive prompts**:
59
- 1. Which agents do you use?
60
- 2. Install Beads? (y/n)
61
-
62
- ### Option 4: bun
63
-
64
- ```bash
65
- bun add -D forge-workflow
66
- bunx forge setup
67
- ```
68
-
69
- ---
70
-
71
- ## Agent-Specific Setup
72
-
73
- ### Claude Code
74
-
75
- **Files created**:
76
- - `CLAUDE.md` → Linked to `AGENTS.md`
77
- - `.claude/commands/` → 7 slash commands
78
- - `.claude/rules/workflow.md` → Workflow rules
79
- - `.claude/skills/forge-workflow/` → Skill files
80
-
81
- **Usage**:
82
- ```bash
83
- /status
84
- /plan feature-name
85
- /dev
86
- /validate
87
- # ... etc
88
- ```
89
-
90
- **Skills available**:
91
- - `forge-workflow` - All 7 stages
92
- - `parallel-deep-research` - Deep analysis and web research (if PARALLEL_API_KEY configured)
93
- - `sonarcloud-analysis` - Code quality (if SONARCLOUD_TOKEN configured)
94
-
95
- ---
96
-
97
- ### Cursor
98
-
99
- **Files created**:
100
- - `.cursorrules` → Linked to `AGENTS.md`
101
- - `.cursor/rules/forge-workflow.mdc` → MDC rules
102
- - `.cursor/skills/forge-workflow/` → Skill files
103
-
104
- **Usage**:
105
- Cursor reads `.cursorrules` and follows the 7-stage workflow.
106
-
107
- **Commands**:
108
- Use Composer or Chat to reference stages:
109
- ```
110
- "I'm at the /dev stage - help me write tests first"
111
- ```
112
-
113
- ---
114
-
115
- ### GitHub Copilot
116
-
117
- **Files created**:
118
- - `.github/copilot-instructions.md` → Linked to `AGENTS.md`
119
- - `.github/prompts/` → Workflow prompts
120
-
121
- **Usage**:
122
- Copilot reads instructions from `.github/copilot-instructions.md`.
123
-
124
- **In Copilot Chat**:
125
- ```
126
- @workspace I'm starting a new feature, help me with the /plan stage
127
- ```
128
-
129
- ---
130
-
131
- ### Codex CLI
132
-
133
- **Files created**:
134
- - `AGENTS.md` → Primary instructions
135
-
136
- **Usage**:
137
- Codex CLI reads `AGENTS.md` and follows the documented workflow.
138
-
139
- **Example**:
140
- ```
141
- codex "Let's follow the Forge workflow. Start with /plan login-button."
142
- ```
143
-
144
- ---
145
-
146
- ### Kilo Code, OpenCode, Goose
147
-
148
- **Files created**:
149
- - Agent-specific config pointing to `AGENTS.md`
150
- - Skill files in agent's skill directory
151
-
152
- **Usage**:
153
- All agents read `AGENTS.md` and follow the documented workflow.
154
-
155
- **Example (any agent)**:
156
- ```
157
- "Let's follow the Forge workflow. I want to add a login button.
158
- Start with the /plan stage."
159
- ```
160
-
161
- ---
162
-
163
- ## Prerequisites
164
-
165
- ### Required
166
-
167
- #### Git
168
-
169
- ```bash
170
- # Verify installation
171
- git --version
172
-
173
- # If not installed:
174
- # macOS: brew install git
175
- # Windows: winget install Git.Git
176
- # Linux: sudo apt install git
177
- ```
178
-
179
- #### GitHub CLI
180
-
181
- **Required for** `/ship`, `/review`, `/premerge` commands.
182
-
183
- ```bash
184
- # macOS
185
- brew install gh
186
-
187
- # Windows
188
- winget install GitHub.cli
189
-
190
- # Linux
191
- sudo apt install gh
192
-
193
- # Authenticate
194
- gh auth login
195
- ```
196
-
197
- **Follow prompts**:
198
- 1. Select "GitHub.com"
199
- 2. Select "HTTPS"
200
- 3. Select "Login with a web browser"
201
- 4. Copy one-time code and paste in browser
202
-
203
- **Verify**:
204
- ```bash
205
- gh auth status
206
- ```
207
-
208
- ---
209
-
210
- ### Recommended
211
-
212
- #### Beads - Issue Tracking
213
-
214
- **Recommended for**: Multi-session work, team collaboration
215
-
216
- ```bash
217
- # Install globally
218
- bun install -g @beads/bd
219
-
220
- # Initialize in your project
221
- cd your-project
222
- bd init
223
-
224
- # Verify
225
- bd list
226
- ```
227
-
228
- **What it does**:
229
- - Git-backed issue tracking
230
- - Survives context clearing
231
- - Dependency tracking
232
- - Team-shareable
233
-
234
- [Full Beads guide in TOOLCHAIN.md](TOOLCHAIN.md#beads---issue-tracking-across-sessions)
235
-
236
- ---
237
-
238
- ## Toolchain Setup
239
-
240
- ### Beads Configuration
241
-
242
- After `bd init`, customize `.beads/config.yaml`:
243
-
244
- ```yaml
245
- # .beads/config.yaml
246
- project:
247
- name: "your-project"
248
- prefix: "PROJ" # Issue IDs: PROJ-1, PROJ-2, etc.
249
-
250
- priorities:
251
- 0: "critical"
252
- 1: "high"
253
- 2: "medium"
254
- 3: "low"
255
- 4: "backlog"
256
-
257
- statuses:
258
- - "open"
259
- - "in_progress"
260
- - "blocked"
261
- - "done"
262
-
263
- labels:
264
- - "bug"
265
- - "feature"
266
- - "chore"
267
- - "security"
268
- ```
269
-
270
- **Custom prefix**:
271
- ```bash
272
- bd init --prefix MYPROJ
273
- ```
274
-
275
- **Stealth mode** (local only, don't commit):
276
- ```bash
277
- bd init --stealth
278
- ```
279
-
280
- ### Beads GitHub Sync
281
-
282
- The `--sync` flag during setup scaffolds a GitHub Actions workflow that syncs Beads issues with GitHub Issues bidirectionally.
283
-
284
- ```bash
285
- # Enable Beads sync during setup
286
- bunx forge setup --sync
287
- ```
288
-
289
- **What gets scaffolded**:
290
- - `.github/workflows/beads-sync.yml` - GitHub Actions workflow for bidirectional sync
291
- - PAT (Personal Access Token) configuration via `gh secret set`
292
-
293
- **PAT requirements**:
294
- - A GitHub PAT with `repo` scope is required for the sync workflow
295
- - During setup, Forge prompts to create and store the token as `BEADS_SYNC_TOKEN`
296
- - The token is stored as a GitHub Actions secret (never committed to the repo)
297
-
298
- **Manual PAT setup** (if skipped during setup):
299
- ```bash
300
- # Create a PAT at https://github.com/settings/tokens
301
- # Then store it as a repo secret:
302
- gh secret set BEADS_SYNC_TOKEN --body "ghp_your_token_here"
303
- ```
304
-
305
- **How sync works**:
306
- - On push: Beads issues are synced to GitHub Issues
307
- - On issue change: GitHub Issues are synced back to Beads
308
- - Conflict resolution: last-write-wins with timestamps
309
-
310
- ---
311
-
312
- ## External Services
313
-
314
- Forge integrates with external services for enhanced capabilities. **All are optional** - Forge works standalone.
315
-
316
- ### Code Review Tools
317
-
318
- | Tool | Pricing | Best For | Setup Time |
319
- |------|---------|----------|------------|
320
- | **GitHub Code Quality** | FREE | All repos | 0 min (built-in) |
321
- | **CodeRabbit** | FREE (OSS) | Open source | 2 min |
322
- | **Greptile** | $99+/mo | Enterprise | 5 min |
323
-
324
- **Recommendation**: Start with GitHub Code Quality (FREE, no setup).
325
-
326
- #### GitHub Code Quality Setup
327
-
328
- **Already enabled!** Zero configuration required.
329
-
330
- GitHub provides built-in code quality features:
331
- - Code scanning
332
- - Dependabot alerts
333
- - Secret scanning
334
- - Pull request checks
335
-
336
- #### CodeRabbit Setup (FREE for Open Source)
337
-
338
- ```bash
339
- # 1. Visit https://coderabbit.ai
340
- # 2. Click "Sign in with GitHub"
341
- # 3. Install GitHub App
342
- # 4. Select repositories
343
-
344
- # Done! CodeRabbit reviews all PRs automatically.
345
- ```
346
-
347
- #### Greptile Setup (Paid - Enterprise)
348
-
349
- ```bash
350
- # 1. Get API key from https://app.greptile.com
351
- # 2. Add to .env.local
352
- GREPTILE_API_KEY=your-key
353
- CODE_REVIEW_TOOL=greptile
354
-
355
- # 3. Index repository (one-time)
356
- curl -X POST "https://api.greptile.com/v2/repositories" \
357
- -H "Authorization: Bearer $GREPTILE_API_KEY" \
358
- -H "Content-Type: application/json" \
359
- -d '{
360
- "remote": "github",
361
- "repository": "owner/repo",
362
- "branch": "main"
363
- }'
364
- ```
365
-
366
- ---
367
-
368
- ### Code Quality Tools
369
-
370
- | Tool | Pricing | Best For | Setup Time |
371
- |------|---------|----------|------------|
372
- | **ESLint** | FREE | All projects | 0 min (built-in) |
373
- | **SonarCloud** | 50k LoC FREE | Cloud hosting | 10 min |
374
- | **SonarQube** | FREE | Self-hosted | 15 min |
375
-
376
- **Recommendation**: Start with ESLint (FREE, already in your project).
377
-
378
- #### ESLint Setup
379
-
380
- **Already configured!** Just run:
381
-
382
- ```bash
383
- bun run lint
384
- # or: npm run lint
385
- ```
386
-
387
- #### SonarCloud Setup
388
-
389
- ```bash
390
- # 1. Create account at https://sonarcloud.io
391
- # 2. Create new project, select your repo
392
- # 3. Get token from Account → Security
393
- # 4. Add to .env.local
394
- SONAR_TOKEN=your-token
395
- SONAR_ORGANIZATION=your-org
396
- SONAR_PROJECT_KEY=your-project
397
- CODE_QUALITY_TOOL=sonarcloud
398
-
399
- # 5. Create sonar-project.properties
400
- cat > sonar-project.properties << EOF
401
- sonar.organization=$SONAR_ORGANIZATION
402
- sonar.projectKey=$SONAR_PROJECT_KEY
403
- sonar.sources=src
404
- sonar.tests=tests
405
- sonar.test.inclusions=**/*.test.js,**/*.spec.js
406
- sonar.javascript.lcov.reportPaths=coverage/lcov.info
407
- EOF
408
-
409
- # 6. Run analysis locally
410
- bunx sonarqube-scanner
411
-
412
- # 7. Add to CI (.github/workflows/quality.yml)
413
- ```
414
-
415
- **GitHub Actions**:
416
- ```yaml
417
- # .github/workflows/quality.yml
418
- name: Code Quality
419
- on: [push, pull_request]
420
-
421
- jobs:
422
- sonarcloud:
423
- runs-on: ubuntu-latest
424
- steps:
425
- - uses: actions/checkout@v3
426
- with:
427
- fetch-depth: 0
428
- - uses: sonarsource/sonarcloud-github-action@master
429
- env:
430
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
431
- SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
432
- ```
433
-
434
- #### SonarQube Setup (Self-Hosted)
435
-
436
- ```bash
437
- # 1. Start SonarQube with Docker
438
- docker run -d \
439
- --name sonarqube \
440
- -p 9000:9000 \
441
- sonarqube:community
442
-
443
- # 2. Access at http://localhost:9000
444
- # Default login: admin/admin
445
- # Change password when prompted
446
-
447
- # 3. Create project in SonarQube UI
448
- # 4. Generate token (Administration → Security → Users)
449
- # 5. Add to .env.local
450
- SONARQUBE_URL=http://localhost:9000
451
- SONARQUBE_TOKEN=your-token
452
- CODE_QUALITY_TOOL=sonarqube
453
-
454
- # 6. Create sonar-project.properties
455
- cat > sonar-project.properties << EOF
456
- sonar.host.url=http://localhost:9000
457
- sonar.login=$SONARQUBE_TOKEN
458
- sonar.projectKey=your-project
459
- sonar.sources=src
460
- sonar.tests=tests
461
- EOF
462
-
463
- # 7. Run analysis
464
- bunx sonarqube-scanner
465
- ```
466
-
467
- ---
468
-
469
- ### Research Tools
470
-
471
- #### Parallel AI (Optional - Paid)
472
-
473
- **Used in** `/plan` stage for deep web research.
474
-
475
- ```bash
476
- # 1. Get API key from https://platform.parallel.ai
477
- # 2. Add to .env.local
478
- PARALLEL_API_KEY=your-key
479
-
480
- # 3. Test
481
- API_KEY=$(grep "^PARALLEL_API_KEY=" .env.local | cut -d= -f2)
482
- curl -s -X POST "https://api.parallel.ai/v1beta/search" \
483
- -H "x-api-key: $API_KEY" \
484
- -H "Content-Type: application/json" \
485
- -H "parallel-beta: search-extract-2025-10-10" \
486
- -d '{"objective": "test query"}'
487
- ```
488
-
489
- **Pricing**: Pay-as-you-go
490
- **Alternative**: Manual web search (FREE)
491
-
492
- ---
493
-
494
- ## Environment Variables
495
-
496
- ### Configuration File
497
-
498
- Create `.env.local` in your project root:
499
-
500
- ```bash
501
- # .env.local (add to .gitignore!)
502
-
503
- # ===== TOOL SELECTION =====
504
- CODE_REVIEW_TOOL=github-code-quality # or: coderabbit, greptile, none
505
- CODE_QUALITY_TOOL=eslint # or: sonarcloud, sonarqube, none
506
-
507
- # ===== REQUIRED: GitHub =====
508
- GITHUB_TOKEN=ghp_xxxxxxxxxxxx
509
-
510
- # ===== OPTIONAL: Research =====
511
- PARALLEL_API_KEY=your-parallel-ai-key
512
-
513
- # ===== OPTIONAL: Code Review (Greptile) =====
514
- GREPTILE_API_KEY=your-greptile-key
515
-
516
- # ===== OPTIONAL: Code Quality (SonarCloud) =====
517
- SONAR_TOKEN=your-sonarcloud-token
518
- SONAR_ORGANIZATION=your-org
519
- SONAR_PROJECT_KEY=your-project
520
-
521
- # ===== OPTIONAL: Code Quality (SonarQube) =====
522
- SONARQUBE_URL=http://localhost:9000
523
- SONARQUBE_TOKEN=your-token
524
- ```
525
-
526
- ### Loading Variables
527
-
528
- **Forge includes a helper**:
529
-
530
- ```bash
531
- # Load all variables
532
- source .claude/scripts/load-env.sh
533
-
534
- # Or manually
535
- export $(grep -v '^#' .env.local | xargs)
536
- ```
537
-
538
- **In Claude Code** (automatic):
539
- Variables are loaded when running commands.
540
-
541
- **Security**:
542
- ```bash
543
- # Add to .gitignore
544
- echo ".env.local" >> .gitignore
545
- ```
546
-
547
- ---
548
-
549
- ## Directory Structure After Setup
550
-
551
- ```
552
- your-project/
553
- ├── AGENTS.md # Universal (always created)
554
- ├── CLAUDE.md # If Claude selected
555
- ├── .cursorrules # If Cursor selected
556
-
557
- ├── .claude/ # Claude Code files
558
- │ ├── commands/ # 7 workflow commands
559
- │ ├── rules/workflow.md
560
- │ ├── skills/forge-workflow/
561
- │ └── scripts/load-env.sh
562
-
563
- ├── .cursor/ # Cursor files
564
- │ ├── rules/forge-workflow.mdc
565
- │ └── skills/forge-workflow/
566
-
567
- ├── docs/
568
- │ ├── TOOLCHAIN.md # Tool reference
569
- │ ├── SETUP.md # This file
570
- │ ├── EXAMPLES.md # Real examples
571
- │ ├── planning/PROGRESS.md # Progress tracking
572
- │ └── research/TEMPLATE.md # Research template
573
-
574
- ├── .beads/ # If Beads installed
575
- │ ├── issues.jsonl
576
- │ ├── config.yaml
577
- │ └── .gitignore
578
-
579
- └── .env.local # Your configuration (add to .gitignore!)
580
- ```
581
-
582
- ---
583
-
584
- ## Troubleshooting
585
-
586
- ### "Command not found: bunx forge"
587
-
588
- ```bash
589
- # Ensure forge-workflow is installed
590
- bun pm ls | grep forge-workflow
591
-
592
- # If not, install
593
- bun add -D forge-workflow
594
- ```
595
-
596
- ### "Permission denied: gh"
597
-
598
- ```bash
599
- # Authenticate GitHub CLI
600
- gh auth login
601
-
602
- # Or check status
603
- gh auth status
604
- ```
605
-
606
- ### "Beads: command not found"
607
-
608
- ```bash
609
- # Install globally
610
- bun install -g @beads/bd
611
-
612
- # Verify
613
- bd --version
614
- ```
615
-
616
- ### "SonarQube connection refused"
617
-
618
- ```bash
619
- # Check if SonarQube is running
620
- docker ps | grep sonarqube
621
-
622
- # If not, start it
623
- docker start sonarqube
624
-
625
- # Or run fresh
626
- docker run -d --name sonarqube -p 9000:9000 sonarqube:community
627
- ```
628
-
629
- ### "Greptile API rate limit"
630
-
631
- **Wait** for rate limit to reset (usually 1 minute).
632
-
633
- **Or upgrade** to higher tier at https://greptile.com/pricing
634
-
635
- ### "Parallel AI API key invalid"
636
-
637
- ```bash
638
- # Verify key in .env.local
639
- grep PARALLEL_API_KEY .env.local
640
-
641
- # Test key
642
- curl -s -X POST "https://api.parallel.ai/v1beta/search" \
643
- -H "x-api-key: YOUR_KEY" \
644
- -H "Content-Type: application/json" \
645
- -H "parallel-beta: search-extract-2025-10-10" \
646
- -d '{"objective": "test"}'
647
- ```
648
-
649
- ---
650
-
651
- ## Next Steps
652
-
653
- ✅ Setup complete? Try your [first feature](../QUICKSTART.md)
654
-
655
- 📖 Learn the workflow in [AGENTS.md](../AGENTS.md)
656
-
657
- 🛠️ Explore toolchain in [TOOLCHAIN.md](TOOLCHAIN.md)
658
-
659
- 🎯 See examples in [EXAMPLES.md](EXAMPLES.md)
660
-
661
- ---
662
-
663
- **Questions?** → [GitHub Discussions](https://github.com/harshanandak/forge/discussions)