forge-workflow 0.1.0-beta.5 → 0.1.0-beta.7

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 (268) hide show
  1. package/AGENTS.md +4 -0
  2. package/CHANGELOG.md +48 -0
  3. package/CLAUDE.md +0 -12
  4. package/CODING_STANDARDS.md +72 -0
  5. package/bin/forge.js +12 -1
  6. package/docs/guides/MIGRATION.md +3 -3
  7. package/docs/reference/FORGE_KERNEL_STORAGE_MODEL.md +4 -0
  8. package/docs/reference/INSTALL.md +4 -0
  9. package/docs/reference/LEGACY_CLAIM_REPAIR.md +112 -0
  10. package/docs/reference/RELEASE.md +4 -4
  11. package/docs/reference/github-accounts.md +134 -0
  12. package/docs/reference/shepherd.md +63 -13
  13. package/lib/adapters/pr-state-adapter.js +15 -2
  14. package/lib/base-remote.js +138 -0
  15. package/lib/beta5-compatibility-evidence.js +1093 -0
  16. package/lib/bun-lockfile-proof.js +413 -0
  17. package/lib/bun-workflow-pins.js +461 -0
  18. package/lib/capabilities/index.js +9 -0
  19. package/lib/capabilities/model.js +141 -0
  20. package/lib/capabilities/probes.js +347 -0
  21. package/lib/codex-skills.js +2 -2
  22. package/lib/commands/_manifest.js +1 -0
  23. package/lib/commands/_registry.js +48 -18
  24. package/lib/commands/clean.js +57 -1
  25. package/lib/commands/doctor.js +37 -6
  26. package/lib/commands/gate.js +197 -27
  27. package/lib/commands/github.js +215 -0
  28. package/lib/commands/hooks.js +54 -6
  29. package/lib/commands/memory.js +66 -2
  30. package/lib/commands/merge.js +720 -73
  31. package/lib/commands/plan.js +33 -2
  32. package/lib/commands/pr.js +2 -0
  33. package/lib/commands/preflight.js +10 -2
  34. package/lib/commands/push.js +120 -9
  35. package/lib/commands/recall.js +95 -61
  36. package/lib/commands/release.js +23 -2
  37. package/lib/commands/remember.js +28 -4
  38. package/lib/commands/serve.js +26 -9
  39. package/lib/commands/setup.js +132 -4
  40. package/lib/commands/shepherd.js +578 -72
  41. package/lib/commands/ship.js +15 -69
  42. package/lib/commands/skill.js +8 -0
  43. package/lib/commands/team.js +47 -8
  44. package/lib/commands/test.js +163 -4
  45. package/lib/commands/validate.js +78 -22
  46. package/lib/commands/worktree.js +155 -19
  47. package/lib/fixtures/beta5-corpus/v1/README.md +9 -0
  48. package/lib/fixtures/beta5-corpus/v1/contract/command-contract.json +26 -0
  49. package/lib/fixtures/beta5-corpus/v1/contract/package-contract.json +13 -0
  50. package/lib/fixtures/beta5-corpus/v1/contract/workflow-stage-matrix.json +8 -0
  51. package/lib/fixtures/beta5-corpus/v1/manifest.json +25 -0
  52. package/lib/fixtures/beta5-corpus/v1/state/comments.jsonl +1 -0
  53. package/lib/fixtures/beta5-corpus/v1/state/config.yaml +6 -0
  54. package/lib/fixtures/beta5-corpus/v1/state/dependencies.jsonl +1 -0
  55. package/lib/fixtures/beta5-corpus/v1/state/issues.jsonl +2 -0
  56. package/lib/fixtures/beta5-corpus/v1/state/kernel.sql +20 -0
  57. package/lib/forge-issues.js +78 -0
  58. package/lib/gate-events.js +98 -10
  59. package/lib/github-context.js +308 -0
  60. package/lib/global-flags.js +1 -0
  61. package/lib/hook-renderer.js +29 -1
  62. package/lib/issue-render.js +19 -0
  63. package/lib/kernel/broker.js +723 -31
  64. package/lib/kernel/claim-reconciler.js +238 -0
  65. package/lib/kernel/lease-enforcer.js +9 -4
  66. package/lib/kernel/legacy-claim-repair.js +442 -0
  67. package/lib/kernel/live-claim-projection.js +26 -0
  68. package/lib/kernel/migrations.js +118 -3
  69. package/lib/kernel/readiness-model.js +184 -12
  70. package/lib/kernel/schema.js +49 -1
  71. package/lib/kernel/sqlite-driver.js +3322 -183
  72. package/lib/kernel/taxonomy-validator.js +4 -1
  73. package/lib/kernel/windows-private-acl.js +239 -0
  74. package/lib/memory/hygiene.js +191 -0
  75. package/lib/memory/router.js +94 -27
  76. package/lib/memory/usage-evidence.js +4 -0
  77. package/lib/memory-digest.js +59 -0
  78. package/lib/merge-rules.js +135 -17
  79. package/lib/npm-publish-workflow.js +233 -40
  80. package/lib/package-root.js +2 -0
  81. package/lib/pr-monitor/auto-actions.js +169 -28
  82. package/lib/pr-monitor/differ.js +110 -4
  83. package/lib/pr-monitor/events.js +0 -0
  84. package/lib/pr-monitor/flow-monitor.js +1424 -0
  85. package/lib/pr-monitor/gather.js +251 -44
  86. package/lib/pr-monitor/journal.js +0 -37
  87. package/lib/pr-monitor/monitor.js +117 -10
  88. package/lib/pr-monitor/process-identity.js +117 -0
  89. package/lib/pr-monitor/reconcile-executor.js +1101 -625
  90. package/lib/pr-monitor/reconcile.js +0 -0
  91. package/lib/pr-monitor/render-summary.js +121 -24
  92. package/lib/pr-monitor/review-preflight.js +269 -0
  93. package/lib/pr-monitor/shepherd-lease.js +28 -19
  94. package/lib/pr-monitor/verdict.js +438 -0
  95. package/lib/pr-monitor/watch-lifecycle.js +144 -38
  96. package/lib/pr-monitor/watch-owner.js +1414 -0
  97. package/lib/pr-monitor/watch.js +129 -58
  98. package/lib/pr-shepherd.js +17 -3
  99. package/lib/project-memory.js +145 -3
  100. package/lib/protected-state-authority.js +799 -4
  101. package/lib/protected-state-surfaces.js +181 -3
  102. package/lib/release-readiness.js +2 -3
  103. package/lib/review-adapter.js +65 -0
  104. package/lib/skills-sync.js +65 -32
  105. package/lib/validation/risk-manifest.js +339 -0
  106. package/lib/validation-receipt.js +190 -0
  107. package/lib/workflow/enforce-stage.js +44 -0
  108. package/lib/workflow/plan-authority.js +225 -0
  109. package/node_modules/@forge/contracts/compatibility-matrix.v1.json +1 -0
  110. package/node_modules/@forge/contracts/contract-baseline.v1.json +134 -0
  111. package/node_modules/@forge/contracts/fixtures/v1/canonical-hash.json +1 -0
  112. package/node_modules/@forge/contracts/fixtures/v1/contract-inputs.v1.json +71 -0
  113. package/node_modules/@forge/contracts/fixtures/v1/feedback-secret-reject.json +1 -0
  114. package/node_modules/@forge/contracts/fixtures/v1/identity-conflict.json +1 -0
  115. package/node_modules/@forge/contracts/fixtures/v1/malformed-envelope-inputs.v1.json +16 -0
  116. package/node_modules/@forge/contracts/fixtures/v1/malformed-missing-required.json +1 -0
  117. package/node_modules/@forge/contracts/fixtures/v1/monitor-bounds-reject.json +1 -0
  118. package/node_modules/@forge/contracts/fixtures/v1/monitor-receipt-privacy-reject.json +1 -0
  119. package/node_modules/@forge/contracts/fixtures/v1/not-executed-receipt.json +1 -0
  120. package/node_modules/@forge/contracts/fixtures/v1/privacy-redaction.json +1 -0
  121. package/node_modules/@forge/contracts/fixtures/v1/retry-identical.json +1 -0
  122. package/node_modules/@forge/contracts/fixtures/v1/stale-authority-reject.json +1 -0
  123. package/node_modules/@forge/contracts/fixtures/v1/structured-error-privacy-reject.json +1 -0
  124. package/node_modules/@forge/contracts/fixtures/v1/structured-error-stripe-live-reject.json +1 -0
  125. package/node_modules/@forge/contracts/fixtures/v1/structured-error-stripe-test-reject.json +1 -0
  126. package/node_modules/@forge/contracts/fixtures/v1/unknown-advisory-roundtrip.json +1 -0
  127. package/node_modules/@forge/contracts/fixtures/v1/unknown-consequential-reject.json +1 -0
  128. package/node_modules/@forge/contracts/fixtures/v1/valid-full.json +1 -0
  129. package/node_modules/@forge/contracts/fixtures/v1/valid-minimal.json +1 -0
  130. package/node_modules/@forge/contracts/fixtures/v1/wrong-capability-digest.json +1 -0
  131. package/node_modules/@forge/contracts/index.js +32 -0
  132. package/node_modules/@forge/contracts/package.json +35 -0
  133. package/node_modules/@forge/contracts/schemas/v1/capability-manifest.schema.json +1 -0
  134. package/node_modules/@forge/contracts/schemas/v1/claim-request.schema.json +1 -0
  135. package/node_modules/@forge/contracts/schemas/v1/context-packet.schema.json +1 -0
  136. package/node_modules/@forge/contracts/schemas/v1/delivery-receipt.schema.json +1 -0
  137. package/node_modules/@forge/contracts/schemas/v1/feedback-report.schema.json +1 -0
  138. package/node_modules/@forge/contracts/schemas/v1/lease-receipt.schema.json +1 -0
  139. package/node_modules/@forge/contracts/schemas/v1/monitor-event.schema.json +1 -0
  140. package/node_modules/@forge/contracts/schemas/v1/monitor-receipt.schema.json +1 -0
  141. package/node_modules/@forge/contracts/schemas/v1/run-receipt.schema.json +1 -0
  142. package/node_modules/@forge/contracts/schemas/v1/structured-error.schema.json +1 -0
  143. package/node_modules/@forge/contracts/schemas/v1/work-packet.schema.json +1 -0
  144. package/node_modules/@forge/contracts/src/baseline.js +23 -0
  145. package/node_modules/@forge/contracts/src/canonical.js +151 -0
  146. package/node_modules/@forge/contracts/src/definitions.js +176 -0
  147. package/node_modules/@forge/contracts/src/identity.js +42 -0
  148. package/node_modules/@forge/contracts/src/schema.js +72 -0
  149. package/node_modules/@forge/contracts/src/validate.js +305 -0
  150. package/node_modules/@forge/flow/index.js +114 -0
  151. package/node_modules/@forge/flow/package.json +34 -0
  152. package/node_modules/@forge/flow/src/bounded-loop.js +415 -0
  153. package/node_modules/@forge/flow/src/efficiency-supervisor.js +89 -0
  154. package/node_modules/@forge/flow/src/executor.js +279 -0
  155. package/node_modules/@forge/flow/src/monitor-durability.js +419 -0
  156. package/node_modules/@forge/flow/src/monitor-runtime.js +460 -0
  157. package/node_modules/@forge/flow/src/process-lifecycle.js +469 -0
  158. package/node_modules/@forge/flow/src/skill-runtime.js +343 -0
  159. package/node_modules/@forge/memory/index.js +331 -0
  160. package/node_modules/@forge/memory/package.json +34 -0
  161. package/node_modules/@forge/memory/src/authority-provider.js +67 -0
  162. package/node_modules/@forge/memory/src/backend-registry.js +166 -0
  163. package/node_modules/@forge/memory/src/feedback-intake.js +243 -0
  164. package/node_modules/@forge/memory/src/pr-lifecycle-authority.js +946 -0
  165. package/node_modules/@forge/memory/src/usage-evidence.js +205 -0
  166. package/package.json +16 -4
  167. package/packages/flow/node_modules/@forge/contracts/compatibility-matrix.v1.json +1 -0
  168. package/packages/flow/node_modules/@forge/contracts/contract-baseline.v1.json +134 -0
  169. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/canonical-hash.json +1 -0
  170. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/contract-inputs.v1.json +71 -0
  171. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/feedback-secret-reject.json +1 -0
  172. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/identity-conflict.json +1 -0
  173. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/malformed-envelope-inputs.v1.json +16 -0
  174. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/malformed-missing-required.json +1 -0
  175. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/monitor-bounds-reject.json +1 -0
  176. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/monitor-receipt-privacy-reject.json +1 -0
  177. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/not-executed-receipt.json +1 -0
  178. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/privacy-redaction.json +1 -0
  179. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/retry-identical.json +1 -0
  180. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/stale-authority-reject.json +1 -0
  181. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/structured-error-privacy-reject.json +1 -0
  182. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/structured-error-stripe-live-reject.json +1 -0
  183. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/structured-error-stripe-test-reject.json +1 -0
  184. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/unknown-advisory-roundtrip.json +1 -0
  185. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/unknown-consequential-reject.json +1 -0
  186. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/valid-full.json +1 -0
  187. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/valid-minimal.json +1 -0
  188. package/packages/flow/node_modules/@forge/contracts/fixtures/v1/wrong-capability-digest.json +1 -0
  189. package/packages/flow/node_modules/@forge/contracts/index.js +32 -0
  190. package/packages/flow/node_modules/@forge/contracts/package.json +35 -0
  191. package/packages/flow/node_modules/@forge/contracts/schemas/v1/capability-manifest.schema.json +1 -0
  192. package/packages/flow/node_modules/@forge/contracts/schemas/v1/claim-request.schema.json +1 -0
  193. package/packages/flow/node_modules/@forge/contracts/schemas/v1/context-packet.schema.json +1 -0
  194. package/packages/flow/node_modules/@forge/contracts/schemas/v1/delivery-receipt.schema.json +1 -0
  195. package/packages/flow/node_modules/@forge/contracts/schemas/v1/feedback-report.schema.json +1 -0
  196. package/packages/flow/node_modules/@forge/contracts/schemas/v1/lease-receipt.schema.json +1 -0
  197. package/packages/flow/node_modules/@forge/contracts/schemas/v1/monitor-event.schema.json +1 -0
  198. package/packages/flow/node_modules/@forge/contracts/schemas/v1/monitor-receipt.schema.json +1 -0
  199. package/packages/flow/node_modules/@forge/contracts/schemas/v1/run-receipt.schema.json +1 -0
  200. package/packages/flow/node_modules/@forge/contracts/schemas/v1/structured-error.schema.json +1 -0
  201. package/packages/flow/node_modules/@forge/contracts/schemas/v1/work-packet.schema.json +1 -0
  202. package/packages/flow/node_modules/@forge/contracts/src/baseline.js +23 -0
  203. package/packages/flow/node_modules/@forge/contracts/src/canonical.js +151 -0
  204. package/packages/flow/node_modules/@forge/contracts/src/definitions.js +176 -0
  205. package/packages/flow/node_modules/@forge/contracts/src/identity.js +42 -0
  206. package/packages/flow/node_modules/@forge/contracts/src/schema.js +72 -0
  207. package/packages/flow/node_modules/@forge/contracts/src/validate.js +305 -0
  208. package/packages/memory/node_modules/@forge/contracts/compatibility-matrix.v1.json +1 -0
  209. package/packages/memory/node_modules/@forge/contracts/contract-baseline.v1.json +134 -0
  210. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/canonical-hash.json +1 -0
  211. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/contract-inputs.v1.json +71 -0
  212. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/feedback-secret-reject.json +1 -0
  213. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/identity-conflict.json +1 -0
  214. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/malformed-envelope-inputs.v1.json +16 -0
  215. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/malformed-missing-required.json +1 -0
  216. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/monitor-bounds-reject.json +1 -0
  217. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/monitor-receipt-privacy-reject.json +1 -0
  218. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/not-executed-receipt.json +1 -0
  219. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/privacy-redaction.json +1 -0
  220. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/retry-identical.json +1 -0
  221. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/stale-authority-reject.json +1 -0
  222. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/structured-error-privacy-reject.json +1 -0
  223. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/structured-error-stripe-live-reject.json +1 -0
  224. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/structured-error-stripe-test-reject.json +1 -0
  225. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/unknown-advisory-roundtrip.json +1 -0
  226. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/unknown-consequential-reject.json +1 -0
  227. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/valid-full.json +1 -0
  228. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/valid-minimal.json +1 -0
  229. package/packages/memory/node_modules/@forge/contracts/fixtures/v1/wrong-capability-digest.json +1 -0
  230. package/packages/memory/node_modules/@forge/contracts/index.js +32 -0
  231. package/packages/memory/node_modules/@forge/contracts/package.json +35 -0
  232. package/packages/memory/node_modules/@forge/contracts/schemas/v1/capability-manifest.schema.json +1 -0
  233. package/packages/memory/node_modules/@forge/contracts/schemas/v1/claim-request.schema.json +1 -0
  234. package/packages/memory/node_modules/@forge/contracts/schemas/v1/context-packet.schema.json +1 -0
  235. package/packages/memory/node_modules/@forge/contracts/schemas/v1/delivery-receipt.schema.json +1 -0
  236. package/packages/memory/node_modules/@forge/contracts/schemas/v1/feedback-report.schema.json +1 -0
  237. package/packages/memory/node_modules/@forge/contracts/schemas/v1/lease-receipt.schema.json +1 -0
  238. package/packages/memory/node_modules/@forge/contracts/schemas/v1/monitor-event.schema.json +1 -0
  239. package/packages/memory/node_modules/@forge/contracts/schemas/v1/monitor-receipt.schema.json +1 -0
  240. package/packages/memory/node_modules/@forge/contracts/schemas/v1/run-receipt.schema.json +1 -0
  241. package/packages/memory/node_modules/@forge/contracts/schemas/v1/structured-error.schema.json +1 -0
  242. package/packages/memory/node_modules/@forge/contracts/schemas/v1/work-packet.schema.json +1 -0
  243. package/packages/memory/node_modules/@forge/contracts/src/baseline.js +23 -0
  244. package/packages/memory/node_modules/@forge/contracts/src/canonical.js +151 -0
  245. package/packages/memory/node_modules/@forge/contracts/src/definitions.js +176 -0
  246. package/packages/memory/node_modules/@forge/contracts/src/identity.js +42 -0
  247. package/packages/memory/node_modules/@forge/contracts/src/schema.js +72 -0
  248. package/packages/memory/node_modules/@forge/contracts/src/validate.js +305 -0
  249. package/scripts/commitlint.js +13 -15
  250. package/scripts/generate-risk-manifest.js +91 -0
  251. package/scripts/github-context-bridge.sh +10 -0
  252. package/scripts/legacy-claim-repair.js +145 -0
  253. package/scripts/lib/behavioral-eval-runtime.js +3 -2
  254. package/scripts/process-tree.js +14 -2
  255. package/scripts/protected-state-check.js +440 -17
  256. package/scripts/sync-agent-skills.js +333 -34
  257. package/scripts/test-full-suite.js +704 -18
  258. package/scripts/test-profile.js +13 -3
  259. package/scripts/test.js +96 -15
  260. package/skills/coverage.json +1 -0
  261. package/skills/review/SKILL.md +2 -0
  262. package/skills/review/evals/scorecard.json +2 -2
  263. package/skills/setup/SKILL.md +18 -0
  264. package/skills/setup/evals/scorecard.json +3 -3
  265. package/skills/shepherd/SKILL.md +19 -2
  266. package/skills/shepherd/evals/scorecard.json +3 -3
  267. package/skills/validate/SKILL.md +3 -0
  268. package/skills/validate/evals/scorecard.json +1 -1
package/AGENTS.md CHANGED
@@ -118,6 +118,10 @@ Task 2: Validation logic
118
118
  ✓ Quality review: ✅
119
119
  ```
120
120
 
121
+ **Flaky tests:** a test that changes result without the code changing gets
122
+ quarantined and an issue filed — never retried until green. Register it in
123
+ `test/QUARANTINE.md`. Reviewers reject a "re-run CI" as a fix.
124
+
121
125
  ## State Management (Single Source of Truth)
122
126
 
123
127
  **Current implementation**: The Forge Kernel is the sole issue-state authority — every issue command reads and writes the kernel store, with no backend to select. Beads exists only as an inbound migration path: `forge migrate --from beads` imports an existing Beads store into the kernel once, and no Forge command depends on Beads at runtime. **Direction (D45)**: the Kernel owns issue/workflow/run authority outright; Beads is retired as a live feature. New authority work must follow [docs/work/2026-04-28-skeleton-pivot/forge-kernel-authority-control-plane.md](docs/work/2026-04-28-skeleton-pivot/forge-kernel-authority-control-plane.md) and [docs/reference/FORGE_KERNEL_STORAGE_MODEL.md](docs/reference/FORGE_KERNEL_STORAGE_MODEL.md).
package/CHANGELOG.md CHANGED
@@ -7,6 +7,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  > **Note**: `/check` was renamed to `/validate` and `/merge` was renamed to `/premerge` in v0.0.3. Historical entries below may use the old names.
9
9
 
10
+ ## [0.1.0-beta.7] - 2026-09-11
11
+
12
+ ### Changed
13
+
14
+ - **A clean full validation is reused by the next unchanged `forge push`.** Forge stores a one-hour, signed local receipt bound to the canonical worktree, exact HEAD, clean state, Forge, Bun, and Node runtimes, and complete nonzero gate results. Branch protection and lint still run; invalid or stale evidence falls back to the full suite, while raw Git pushes and CI remain independent.
15
+ - **A local full suite no longer reruns its already-included E2E directory.** Targeted E2E execution is unchanged, while full validation avoids an exact duplicate. (issue `4aed2cc8-57eb-451b-bb3a-02bbdd93af49`)
16
+ - **The shared public contract package is now `@forge/contracts`.** The product-neutral name replaces the former unpublished Memory-qualified name before beta.7, and all three scoped packages explicitly publish as public MIT packages linked to the public Forge repository. (issue `4d41ffb7-8793-4a17-a30b-92130db69672`)
17
+
18
+ ### Fixed
19
+
20
+ - **The npm package now includes every internal runtime workspace.** Root runtime imports use the `@forge/memory`, `@forge/contracts`, and `@forge/flow` package boundaries, and npm bundles those unpublished workspaces into `forge-workflow`. The installed-package smoke accepts npm 10 lifecycle output before its JSON payload, so Node 22 verifies the same package correctly. A fresh packed install now runs `forge --version` and `forge setup --quick --yes`, preventing the `MODULE_NOT_FOUND` failure in v0.1.0-beta.6. (issue `95372af8-da00-42e0-af64-0111ddab3405`)
21
+
22
+ ## [0.1.0-beta.6] - 2026-09-11
23
+
24
+ ### Added
25
+
26
+ - **Optional repository-scoped GitHub account context.** Adds clone-local `github.account` binding, native GitHub CLI named-account retrieval, live identity verification, child-only credential scoping across Forge GitHub routes, and concurrent launcher isolation without changing global authentication, Git authorship, or transport configuration. (#554, issue `ee4869d5-77af-4959-909c-190e99b3ada0`)
27
+ - **Dormant Shepherd owner-authority foundation.** Adds the composite-key Kernel schema, migration gate, and bounded transactional owner API without changing any production watcher, daemon, lease, monitor, or command caller. The atomic caller cutover remains isolated in the dependent PR. (#540, issue `ca693a15-c430-404b-9e97-7de59b529eee`)
28
+ - **Atomic Shepherd watcher-authority cutover.** Routes direct, adopt, child, and daemon watcher lifecycles through the Kernel owner row and exact-complete migration gate; reduces the singleton lease to election only; and removes persisted PID, lease-watcher, generation-marker, cleanup-marker, and in-memory authority writers. (#541, issue `700c07c3-e06d-48ed-9b24-229cd7872069`)
29
+ - **Public receipt-bound PR lifecycle authority.** `@forge/memory` now issues exact-head WorkPackets, authenticates RunReceipts, durably links exact `pr.opened` evidence through public Kernel provider seams, requires and rechecks live session-bound ownership and authoritative readiness, preserves Kernel ready order, and fails closed on replay conflicts, stale evidence, unsafe paths, provider loss, and unbounded operations. External merge and terminal `pr.merged` linkage remain owned by the guarded Forge merge path; canonical LeaseReceipt epochs remain explicitly deferred for 0.1. (issue `c2a3c655-ade2-4156-a8dc-e6b4ee2827ad`)
30
+ - **Human-gated legacy claim repair.** Adds a fixed-time, privacy-safe claim preflight, separately restored SQLite backup proof, and exact-digest `BEGIN IMMEDIATE` repair with terminal precedence, null-expiry preservation, CAS drift rejection, idempotent receipts, and interruption rollback. The operator-only script is never run at startup. (PR #528, issue `0fd8b8c1-686c-4808-8d99-f9ed5b9571de`)
31
+ - **Memory recall and session-attention stabilization.** Typed recall now filters before limits, superseded notes hide by default but remain recoverable, Claude read-attention injects only fenced path-matched notes, and session-summary reminders remain current and idempotent. (#504, issue `0874844f-9c0c-449a-994e-a804fe3fc3a5`)
32
+ - **Frozen beta.5 compatibility evidence.** Adds a content-hashed v0.1.0-beta.5 contract and state corpus, privacy-safe inventory, isolated backup/restore proof, and deterministic non-mutating migration dry-run results for Windows and Linux-safe paths. (#498, issue `5dad8dbf-1c49-444d-a407-a48583537817`)
33
+ - **Forge 0.1.0 control-plane foundations.** Adds executable issue-readiness contracts, dead-run claim reconciliation, issue-scoped approval receipts, Kernel-authoritative plan snapshots, fail-closed risk-to-test selection, and distinct npm beta, RC, and stable release channels. (#497; issues `4ee7f9a9-4fa0-42c1-bd96-96638cc9feff`, `9b69a551-f5a0-4057-9d9f-96fb0d744fd3`, `b977b0a2-11f6-40d7-a230-8e2ff5f79115`, `b811a974-a866-47e0-8f83-3f5d2423aded`, `7a6a3fb3-c82c-48e7-86ee-630c171b924c`, `3e46debd-11c3-4b1c-b59a-17304c37cb03`)
34
+ - **Deterministic Bun lockfile ownership.** Protected-state validation can approve a staged root `bun.lock` only when pinned Bun reproduces its exact bytes from captured staged package manifests: first from the committed lock, then from a clean no-lock state only after an exact byte mismatch. Index races, tampering, unsafe paths/configuration, tool drift, and environment-seam hiding fail closed. (issue `a6c52ac8-6f80-4f2d-8d3c-d83eb92becbd`)
35
+
36
+ ### Fixed
37
+
38
+ - **Legacy claim repair now compares exact Windows file identities and timestamps.** BigInt filesystem metadata prevents rounded device/inode collisions from treating distinct files as aliases, while nanosecond timestamps keep recovery-state drift checks fail closed. (#556, issue `7e164066-4d41-4d14-90ef-1b7ee14e2b73`)
39
+ - **Dep-guard apply-decision tests no longer contend with shared Windows subprocess shards.** The process-heavy suite now uses the existing exclusive resource lane, with exact scheduler coverage and no timeout increase or exemption. (issue `762ae565-0059-4827-9c3d-b4249f2b3364`)
40
+ - **Bun workflow proof tests no longer contend with shared full-suite shards.** The process-heavy commit-boundary proof now uses the existing exclusive resource lane, with exact scheduler coverage and no timeout increase or exemption. (#552, issue `2daab8c0-34d6-4378-8cf4-dce6fdbfb86b`)
41
+
42
+ - **The protected-state pre-commit check is now merge-aware.** While a merge is in progress (per-worktree `MERGE_HEAD`), a staged protected path is exempt only when its full staged index entry (mode, object type and object id) is identical to that path's entry on `HEAD`, or on a `MERGE_HEAD` contained in the repository's canonical upstream ref (the base remote — `upstream` preferred over `origin`, the same resolution `/ship` uses to pick a PR base, then that remote's default branch) — content already published on the official base rather than on a contributor's fork. The base-remote resolver now lives in `lib/base-remote.js` and is shared with `/ship`, so a change merged from a fork's default branch but never published upstream stays blocked — content already published on the line this repo integrates into, carried in by the merge rather than edited. A local-only branch, an untrusted contributor remote, or a hand-created `refs/remotes/*` ref earns no exemption, an unresolvable `HEAD` grants no exemption context at all, `bun.lock` still requires its regeneration proof, paths differing from every trusted revision stay blocked, the non-merge path is unchanged, and any failed git query fails closed. (issue `f6d43eb1-249d-4d81-b679-32502ffa28c2`)
43
+ - **Worktree dependency repair now covers Bun workspace shapes and reused worktrees.** Workspace discovery accepts array and object-form manifests plus wildcard and exact paths, reused worktrees revalidate dependencies before returning, and full-suite stderr tails redact complete lines before bounded retention. (#550, issue `465f7e62-1928-4bcf-97a5-c2db05504a7e`)
44
+ - **Validation and dependency recovery gates are reproducible and fail closed.** The protected-state hook now accepts either an exact pinned-Bun transition from the committed lock or an exact clean no-lock regeneration after that transition mismatches; the regenerated lock clears all dependency advisories, every active Bun execution surface is pinned to 1.4.2, and `forge validate` gives the full suite measured capture headroom while distinguishing numeric skipped-test counts from an entirely skipped check. (#551; issues `95ed6f9c-6f23-41f4-9bc4-13177a96ccf2`, `1f7baefc-c9cc-4acf-9cad-e98c53f308ba`, `cfffed63-51dd-4145-acb2-a18f41ef2846`)
45
+ - **Bare conditional merge no longer blocks on intentionally skipped optional checks.** `checks_green` now partitions the authoritative protected context/application set from optional check runs: protected and explicit `only` checks remain strict `SUCCESS`, while terminal optional `NEUTRAL` and `SKIPPED` results no longer block. Missing, malformed, unsafe, and nonterminal evidence still fails closed. (#549, issue `fa805e7e-e718-438f-a776-bd860c80e99a`)
46
+ - **The full-suite worker budget now weights subprocess workers by real process cost.** A subprocess-lane worker owns two Windows processes (its own bun runtime plus the `bun.exe` grandchild its tests spawn), so granting three of them on a 4-vCPU runner oversubscribed the box and produced wall-clock-only failures. Grants are now made against the budget by cost (subprocess/exclusive = 2 units on `win32`, 1 elsewhere; unit = 1), the strongest lane always keeps one worker so the schedule can never stall at zero, and the plan log prints the *granted* concurrency plus the cost and budget instead of the nominal lane concurrency. Non-Windows scheduling is unchanged. (issue `9b8dfa31-4a76-4ef2-b7e9-331d248e3850`)
47
+ - **`forge push` no longer kills a passing full test suite.** The pre-push test run is budgeted from the shared full-suite budget in `scripts/test.js` instead of a hardcoded 120s cap, and that shared budget is raised from 10 to 25 minutes — the previous default sat *below* the measured healthy runtime (602.43s for 8038 tests on Windows), so it SIGKILLed good runs. The ceiling now carries >2x headroom because it exists to catch an indefinite hang, not to bound normal runtime; `FORGE_TEST_TIMEOUT_MS` still overrides. A run terminated by a timeout, signal, or spawn error now reports what happened instead of failing with no summary. (issue `e26dbb91-0443-4e53-946e-a9941ec30ca3`)
48
+ - **The targeted PR lane's full-suite fallback now uses the lane-aware runner.** When the execution planner returns `mode=full`, the follow-up job runs `scripts/test-full-suite.js` instead of a raw `bun test test/`, so subprocess-heavy files get resource-lane separation and the worker budget the full matrix already had — closing the Windows-only spawn failures that hit only this lane.
49
+ - **Full-suite validation now respects the computed worker budget.** Resource-aware lanes share the reserved worker pool by default, and `forge validate` uses that runner when available, preventing mixed unit and subprocess shards from oversubscribing Windows runners. (PR #545, issue `8cb52d50-24ea-4c69-8579-b30a0f1ee467`)
50
+ - **Windows legacy-claim repair now preserves owner-only ACL guarantees without PowerShell transport stalls.** The operator-only repair path uses bounded, privacy-safe Windows security-descriptor verification, exact owner/DACL replacement, Unicode-safe targets, transaction-isolated async hardening, and fail-closed timeout cleanup. (#538, issue `eb2c56e8-5054-4542-8f02-3f9fe635fd2d`)
51
+ - **Local full-suite validation is deterministic under Windows process pressure.** Resource-aware lanes, runtime-balanced subprocess shards, isolated coordination state, direct commitlint execution, batched Flow-monitor replay, and exact failure attribution remove rotating shared-state and child-process flakes without weakening timeouts or gates. (#538; issues `51672736-3387-4d0f-950d-4ae6e5e2c13e`, `9eb98ac0-ebe1-4604-a57a-5fefadad6682`)
52
+ - **PR lifecycle acceptance fails closed at its authority and privacy boundaries.** Every opened linkage write now proves exact live claim ownership, timed-out persistence reconciles only through bounded durable trace evidence, and bare POSIX user-home paths are rejected before WorkPacket publication. (#530, issue `50571aa3-b1cd-42f4-9c50-2c7576d1b0d4`)
53
+ - **Official skill-mirror writes retain protected-state authority.** The canonical `.agents/skills` sync now uses one-time, actor/path/content/source-HEAD/worktree-bound authorization and completion receipts, verifies byte equality with `skills/`, and continues to deny direct, stale, replayed, or foreign writes. (issue `209d80bc-f521-4947-9953-e5b5bf7020f6`)
54
+ - **Workspace lockfile proofs are path-independent.** Bun regeneration now receives the isolated proof root explicitly, preventing temporary proof paths from leaking into workspace keys. (issue `3eb1db42-eaa3-4847-9878-7b77310d1beb`)
55
+ - **Windows lockfile proofs canonicalize temporary roots.** Native path resolution prevents 8.3 TEMP aliases from changing regenerated lock bytes. (issue `3eb1db42-eaa3-4847-9878-7b77310d1beb`)
56
+ - **Linked-worktree lockfile proofs no longer mutate shared Git configuration.** Internal proof Git commands discard inherited repository-local Git environment variables while preserving the host toolchain environment. (issue `93cb615f-2e6e-45ff-90c1-6c98e47f0fff`)
57
+
10
58
  ## [0.1.0-beta.5] - 2026-08-09
11
59
 
12
60
  ### Added
package/CLAUDE.md CHANGED
@@ -1,13 +1 @@
1
- # Project Instructions
2
-
3
- Forge uses **[AGENTS.md](AGENTS.md)** as the single source of truth for all agent
4
- instructions: the workflow template, change classification, detailed stage
5
- instructions, git hooks and push workflow, build/shell/MCP toolchain, issue
6
- tracking, project learnings, and session completion. This file intentionally
7
- holds no content of its own — it only loads AGENTS.md.
8
-
9
1
  @AGENTS.md
10
-
11
- > **IMPORTANT**: Read [AGENTS.md](AGENTS.md) using the Read tool at the start of
12
- > every session to load the current Forge workflow contract. AGENTS.md is
13
- > authoritative; do not duplicate its content here.
@@ -0,0 +1,72 @@
1
+ # Coding Standards (read at review time)
2
+
3
+ This file is **not** loaded every turn. It is read by the review step — the
4
+ `/review` stage, the `code-review` skill, and any human or bot reviewing a diff —
5
+ and nowhere else. Everything here is a property a reviewer can check **by reading
6
+ the diff**. Rules about how an agent shapes its turn (arm the shepherd, work in a
7
+ worktree, don't stall, don't poll on a fixed timer while waiting) live in
8
+ [AGENTS.md](AGENTS.md), because no diff shows them.
9
+
10
+ **How to add to it:** when you catch an agent (or yourself) doing something wrong
11
+ in a change, add one line here, stated positively, with an evidence tag naming
12
+ where the evidence came from — `[mined: <cluster> ×N]` for the transcript-mining
13
+ counts, `[git: <pattern>]` for repository history, `[incident: <what happened>]`
14
+ for a single concrete failure. No rule without evidence; delete a rule when its
15
+ evidence stops recurring.
16
+
17
+ ---
18
+
19
+ ## Scope
20
+
21
+ 1. Every file in the diff is one the originating issue or design doc named; an
22
+ unrelated fix found along the way gets its own issue and its own PR.
23
+ `[mined: scope creep — unrelated fixes into the PR ×6]`
24
+ 2. A follow-up noted in the diff cites a kernel issue id, not a bare `TODO` or
25
+ `FIXME`. `[mined: discussed work not filed as kernel issue ×3]`
26
+
27
+ ## Gates and tests
28
+
29
+ 3. A failing check is fixed at its cause; the diff does not raise a timeout,
30
+ add a skip, loosen a threshold, or replace a real assertion with a vacuous
31
+ one to get green. `[mined: weakening gates/tests to pass ×3]`
32
+ 4. Tests synchronize on an observable condition (poll until true, await the
33
+ event), never on a fixed sleep or timer duration.
34
+ `[mined: waiting a fixed 10 min when reviewers already settled ×2]`
35
+ 5. A new or moved source path that needs targeted tests lands in both the
36
+ targetability checks in `scripts/test.js` and the `DIRECT_TEST_CANDIDATES`
37
+ mapping in `lib/commands/test.js`, so it does not silently fall into the
38
+ full-suite lane.
39
+ `[mined: slow test/CI lanes accepted as normal ×3]` `[git: 13 fix commits touch scripts/test.js]`
40
+
41
+ ## Generated artifacts and single source of truth
42
+
43
+ 6. Skills are edited in the canonical `skills/` tree and mirrors are regenerated
44
+ by `scripts/sync-agent-skills.js`; the diff never hand-edits `.agents/skills/`
45
+ or another generated mirror.
46
+ `[mined: duplicating skills per agent instead of skill-CLI generation ×4]`
47
+ `[incident: recurring skills-sync-drift failures]`
48
+ 7. Adding, deleting, or renaming a `lib/commands/*.js` file includes the
49
+ regenerated command manifest (`scripts/gen-command-manifest.js`) in the same
50
+ diff. `[git: 24 fix commits touch bin/forge.js, 15 touch lib/commands/setup.js]`
51
+
52
+ ## Product boundary
53
+
54
+ 8. Issue authority reads and writes go through the kernel; the diff adds no code
55
+ path that treats Beads or Dolt as a live backend.
56
+ `[mined: treating beads as live backend ×5]` `[decision: D45 retires Beads as a live feature]`
57
+ 9. Shipped code discovers its own paths and config; no maintainer machine path,
58
+ local username, or personal directory appears in a committed file.
59
+ `[incident: hardcoded C:\Users\<user>\Downloads\forge in .claude/settings.json]`
60
+ 10. A new runtime asset the installed package needs is added to the `files`
61
+ allowlist in `package.json` in the same diff.
62
+ `[incident: protected-paths.yaml missing from the npm files allowlist]`
63
+ 11. PR-monitoring capability is wired into the substrate — a hook, the ship
64
+ path, or a gate — not left as a step someone must remember to invoke.
65
+ `[mined: shepherd not armed/auto-attached on ship ×10]`
66
+
67
+ ## Repository hygiene
68
+
69
+ 12. Machine-local runtime state (per-session caches, saved PR diffs, symlinks
70
+ into worktrees, stray shell artifacts, and transient kernel .export.lock /
71
+ .tmp-* files) is gitignored, never committed. Deterministic .forge/kernel/
72
+ JSONL and manifest projections are tracked export/import artifacts. `[git: triage 2026-08-15 found NUL, gw/, .hermes/, .forge/kernel/, pr*.diff untracked at repo root]`
package/bin/forge.js CHANGED
@@ -1696,6 +1696,13 @@ function ensureDirWithNote(dir, purpose) {
1696
1696
 
1697
1697
  // Setup core documentation and directories
1698
1698
  function setupCoreDocs() {
1699
+ // Review skills reference this root contract in every installed repository.
1700
+ // It is a consumer-owned extension point after creation, so setup never overwrites it.
1701
+ const codingStandardsDest = path.join(projectRoot, 'CODING_STANDARDS.md');
1702
+ if (!fs.existsSync(codingStandardsDest)) {
1703
+ copyFile(path.join(packageDir, 'CODING_STANDARDS.md'), 'CODING_STANDARDS.md');
1704
+ }
1705
+
1699
1706
  // docs/planning/ and docs/research/ are created lazily on first use
1700
1707
  // by /plan Phase 1 and Phase 2 respectively, via ensureDirWithNote().
1701
1708
  // TEMPLATE.md and PROGRESS.md are also deferred to first use.
@@ -2354,6 +2361,9 @@ function parseFlags() {
2354
2361
  for (let i = 0; i < args.length;) {
2355
2362
  const arg = args[i];
2356
2363
 
2364
+ // Everything after the explicit launcher delimiter belongs to the child.
2365
+ if (arg === '--' && args[0] === 'github' && args[firstPositionalIndex(args, 1)] === 'run') break;
2366
+
2357
2367
  if (arg === '--quick' || arg === '-q') {
2358
2368
  flags.quick = true;
2359
2369
  i++;
@@ -3480,8 +3490,9 @@ function dryRunSetup(agents) {
3480
3490
  }
3481
3491
  }
3482
3492
 
3483
- // AGENTS.md
3493
+ // Root policy files
3484
3494
  addFileAction('AGENTS.md', 'Copy workflow documentation');
3495
+ addFileAction('CODING_STANDARDS.md', 'Install Forge coding standards');
3485
3496
 
3486
3497
  // Per-agent planned actions
3487
3498
  for (const agentKey of agents) {
@@ -1,6 +1,6 @@
1
1
  # Migration Guide
2
2
 
3
- Use this guide when moving older Forge docs, habits, or installed scaffolding toward the v0.1.0-beta.5 public framing.
3
+ Use this guide when moving older Forge docs, habits, or installed scaffolding toward the v0.1.0-beta.7 public framing.
4
4
 
5
5
  ## What Changed
6
6
 
@@ -39,8 +39,8 @@ forge setup --agents claude,cursor
39
39
 
40
40
  ## Version Labels
41
41
 
42
- - `0.1.0-beta.5` is the current prerelease package version.
43
- - `0.1.0-beta.4` is the previous prerelease package version.
42
+ - `0.1.0-beta.7` is the current prerelease package version.
43
+ - `0.1.0-beta.6` is the previous prerelease package version, but its npm tarball omits required runtime workspaces; upgrade directly to beta.7.
44
44
  - Internal labels such as `0.0.19` or `v3` describe roadmap slices or historical codenames. Do not present them as current package versions.
45
45
 
46
46
  ## Safe Upgrade Path
@@ -79,6 +79,10 @@ Forge Kernel local mode uses a builtin SQLite runtime driver. Driver selection m
79
79
 
80
80
  The selected driver must pass conformance checks for WAL mode, `busy_timeout`, transactions, WAL checkpointing, backup creation, and FTS5 before Forge claims real local SQLite authority behavior.
81
81
 
82
+ Legacy claim contradictions are handled only by the explicit, human-gated
83
+ [legacy claim repair](./LEGACY_CLAIM_REPAIR.md). The broker never starts or applies
84
+ that repair automatically.
85
+
82
86
  ## Team Mode
83
87
 
84
88
  Team mode requires server authority.
@@ -155,6 +155,10 @@ installed and on your `PATH`:
155
155
  These are runtime prerequisites checked by `forge`'s own health checks; the
156
156
  installer does not install them for you.
157
157
 
158
+ Using personal and work GitHub accounts together? See the optional
159
+ [per-clone GitHub account guide](github-accounts.md). Ordinary single-account
160
+ setup is unchanged.
161
+
158
162
  ---
159
163
 
160
164
  ## Uninstall
@@ -0,0 +1,112 @@
1
+ # Legacy Claim Repair
2
+
3
+ This is an explicit operator tool for the one-time pre-0.1.0 reconciliation of
4
+ legacy Kernel claim rows. It is not called by setup, startup, broker migrations,
5
+ claim acquisition, or any background process.
6
+
7
+ ## Safety contract
8
+
9
+ - Always use an explicit, file-backed database path and a different backup path.
10
+ - The observation time is mandatory and must be one canonical UTC instant. Reuse
11
+ that literal time for approval and apply.
12
+ - Dry-run does not mutate Kernel authority. It creates a separate SQLite backup,
13
+ restores that backup into an isolated temporary database, and requires the
14
+ restored snapshot digest to equal the source preflight digest. On POSIX
15
+ systems, both the temporary and final backup are forced to owner-only `0600`
16
+ permissions before the backup is accepted. On Windows, inherited access is
17
+ removed and a private DACL for the current operator is applied and verified.
18
+ - The digest covers the complete Kernel database schema and every row in every
19
+ authority table, while the report exposes only the digest and aggregate claim
20
+ counts. Any intervening Kernel write invalidates approval.
21
+ - Preflight fails closed on integrity, foreign-key, schema/index, duplicate-row,
22
+ state, timestamp, read faults, or active claims attached to unclaimable issue
23
+ types.
24
+ - Apply requires the human-approved exact digest and the verified backup. It
25
+ acquires `BEGIN IMMEDIATE`, re-reads the complete repair snapshot, rejects any
26
+ digest drift, and compare-and-swaps every exact row before committing one
27
+ privacy-safe receipt.
28
+ - Terminal issue state wins over expiry: its active claim becomes `released`.
29
+ An expired active claim on nonterminal work becomes `reclaimable`. Valid
30
+ unexpired leases and historical null-expiry leases remain active.
31
+ - Replaying the same approved digest returns the original receipt without another
32
+ mutation. Any interruption before receipt commit rolls back the whole repair.
33
+
34
+ ## Dry-run and approval
35
+
36
+ Choose the observation time once; do not substitute a moving clock between steps.
37
+
38
+ ```powershell
39
+ bun scripts/legacy-claim-repair.js --dry-run `
40
+ --database <absolute-kernel.sqlite> `
41
+ --backup <absolute-separate-backup.sqlite> `
42
+ --at <YYYY-MM-DDTHH:mm:ss.sssZ>
43
+ ```
44
+
45
+ ```bash
46
+ bun scripts/legacy-claim-repair.js --dry-run \
47
+ --database <absolute-kernel.sqlite> \
48
+ --backup <absolute-separate-backup.sqlite> \
49
+ --at <YYYY-MM-DDTHH:mm:ss.sssZ>
50
+ ```
51
+
52
+ Every dry-run requires a new, unused `--backup` path. Repeating a dry-run with
53
+ the same path fails closed instead of overwriting the immutable backup.
54
+
55
+ Review the privacy-safe counts, `preflight.digest`, `preflight.after_digest`, and
56
+ backup proof. Approval must name the exact `preflight.digest`.
57
+
58
+ ## Apply (human-gated)
59
+
60
+ Do not run this command until the exact dry-run digest is explicitly approved.
61
+
62
+ ```powershell
63
+ bun scripts/legacy-claim-repair.js --apply `
64
+ --database <absolute-kernel.sqlite> `
65
+ --backup <absolute-separate-backup.sqlite> `
66
+ --at <same-literal-observation-time> `
67
+ --approved-digest <approved-preflight-digest> `
68
+ --actor <operator-id>
69
+ ```
70
+
71
+ ```bash
72
+ bun scripts/legacy-claim-repair.js --apply \
73
+ --database <absolute-kernel.sqlite> \
74
+ --backup <absolute-separate-backup.sqlite> \
75
+ --at <same-literal-observation-time> \
76
+ --approved-digest <approved-preflight-digest> \
77
+ --actor <operator-id>
78
+ ```
79
+
80
+ If an apply process is forcibly terminated, it may leave empty blocker
81
+ directories named `<backup>-wal`, `<backup>-shm`, and `<backup>-journal`. After
82
+ confirming that no repair process is still running, remove those stale
83
+ directories before verifying or reusing that backup. An already committed
84
+ receipt can still be replayed without this cleanup.
85
+
86
+ `CLAIM_REPAIR_BACKUP_POSTCOMMIT_DRIFT` means the repair and receipt committed,
87
+ but the named backup changed during commit. Do not discard the
88
+ `details.recovery_path` copy: it is the independently retained verified backup.
89
+ Fence writers and investigate the named path before any restore. Repeating the
90
+ same approved apply returns the committed receipt without mutating rows again.
91
+
92
+ A successful first apply also reports `receipt.recovery_path`, and its durable
93
+ receipt stores a privacy-safe `recovery_ref` suffix so a retry with the same
94
+ `--backup` path reconstructs the retained artifact after response loss. The
95
+ tool never automatically unlinks this owner-only independent copy after commit
96
+ because no final check can make a later unlink race-free. Keep it until the
97
+ named backup and receipt have been independently verified. A human may then
98
+ remove that exact reported recovery path after confirming that no repair
99
+ process is running.
100
+
101
+ On POSIX the recovery file and its parent directory entry are synced before the
102
+ authority transaction commits. Every receipt replay reopens the retained copy,
103
+ reapplies owner-only permissions, and verifies its exact digest and identity
104
+ before reporting success.
105
+
106
+ ## Restore boundary
107
+
108
+ Restore is deliberately not automated. Fence every Kernel writer, stop Forge
109
+ processes, and close all database handles first. Preserve the failed database and
110
+ its `-wal`/`-shm` sidecars for diagnosis, then restore the separately verified
111
+ backup to a new path and run the same fixed-time dry-run there before replacing
112
+ authority. Never overwrite a live or open SQLite database.
@@ -2,9 +2,9 @@
2
2
 
3
3
  This page documents release readiness. Package publishing still requires the explicit publish step after merge.
4
4
 
5
- ## v0.1.0-beta.5 Boundary
5
+ ## v0.1.0-beta.7 Boundary
6
6
 
7
- v0.1.0-beta.5 is the current prerelease boundary. The release branch declares `0.1.0-beta.5`; publish only after the release PR is merged, tagged, and validated on that exact SHA.
7
+ v0.1.0-beta.7 is the current prerelease boundary. The release branch declares `0.1.0-beta.7`; publish only after the release PR is merged, tagged, and validated on that exact SHA.
8
8
 
9
9
  Keep these release steps explicit:
10
10
 
@@ -23,7 +23,7 @@ bun run check
23
23
  npm pack --dry-run
24
24
  ```
25
25
 
26
- The trusted npm workflow is generated through `forge release generate-npm-workflow`; direct workflow edits remain blocked. On a release event, the workflow resolves the tag once, runs the complete supported repository suite on that immutable commit, and allows publication only when the attributable suite receipt, verification checkout, and publish checkout all name the same SHA. Missing or mismatched evidence fails closed.
26
+ The trusted npm workflow is generated through `forge release generate-npm-workflow --expect-head "$(git rev-parse HEAD)"`; the full expected SHA must match the current checkout, and direct workflow edits remain blocked. The generated authorization is bound to that SHA, actor, worktree, path, and exact content, so moving HEAD before staging also fails closed. On a release event, the workflow resolves the tag once, runs the complete supported repository suite on that immutable commit, and allows publication only when the attributable suite receipt, verification checkout, and publish checkout all name the same SHA.
27
27
 
28
28
  For docs-heavy changes, also run a Markdown link check if available. If no docs checker exists and adding one would broaden the PR, create a follow-up issue instead.
29
29
 
@@ -43,7 +43,7 @@ Release notes should include:
43
43
  - adapter compatibility
44
44
  - DeepWiki refresh checklist
45
45
 
46
- The v0.1.0-beta.5 release notes live in [CHANGELOG.md](../../CHANGELOG.md).
46
+ The v0.1.0-beta.7 release notes live in [CHANGELOG.md](../../CHANGELOG.md).
47
47
 
48
48
  ## Rollback
49
49
 
@@ -0,0 +1,134 @@
1
+ # Optional GitHub accounts per clone
2
+
3
+ Use this when you keep personal and work GitHub accounts signed in at the same
4
+ time. It is off by default. Installing Forge or running `forge setup` does not
5
+ select an account. Unbound projects keep native account selection.
6
+
7
+ ## Sign in once, select per clone
8
+
9
+ From a normal terminal outside any previously launched account session, run:
10
+
11
+ ```sh
12
+ gh auth login --hostname github.com --web --skip-ssh-key
13
+ ```
14
+
15
+ Complete the browser flow for one account, then repeat for the other account.
16
+ Choose the intended browser account each time. Keep your existing Git transport
17
+ choice and decline Git credential-helper changes unless you deliberately want
18
+ them. GitHub CLI owns login and credential storage; Forge does not create another
19
+ credential store. Native `gh` normally uses the system credential store, but can
20
+ fall back to a plaintext file when that store is unavailable. See
21
+ [GitHub CLI login](https://cli.github.com/manual/gh_auth_login).
22
+
23
+ Do not paste tokens into chat, commands, project files, shell profiles, or `.env`
24
+ files. You do not need to export or persist `GH_TOKEN` for this workflow. If your
25
+ normal terminal already supplies GitHub token variables, remove those overrides
26
+ from that session before interactive login; do not print their values.
27
+
28
+ Inside the work clone:
29
+
30
+ ```sh
31
+ forge github use WORK_LOGIN
32
+ forge github status
33
+ forge github run -- codex
34
+ ```
35
+
36
+ Inside the personal clone, in another terminal:
37
+
38
+ ```sh
39
+ forge github use PERSONAL_LOGIN
40
+ forge github status
41
+ forge github run -- t3
42
+ ```
43
+
44
+ Replace the uppercase labels with your GitHub logins. Both sessions can remain
45
+ open together. Substitute any installed, trusted CLI harness or shell for `codex`
46
+ or `t3`, such as `claude`, `pwsh`, or `bash`.
47
+
48
+ `use` verifies the named stored account and repository access, then writes only
49
+ `git config --local github.account`. It does not log in, switch the globally
50
+ active account, or modify another clone. Linked Git worktrees normally share this
51
+ clone-local configuration; use separate clones when you need separate bindings.
52
+
53
+ Supported GitHub-dependent Forge commands use the binding automatically. To give
54
+ the same identity to a harness's own `gh` calls, start that harness with
55
+ `forge github run --`. Already-running terminals and harnesses are not changed.
56
+
57
+ The launcher deliberately gives its child GitHub authority through transient
58
+ environment variables. Only launch programs you trust with that account. Forge
59
+ does not persist the token, but the launched program can access it. Harnesses or
60
+ tools using their own credentials instead of the inherited `gh` environment are
61
+ outside this guarantee.
62
+
63
+ ## Check or undo
64
+
65
+ ```sh
66
+ forge github status --json
67
+ forge github unset
68
+ ```
69
+
70
+ Status reports the selected and verified login, clone-local binding source,
71
+ effective Git author, origin transport, helper classification, and repository
72
+ access. It does not print tokens, raw remote URLs, or raw credential-helper
73
+ commands. Treat author and account labels as personal information when sharing
74
+ diagnostics.
75
+
76
+ `unset` is safe to repeat. It removes only the clone binding, not either stored
77
+ login. It does not revoke authority from a running child: close that session and
78
+ start a new one after changing or removing a binding.
79
+
80
+ ## Three separate identities
81
+
82
+ | Identity | Controlled by |
83
+ | --- | --- |
84
+ | GitHub API account used by supported Forge routes | Clone-local `github.account` |
85
+ | Commit author | Git `user.name` and `user.email` |
86
+ | Fetch/push authentication | SSH configuration or the HTTPS credential helper |
87
+
88
+ Forge does not change your author, origin, SSH keys, or credential helper.
89
+ Existing SSH keys and host aliases remain valid; custom aliases must resolve to
90
+ `github.com` for Forge's repository-access check. HTTPS and SSH GitHub.com origins
91
+ are supported; insecure HTTP/Git transports and Enterprise hosts are not V1 targets.
92
+
93
+ HTTPS has one important coupling: if Git uses `gh auth git-credential` as its
94
+ helper, Git commands inside the explicitly launched session may use that session's
95
+ selected token too. Other HTTPS helpers and SSH key selection remain independent.
96
+ For native multi-account transport, keep separate SSH keys/aliases or configure
97
+ your HTTPS credential manager to distinguish repository URLs (`useHttpPath`).
98
+ These are optional Git choices, not Forge setup steps; see
99
+ [GitHub's multi-account transport guide](https://docs.github.com/en/account-and-profile/how-tos/account-management/managing-multiple-accounts).
100
+
101
+ ## Platforms and recovery
102
+
103
+ The command syntax is the same on Windows, macOS, and Linux. Windows executable
104
+ and `.cmd` launchers are supported; quote paths or arguments containing spaces.
105
+ Everything after `run --` belongs to the child, including `--help`, `--version`,
106
+ and `--path`. Git Bash is still required for Forge's existing Windows Bash helpers.
107
+
108
+ - **Account missing or expired:** run the browser login again from a normal
109
+ terminal, then retry `use` or `status`. Forge never starts login automatically.
110
+ - **Account mismatch:** stop and check the clone with `forge github status`.
111
+ Reauthenticate the intended account, or explicitly bind the correct login.
112
+ A failed `use` leaves the prior binding intact.
113
+ - **Repository access denied:** check organization membership, SSO authorization,
114
+ and the intended repository with its administrator. Account identity alone does
115
+ not grant repository access.
116
+ - **Git push still uses the wrong account:** check the separate transport and
117
+ commit-author configuration above; changing the Forge API binding does not
118
+ replace SSH or credential-manager setup.
119
+ - **Unsupported GitHub CLI:** upgrade `gh` to a version supporting named-account
120
+ token retrieval. Unbound projects do not need that capability.
121
+ - **Program not found:** install the harness and check its executable name/PATH.
122
+
123
+ The supported workflow entrypoints are `forge`, `forge-workflow`, and the compiled
124
+ Forge executable. Direct developer invocation of `node bin/forge-cmd.js` is an
125
+ internal legacy utility, not an account-isolated V1 entrypoint.
126
+
127
+ ## CuraPod adoption
128
+
129
+ Only after this Forge feature is merged, the merged build is installed, and its
130
+ acceptance checks pass: open each intended CuraPod clone, run
131
+ `forge github use WORK_LOGIN`, verify `forge github status`, then launch the
132
+ chosen harness with `forge github run --`. Keep personal clones separately bound
133
+ to `PERSONAL_LOGIN`. This example does not discover or modify existing CuraPod
134
+ repositories, remotes, keys, or accounts automatically.