forge-workflow 0.0.9 → 0.1.0-beta.2

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 (479) 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 +3 -0
  5. package/.forge/hooks/forge-native-hook.js +245 -0
  6. package/.forge/protected-paths.yaml +157 -0
  7. package/AGENTS.md +151 -61
  8. package/CHANGELOG.md +681 -0
  9. package/CLAUDE.md +9 -106
  10. package/QUICKSTART.md +171 -0
  11. package/README.md +271 -363
  12. package/bin/forge-cmd.js +120 -9
  13. package/bin/forge-preflight.js +26 -5
  14. package/bin/forge.js +466 -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/{TOOLCHAIN.md → forge/TOOLCHAIN.md} +56 -47
  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 +118 -0
  29. package/docs/guides/SUPPORT.md +185 -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 +205 -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/reference/TOOLCHAIN.md +658 -0
  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 +115 -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/adapter-cli.js +307 -0
  67. package/lib/adapters/beads-issue-adapter.js +127 -0
  68. package/lib/adapters/beads-kernel-compat.js +1042 -0
  69. package/lib/adapters/greptile-review-adapter.js +141 -0
  70. package/lib/adapters/kernel-issue-adapter.js +101 -0
  71. package/lib/adapters/pr-state-adapter.js +484 -0
  72. package/lib/adoption-profiles.js +126 -0
  73. package/lib/agents/README.md +2 -6
  74. package/lib/agents/claude.plugin.json +3 -8
  75. package/lib/agents/codex.plugin.json +9 -1
  76. package/lib/agents/cursor.plugin.json +2 -6
  77. package/lib/agents/hermes.plugin.json +22 -0
  78. package/lib/agents-config.js +39 -1236
  79. package/lib/audit-evidence.js +282 -0
  80. package/lib/beads-setup.js +225 -28
  81. package/lib/beads-sync-scaffold.js +36 -107
  82. package/lib/codex-skills.js +51 -1
  83. package/lib/commands/_issue.js +744 -70
  84. package/lib/commands/_manifest.js +91 -0
  85. package/lib/commands/_registry.js +85 -34
  86. package/lib/commands/_resolve-command-opts.js +261 -0
  87. package/lib/commands/_serve-security.js +270 -0
  88. package/lib/commands/adapter.js +12 -0
  89. package/lib/commands/add.js +118 -0
  90. package/lib/commands/audit.js +70 -0
  91. package/lib/commands/blocked.js +5 -0
  92. package/lib/commands/board.js +64 -0
  93. package/lib/commands/claim.js +21 -2
  94. package/lib/commands/claims.js +7 -0
  95. package/lib/commands/clean.js +485 -75
  96. package/lib/commands/close.js +2 -2
  97. package/lib/commands/comment.js +5 -0
  98. package/lib/commands/control.js +148 -0
  99. package/lib/commands/create.js +2 -2
  100. package/lib/commands/dev.js +185 -7
  101. package/lib/commands/doc-gate.js +336 -0
  102. package/lib/commands/doctor.js +156 -0
  103. package/lib/commands/explain.js +15 -0
  104. package/lib/commands/export.js +237 -0
  105. package/lib/commands/gate.js +192 -0
  106. package/lib/commands/hooks.js +242 -0
  107. package/lib/commands/inbox.js +118 -0
  108. package/lib/commands/init.js +598 -0
  109. package/lib/commands/insights.js +79 -0
  110. package/lib/commands/issue.js +12 -1
  111. package/lib/commands/issues.js +66 -0
  112. package/lib/commands/lint.js +5 -0
  113. package/lib/commands/list.js +2 -2
  114. package/lib/commands/merge.js +312 -0
  115. package/lib/commands/migrate.js +523 -0
  116. package/lib/commands/new.js +12 -0
  117. package/lib/commands/options.js +241 -0
  118. package/lib/commands/orient.js +13 -0
  119. package/lib/commands/orphans.js +5 -0
  120. package/lib/commands/patch.js +67 -0
  121. package/lib/commands/plan.js +436 -24
  122. package/lib/commands/preflight.js +211 -0
  123. package/lib/commands/prime.js +13 -0
  124. package/lib/commands/push.js +69 -2
  125. package/lib/commands/ready.js +2 -2
  126. package/lib/commands/recall.js +116 -0
  127. package/lib/commands/recap.js +61 -0
  128. package/lib/commands/recommend.js +22 -2
  129. package/lib/commands/release.js +91 -0
  130. package/lib/commands/remember.js +74 -0
  131. package/lib/commands/role.js +99 -0
  132. package/lib/commands/serve.js +581 -0
  133. package/lib/commands/setup.js +851 -979
  134. package/lib/commands/shepherd.js +436 -0
  135. package/lib/commands/ship.js +23 -1
  136. package/lib/commands/show.js +2 -2
  137. package/lib/commands/stage.js +192 -0
  138. package/lib/commands/stale.js +5 -0
  139. package/lib/commands/status.js +329 -11
  140. package/lib/commands/sync.js +34 -46
  141. package/lib/commands/team.js +15 -2
  142. package/lib/commands/test.js +58 -7
  143. package/lib/commands/update.js +2 -2
  144. package/lib/commands/upgrade.js +47 -0
  145. package/lib/commands/validate.js +56 -25
  146. package/lib/commands/worktree.js +308 -128
  147. package/lib/config-writer.js +202 -0
  148. package/lib/control-plane.js +236 -0
  149. package/lib/core/runtime-graph.js +946 -0
  150. package/lib/dep-guard/keyword-ripple.js +184 -0
  151. package/lib/deprecated-sync-cleanup.js +362 -0
  152. package/lib/detect-agent.js +2 -28
  153. package/lib/detect-worktree.js +42 -17
  154. package/lib/doc-gate/declaration.js +177 -0
  155. package/lib/doc-gate/detect.js +289 -0
  156. package/lib/doc-gate/gate.js +375 -0
  157. package/lib/doc-gate/okf-config.js +128 -0
  158. package/lib/doc-gate/okf.js +429 -0
  159. package/lib/docs-command.js +1161 -6
  160. package/lib/forge-issues.js +697 -0
  161. package/lib/forge-lock.js +262 -0
  162. package/lib/gate-events.js +193 -0
  163. package/lib/global-flags.js +74 -0
  164. package/lib/greptile-match.js +7 -63
  165. package/lib/harness-capability-matrix.js +380 -0
  166. package/lib/hook-global-installer.js +347 -0
  167. package/lib/hook-renderer.js +451 -0
  168. package/lib/inbox.js +391 -0
  169. package/lib/insights.js +397 -0
  170. package/lib/issue-adapter.js +156 -0
  171. package/lib/issue-backend.js +145 -0
  172. package/lib/issue-render.js +220 -0
  173. package/lib/issue-sync/authority.js +100 -0
  174. package/lib/issue-sync/github-pull.js +184 -0
  175. package/lib/issue-sync/import-primitives.js +98 -0
  176. package/lib/issue-sync/legacy-link-bridge.js +436 -0
  177. package/lib/issue-sync/link-store.js +292 -0
  178. package/lib/issue-sync/project-github.js +123 -0
  179. package/lib/issue-sync/reconcile.js +195 -0
  180. package/lib/issue-sync/schema.js +126 -0
  181. package/lib/kernel/backing-issue.js +305 -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/planning-buckets-schema.js +109 -0
  192. package/lib/kernel/projection-jsonl-writer.js +450 -0
  193. package/lib/kernel/readiness-model.js +329 -0
  194. package/lib/kernel/schema.js +356 -0
  195. package/lib/kernel/sqlite-driver.js +2504 -0
  196. package/lib/kernel/taxonomy-validator.js +394 -0
  197. package/lib/lefthook-check.js +8 -4
  198. package/lib/lefthook-wiring.js +413 -0
  199. package/lib/mcp-config-renderer.js +288 -0
  200. package/lib/memory/graphiti-mcp.js +106 -0
  201. package/lib/memory/router.js +387 -0
  202. package/lib/memory/typed-api.js +102 -0
  203. package/lib/memory-digest.js +195 -0
  204. package/lib/merge-rules.js +395 -0
  205. package/lib/migrate-dry-run.js +466 -0
  206. package/lib/orientation.js +863 -0
  207. package/lib/package-manager-remediation.js +103 -0
  208. package/lib/package-root.js +381 -0
  209. package/lib/patch-intent.js +890 -0
  210. package/lib/plugin-catalog.js +3 -4
  211. package/lib/plugin-manager.js +0 -5
  212. package/lib/pr-bundle.js +186 -0
  213. package/lib/pr-monitor/differ.js +195 -0
  214. package/lib/pr-monitor/events.js +0 -0
  215. package/lib/pr-monitor/gather.js +124 -0
  216. package/lib/pr-monitor/journal.js +299 -0
  217. package/lib/pr-monitor/monitor.js +146 -0
  218. package/lib/pr-monitor/render-sticky.js +157 -0
  219. package/lib/pr-monitor/watch-lifecycle.js +95 -0
  220. package/lib/pr-monitor/watch.js +247 -0
  221. package/lib/pr-pull.js +1273 -0
  222. package/lib/pr-shepherd.js +494 -0
  223. package/lib/pr-state-validator.js +59 -0
  224. package/lib/preflight/gates.js +237 -0
  225. package/lib/preflight/runner.js +116 -0
  226. package/lib/project-discovery.js +0 -53
  227. package/lib/project-memory.js +166 -0
  228. package/lib/protected-path-manifest.js +281 -0
  229. package/lib/protected-state-surfaces.js +387 -0
  230. package/lib/release-readiness.js +2089 -0
  231. package/lib/reset.js +59 -45
  232. package/lib/review-adapter.js +68 -0
  233. package/lib/rules-sync.js +260 -0
  234. package/lib/runtime-health.js +332 -23
  235. package/lib/safety-config-renderer.js +268 -0
  236. package/lib/setup-action-log.js +1 -7
  237. package/lib/setup.js +27 -65
  238. package/lib/shell-utils.js +76 -6
  239. package/lib/skills-sync.js +330 -0
  240. package/lib/smart-status/conflicts.js +205 -0
  241. package/lib/smart-status/scoring.js +191 -0
  242. package/lib/status/beads-snapshot.js +145 -0
  243. package/lib/status/presenter.js +216 -0
  244. package/lib/status/snapshot.js +186 -0
  245. package/lib/sync-backend.js +202 -0
  246. package/lib/untrusted-content.js +52 -0
  247. package/lib/upgrade-safety.js +199 -0
  248. package/lib/workflow/enforce-stage.js +298 -47
  249. package/lib/workflow/stage-transition.js +115 -0
  250. package/lib/workflow/stages.js +30 -6
  251. package/lib/workflow/state-manager.js +159 -14
  252. package/lib/workflow/state.js +23 -1
  253. package/lib/workflow-profiles.js +17 -5
  254. package/package.json +46 -36
  255. package/rules/documentation.md +19 -0
  256. package/rules/kernel-tracking.md +26 -0
  257. package/rules/security.md +22 -0
  258. package/rules/tdd.md +20 -0
  259. package/rules/workflow.md +27 -0
  260. package/scripts/auto-backing-issue.js +47 -0
  261. package/scripts/beads-context.sh +165 -22
  262. package/scripts/beads-migrate-to-dolt.sh +7 -0
  263. package/scripts/beads-upgrade-smoke.sh +284 -0
  264. package/scripts/behavioral-judge.sh +115 -11
  265. package/scripts/benchmark.js +349 -63
  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-analyze.js +52 -17
  272. package/scripts/dep-guard-keyword-ripple.js +29 -0
  273. package/scripts/dep-guard-render-review.js +86 -0
  274. package/scripts/dep-guard.sh +64 -232
  275. package/scripts/file-index.sh +3 -0
  276. package/scripts/forge-team/lib/claim.sh +34 -18
  277. package/scripts/forge-team/lib/dashboard.sh +61 -86
  278. package/scripts/forge-team/lib/epic.sh +99 -263
  279. package/scripts/forge-team/lib/hooks.sh +26 -28
  280. package/scripts/forge-team/lib/identity.sh +4 -4
  281. package/scripts/forge-team/lib/sync-github.sh +144 -47
  282. package/scripts/forge-team/lib/verify.sh +93 -83
  283. package/scripts/forge-team/lib/workload.sh +41 -65
  284. package/scripts/forge-team/tests/claim.test.sh +25 -19
  285. package/scripts/forge-team/tests/dashboard.test.sh +31 -46
  286. package/scripts/forge-team/tests/epic.test.sh +52 -71
  287. package/scripts/forge-team/tests/hooks.test.sh +38 -50
  288. package/scripts/forge-team/tests/identity.test.sh +3 -3
  289. package/scripts/forge-team/tests/integration.test.sh +44 -66
  290. package/scripts/forge-team/tests/sync-github.test.sh +183 -79
  291. package/scripts/forge-team/tests/verify.test.sh +37 -46
  292. package/scripts/forge-team/tests/workflow-integration.test.sh +4 -4
  293. package/scripts/forge-team/tests/workload.test.sh +32 -66
  294. package/scripts/gen-command-manifest.js +153 -0
  295. package/scripts/gen-embedded-assets.mjs +129 -0
  296. package/scripts/install.ps1 +139 -0
  297. package/scripts/install.sh +268 -0
  298. package/scripts/lib/beads-migrate-to-dolt.mjs +503 -0
  299. package/scripts/lib/release-asset.mjs +84 -0
  300. package/scripts/parity-check.mjs +145 -0
  301. package/scripts/parity-check.test.mjs +58 -0
  302. package/scripts/pin-agentic-workflow-images.js +112 -0
  303. package/scripts/pr-coordinator.sh +3 -0
  304. package/scripts/preflight-sonar.eslint.config.mjs +44 -0
  305. package/scripts/preflight.sh +108 -0
  306. package/scripts/protected-state-check.js +104 -0
  307. package/scripts/smart-status-score.js +31 -0
  308. package/scripts/smart-status-sessions.js +51 -0
  309. package/scripts/smart-status.sh +117 -369
  310. package/scripts/spikes/config-race-bench.js +111 -0
  311. package/scripts/spikes/harness-capability-matrix.js +13 -0
  312. package/scripts/spikes/patch-anchor-stability-bench.js +125 -0
  313. package/scripts/spikes/protected-path-manifest.js +20 -0
  314. package/scripts/spikes/skill-auto-invoke-parity.js +292 -0
  315. package/scripts/sync-agent-skills.js +62 -0
  316. package/scripts/sync-agentic-workflow.js +48 -0
  317. package/scripts/sync-utils.sh +3 -0
  318. package/scripts/test-ci-shard.js +251 -0
  319. package/scripts/test-dashboard.js +188 -52
  320. package/scripts/test-full-suite.js +186 -0
  321. package/scripts/test-profile.js +278 -0
  322. package/scripts/test.js +302 -28
  323. package/scripts/validate.js +143 -0
  324. package/scripts/validate.sh +18 -1
  325. package/skills/claim-safety/SKILL.md +102 -0
  326. package/skills/claim-safety/evals/evals.json +46 -0
  327. package/{.github/prompts/dev.prompt.md → skills/dev/SKILL.md} +46 -52
  328. package/skills/dev/evals/evals.json +50 -0
  329. package/skills/hermes-forge/SKILL.md +185 -0
  330. package/skills/hermes-forge/evals/evals.json +46 -0
  331. package/skills/issue-basics/SKILL.md +111 -0
  332. package/skills/issue-basics/evals/evals.json +46 -0
  333. package/skills/kernel/SKILL.md +166 -0
  334. package/skills/kernel/evals/evals.json +50 -0
  335. package/skills/memory/SKILL.md +102 -0
  336. package/skills/parallel-deep-research/SKILL.md +14 -11
  337. package/skills/parallel-deep-research/evals/evals.json +11 -27
  338. package/{.github/prompts/plan.prompt.md → skills/plan/SKILL.md} +134 -159
  339. package/skills/plan/evals/evals.json +42 -0
  340. package/skills/research/SKILL.md +195 -0
  341. package/skills/research/evals/evals.json +42 -0
  342. package/{.github/prompts/review.prompt.md → skills/review/SKILL.md} +98 -62
  343. package/skills/review/evals/evals.json +42 -0
  344. package/skills/rollback/SKILL.md +110 -0
  345. package/skills/rollback/evals/evals.json +46 -0
  346. package/skills/rollback/references/methods.md +204 -0
  347. package/{.cursor/commands/rollback.md → skills/rollback/references/workflow-integration.md} +10 -284
  348. package/skills/shepherd/SKILL.md +66 -0
  349. package/skills/shepherd/evals/evals.json +42 -0
  350. package/skills/ship/SKILL.md +251 -0
  351. package/skills/ship/evals/evals.json +42 -0
  352. package/skills/smith/SKILL.md +142 -0
  353. package/skills/smith/evals/evals.json +46 -0
  354. package/skills/smith/references/autonomy-and-gates.md +94 -0
  355. package/{.github/prompts/sonarcloud.prompt.md → skills/sonarcloud/SKILL.md} +14 -3
  356. package/skills/sonarcloud/evals/evals.json +46 -0
  357. package/skills/sonarcloud-analysis/SKILL.md +18 -13
  358. package/skills/sonarcloud-analysis/evals/evals.json +11 -15
  359. package/skills/status/SKILL.md +102 -0
  360. package/skills/status/evals/evals.json +50 -0
  361. package/skills/triage-ready/SKILL.md +121 -0
  362. package/skills/triage-ready/evals/evals.json +42 -0
  363. package/{.github/prompts/validate.prompt.md → skills/validate/SKILL.md} +52 -29
  364. package/skills/validate/evals/evals.json +42 -0
  365. package/skills/verify/SKILL.md +299 -0
  366. package/skills/verify/evals/evals.json +50 -0
  367. package/.claude/commands/dev.md +0 -345
  368. package/.claude/commands/plan.md +0 -566
  369. package/.claude/commands/premerge.md +0 -186
  370. package/.claude/commands/research.md +0 -42
  371. package/.claude/commands/review.md +0 -451
  372. package/.claude/commands/rollback.md +0 -721
  373. package/.claude/commands/ship.md +0 -213
  374. package/.claude/commands/sonarcloud.md +0 -152
  375. package/.claude/commands/status.md +0 -90
  376. package/.claude/commands/validate.md +0 -288
  377. package/.claude/commands/verify.md +0 -269
  378. package/.claude/rules/workflow.md +0 -121
  379. package/.cline/workflows/dev.md +0 -342
  380. package/.cline/workflows/plan.md +0 -563
  381. package/.cline/workflows/premerge.md +0 -183
  382. package/.cline/workflows/research.md +0 -39
  383. package/.cline/workflows/review.md +0 -448
  384. package/.cline/workflows/rollback.md +0 -718
  385. package/.cline/workflows/ship.md +0 -210
  386. package/.cline/workflows/sonarcloud.md +0 -146
  387. package/.cline/workflows/status.md +0 -87
  388. package/.cline/workflows/validate.md +0 -285
  389. package/.cline/workflows/verify.md +0 -266
  390. package/.codex/config.toml +0 -11
  391. package/.codex/skills/dev/SKILL.md +0 -345
  392. package/.codex/skills/plan/SKILL.md +0 -566
  393. package/.codex/skills/premerge/SKILL.md +0 -186
  394. package/.codex/skills/research/SKILL.md +0 -42
  395. package/.codex/skills/review/SKILL.md +0 -451
  396. package/.codex/skills/rollback/SKILL.md +0 -721
  397. package/.codex/skills/ship/SKILL.md +0 -213
  398. package/.codex/skills/sonarcloud/SKILL.md +0 -149
  399. package/.codex/skills/status/SKILL.md +0 -90
  400. package/.codex/skills/validate/SKILL.md +0 -288
  401. package/.codex/skills/verify/SKILL.md +0 -269
  402. package/.cursor/commands/dev.md +0 -342
  403. package/.cursor/commands/plan.md +0 -563
  404. package/.cursor/commands/premerge.md +0 -183
  405. package/.cursor/commands/research.md +0 -39
  406. package/.cursor/commands/review.md +0 -448
  407. package/.cursor/commands/ship.md +0 -210
  408. package/.cursor/commands/sonarcloud.md +0 -146
  409. package/.cursor/commands/status.md +0 -87
  410. package/.cursor/commands/validate.md +0 -285
  411. package/.cursor/commands/verify.md +0 -266
  412. package/.cursorrules +0 -149
  413. package/.github/prompts/premerge.prompt.md +0 -188
  414. package/.github/prompts/research.prompt.md +0 -44
  415. package/.github/prompts/rollback.prompt.md +0 -723
  416. package/.github/prompts/ship.prompt.md +0 -215
  417. package/.github/prompts/status.prompt.md +0 -92
  418. package/.github/prompts/verify.prompt.md +0 -271
  419. package/.github/workflows/beads-to-github.yml +0 -56
  420. package/.github/workflows/github-to-beads.yml +0 -97
  421. package/.kilocode/workflows/dev.md +0 -346
  422. package/.kilocode/workflows/plan.md +0 -567
  423. package/.kilocode/workflows/premerge.md +0 -187
  424. package/.kilocode/workflows/research.md +0 -43
  425. package/.kilocode/workflows/review.md +0 -452
  426. package/.kilocode/workflows/rollback.md +0 -722
  427. package/.kilocode/workflows/ship.md +0 -214
  428. package/.kilocode/workflows/sonarcloud.md +0 -150
  429. package/.kilocode/workflows/status.md +0 -91
  430. package/.kilocode/workflows/validate.md +0 -289
  431. package/.kilocode/workflows/verify.md +0 -270
  432. package/.opencode/commands/dev.md +0 -345
  433. package/.opencode/commands/plan.md +0 -566
  434. package/.opencode/commands/premerge.md +0 -186
  435. package/.opencode/commands/research.md +0 -42
  436. package/.opencode/commands/review.md +0 -451
  437. package/.opencode/commands/rollback.md +0 -721
  438. package/.opencode/commands/ship.md +0 -213
  439. package/.opencode/commands/sonarcloud.md +0 -149
  440. package/.opencode/commands/status.md +0 -90
  441. package/.opencode/commands/validate.md +0 -288
  442. package/.opencode/commands/verify.md +0 -269
  443. package/.roo/commands/dev.md +0 -346
  444. package/.roo/commands/plan.md +0 -567
  445. package/.roo/commands/premerge.md +0 -187
  446. package/.roo/commands/research.md +0 -43
  447. package/.roo/commands/review.md +0 -452
  448. package/.roo/commands/rollback.md +0 -722
  449. package/.roo/commands/ship.md +0 -214
  450. package/.roo/commands/sonarcloud.md +0 -150
  451. package/.roo/commands/status.md +0 -91
  452. package/.roo/commands/validate.md +0 -289
  453. package/.roo/commands/verify.md +0 -270
  454. package/docs/BEADS_GITHUB_SYNC.md +0 -255
  455. package/docs/GREPTILE_SETUP.md +0 -400
  456. package/docs/MANUAL_REVIEW_GUIDE.md +0 -106
  457. package/docs/SETUP.md +0 -663
  458. package/docs/VALIDATION.md +0 -363
  459. package/lib/agents/cline.plugin.json +0 -29
  460. package/lib/agents/copilot.plugin.json +0 -24
  461. package/lib/agents/kilocode.plugin.json +0 -22
  462. package/lib/agents/opencode.plugin.json +0 -23
  463. package/lib/agents/roo.plugin.json +0 -30
  464. package/lib/beads-health-check.js +0 -143
  465. package/lib/commands/commands-reset.js +0 -147
  466. package/opencode.json +0 -67
  467. package/scripts/beads-context.test.js +0 -567
  468. package/scripts/github-beads-sync/comment.mjs +0 -64
  469. package/scripts/github-beads-sync/config.mjs +0 -148
  470. package/scripts/github-beads-sync/github-api.mjs +0 -131
  471. package/scripts/github-beads-sync/index.mjs +0 -332
  472. package/scripts/github-beads-sync/label-mapper.mjs +0 -54
  473. package/scripts/github-beads-sync/mapping.mjs +0 -78
  474. package/scripts/github-beads-sync/reverse-sync-cli.mjs +0 -31
  475. package/scripts/github-beads-sync/reverse-sync.mjs +0 -138
  476. package/scripts/github-beads-sync/run-bd.mjs +0 -161
  477. package/scripts/github-beads-sync/sanitize.mjs +0 -121
  478. package/scripts/github-beads-sync.config.json +0 -26
  479. package/scripts/sync-commands.js +0 -600
@@ -0,0 +1,128 @@
1
+ # Forge Adapters
2
+
3
+ Forge adapters normalize provider-specific surfaces behind Forge-owned contracts. The bundled adapters are reference implementations; Forge owns the contract and authority rules.
4
+
5
+ Current public support is narrow: Beads is the reference issue adapter, and review-adapter scaffolding supports review adapters with a Greptile-shaped starter template. Other adapter kinds are roadmap or internal design work until implemented and tested.
6
+
7
+ ## Issue Adapters
8
+
9
+ Issue adapters expose issue tracking operations without making Beads, GitHub, Linear, Jira, or another provider the Forge API. The bundled reference adapter is `BeadsIssueAdapter`.
10
+
11
+ ### Issue Contract
12
+
13
+ An issue adapter has `kind: "issue"` and implements these methods:
14
+
15
+ - `list(args, context)`: list issues from the provider/backend.
16
+ - `read(args, context)`: read a single issue. The Beads adapter maps this to `bd show`.
17
+ - `create(args, context)`: create an issue.
18
+ - `update(args, context)`: update issue fields.
19
+ - `close(args, context)`: close an issue.
20
+ - `comment(args, context)`: add an issue comment. The Beads adapter maps this to `bd comments add`.
21
+ - `mapStatus(status, context)`: map provider status into the requested target state.
22
+ - `decideAuthority(change, context)`: return the Forge authority decision for a field change.
23
+
24
+ ### Issue Authority
25
+
26
+ GitHub owns shared team-visible fields: GitHub identity, URL, title, body, state, assignees, labels, milestone, and remote update timestamps.
27
+
28
+ Forge owns workflow and project context: Forge issue id, dependencies, parent/child links, workflow stages, acceptance criteria, progress notes, stage transitions, decisions, memory, outbound projection bookkeeping, and drift diagnostics.
29
+
30
+ Beads is the local/reference issue adapter and cache backend. Cache fields are derived and may be rebuilt. Unknown field paths are rejected until the authority model explicitly assigns ownership.
31
+
32
+ ### Conflict Behavior
33
+
34
+ During pull/import, GitHub-owned remote fields overwrite local materialized shared fields and differences are recorded as drift diagnostics. Forge-owned fields are preserved locally and are not overwritten by GitHub import. Cache fields are rebuilt from the authoritative inputs.
35
+
36
+ ### Issue Non-Scope
37
+
38
+ Issue adapters do not implement team dashboard UI, ReviewAdapter internals, GitHub Projects board automation, or full comment/discussion import. GitHub issue import must use the existing `lib/issue-sync/import-primitives.js` reconciliation path rather than a separate import contract.
39
+
40
+ ## Review Adapters
41
+
42
+ Forge review adapters normalize provider-specific review feedback into one contract used by review tooling and offline fixture tests.
43
+
44
+ ### Review Contract
45
+
46
+ A review adapter has `kind: "review"` and implements these methods:
47
+
48
+ - `fetchThreads(context)`: fetch provider review threads. Live adapters may use GitHub, REST, GraphQL, or a provider SDK.
49
+ - `parse(payload, options)`: normalize provider payloads into review thread objects.
50
+ - `reply(context)`: post a reply to a provider review comment.
51
+ - `resolve(context)`: mark a provider review thread resolved.
52
+ - `score(threads, context)`: score or classify parsed threads, usually by checking local commits or fixture data.
53
+
54
+ Normalized thread shape:
55
+
56
+ ```js
57
+ {
58
+ id: 'provider-thread-id',
59
+ commentId: 123,
60
+ file: 'lib/example.js',
61
+ line: 42,
62
+ body: 'review text',
63
+ author: 'review-bot',
64
+ isResolved: false,
65
+ raw: {}
66
+ }
67
+ ```
68
+
69
+ ### Review Lifecycle
70
+
71
+ 1. `fetchThreads` obtains raw provider data for live review runs.
72
+ 2. `parse` filters and normalizes the provider data.
73
+ 3. `score` decides whether local work appears to address each parsed thread.
74
+ 4. `reply` posts the resolution explanation.
75
+ 5. `resolve` closes the provider thread after a reply is recorded.
76
+
77
+ The bundled `GreptileReviewAdapter` is the compatibility reference. Existing Greptile shell commands keep their public command names while the shared matching behavior is routed through the adapter implementation.
78
+
79
+ ### Review Scaffold
80
+
81
+ Create a local review adapter starter:
82
+
83
+ ```bash
84
+ forge new adapter coderabbit --kind=review --template=greptile
85
+ ```
86
+
87
+ The scaffold is written to:
88
+
89
+ ```text
90
+ .forge/adapters/review/coderabbit.js
91
+ ```
92
+
93
+ Only review adapters and the Greptile-shaped starter template are supported in this foundation PR.
94
+
95
+ ### Review Fixture Replay
96
+
97
+ Run adapter parsing and scoring offline:
98
+
99
+ ```bash
100
+ forge adapter test greptile --fixture=fixtures/greptile-review.json
101
+ ```
102
+
103
+ Fixture shape:
104
+
105
+ ```json
106
+ {
107
+ "input": {
108
+ "data": {
109
+ "repository": {
110
+ "pullRequest": {
111
+ "reviewThreads": {
112
+ "nodes": []
113
+ }
114
+ }
115
+ }
116
+ }
117
+ },
118
+ "expect": {
119
+ "threads": 0
120
+ }
121
+ }
122
+ ```
123
+
124
+ Fixture replay must not make network calls. Live provider calls belong in `fetchThreads`, `reply`, and `resolve`.
125
+
126
+ ### Review Non-Scope
127
+
128
+ Review adapters do not implement issue tracking, GitHub issue sync, or the full v3 reference adapter template catalog.
@@ -0,0 +1,175 @@
1
+ # Agent Skill Parity
2
+
3
+ Forge treats cross-agent skill compatibility as one canonical capability rendered into each harness's native activation surface.
4
+
5
+ This page documents the W0 metadata fixture only. It is not the full Forge extension parity model.
6
+
7
+ For Week 3 planning, see [Week 3 Runtime Capability Packs](../work/2026-04-28-skeleton-pivot/week-3-runtime-capability-packs.md). That plan defines replaceable workflow packs, on-demand skill loading through MCP, runtime-enforced required skill policies, and per-project workflow composition.
8
+
9
+ ## Supported Surfaces
10
+
11
+ Forge supports Claude Code, Codex, Cursor, and Hermes. Hermes is a **CLI-consumed**
12
+ harness: it reads Forge project state through `forge orient` / `forge recap` and
13
+ ships the `hermes-forge` skill (`.hermes/skills`), rather than consuming generated
14
+ rule/MCP/hook files. The W0 metadata fixture below proves the file-surface metadata
15
+ for Claude Code, Cursor, and Codex; Hermes is modeled in the capability matrix
16
+ (`lib/harness-capability-matrix.js`) as CLI-consumed.
17
+
18
+ | Harness | Forge fixture path | Activation metadata | Proof status |
19
+ | --- | --- | --- | --- |
20
+ | Claude Code | `.claude/skills/<name>/SKILL.md` | `description` in `SKILL.md` frontmatter | Proven by metadata fixture |
21
+ | Cursor | `.cursor/rules/<name>.mdc` | `description`, blank `globs`, `alwaysApply: false` | Proven by metadata fixture |
22
+ | Codex CLI | `.codex/skills/<name>/SKILL.md` | `name` and `description` in `SKILL.md` frontmatter | Proven by metadata fixture and Forge packaging helper |
23
+ | Hermes | `.hermes/skills/<name>/SKILL.md` | `name` and `description` in `SKILL.md` frontmatter | CLI-consumed (forge orient/recap); not part of the W0 file-metadata fixture |
24
+
25
+ The shared rule is: keep the skill name, description, and task body canonical, then generate the smallest native wrapper each harness needs.
26
+
27
+ For Codex, this W0 fixture validates Forge's repository packaging surface (`.codex/skills`) plus the metadata needed for installed Codex skills. Codex's documented repo-scope discovery path is `.agents/skills` (scanned cwd → repo root); Forge now generates that mirror at setup and commits it, so a teammate who clones the repo WITHOUT running `forge setup` still gets Forge skills/stages auto-discovered.
28
+
29
+ Cursor rules are included here because `forge-2si5` explicitly asked for `.cursor/rules/*.mdc` evidence. They are not the final Cursor skill target. The broader parity model must treat Cursor Agent Skills as the primary on-demand workflow surface and Cursor rules as the always-on or scoped-policy surface.
30
+
31
+ ## Required Follow-Up: Skills-First Stage Graph
32
+
33
+ Tracked as `forge-wj36`.
34
+
35
+ This follow-up now has a machine-readable contract in `lib/harness-capability-matrix.js`.
36
+ Generate the current evidence artifact with:
37
+
38
+ ```bash
39
+ node scripts/spikes/harness-capability-matrix.js
40
+ ```
41
+
42
+ The output is JSON with three top-level contracts:
43
+
44
+ - `harnesses[]`: Claude, Cursor, Codex, and Hermes capability support across instructions, skills, rules, MCP, hooks, commands, agents/subagents, stages, Beads, typed memory, patch overrides, marketplace trust, extension packs, and the native safety surfaces (tool permissions, AI read/index ignore boundary, execution sandbox).
45
+ - `stageGraph`: canonical Forge workflow stages as skills-first super skills with addressable subskills, plus utility skills such as `status` outside workflow transitions.
46
+ - `rendererContract`: the evidence a renderer must provide before Forge emits broad harness files.
47
+
48
+ Forge stage parity is skills-first across all harnesses. Claude stage skills have
49
+ **no command shim** — the legacy `.claude/commands/` surface was removed (A0d), so
50
+ the stage skill is the authority. Cursor stage skill files are **generated** by
51
+ Forge, though live auto-invocation is not yet proven. Hermes is CLI-consumed and
52
+ reads the stage graph through `forge orient` / `forge recap` (no per-stage file).
53
+
54
+ | Forge stage | Canonical surface | Claude render | Cursor render | Codex render |
55
+ | --- | --- | --- | --- | --- |
56
+ | `plan` | super skill with phases | `.claude/skills/plan/SKILL.md` | `.cursor/skills/plan/SKILL.md` (generated) | `.codex/skills/plan/SKILL.md` |
57
+ | `dev` | super skill with TDD subskills | `.claude/skills/dev/SKILL.md` | `.cursor/skills/dev/SKILL.md` (generated) | `.codex/skills/dev/SKILL.md` |
58
+ | `validate` | super skill with check subskills | `.claude/skills/validate/SKILL.md` | `.cursor/skills/validate/SKILL.md` (generated) | `.codex/skills/validate/SKILL.md` |
59
+ | `ship` | super skill with PR subskills | `.claude/skills/ship/SKILL.md` | `.cursor/skills/ship/SKILL.md` (generated) | `.codex/skills/ship/SKILL.md` |
60
+ | `review` | super skill with feedback subskills | `.claude/skills/review/SKILL.md` | `.cursor/skills/review/SKILL.md` (generated) | `.codex/skills/review/SKILL.md` |
61
+ | `verify` | super skill with post-merge subskills | `.claude/skills/verify/SKILL.md` | `.cursor/skills/verify/SKILL.md` (generated) | `.codex/skills/verify/SKILL.md` |
62
+
63
+ Pre-merge is not a skill or a workflow stage — it is a documentation-and-handoff gate embedded in the `ship` and `review` skills, so it has no parity row.
64
+
65
+ `status` remains a utility skill, not a workflow stage. The stage graph exposes it in `utilitySkills[]` so renderers can still generate status affordances without adding invalid workflow transitions.
66
+
67
+ The legacy `.claude/commands/` surface was removed (A0d): the canonical workflow lives in stage skills and subskills, and the stage skill — not a command shim — is the workflow authority.
68
+
69
+ The super-skill structure should follow the same pattern as rich local skills such as `impeccable`: one top-level skill handles routing and context, while individual subskills or references handle specific phases. For Forge, that means examples like:
70
+
71
+ ```text
72
+ plan/
73
+ SKILL.md
74
+ phases/
75
+ intent_capture/SKILL.md
76
+ research/SKILL.md
77
+ critics/SKILL.md
78
+ synthesis/SKILL.md
79
+ final_lock/SKILL.md
80
+ ```
81
+
82
+ ## Full Extension Parity Scope
83
+
84
+ The full Forge extension parity model must cover more than skills:
85
+
86
+ | Capability | Canonical Forge source | Claude | Cursor | Codex | Required evidence |
87
+ | --- | --- | --- | --- | --- | --- |
88
+ | Project instructions | structured `AGENTS.md` sections | `CLAUDE.md` shim or generated file | `AGENTS.md` (native) + `.cursor/rules/*.mdc` for scoped policy | `AGENTS.md` | semantic section comparison |
89
+ | Skills/playbooks | agentskills.io-compatible `SKILL.md` | `.claude/skills` | `.cursor/skills` | `.codex/skills` packaging source (global `$CODEX_HOME` install) + committed `.agents/skills` repo-local discovery | generated file and trigger metadata |
90
+ | Rules/policies | Forge rule manifest (`rules/<name>.md`) | `AGENTS.md` instruction projection (no always-on `.claude/rules/*` policy bloat) | `.cursor/rules/*.mdc` (rendered from `rules/`) | `AGENTS.md` section | rule target and unsupported-surface notes |
91
+ | MCP tools/resources | Forge MCP manifest | Claude MCP config | `.cursor/mcp.json` | Codex MCP config | config render and server probe |
92
+ | Hooks | Forge hook manifest | Claude hook adapter if supported | unsupported unless verified | Codex hook adapter if supported | supported/unsupported matrix |
93
+ | Commands | Forge stage-skill manifest | `.claude/skills/<stage>` (legacy `.claude/commands` removed in A0d) | stage skills if supported | CLI docs or skill backstop | stage skill is the authority |
94
+ | Agents/subagents | Forge agent role spec | Claude subagents | Cursor agent/subagent config if supported | Codex skill/agent backstop | role mapping or known issue |
95
+ | Marketplace/extensions | `extension.yaml` plus lock metadata | plugin/skills/commands/hooks | skills/rules/`.cursor/mcp.json` config | skills/MCP/hooks | lockfile, SHA, trust, generated targets |
96
+
97
+ The machine-readable matrix intentionally separates similar-looking surfaces:
98
+
99
+ - Skills are on-demand workflows: `.claude/skills/<skill>/SKILL.md`, `.cursor/skills/<skill>/SKILL.md`, and for Codex the `.agents/skills/<skill>/SKILL.md` repo-local discovery mirror (Codex scans it cwd → repo root). All are generated from the canonical `skills/` source; the `.claude`/`.cursor`/`.codex`/`.hermes` mirrors are gitignored and populated at `forge setup`, while `.agents/skills` is committed (kept byte-identical to `skills/` by a pre-commit hook + drift gate) so a fresh clone gets discovery without setup. The global `$CODEX_HOME/skills` install is likewise generated from `skills/`; no committed `.codex/skills` mirror is kept.
100
+ - Rules are policy/context projections rendered from one canonical `rules/<name>.md` source: only Cursor has a first-class native rule surface (`.cursor/rules/<rule>.mdc`); Claude, Codex, and Hermes receive the same policy through their `AGENTS.md` instruction projection (adding always-on `.claude/rules/*` policy files would triple-deliver the same context as token bloat).
101
+ - Commands are removed, not shims: the legacy `.claude/commands/` and `.cursor/commands/` surfaces were removed in A0d. The canonical workflow lives in stage skills (`.claude/skills/<stage>`, `.codex/skills/<stage>`); Codex/Hermes fall back to the stage skill, not a command file.
102
+ - MCP is config plumbing: each harness gets native MCP config only when the matrix records a target path and probe evidence.
103
+ - Hooks are lifecycle adapters: Claude and Codex have native hook targets; Cursor remains a known issue until a hook surface is proven.
104
+ - Distribution is not a skill directory dump: Codex can use plugins and marketplaces; Forge extension packs must carry lock/trust metadata before installation.
105
+
106
+ No broad renderer should be added until its capability has a matrix entry, target path contract, activation metadata contract, machine-readable evidence, and a known-issue record for any unproven harness.
107
+
108
+ ## External Compatibility Pattern
109
+
110
+ The current ecosystem pattern is a canonical payload with native harness renderers:
111
+
112
+ - Claude Code documents skills as `SKILL.md` files whose `description` controls automatic loading, and notes that commands and skills can both expose slash affordances.
113
+ - Cursor documents `.cursor/rules/*.mdc` as persistent scoped context with `description`, `globs`, and `alwaysApply`; Cursor skills are treated by Forge as the on-demand workflow target, while rules remain the policy target.
114
+ - Codex documents skills as reusable workflow packages under `.agents/skills` for repository scope (checked in for the team, scanned cwd → repo root), uses description-based implicit invocation, and uses plugins/marketplaces to distribute reusable skills, MCP servers, hooks, and apps. Forge emits `.codex/skills` packages for the global `$CODEX_HOME` install and now also generates + commits the repo-local `.agents/skills` mirror at setup.
115
+ - AGENTS.md remains the shared instruction projection for agents that read repository instructions directly.
116
+
117
+ Forge adopts that pattern by keeping one canonical Forge capability and rendering the smallest verified native wrapper per harness. It does not duplicate every feature blindly into every directory.
118
+
119
+ Week 3 expands that into a runtime capability registry. The registry must cover skills, commands, hooks, MCPs, ACPs, books/docs, agents, memory policies, protected paths, marketplace metadata, and workflow stages. Harness files should be generated projections from the active project workflow, not the authority.
120
+
121
+ Invocation policy is part of parity. Required skills must be loaded by Forge runtime at stage or gate boundaries; expensive, dangerous, or long-running skills must remain gated, hidden, or execution-only until the user or runtime explicitly requests them.
122
+
123
+ Parity is not accepted until an evaluator cross-checks the resolved workflow graph against generated harness projections and either passes, blocks, or records a known issue with evidence. The evaluator must also propose minimal repair diffs when a customer-installed workflow pack changes the active stage implementation.
124
+
125
+ ## Evidence Command
126
+
127
+ Run the W0 parity fixture from the repository root:
128
+
129
+ ```bash
130
+ node scripts/spikes/skill-auto-invoke-parity.js --json
131
+ ```
132
+
133
+ The JSON output includes:
134
+
135
+ - `harnesses[].passed`
136
+ - `harnesses[].target`
137
+ - `harnesses[].sourceLabel`
138
+ - `sources[]`
139
+ - `proofBoundary`
140
+ - `knownIssues[]`
141
+
142
+ Run the broader capability matrix evidence from the repository root:
143
+
144
+ ```bash
145
+ node scripts/spikes/harness-capability-matrix.js
146
+ ```
147
+
148
+ The JSON output includes:
149
+
150
+ - `harnesses[].capabilities`
151
+ - `stageGraph.stages[].subskills`
152
+ - `stageGraph.stages[].renderTargets`
153
+ - `rendererContract.rendererFamilies`
154
+ - `sources[]`
155
+
156
+ ## Proof Boundary
157
+
158
+ This fixture proves deterministic metadata-surface parity. It does not launch closed-source agent sessions or claim that a live model selected a skill in a proprietary runtime. For Codex specifically, it validates the Forge canonical skill source and metadata (and the committed `.agents/skills` repo-local discovery mirror), not live auto-invocation inside the Codex runtime.
159
+
160
+ If a future release needs live invocation proof, add a separate transcript-producing eval for Claude Code, Cursor, and Codex and keep this fixture as the fast CI gate.
161
+
162
+ ## Known Issues
163
+
164
+ No harness-specific metadata issue is known for this fixture. Live proprietary-agent auto-invocation is intentionally outside this deterministic test and is reported in `proofBoundary`.
165
+
166
+ Known gaps intentionally left for follow-up. Tier-2 work is tracked under kernel epic `90f2f631` (Cross-agent parity Tier 2):
167
+
168
+ - Cursor Agent Skill files ARE generated by Forge at setup (`.cursor/skills`), so the matrix marks Cursor skills/stages `native`; live auto-invocation is simply not asserted by the W0 metadata fixture. `.cursor/rules` remains the policy target.
169
+ - Claude stage distribution is skills-first: the legacy `.claude/commands/` surface was removed (A0d) and the stage skill (`.claude/skills/<stage>`) is the authority — the stage graph no longer emits a command shim.
170
+ - **Hooks (`988ae187`)**: NO harness-native hook file is rendered for ANY harness — all lifecycle enforcement is delivered via Lefthook git hooks. The matrix marks Claude/Codex hooks `contract-only` and Cursor hooks `not-delivered` (Cursor 1.7+ exposes `.cursor/hooks.json`, not yet rendered). Native hook renderers are the deliverable.
171
+ - **Agents/subagents (`802aa4d8`)**: the whole domain is unimplemented — no renderer, manifest, wiring, or tests for any harness. The matrix marks every harness `not-delivered`/`unsupported`. A subagent renderer is the deliverable.
172
+ - **Typed memory (`dce9da46`)**: typed memory is WRITE-ONLY (`insights.js`); no generator projects a memory section into any instruction/rule file. All four typedMemory rows are marked `not-delivered`. A memory-projection renderer is the deliverable.
173
+ - **Codex paths (`55dfeccf`)**: `.codex/skills` is a setup-generated, gitignored local mirror; skills install to the global `$CODEX_HOME/skills`, generated at setup from the canonical `skills/` source. Codex's repo-local discovery path `.agents/skills` is generated from `skills/` and committed (kept byte-identical by a pre-commit hook + drift gate) so a fresh clone gets discovery without `forge setup` (this closes the skills/stages half of `55dfeccf`). Codex MCP remains global-config-only (`$CODEX_HOME/config.toml`), so `(mcp, codex)` is still `not-delivered` at project setup.
174
+ - **Safety domains (`1e68255c`)**: the native safety surfaces are now modeled as three capability rows (`permissions`, `ignore`, `sandbox`) rendered by the `safety` renderer family. `forge setup` auto-writes safe project-local defaults via the tested `lib/safety-config-renderer.js`: Claude tool permissions (`.claude/settings.json` `permissions` — allow the forge/dev workflow, deny `rm -rf`/force-push/secret reads, ask for history-rewrites) and Cursor `.cursorignore` (secrets/`.env`/`node_modules`/build artifacts). Both use read → merge → write, preserving user entries and backing up an unparseable file rather than clobbering it. Defaults are ON but opt-out-able with `FORGE_SKIP_SAFETY_DEFAULTS`. The Claude `ignore` row is `projection` (its read boundary is delivered as `permissions.deny Read(...)` rules; Claude has no `.claudeignore`). **Global-scope-deferred**: Codex `permissions`/`sandbox` are `not-delivered` — `approval_policy`/`sandbox_mode` live in `config.toml` but a project-local `.codex/config.toml` is honored only when the project is trusted in the GLOBAL `$CODEX_HOME/config.toml` (`projects.<path>.trust_level`), which Forge cannot grant during project-local setup (matches the Codex MCP finding, `#311`). Cursor `permissions` and Hermes safety surfaces are `unsupported` (IDE/global-only and CLI-consumed respectively).
175
+ - MCP is now auto-wired project-local for both Claude (`.mcp.json`) and Cursor (`.cursor/mcp.json`) via the tested `lib/mcp-config-renderer.js`. Beads/patch-override state, marketplace trust, and extension packs remain as the matrix records them.
@@ -0,0 +1,205 @@
1
+ # Command Reference
2
+
3
+ This reference documents commands verified against the current package and CLI surfaces. Stage names beginning with `/` are agent workflow stages, not automatically standalone `forge` CLI commands.
4
+
5
+ For stage skills, command projections, and the skills-first roadmap, see [Skills and command projections](SKILLS.md) and [Workflow templates](../guides/WORKFLOW_TEMPLATES.md).
6
+
7
+ ## Package Entrypoints
8
+
9
+ The package exposes:
10
+
11
+ ```text
12
+ forge
13
+ forge-workflow
14
+ forge-preflight
15
+ ```
16
+
17
+ Use `bunx forge ...` for first-run examples. Bare `forge ...` works when the package bin is available on PATH. Command-specific `--help` output is still uneven in the current CLI, so treat this reference as the canonical command list for v0.0.11 docs.
18
+
19
+ ## Setup And Adoption
20
+
21
+ ```bash
22
+ forge init [--profile minimal|standard|full] [--classification critical|standard|refactor] [--harness claude,cursor,codex] [--yes] [--force] [--dry-run]
23
+ forge setup --agents codex --yes
24
+ forge setup --agents claude,cursor
25
+ forge setup --agents claude cursor
26
+ forge setup --all --quick
27
+ forge setup --path ./repo --dry-run
28
+ forge setup --agents claude,cursor
29
+ ```
30
+
31
+ Use `--agents`, not `--agent`.
32
+
33
+ ## Local State
34
+
35
+ ```bash
36
+ forge board --json
37
+ forge options lint
38
+ forge options diff
39
+ forge options why <key>
40
+ forge options stages
41
+ ```
42
+
43
+ `forge options` inspects the runtime graph and `.forge/` adoption config created by `forge init`.
44
+
45
+ `forge status` (full flags below) also supports workflow-state and issue-state inputs used by tests and stage recovery.
46
+
47
+ ## Core Workflow Loop
48
+
49
+ These are the CLI commands behind the default agent workflow template (`/plan -> /dev -> /validate -> /ship`, then the `/review` skill) plus the session-orientation and memory commands agents run alongside it. Verified against `lib/commands/<name>.js` and `forge <cmd> --help`.
50
+
51
+ ```bash
52
+ forge plan "<feature description>"
53
+ forge dev [--issue-id <id>] [--phase red|green|refactor]
54
+ forge validate
55
+ forge ship <feature-slug> [<title>] [--dry-run]
56
+ forge status [--full] [--json]
57
+ forge prime [--budget N] [--json]
58
+ forge orient [--budget N] [--json]
59
+ forge recap <issue> [--budget N] [--json]
60
+ forge recall [query] [--limit N] [--all] [--json]
61
+ forge remember <note> [--tag <label>]... [--json]
62
+ ```
63
+
64
+ - `forge plan` creates the implementation plan, kernel issue, and feature branch/worktree from a researched feature description; it prints the created issue id, branch name, and the suggested next command.
65
+ - `forge dev` runs the TDD development stage with RED/GREEN/REFACTOR phase guidance; `--issue-id` scopes it to a specific kernel issue and `--phase` overrides auto-detection.
66
+ - `forge validate` runs the validation orchestration pipeline (conflict markers, type check, lint, security, tests) with no arguments — see also `bun run check` under Validation And Packaging.
67
+ - `forge ship` creates the pull request from validated feature work (wraps `gh pr create`); `--dry-run` previews without creating a PR.
68
+ - `forge status` is the one-glance orientation command: where you are, what to run next, and your active work; `--full` also shows blocked/stale/recently-completed issues.
69
+ - `forge prime` emits the bounded session-entry orientation envelope agents read at the start of a session.
70
+ - `forge orient` emits bounded project orientation from deterministic source files (broader than `prime`, still token-budgeted via `--budget`).
71
+ - `forge recap <issue>` is the issue-scoped counterpart to `forge orient`/`forge prime` — it summarizes a single issue from the same deterministic file assembly instead of the whole project. Requires an issue id; running it with no id (or `--help`) prints usage only.
72
+ - `forge recall` retrieves project-memory notes from the kernel-backed memory store; omit `query` to list recent notes.
73
+ - `forge remember` persists a project-memory note to the kernel-backed memory store; repeat `--tag` to attach multiple labels.
74
+
75
+ ## Issue Wrappers
76
+
77
+ These commands delegate to the Kernel by default. Beads is used only when explicitly selected — precedence (highest first): the `--issue-backend beads` flag, then `FORGE_ISSUE_BACKEND=beads`, then the `.forge/config.yaml` key `issueBackend: beads`, otherwise the Kernel default. The stable Kernel-era JSON contract is defined in [Forge Kernel issue command contract](forge-kernel-issue-command-contract.md).
78
+
79
+ ```bash
80
+ forge ready
81
+ forge list
82
+ forge show <id>
83
+ forge issue ready --json
84
+ forge issue list --json
85
+ forge issue show <id> --json
86
+ forge issue search <query> --json
87
+ forge issue stats --json
88
+ forge create --title "Title"
89
+ forge update <id>
90
+ forge claim <id>
91
+ forge release <id>
92
+ forge close <id>
93
+ forge issue dep add <issue-id> <blocks-issue-id>
94
+ forge issue dep remove <issue-id> <blocks-issue-id>
95
+ forge issue ...
96
+ forge issues ...
97
+ forge sync
98
+ ```
99
+
100
+ `forge release <id>` is a Kernel command contract and does not have a verified Beads passthrough in this slice.
101
+
102
+ `forge sync` runs Beads/Dolt pull and push behavior when configured. `forge setup --sync` is deprecated and removes old generated GitHub-Beads sync files; future GitHub issue sync belongs to Forge Kernel/server authority.
103
+
104
+ ## Worktrees
105
+
106
+ ```bash
107
+ forge worktree create <slug> --branch <branch-name>
108
+ forge worktree remove <slug>
109
+ forge clean --dry-run
110
+ ```
111
+
112
+ Slugs must not contain `..`, `/`, or `\`.
113
+
114
+ ## Adapters
115
+
116
+ ```bash
117
+ forge new adapter <name> --kind=review --template=greptile
118
+ forge adapter list
119
+ forge adapter test <name> --fixture=<path>
120
+ forge adapter enable <name>
121
+ forge adapter disable <name>
122
+ ```
123
+
124
+ Only review adapters and the Greptile-shaped starter template are currently safe to present as supported.
125
+
126
+ ## Validation And Packaging
127
+
128
+ ```bash
129
+ bun run typecheck
130
+ bun run lint
131
+ bun run check
132
+ bun test --timeout 15000
133
+ npm pack --dry-run
134
+ ```
135
+
136
+ `bun run check` is the project validation pipeline.
137
+
138
+ ## Other Registered CLI Surfaces
139
+
140
+ These commands exist as current CLI surfaces, but many are specialized and should be checked with source or tests before using them in public examples:
141
+
142
+ ```text
143
+ forge audit
144
+ forge explain
145
+ forge docs
146
+ forge doctor
147
+ forge test
148
+ forge push
149
+ forge upgrade
150
+ forge migrate
151
+ forge recommend
152
+ forge add
153
+ ```
154
+
155
+ `forge migrate` is dry-run oriented in the current public docs. Do not present it as a migration executor.
156
+
157
+ ## Doc Gate
158
+
159
+ `forge doc-gate` inspects a repository's documentation structure and enforces that code changes ship with a documentation update. It is a thin CLI wrapper over the validated doc-gate detector and gate.
160
+
161
+ ```bash
162
+ forge doc-gate detect [--json]
163
+ forge doc-gate check --base <ref> --head <ref> [--skip] [--json]
164
+ ```
165
+
166
+ - `detect` runs the repo-structure detector against the current working directory and prints a human-readable summary — detected source surface, toolchain, CI provider, CHANGELOG, and AGENTS.md, plus an overall verdict — or a structured object with `--json`. Any verdict, including `ESCALATE→agent` or `MANUAL-CONFIG`, exits 0; it exits non-zero only on a real error (not a git repository, or no commits yet).
167
+ - `check` compares the `--base` and `--head` refs and **fails when a code change lands without an accompanying documentation update**. A `pass` or `abstain` decision exits 0; a hard `fail` exits 1. Use `--skip` to record an explicit skip without supplying refs.
168
+
169
+ Both subcommands require a git working tree with at least one commit (`HEAD`). The related `forge doc-gate init` (scaffold a doc-gate declaration file) and `forge doc-gate okf` (OKF bundle generation) subcommands are also registered; run `forge doc-gate` with no arguments for full usage.
170
+
171
+ ## Kernel Filesystem Safety
172
+
173
+ The Forge Kernel stores its SQLite database under `.git/forge/kernel.sqlite`. SQLite WAL mode corrupts when a cloud-sync client (OneDrive, Dropbox, Google Drive, iCloud) or a network filesystem (UNC / SMB / NFS / mapped drive) rewrites the database mid-write. A default-on gate in `broker.initialize()` therefore **refuses** to initialize the kernel on those filesystems — the throw happens *before* any database file is created, so nothing is written to the unsafe location.
174
+
175
+ ```bash
176
+ forge doctor # human summary, exits non-zero on a refuse-class path
177
+ forge doctor --json # machine-readable report (schemaVersion 1)
178
+ ```
179
+
180
+ `forge doctor` resolves the exact kernel database path the gate guards and reports its filesystem class **without creating any file**:
181
+
182
+ | Class | Risk tier | Behavior |
183
+ |-------|-----------|----------|
184
+ | `local-ok` | safe | proceed silently |
185
+ | `wsl-cross`, `unknown` | warn | proceed with a warning (fail-open) |
186
+ | `onedrive`, `dropbox`, `gdrive`, `icloud`, `network-unc`, `mapped-network-drive` | refuse | block kernel init |
187
+
188
+ **Escape hatch:** set `FORGE_KERNEL_ALLOW_UNSAFE_FS=1` to downgrade every `refuse` to a warning and proceed at your own risk (intended for reliable network homes, CI sandboxes, and incident recovery). It does not affect `safe`/`warn` classes. On Windows, mapped-drive detection **fails safe**: any probe failure is treated as `unknown` (warn), never silently allowed.
189
+
190
+ ## Agent Workflow Stages
191
+
192
+ The default agent workflow template is:
193
+
194
+ ```text
195
+ /plan -> /dev -> /validate -> /ship -> /review -> /verify
196
+ ```
197
+
198
+ These are stage skills and installed agent workflows. They are intentionally documented separately from current `forge` CLI commands. The workflow is core to Forge, but it is packaged through agent harness files and skills rather than through one CLI command per stage. Pre-merge is not one of these numbered stages or a `/premerge` command; it is a documentation-and-handoff gate embedded in the `/ship` and `/review` stages that finishes docs and confirms CI before merge.
199
+
200
+ Do not document these as current CLI commands unless the matching `lib/commands/<name>.js` file exists:
201
+
202
+ ```text
203
+ forge review
204
+ forge verify
205
+ ```
@@ -0,0 +1,97 @@
1
+ # Decision Drift Guards
2
+
3
+ **Status**: Planning reference for the Forge Kernel authority reset.
4
+ **Canonical decision registry**: [Project design and decision registry](../PROJECT_DESIGN.md).
5
+ **Historical decision log**: [Locked decisions](../work/2026-04-28-skeleton-pivot/locked-decisions.md).
6
+
7
+ ## Purpose
8
+
9
+ Forge has moved from a Beads/Dolt-centered plan to a Forge Kernel authority plan. This document defines the checks that keep future PRs from accidentally drifting back to the old architecture. Current accepted direction is tracked in `docs/PROJECT_DESIGN.md`; historical work-folder decisions are evidence unless promoted there or accepted by Kernel decision event.
10
+
11
+ ## Non-Negotiable Rules
12
+
13
+ 1. Forge Kernel is the issue authority.
14
+ 2. Beads is import/export compatibility only.
15
+ 3. Local mode uses local SQLite WAL broker authority.
16
+ 4. Team mode requires server authority.
17
+ 5. GitHub/Linear are projections only.
18
+ 6. Harness files are generated projections only.
19
+ 7. Skills, MCPs, agents, commands, hooks, scripts, docs/context packs, and extensions are capability providers.
20
+ 8. Forge-owned check commands are the policy engine; agent hooks, Lefthook, and CI are adapters/enforcement surfaces.
21
+ 9. Users configure provider/stage bindings; Forge validates and records them.
22
+ 10. Conflicts are quarantined in Forge before projection.
23
+ 11. Raw prompts/tool logs remain local-only by default.
24
+
25
+ ## Required Doc Updates
26
+
27
+ Any PR changing authority, storage, workflow config, provider loading, issue commands, team sync, Beads migration, or external projections must update:
28
+
29
+ - [PROJECT_DESIGN.md](../PROJECT_DESIGN.md) when accepted/current project direction changes
30
+ - [Architecture index](../architecture/index.md) or scoped `docs/architecture/**` records when architecture-significant behavior is changed or discovered
31
+ - [forge-kernel-authority-control-plane.md](../work/2026-04-28-skeleton-pivot/forge-kernel-authority-control-plane.md)
32
+ - [locked-decisions.md](../work/2026-04-28-skeleton-pivot/locked-decisions.md)
33
+ - [release-plan.md](../work/2026-04-28-skeleton-pivot/release-plan.md)
34
+ - [FORGE_KERNEL_STORAGE_MODEL.md](./FORGE_KERNEL_STORAGE_MODEL.md)
35
+ - the implementation-specific guide/reference doc for the changed surface
36
+
37
+ ## Evaluator Checklist
38
+
39
+ Before a release PR can be considered ready, run or manually answer these checks:
40
+
41
+ ```text
42
+ Authority:
43
+ - Does any path make Beads, GitHub, Linear, D1, or a harness file authoritative?
44
+ - Do issue commands write through Forge Kernel?
45
+
46
+ Storage:
47
+ - Is each new field classified as authority, cache, projection, archive, or config?
48
+ - Is local-only sensitive data protected from server upload by default?
49
+
50
+ Team mode:
51
+ - Are claim/start/close/stage-transition writes blocked when server authority is unavailable?
52
+ - Are stale/reclaimable states visible and auditable?
53
+
54
+ Providers:
55
+ - Are external skills/MCPs/agents/commands/hooks declared as provider capabilities?
56
+ - Are required providers validated before stage execution?
57
+ - Are unknown providers prevented from becoming required without evidence/evaluator support?
58
+
59
+ Projections:
60
+ - Does projection failure leave Forge Kernel state intact?
61
+ - Are dead letters visible with repair actions?
62
+
63
+ Docs:
64
+ - Did the PR update the authority plan, storage model, and release gates if behavior changed?
65
+ - Did the PR update or explicitly leave unchanged docs/PROJECT_DESIGN.md for accepted decision changes?
66
+ - Did the PR answer architecture impact and add/update docs/architecture/** records for architecture-significant changes or discoveries?
67
+ ```
68
+
69
+ ## Forbidden Drift Patterns
70
+
71
+ - Direct `.beads/issues.jsonl` reads as current state authority.
72
+ - `bd` commands as the canonical write path after Kernel command routing lands.
73
+ - GitHub or Linear webhook payloads overwriting Forge-owned fields.
74
+ - D1 reads deciding claims or lease state.
75
+ - Generated Claude/Cursor/Codex files being edited as source of truth.
76
+ - Lefthook or any agent-specific hook treated as the policy source of truth instead of Forge-owned checks plus CI/Kernel gates.
77
+ - Agents using `git commit --no-verify`, `git push --no-verify`, `HUSKY=0`, `LEFTHOOK=0`, `git -c core.hooksPath=...`, script-mediated hook bypasses, or hook removal to bypass Forge workflow gates without explicit audited authorization recorded as Forge/Kernel-compatible evidence.
78
+ - Required skills loaded by prompt discretion instead of WorkflowGraph policy.
79
+ - Silent projection failures.
80
+ - Accepted project direction living only in a work folder, chat transcript, Beads memory, generated summary, or agent prompt without a `docs/PROJECT_DESIGN.md` entry.
81
+ - Architecture-significant behavior, domain rules, constraints, or subsystem facts discovered during work but not captured as an architecture record, ADR, work evidence, or KnowledgeStore proposal.
82
+ - Fixed heartbeat spam as the main liveness signal.
83
+
84
+ ## Release Gate
85
+
86
+ Each Kernel-era release must include a short evaluator note with:
87
+
88
+ ```text
89
+ Authority score:
90
+ Storage score:
91
+ Provider/config score:
92
+ Projection score:
93
+ Security/privacy score:
94
+ Known drift risks:
95
+ ```
96
+
97
+ Target score is 100/100. Anything below 100 needs a documented follow-up or a deliberate locked decision.
@@ -1,5 +1,7 @@
1
1
  # Forge Workflow Examples
2
2
 
3
+ > Historical examples. These transcripts are illustrative, not current setup or timing guarantees. Use [Quickstart](../../QUICKSTART.md), [Workflow templates](../guides/WORKFLOW_TEMPLATES.md), and [Command reference](COMMANDS.md) for current behavior.
4
+
3
5
  Real-world examples showing how to use Forge for different scenarios.
4
6
 
5
7
  ---
@@ -17,7 +19,7 @@ Real-world examples showing how to use Forge for different scenarios.
17
19
 
18
20
  **Task**: Add a health check endpoint
19
21
 
20
- **Estimated Time**: 15 minutes
22
+ **Estimated Time**: Historical example only; do not treat as a guarantee.
21
23
 
22
24
  **Workflow**: Tactical
23
25
 
@@ -88,7 +90,7 @@ git commit -m "feat: add health check endpoint"
88
90
  # URL: https://github.com/you/project/pull/42
89
91
  ```
90
92
 
91
- **Result**: Feature shipped in 15 minutes with tests and documentation.
93
+ **Result**: Historical transcript showing the intended flow with tests and documentation. Do not treat the timing or output as a current guarantee.
92
94
 
93
95
  ---
94
96
 
@@ -473,10 +475,10 @@ forge sync
473
475
 
474
476
  ## Next Steps
475
477
 
476
- 📚 **New to Forge?** → [QUICKSTART.md](../QUICKSTART.md)
478
+ 📚 **New to Forge?** → [QUICKSTART.md](../../QUICKSTART.md)
477
479
 
478
- 📖 **Learn workflow** → [AGENTS.md](../AGENTS.md)
480
+ 📖 **Learn workflow** → [AGENTS.md](../../AGENTS.md)
479
481
 
480
- 🛠️ **Setup tools** → [SETUP.md](SETUP.md)
482
+ 🛠️ **Setup tools** → [SETUP.md](../guides/SETUP.md)
481
483
 
482
484
  💬 **Questions?** → [GitHub Discussions](https://github.com/harshanandak/forge/discussions)