forgeos 0.1.0-alpha.65 → 0.1.0-alpha.67

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 (284) hide show
  1. package/.npmignore +19 -19
  2. package/AGENTS.md +1 -1
  3. package/CHANGELOG.md +24 -0
  4. package/LICENSE +21 -21
  5. package/README.md +525 -525
  6. package/adapters/java/README.md +68 -68
  7. package/adapters/java/pom.xml +47 -47
  8. package/adapters/java/src/main/java/dev/forgeos/adapter/Auth.java +20 -20
  9. package/adapters/java/src/main/java/dev/forgeos/adapter/Diagnostic.java +16 -16
  10. package/adapters/java/src/main/java/dev/forgeos/adapter/Entry.java +38 -38
  11. package/adapters/java/src/main/java/dev/forgeos/adapter/EntryKind.java +16 -16
  12. package/adapters/java/src/main/java/dev/forgeos/adapter/ErrorInfo.java +4 -4
  13. package/adapters/java/src/main/java/dev/forgeos/adapter/Forge.java +94 -94
  14. package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeCall.java +12 -12
  15. package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeContext.java +11 -11
  16. package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeHandler.java +8 -8
  17. package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeHttpHandler.java +179 -179
  18. package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeRegistry.java +121 -121
  19. package/adapters/java/src/main/java/dev/forgeos/adapter/Json.java +14 -14
  20. package/adapters/java/src/main/java/dev/forgeos/adapter/Manifest.java +14 -14
  21. package/adapters/java/src/main/java/dev/forgeos/adapter/RequestEnvelope.java +6 -6
  22. package/adapters/java/src/main/java/dev/forgeos/adapter/ResponseEnvelope.java +25 -25
  23. package/adapters/java/src/main/java/dev/forgeos/adapter/Risk.java +18 -18
  24. package/adapters/java/src/main/java/dev/forgeos/adapter/Schemas.java +36 -36
  25. package/adapters/java/src/main/java/dev/forgeos/adapter/Service.java +65 -65
  26. package/adapters/java/src/main/java/dev/forgeos/adapter/TransactionMode.java +18 -18
  27. package/adapters/java/src/main/java/dev/forgeos/adapter/TypedForgeHandler.java +6 -6
  28. package/adapters/java-spring-boot-starter/README.md +32 -32
  29. package/adapters/java-spring-boot-starter/pom.xml +49 -49
  30. package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeCommand.java +22 -22
  31. package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeExternalService.java +15 -15
  32. package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeQuery.java +16 -16
  33. package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeServiceBeanCondition.java +18 -18
  34. package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeSpringAutoConfiguration.java +16 -16
  35. package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeSpringRuntime.java +104 -104
  36. package/adapters/java-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +1 -1
  37. package/bin/forge.mjs +38 -38
  38. package/docs/agent-fabric.md +131 -0
  39. package/examples/java-billing/pom.xml +60 -60
  40. package/examples/java-billing/src/main/java/dev/forgeos/examples/billing/CreateInvoiceInput.java +4 -4
  41. package/examples/java-billing/src/main/java/dev/forgeos/examples/billing/Invoice.java +11 -11
  42. package/examples/java-billing/src/main/java/dev/forgeos/examples/billing/Main.java +127 -127
  43. package/package.json +5 -4
  44. package/packages/eslint-plugin-forge/index.ts +15 -15
  45. package/packages/eslint-plugin-forge/package.json +10 -10
  46. package/packages/eslint-plugin-forge/src/check-source.ts +95 -95
  47. package/packages/eslint-plugin-forge/src/load-artifacts.ts +24 -24
  48. package/packages/eslint-plugin-forge/src/rule-no-forge-guard-violation.ts +93 -93
  49. package/schemas/agent-fabric/v0.1/control-event.schema.json +281 -281
  50. package/scripts/field-test-forgeos.mjs +1021 -1021
  51. package/src/forge/_generated/releaseManifest.json +1 -1
  52. package/src/forge/_generated/releaseManifest.ts +3 -3
  53. package/src/forge/agent-adapters/index.ts +7 -3
  54. package/src/forge/agent-adapters/types.ts +1 -0
  55. package/src/forge/agent-fabric/attached-snapshot.ts +55 -0
  56. package/src/forge/agent-fabric/attached-task-contract.ts +105 -0
  57. package/src/forge/agent-fabric/attached-task-service.ts +127 -0
  58. package/src/forge/agent-fabric/attached-task-store.ts +109 -0
  59. package/src/forge/agent-fabric/codex-adversarial-review.ts +229 -0
  60. package/src/forge/agent-fabric/codex-sdk-worker.ts +163 -0
  61. package/src/forge/agent-fabric/index.ts +19 -0
  62. package/src/forge/agent-fabric/local-adaptive-digest-worker.mjs +26 -26
  63. package/src/forge/agent-fabric/local-change-review-service.ts +374 -0
  64. package/src/forge/agent-fabric/local-task-server.ts +324 -249
  65. package/src/forge/agent-fabric/managed-environment.ts +205 -0
  66. package/src/forge/agent-fabric/managed-run-contract.ts +102 -0
  67. package/src/forge/agent-fabric/managed-run-service.ts +392 -0
  68. package/src/forge/agent-fabric/managed-run-store.ts +135 -0
  69. package/src/forge/agent-fabric/managed-workspace.ts +214 -0
  70. package/src/forge/agent-fabric/readiness.ts +26 -0
  71. package/src/forge/agent-fabric/workflow-engine.ts +218 -0
  72. package/src/forge/agent-fabric/workflow-task-actions.ts +104 -0
  73. package/src/forge/agent-fabric/workflow-templates.ts +11 -0
  74. package/src/forge/agent-memory/bridge.ts +309 -47
  75. package/src/forge/agent-memory/context-pack.ts +8 -1
  76. package/src/forge/agent-memory/hook-runner.ts +38 -19
  77. package/src/forge/agent-memory/mcp.ts +500 -286
  78. package/src/forge/agent-memory/sources/codex-hook-runner.mjs +343 -234
  79. package/src/forge/agent-memory/sources/codex.ts +49 -7
  80. package/src/forge/agent-memory/types.ts +11 -0
  81. package/src/forge/bench.ts +154 -154
  82. package/src/forge/cair/action-journal.ts +61 -61
  83. package/src/forge/cair/action-parser.ts +314 -314
  84. package/src/forge/cair/action-validator.ts +40 -40
  85. package/src/forge/cair/actions.ts +1818 -1818
  86. package/src/forge/cair/format.ts +77 -77
  87. package/src/forge/cair/index.ts +106 -106
  88. package/src/forge/cair/query.ts +478 -478
  89. package/src/forge/cair/snapshot.ts +315 -315
  90. package/src/forge/cair/types.ts +248 -248
  91. package/src/forge/cli/ai.ts +816 -816
  92. package/src/forge/cli/codex-app-server.ts +877 -877
  93. package/src/forge/cli/fabric.ts +205 -131
  94. package/src/forge/cli/index.ts +26 -26
  95. package/src/forge/cli/main.ts +259 -245
  96. package/src/forge/cli/next-actions.ts +23 -23
  97. package/src/forge/cli/parse.ts +3574 -3542
  98. package/src/forge/cli/release.ts +309 -309
  99. package/src/forge/cli/self-host.ts +510 -510
  100. package/src/forge/compiler/ai-registry/parse.ts +219 -219
  101. package/src/forge/compiler/app-graph/classify.ts +10 -10
  102. package/src/forge/compiler/app-graph/dup-symbol.ts +29 -29
  103. package/src/forge/compiler/app-graph/extract.ts +231 -231
  104. package/src/forge/compiler/app-graph/forge-apis.ts +25 -25
  105. package/src/forge/compiler/app-graph/index.ts +11 -11
  106. package/src/forge/compiler/app-graph/module-graph.ts +151 -151
  107. package/src/forge/compiler/app-graph/parser.ts +71 -71
  108. package/src/forge/compiler/app-graph/symbols.ts +48 -48
  109. package/src/forge/compiler/app-graph/types.ts +43 -43
  110. package/src/forge/compiler/app-graph/versions.ts +14 -14
  111. package/src/forge/compiler/cache/index.ts +17 -17
  112. package/src/forge/compiler/cache/key.ts +46 -46
  113. package/src/forge/compiler/cache/scheduler.ts +72 -72
  114. package/src/forge/compiler/cache/store.ts +78 -78
  115. package/src/forge/compiler/classifier/capabilities.ts +64 -64
  116. package/src/forge/compiler/classifier/classify.ts +76 -76
  117. package/src/forge/compiler/classifier/contexts.ts +188 -188
  118. package/src/forge/compiler/classifier/index.ts +18 -18
  119. package/src/forge/compiler/classifier/runtime-matrix.ts +45 -45
  120. package/src/forge/compiler/classifier/secrets.ts +31 -31
  121. package/src/forge/compiler/classifier/signals.ts +95 -95
  122. package/src/forge/compiler/client-sdk/build-manifest.ts +210 -210
  123. package/src/forge/compiler/data-graph/sql/serialize.ts +89 -89
  124. package/src/forge/compiler/data-graph/sql/types.ts +38 -38
  125. package/src/forge/compiler/diagnostics/index.ts +57 -57
  126. package/src/forge/compiler/emitter/artifact-kind.ts +14 -14
  127. package/src/forge/compiler/emitter/barrel.ts +47 -47
  128. package/src/forge/compiler/emitter/constants.ts +7 -7
  129. package/src/forge/compiler/emitter/emit.ts +223 -223
  130. package/src/forge/compiler/emitter/index.ts +24 -24
  131. package/src/forge/compiler/emitter/lock.ts +61 -61
  132. package/src/forge/compiler/external-manifest/registry.ts +205 -205
  133. package/src/forge/compiler/external-manifest/types.ts +91 -91
  134. package/src/forge/compiler/external-manifest/validate.ts +373 -373
  135. package/src/forge/compiler/frontend-graph/build.ts +623 -623
  136. package/src/forge/compiler/guards/artifacts.ts +96 -96
  137. package/src/forge/compiler/guards/check-import-guards.ts +106 -106
  138. package/src/forge/compiler/guards/index.ts +11 -11
  139. package/src/forge/compiler/guards/propagate-contexts.ts +57 -57
  140. package/src/forge/compiler/index.ts +17 -17
  141. package/src/forge/compiler/integration/index.ts +17 -17
  142. package/src/forge/compiler/integration/snapshot.ts +54 -54
  143. package/src/forge/compiler/integration/templates/convex.ts +70 -70
  144. package/src/forge/compiler/orchestrator/discover.ts +214 -214
  145. package/src/forge/compiler/orchestrator/guards.ts +5 -5
  146. package/src/forge/compiler/orchestrator/index.ts +27 -27
  147. package/src/forge/compiler/orchestrator/orphans.ts +51 -51
  148. package/src/forge/compiler/orchestrator/profile.ts +23 -23
  149. package/src/forge/compiler/orchestrator/serialize.ts +979 -979
  150. package/src/forge/compiler/orchestrator/verify.ts +35 -35
  151. package/src/forge/compiler/package-graph/capabilities-stub.ts +33 -33
  152. package/src/forge/compiler/package-graph/checksum.ts +107 -107
  153. package/src/forge/compiler/package-graph/exports-discovery.ts +91 -91
  154. package/src/forge/compiler/package-graph/extract-dts.ts +32 -32
  155. package/src/forge/compiler/package-graph/index.ts +24 -24
  156. package/src/forge/compiler/package-graph/jsdoc.ts +50 -50
  157. package/src/forge/compiler/package-graph/oracle.ts +326 -326
  158. package/src/forge/compiler/package-graph/read-file.ts +21 -21
  159. package/src/forge/compiler/package-graph/resolve.ts +131 -131
  160. package/src/forge/compiler/package-manager/adapter.ts +240 -240
  161. package/src/forge/compiler/package-manager/commands.ts +51 -51
  162. package/src/forge/compiler/package-manager/detect.ts +65 -65
  163. package/src/forge/compiler/package-manager/executor.ts +146 -146
  164. package/src/forge/compiler/package-manager/index.ts +22 -22
  165. package/src/forge/compiler/package-manager/parse-spec.ts +16 -16
  166. package/src/forge/compiler/primitives/compare.ts +26 -26
  167. package/src/forge/compiler/primitives/hash.ts +29 -29
  168. package/src/forge/compiler/primitives/header.ts +43 -43
  169. package/src/forge/compiler/primitives/index.ts +45 -45
  170. package/src/forge/compiler/primitives/paths.ts +24 -24
  171. package/src/forge/compiler/primitives/serialize.ts +66 -66
  172. package/src/forge/compiler/primitives/sort.ts +87 -87
  173. package/src/forge/compiler/recipes/helpers.ts +37 -37
  174. package/src/forge/compiler/sandbox/artifact-sanitize.ts +26 -26
  175. package/src/forge/compiler/sandbox/backends/child.ts +123 -123
  176. package/src/forge/compiler/sandbox/backends/docker.ts +173 -173
  177. package/src/forge/compiler/sandbox/index.ts +51 -51
  178. package/src/forge/compiler/sandbox/inspect.ts +143 -143
  179. package/src/forge/compiler/sandbox/inspector-entry.ts +115 -115
  180. package/src/forge/compiler/sandbox/limits.ts +31 -31
  181. package/src/forge/compiler/sandbox/scrub-env.ts +60 -60
  182. package/src/forge/compiler/sandbox/secret-scan.ts +54 -54
  183. package/src/forge/compiler/sandbox/serialize.ts +106 -106
  184. package/src/forge/compiler/sandbox/types.ts +7 -7
  185. package/src/forge/compiler/test-graph/build.ts +285 -285
  186. package/src/forge/compiler/types/app-graph.ts +87 -87
  187. package/src/forge/compiler/types/capability.ts +29 -29
  188. package/src/forge/compiler/types/classification.ts +9 -9
  189. package/src/forge/compiler/types/diagnostic.ts +2 -2
  190. package/src/forge/compiler/types/frontend-graph.ts +81 -81
  191. package/src/forge/compiler/types/import-guards.ts +19 -19
  192. package/src/forge/compiler/types/index.ts +98 -98
  193. package/src/forge/compiler/types/json.ts +3 -3
  194. package/src/forge/compiler/types/lock.ts +37 -37
  195. package/src/forge/compiler/types/runtime-matrix.ts +16 -16
  196. package/src/forge/compiler/types/runtime.ts +30 -30
  197. package/src/forge/compiler/types/sandbox.ts +24 -24
  198. package/src/forge/delta/broker-runner.mjs +5 -0
  199. package/src/forge/delta/broker.ts +429 -0
  200. package/src/forge/delta/classifier.ts +52 -52
  201. package/src/forge/delta/explain.ts +238 -238
  202. package/src/forge/delta/git-observer.ts +24 -0
  203. package/src/forge/delta/ids.ts +40 -40
  204. package/src/forge/delta/index.ts +25 -25
  205. package/src/forge/delta/process-identity.ts +31 -0
  206. package/src/forge/delta/queue-status.ts +190 -0
  207. package/src/forge/delta/redaction.ts +50 -50
  208. package/src/forge/delta/schema.ts +135 -135
  209. package/src/forge/delta/session.ts +142 -142
  210. package/src/forge/delta/status.ts +82 -145
  211. package/src/forge/delta/store.ts +77 -32
  212. package/src/forge/delta/timeline.ts +178 -178
  213. package/src/forge/dev/types.ts +63 -63
  214. package/src/forge/dev/watch.ts +119 -119
  215. package/src/forge/intent/index.ts +509 -509
  216. package/src/forge/make/types.ts +153 -153
  217. package/src/forge/refactor/index.ts +1937 -1937
  218. package/src/forge/refactor/runtime-rename.ts +598 -598
  219. package/src/forge/repair/rules/index.ts +476 -476
  220. package/src/forge/review/types.ts +211 -211
  221. package/src/forge/runtime/db/generated-client.ts +305 -305
  222. package/src/forge/runtime/db/pglite-adapter.ts +33 -11
  223. package/src/forge/runtime/runner/run-entry.ts +236 -236
  224. package/src/forge/version.ts +1 -1
  225. package/templates/agent-workroom/AGENTS.md +29 -29
  226. package/templates/agent-workroom/README.md +34 -34
  227. package/templates/agent-workroom/forge.config.ts +3 -3
  228. package/templates/agent-workroom/package.json +34 -34
  229. package/templates/agent-workroom/pnpm-workspace.yaml +2 -2
  230. package/templates/agent-workroom/src/actions/indexAgentSignal.ts +10 -10
  231. package/templates/agent-workroom/src/commands/openWorkroom.ts +61 -61
  232. package/templates/agent-workroom/src/commands/recordAgentSignal.ts +119 -119
  233. package/templates/agent-workroom/src/commands/recordCheckRun.ts +52 -52
  234. package/templates/agent-workroom/src/forge/schema.ts +54 -54
  235. package/templates/agent-workroom/src/policies.ts +6 -6
  236. package/templates/agent-workroom/src/queries/listWorkrooms.ts +11 -11
  237. package/templates/agent-workroom/src/queries/liveWorkroom.ts +63 -63
  238. package/templates/agent-workroom/tsconfig.json +16 -16
  239. package/templates/agent-workroom/web/index.html +13 -13
  240. package/templates/agent-workroom/web/package.json +21 -21
  241. package/templates/agent-workroom/web/src/App.tsx +345 -345
  242. package/templates/agent-workroom/web/src/main.tsx +13 -13
  243. package/templates/agent-workroom/web/src/styles.css +545 -545
  244. package/templates/agent-workroom/web/tsconfig.json +27 -27
  245. package/templates/b2b-support-web/package.json +37 -37
  246. package/templates/b2b-support-web/pnpm-workspace.yaml +2 -2
  247. package/templates/b2b-support-web/web/package.json +21 -21
  248. package/templates/minimal-web/package.json +34 -34
  249. package/templates/minimal-web/pnpm-workspace.yaml +2 -2
  250. package/templates/minimal-web/web/index.html +13 -13
  251. package/templates/minimal-web/web/src/styles.css +190 -190
  252. package/templates/nuxt-web/.vscode/settings.json +14 -14
  253. package/templates/nuxt-web/.yarnrc.yml +1 -1
  254. package/templates/nuxt-web/README.md +30 -30
  255. package/templates/nuxt-web/forge.config.ts +3 -3
  256. package/templates/nuxt-web/package.json +34 -34
  257. package/templates/nuxt-web/pnpm-workspace.yaml +2 -2
  258. package/templates/nuxt-web/src/actions/logNoteCreated.ts +11 -11
  259. package/templates/nuxt-web/src/commands/createNote.ts +26 -26
  260. package/templates/nuxt-web/src/forge/schema.ts +12 -12
  261. package/templates/nuxt-web/src/policies.ts +6 -6
  262. package/templates/nuxt-web/src/queries/listNotes.ts +8 -8
  263. package/templates/nuxt-web/src/queries/liveNotes.ts +8 -8
  264. package/templates/nuxt-web/tsconfig.json +17 -17
  265. package/templates/nuxt-web/web/app.vue +67 -67
  266. package/templates/nuxt-web/web/components/LiveNotes.vue +89 -89
  267. package/templates/nuxt-web/web/components/NoteComposer.vue +100 -100
  268. package/templates/nuxt-web/web/composables/forge.ts +13 -13
  269. package/templates/nuxt-web/web/composables/useNotes.ts +24 -24
  270. package/templates/nuxt-web/web/nuxt.config.ts +11 -11
  271. package/templates/nuxt-web/web/package.json +19 -19
  272. package/templates/nuxt-web/web/plugins/forge.client.ts +10 -10
  273. package/templates/nuxt-web/web/plugins/forge.server.ts +10 -10
  274. package/templates/nuxt-web/web/server/api/forge-health.get.ts +7 -7
  275. package/templates/nuxt-web/web/tsconfig.json +6 -6
  276. package/templates/vendor-access/.vscode/settings.json +14 -14
  277. package/templates/vendor-access/README.md +30 -30
  278. package/templates/vendor-access/package.json +35 -35
  279. package/templates/vendor-access/pnpm-workspace.yaml +2 -2
  280. package/templates/vendor-access/tsconfig.json +17 -17
  281. package/templates/vendor-access/web/index.html +13 -13
  282. package/templates/vendor-access/web/package.json +21 -21
  283. package/templates/vendor-access/web/src/styles.css +682 -682
  284. package/templates/vendor-access/web/tsconfig.json +18 -18
package/README.md CHANGED
@@ -1,525 +1,525 @@
1
- # ForgeOS
2
-
3
- The contract layer for agentic software development. ForgeOS turns application source into deterministic runtime contracts, generated clients, safety checks, and machine-readable context that humans and AI coding agents can use safely.
4
-
5
- **Status:** private/public alpha MVP, implemented through H49. ForgeOS already includes the compiler, local runtime, frontend SDK, production auth, RLS compiler, liveQuery, self-host artifacts, generated agent contract, guided dev loop, repair/review/test tooling, AST-aware codemods, package intelligence, native AI tools/agents, DeltaDB work memory, external agent memory ingestion, brownfield import analysis, npm alpha publishing, and Read the Docs public docs. Public release hardening is still focused on deeper semantic codemods, broader field reports, and more production mileage.
6
-
7
- Public docs live at [forgeos.readthedocs.io](https://forgeos.readthedocs.io/). The repo builds them with `.readthedocs.yaml`, `mkdocs.yml`, and `docs/index.md`.
8
-
9
- Start with [Why ForgeOS](https://forgeos.readthedocs.io/en/latest/why-forgeos/) to understand the agent-native design.
10
-
11
- For the short version, read [The Five-Minute ForgeOS Model](https://forgeos.readthedocs.io/en/latest/five-minute-model/), [Alpha Golden Path](https://forgeos.readthedocs.io/en/latest/golden-path/), and [Stable Alpha Surface](https://forgeos.readthedocs.io/en/latest/stable-alpha/). The important distinction is that external coding agents are the primary ForgeOS workflow; integrated AI SDK features are available for apps that need in-product AI, but they are not the main development loop.
12
-
13
- ## Agent-First Quickstart
14
-
15
- ```bash
16
- bun install --ignore-scripts
17
- bun run forge generate
18
- bun run forge do inspect --json
19
- bun run forge dev
20
- bun run forge dev --once --json
21
- bun run forge inspect all --json
22
- bun run forge inspect framework --json
23
- bun run forge doctor
24
- bun run forge verify --standard
25
- bun run forge verify --strict
26
- ```
27
-
28
- Node is supported for the CLI/runtime path as well:
29
-
30
- ```bash
31
- npm install
32
- npm run forge:node -- generate
33
- npm run forge:node -- dev --once --json
34
- npm run forge:node -- inspect framework --json
35
- ```
36
-
37
- When working as an AI coder, read:
38
-
39
- ```txt
40
- AGENTS.md
41
- src/forge/_generated/agentContract.json
42
- src/forge/_generated/runtimeRules.md
43
- src/forge/_generated/appMap.md
44
- src/forge/_generated/operationPlaybooks.md
45
- ```
46
-
47
- These files describe the app surface, runtime rules, generated files, policies, secrets, workflows, UI routes, commands to run, and common repair/refactor playbooks.
48
-
49
- ## Create a Test App
50
-
51
- Public one-command app creation:
52
-
53
- ```bash
54
- npm create forgeos-app@alpha notes-app -- --template minimal-web
55
- cd notes-app
56
- npm run dev
57
- ```
58
-
59
- Equivalent lower-level command without installing ForgeOS globally:
60
-
61
- ```bash
62
- npm exec --package forgeos@alpha -- forge new notes-app --template minimal-web --package-manager npm
63
- ```
64
-
65
- If ForgeOS is already installed or you are inside this repository:
66
-
67
- ```bash
68
- forge new notes-app --template minimal-web --package-manager npm
69
- cd notes-app
70
- npm run dev -- --open
71
- ```
72
-
73
- `forge dev` starts the API runtime and the web dev server together when a `web/` app exists. The `--once --json` mode is the central agent/CI diagnostic entrypoint: it checks generated drift, guardrails, frontend routes/bindings, doctor status, impact, and the last test/UI reports in one deterministic response.
74
-
75
- Template apps ignore `src/forge/_generated/`, `forge.lock`, and operational `.forge/**` work dirs by default so a freshly created app does not flood git or the editor with generated files. Run `forge generate` after checkout or before verification to recreate the agent contract, client SDK, frontend graph, capability map, and runtime manifests.
76
- Templates also include workspace editor excludes for generated/runtime directories so source files stay visually prominent.
77
-
78
- ## Production-Shaped Golden Path
79
-
80
- For a real multi-tenant app with WorkOS/AuthKit, start with the golden-path
81
- planner instead of piecing together commands from docs:
82
-
83
- ```bash
84
- forge golden-path plan --auth workos --target docker --real --production --json
85
- ```
86
-
87
- The canonical path is:
88
-
89
- ```bash
90
- forge field-test create vendor-access --auth workos --template vendor-access --package-manager npm --install --git --json
91
- cd vendor-access
92
- npm run forge -- workos env --client-id client_... --write --json
93
- npm run forge -- workos setup --real --file workos-seed.yml --json
94
- npm run forge -- auth prove --provider workos --real --client-id client_... --file workos-seed.yml --json
95
- npm run forge -- field-test run --realistic --json
96
- npm run forge -- deploy readiness --production --json
97
- npm run forge -- deploy package --target docker
98
- ```
99
-
100
- For an existing app, ask ForgeOS for the current blocking stage:
101
-
102
- ```bash
103
- forge golden-path status --real --production --json
104
- ```
105
-
106
- It reports whether the app can publish, which stage blocks publication, and the
107
- next command to run. WorkOS FGA is optional; ordinary B2B apps can ship with
108
- AuthKit, RBAC permission claims, Forge policies, and tenant isolation.
109
-
110
- If the AuthKit client id is already known, pass it to the status command so the
111
- next action is copy/paste exact instead of using `client_...` placeholders:
112
-
113
- ```bash
114
- forge golden-path status --real --production --client-id client_... --json
115
- ```
116
-
117
- When the WorkOS CLI can confirm a client id exists but cannot expose the value,
118
- `golden-path status` asks for `forge workos env --client-id client_... --write
119
- --json`; ForgeOS then writes the OIDC/JWKS and web public env values without
120
- dashboard clicks or shell-specific env syntax. The higher-level
121
- `forge auth prove --provider workos --real --client-id client_... --file
122
- workos-seed.yml --json` wrapper performs the same env preparation before it
123
- proves hosted WorkOS setup.
124
-
125
- For release or external smoke testing, choose the Forge package source explicitly:
126
-
127
- ```bash
128
- forge new smoke-app --template minimal-web --package-manager npm --forge-spec "npm:forgeos@alpha"
129
- forge new local-app --template minimal-web --package-manager npm --local-forge
130
- ```
131
-
132
- `--forge-spec` writes that dependency spec into the generated app, while `--local-forge` keeps the monorepo/local package workflow. The npm package is published as `forgeos`, but generated apps keep the dependency key, CLI binary, and import surface as `forge` (`forge`, `forge/server`, `forge/react`) by using npm alias specs such as `"forge": "npm:forgeos@alpha"`. CI uses both `--forge-spec "file:$GITHUB_WORKSPACE"` and a packed tarball smoke to prove freshly created apps can install ForgeOS and run outside the framework workspace.
133
-
134
- For broader field testing:
135
-
136
- ```bash
137
- npm run field:test -- --dry-run --json
138
- npm run field:test -- --package-managers npm --templates minimal-web --forge-spec "file:." --install --json
139
- ```
140
-
141
- The scheduled/manual `Field Tests` workflow expands that coverage across Linux, macOS, Windows, Node 22, Node 24, and npm/pnpm/yarn/bun.
142
-
143
- ## External Runtimes And Adapters
144
-
145
- ForgeOS can import services written outside TypeScript through the Forge Protocol.
146
- External runtimes publish a `forge.manifest.json` that describes commands, queries,
147
- transport, policies, risk metadata, tenant scope, and schemas. Forge then emits
148
- the same machine-readable app/API/agent artifacts and exposes runtime bridge
149
- endpoints for those entries.
150
-
151
- The Go example starts a manifest-backed service:
152
-
153
- ```bash
154
- cd examples/go-billing
155
- go run . --manifest --base-url http://127.0.0.1:8787 > forge.manifest.json
156
- go run . --addr 127.0.0.1:8787 --base-url http://127.0.0.1:8787
157
- ```
158
-
159
- In a Forge app:
160
-
161
- ```bash
162
- forge manifest validate ./forge.manifest.json --json
163
- forge manifest import ./forge.manifest.json --json
164
- forge generate
165
- forge run billing.createInvoice --args '{"title":"Invoice"}' --user-id u1 --tenant-id tenant-a --role admin
166
- forge query billing.listInvoices --args '{}' --user-id u1 --tenant-id tenant-a --role admin
167
- ```
168
-
169
- For Java, see [`adapters/java`](adapters/java/README.md),
170
- [`adapters/java-spring-boot-starter`](adapters/java-spring-boot-starter/README.md),
171
- and [`examples/java-billing`](examples/java-billing/README.md).
172
-
173
- See [`docs/forge-protocol.md`](docs/forge-protocol.md), [`schemas/forge-manifest.schema.json`](schemas/forge-manifest.schema.json),
174
- and [`adapters/go`](adapters/go/README.md).
175
-
176
- ## What ForgeOS Generates
177
-
178
- ```txt
179
- src/forge/_generated/
180
- api.ts/json
181
- client.ts, clientTypes.ts, clientApi.ts
182
- react.ts, reactManifest.ts/json
183
- appGraph.ts/json
184
- dataGraph.ts/json
185
- runtimeGraph.ts/json
186
- runtimeMatrix.ts/json
187
- policyRegistry.ts/json
188
- permissionMatrix.ts/json
189
- tenantScope.ts/json
190
- secretRegistry.ts/json
191
- aiRegistry.ts/json
192
- workflowRegistry.ts/json
193
- liveQueryRegistry.ts/json
194
- agentContract.ts/json
195
- capabilityMap.ts/json/md
196
- agentAdapterManifest.ts/json
197
- testGraph.ts/json
198
- uiTestManifest.ts/json
199
- uiRoutes.ts/json
200
- uiScenarios.ts/json
201
- ```
202
-
203
- Project-level generated context:
204
-
205
- ```txt
206
- AGENTS.md
207
- forge.lock
208
- .forge/test-plans/**
209
- .forge/repairs/**
210
- .forge/refactors/**
211
- .forge/ui-runs/**
212
- ```
213
-
214
- ## Core Capabilities
215
-
216
- | Area | What exists now |
217
- | --- | --- |
218
- | Compiler | AppGraph, DataGraph, RuntimeGraph, PackageGraph, deterministic generated artifacts, drift checks |
219
- | Runtime | commands, queries, liveQueries, actions, workflows, durable outbox, local dev server |
220
- | Data | schema compiler, SQL DDL, migrations, PGlite/Postgres adapter, tenant scope metadata |
221
- | Policies | RBAC policy registry, permission matrix, simulation, strict policy checks |
222
- | Auth | dev headers, JWT, OIDC discovery/JWKS verification via `jose`, production-mode guardrails |
223
- | RLS | Postgres RLS SQL compiler/checks for DB-enforced tenant isolation |
224
- | Secrets/env | secret registry, env schema, redaction, strict `process.env` checks |
225
- | AI | Vercel AI SDK v6 engine, provider registry, `ctx.ai`, `ctx.agent.run`, `aiTool`, `agent`, `/ai/agents/run` JSON automation, `/ai/agents/chat` UIMessage streaming, `forge ai trace`, structural and model-level redteam probes, mock mode, telemetry without prompt/output retention by default |
226
- | Frontend | generated client SDK, React/Next hooks, template app, liveQuery client support |
227
- | LiveQuery | durable invalidation log, reconnect/resume semantics, production hardening checks |
228
- | DeltaDB | ambient local recorder plus inferred work sessions and semantic timelines for Forge commands, dev file saves, generated artifacts, runtime calls, policies, proofs, diagnostics, `forge timeline`, `forge explain`, and optional `forge session` correction |
229
- | Agent memory | opt-in Codex and Claude Code hooks, Cursor MCP/rules setup, normalized external agent events, redacted local memory, and `forge mcp serve` |
230
- | Brownfield import | static TypeScript/JavaScript app inventory with routes, frontend calls, env usage, candidate entries, risk report, migration plan, and hidden-by-default imported agent contract |
231
- | Self-host | compose/deploy artifacts and self-host checks |
232
- | Agent contract | `AGENTS.md`, `agentContract.json`, app maps, runtime rules, playbooks, inspect/doctor |
233
- | Authoring | `forge make`, feature blueprints, safe refactor plans, package upgrade plans |
234
- | Testing/repair | impact-based test planner, repair loop, structured review, UI/browser test bridge |
235
- | Adapters | Forge Protocol manifest import plus Go, Java, and Spring Boot adapter support for executable external commands and queries |
236
- | Intent router | `forge do` maps objectives like fix, verify, connect UI, and add feature into plans, files, risks, and next commands |
237
- | Full-stack map | `frontendGraph` + `capabilityMap` connect routes, components, hooks, runtime entries, tables, policies, and gaps |
238
- | Dev loop | `forge dev` prints API/Web URLs, phase health, capability coverage, cache status, diagnostics, and next action |
239
- | Templates | source-only templates and showcase app avoid committing generated artifacts by default |
240
- | Verification | `forge verify --smoke`, `--standard`, and `--strict` report per-step duration/command metadata, use impact-selected tests for the standard loop, and time out package scripts predictably |
241
-
242
- ## Command Map
243
-
244
- Prefer task-oriented commands first:
245
-
246
- ```bash
247
- forge do "<objective>" --json
248
- forge do fix --json
249
- forge do connect-ui --json
250
- forge do verify --json
251
- forge dev --once --json
252
- forge dev
253
- forge inspect all --json
254
- forge inspect framework --json
255
- forge inspect capabilities --json
256
- forge delta status
257
- forge timeline
258
- forge timeline --session current
259
- forge explain <thing>
260
- forge explain session current
261
- forge session list
262
- forge agent memory --json
263
- forge mcp serve
264
- forge import analyze --json
265
- forge inspect imported --json
266
- forge doctor
267
- forge verify --standard
268
- forge verify --strict
269
- forge impact --changed --json
270
- forge test plan --changed --json
271
- forge test run --changed --timeout-ms 120000 --json
272
- forge repair diagnose --from-last-test-run --json
273
- forge repair diagnose --from-last-ui-run --json
274
- forge review run --changed --json
275
- forge ui smoke --json
276
- ```
277
-
278
- Common command groups:
279
-
280
- | Command | Purpose |
281
- | --- | --- |
282
- | `forge generate` | Analyze source and emit generated artifacts |
283
- | `forge generate --check` | Fail on generated drift |
284
- | `forge check --json` | Validate guardrails and emit diagnostics with fix hints |
285
- | `forge verify --smoke` | Fast local gate: generated drift, Forge checks, typecheck when present, no tests/lint |
286
- | `forge verify --standard` | Agent development gate: generated drift, Forge/security checks, typecheck, and impact-selected tests |
287
- | `forge verify --strict` | Full handoff/CI gate: generated drift, Forge/security checks, typecheck, full TestGraph in bounded parallel/isolated chunks, lint |
288
- | `forge verify --script-timeout-ms <ms>` | Run package scripts with a predictable timeout and machine-readable timeout diagnostics |
289
- | `forge verify --test-jobs <n>` | Tune strict TestGraph chunk parallelism; `FORGE_VERIFY_TEST_JOBS` is also supported |
290
- | `forge verify --strict --test-plan --json` | Print the strict TestGraph scheduler plan without running tests |
291
- | `forge do "<objective>" --json` | Guided intent router: choose the right workflow, files, risks, and next action |
292
- | `forge inspect <target> --json` | Inspect generated app/data/runtime/policy/client/agent/UI surfaces |
293
- | `forge inspect framework --json` | Inspect ForgeOS framework modules, CLI commands, templates, examples, tests, and preferred entrypoints |
294
- | `forge doctor --json` | Human/agent health check for project coherence |
295
- | `forge dev` | Interactive local loop: generated checks, API runtime, DB, worker, watch mode, frontend server, URLs, and next agent checks |
296
- | `forge dev --once --json` | One-shot diagnostic orchestrator for agents/CI: generated drift/cache hit, check, frontend, capability map, doctor, impact, reports, next actions |
297
- | `forge run`, `forge query`, `forge live` | Execute and inspect runtime entries locally |
298
- | `forge db`, `forge rls` | Diff/migrate/status and inspect/check RLS |
299
- | `forge policy`, `forge secrets`, `forge env`, `forge auth` | Security and configuration operations |
300
- | `forge make` | Scaffold resources, commands, queries, policies, actions, workflows |
301
- | `forge feature` | Validate/plan/apply feature blueprints |
302
- | `forge refactor` | Plan/apply/rollback safe refactors and targeted codemods |
303
- | `forge impact`, `forge test` | Compute change impact and run targeted checks |
304
- | `forge test run --timeout-ms <ms>` | Run impact-selected checks with a per-command timeout |
305
- | `forge repair` | Diagnose failures and produce repair plans |
306
- | `forge review` | Structured code review with findings and suggested commands |
307
- | `forge ui` | Browser/UI smoke, scenario, route, snapshot, doctor, and reports |
308
- | `forge deps` | Package upgrade planning and application |
309
- | `forge release` | Release/source-map bridge and symbolication |
310
- | `forge agent`, `forge agent-contract` | Agent-facing contract, adapter exports, context, install, ingest, and memory commands |
311
- | `forge mcp serve` | MCP server for external agents to read Forge context, memory, timeline, and inspect surfaces |
312
- | `forge import analyze`, `forge import inspect` | Brownfield TypeScript/JavaScript and Java/Spring app inventory with reviewed migration planning |
313
- | `forge inspect imported --json` | Inspect `.forge/import` analysis artifacts |
314
- | `forge self-host` | Self-host packaging and checks |
315
-
316
- Refactor codemods are AST-aware where safety matters most:
317
-
318
- - `forge refactor extract-action` is binding-aware and preserves unrelated imports, type-only imports, and shadowed locals.
319
- - `forge refactor rename command <oldName> <newName>` rewrites command declarations, generated client references, React hook usage, tests, and safe string references while preserving unrelated symbols.
320
- - `forge refactor rename field <table.field> <table.field>` rewrites structured TS/JS/JSX/TSX and JSON references, preserves locals, and scopes the field change to files/objects linked to the target table. For example, `tickets.priority -> tickets.urgency` does not rewrite a generic `priority` prop in a component with no `tickets` binding.
321
- - `forge refactor rename table <from> <to>` rewrites table definitions, `ctx.db.<table>` access, policy strings, JSON/blueprints, and import/export specifiers while preserving unrelated locals with the same name.
322
-
323
- ## Runtime Rules
324
-
325
- Commands are transactional and deterministic:
326
-
327
- - allowed: `ctx.db`, `ctx.emit`, buffered telemetry
328
- - forbidden: network packages, direct integrations, `ctx.secrets`, `ctx.ai`, direct `process.env`
329
-
330
- Queries and liveQueries are read-only:
331
-
332
- - allowed: scoped DB reads
333
- - forbidden: writes, emits, secrets, AI, network integrations
334
-
335
- Actions and workflows handle side effects after commit:
336
-
337
- - allowed: integrations, secrets, AI, network packages, retries
338
- - expected: idempotent behavior and traceable telemetry
339
-
340
- Use `src/forge/_generated/runtimeRules.md` as the canonical generated version.
341
-
342
- ## Showcase App
343
-
344
- See [`examples/showcase-forge-app`](examples/showcase-forge-app/README.md).
345
-
346
- ```bash
347
- cd examples/showcase-forge-app
348
- npm install
349
- npm run generate
350
- npm run dev
351
- ```
352
-
353
- For the reproducible public proof path:
354
-
355
- ```bash
356
- npm run proof:inspect
357
- npm run proof:dev
358
- npm run proof:capabilities
359
- npm run proof:verify
360
- ```
361
-
362
- Read [`examples/showcase-forge-app/PUBLIC_PROOF.md`](examples/showcase-forge-app/PUBLIC_PROOF.md) for the full walkthrough.
363
-
364
- Examples are source-only where practical: generated artifacts, `forge.lock`, package lockfiles, and operational `.forge/**` state are recreated locally. The showcase demonstrates tenant-scoped data, policies, commands, queries, liveQueries, outbox actions, workflows, mock AI, telemetry trace IDs, generated React hooks, `agentContract`, `frontendGraph`, `capabilityMap`, and the standard agent handoff loop.
365
-
366
- ## Platform Support
367
-
368
- | Platform | Support |
369
- | --- | --- |
370
- | Linux | Supported for MVP development |
371
- | macOS | Supported for MVP development |
372
- | Windows (WSL) | Supported for MVP development |
373
- | Windows (native) | Experimental, with `forge doctor windows` and `forge setup windows` |
374
-
375
- ForgeOS is Bun-first but no longer Bun-only. The package bin runs through Node via `tsx`, the dev server has a `node:http` fallback, package scripts use the detected package manager, and the Postgres adapter uses `Bun.SQL` when available or the `postgres` npm package under Node.
376
-
377
- Known Windows note: ForgeOS resolves Bun through a Windows-safe resolver and ignores known non-Bun `Kiro-Cli\bun` shims. If your shell still resolves a broken app association, invoke Bun from the real install path:
378
-
379
- ```powershell
380
- & "$env:USERPROFILE\.bun\bin\bun.exe"
381
- ```
382
-
383
- Native Windows diagnostics:
384
-
385
- ```powershell
386
- node .\bin\forge.mjs doctor windows --json
387
- node .\bin\forge.mjs setup windows --json
388
- ```
389
-
390
- `forge doctor windows` checks Node, npm, Git, safe Bun resolution, suspicious Bun shims, Git long-path support, PowerShell execution policy, and symlink support. `forge setup windows` is dry-run by default and only applies supported environment fixes with `--yes`.
391
-
392
- For Node-only local checks, use:
393
-
394
- ```powershell
395
- node .\bin\forge.mjs dev --once --json
396
- node .\bin\forge.mjs inspect framework --json
397
- ```
398
-
399
- ## Verification
400
-
401
- Fast focused checks:
402
-
403
- ```bash
404
- bun run typecheck
405
- bun run lint
406
- bun test tests/<area>
407
- bun run forge generate --check
408
- forge verify --changed
409
- ```
410
-
411
- Full gate:
412
-
413
- ```bash
414
- bun test --timeout 120000
415
- bun run forge verify --strict
416
- ```
417
-
418
- UI bridge note: `forge ui` uses Playwright when installed. Without Playwright, `forge ui doctor --json` reports `FORGE_UI_PLAYWRIGHT_MISSING` with fix hints instead of silently failing.
419
-
420
- Frontend bridge note: `forge inspect frontend --json` and `forge dev --once --json` expose routes, components, `ForgeProvider`, generated client bindings, raw runtime fetch warnings, and fix hints. Agents should use this before editing UI wiring.
421
-
422
- CI note: the main GitHub Actions gate runs the full Bun-based verification path on Ubuntu. A separate Node breadth smoke matrix runs on Ubuntu, Windows, and macOS with Node 22 and 24, including template package-manager smoke for npm, pnpm, yarn, and Bun.
423
-
424
- ## npm Release
425
-
426
- ForgeOS publishes to npm as `forgeos` and exposes the executable as `forge`.
427
-
428
- Release automation uses Changesets plus npm Trusted Publishing:
429
-
430
- ```bash
431
- npm run changeset
432
- npm run version-packages
433
- npm run release:smoke
434
- ```
435
-
436
- For the first prerelease publish, use the alpha dist-tag explicitly:
437
-
438
- ```bash
439
- npm run release:publish-local-alpha -- --dry-run
440
- npm run release:publish-alpha
441
- ```
442
-
443
- The normal path is:
444
-
445
- ```txt
446
- merge feature PR with changeset
447
- -> publish.yml opens/updates a version PR
448
- merge version PR
449
- -> publish.yml publishes through npm OIDC Trusted Publisher
450
- ```
451
-
452
- Configure npm Trusted Publisher for package `forgeos`:
453
-
454
- | Field | Value |
455
- | --- | --- |
456
- | Provider | GitHub Actions |
457
- | Organization/user | `Stahldavid` |
458
- | Repository | `forge` |
459
- | Workflow filename | `publish.yml` |
460
- | Environment | blank |
461
- | Allowed action | `npm publish` |
462
-
463
- Do not add `NPM_TOKEN` for normal alpha publishes. Alpha releases publish with the `alpha` dist-tag through npm OIDC Trusted Publisher so prerelease builds do not become `latest` accidentally. Configure `NPM_TOKEN` only when maintainers intentionally want the workflow to promote `latest` with `npm dist-tag add forgeos@<version> latest`; otherwise that step is skipped and `latest` may lag behind `alpha` during hardening. Use `release:publish-local-alpha -- --dry-run` only to validate the staged tarball locally; real npm publishing should go through `release:publish-alpha`, which dispatches `publish.yml` and uses npm OIDC Trusted Publisher. The workflow checks whether the package version already exists before installing dependencies or running tests, then uses `id-token: write`, Node 24/npm 11+, and provenance for the actual publish. `npm run release:smoke` runs `npm pack`, creates a fresh app with the packed tarball, installs dependencies, runs `forge dev --once --json`, and verifies the app smoke path.
464
-
465
- ## Milestone History
466
-
467
- ```txt
468
- H1 Hardening, CI, examples
469
- H2 Reference integration quality
470
- H3 DataGraph Compiler
471
- H4 Local command/action runtime
472
- H5 Local dev server
473
- H6 DataGraph-backed persistence runtime
474
- H7 Durable outbox worker
475
- H8 Lightweight workflow engine
476
- H9 Telemetry bridge
477
- H10 Auth, policy engine, tenant isolation
478
- H11 Secrets & environment runtime
479
- H12 AI workflow integration
480
- H13 Query runtime & typed API surface
481
- H14 Frontend client SDK core
482
- H15 LiveQuery/Reactivity MVP
483
- H16 React/Next hooks
484
- H17 Minimal frontend app template
485
- H18 Self-host packaging
486
- H19 Agent Contract & Project Introspection Layer
487
- H20 Production Auth / JWT & OIDC v1
488
- H21 Postgres RLS Compiler & DB-enforced tenant isolation
489
- H22 Package Upgrade Planner
490
- H23 Release / Source Map Bridge
491
- H24 Production LiveQuery Hardening
492
- H25 Authoring primitives: forge make
493
- H26 Feature Blueprint Compiler
494
- H27 Safe Refactor / Codemod Engine
495
- H28 Impact-Based Test Planner
496
- H29 Repair Loop
497
- H30 Agent Adapter Export
498
- H31 Forge Review / Structured Code Review
499
- H32 UI / Browser Test Bridge
500
- H33 Intent Router / Guided Dev Loop
501
- H34 Full-Stack App Contract v2
502
- H35 Capability Map
503
- H36 Template hygiene / git noise
504
- H37 Convex-style forge dev panel
505
- H38 Fast generated check visibility
506
- H39 Showcase app
507
- H40 Windows/runtime hardening
508
- H41 Node-compatible CLI/runtime
509
- H42 Verify observability and quieter app workspaces
510
- H43 Native AI tools and agent loop
511
- H44 Ambient DeltaDB recorder
512
- H45 Automatic work-session inference
513
- H46 Automatic change grouping
514
- H47 Semantic timeline
515
- H48 Agent Memory Bridge
516
- H49 Brownfield import analysis
517
- ```
518
-
519
- ## Remaining Hardening Before Public Release
520
-
521
- - Keep expanding semantic codemods beyond the current AST-aware `extract-action`, `rename command`, `rename field`, and `rename table` paths.
522
- - Reduce command-selection risk with more task routers and richer inline diagnostics.
523
- - Keep hardening native Windows setup beyond diagnostics and safe automatic environment fixes.
524
- - Keep broadening package manager CI from template smoke toward install/build smoke for pnpm and yarn apps.
525
- - Broaden UI bridge coverage with installed Playwright browsers in CI.
1
+ # ForgeOS
2
+
3
+ The contract layer for agentic software development. ForgeOS turns application source into deterministic runtime contracts, generated clients, safety checks, and machine-readable context that humans and AI coding agents can use safely.
4
+
5
+ **Status:** private/public alpha MVP, implemented through H49. ForgeOS already includes the compiler, local runtime, frontend SDK, production auth, RLS compiler, liveQuery, self-host artifacts, generated agent contract, guided dev loop, repair/review/test tooling, AST-aware codemods, package intelligence, native AI tools/agents, DeltaDB work memory, external agent memory ingestion, brownfield import analysis, npm alpha publishing, and Read the Docs public docs. Public release hardening is still focused on deeper semantic codemods, broader field reports, and more production mileage.
6
+
7
+ Public docs live at [forgeos.readthedocs.io](https://forgeos.readthedocs.io/). The repo builds them with `.readthedocs.yaml`, `mkdocs.yml`, and `docs/index.md`.
8
+
9
+ Start with [Why ForgeOS](https://forgeos.readthedocs.io/en/latest/why-forgeos/) to understand the agent-native design.
10
+
11
+ For the short version, read [The Five-Minute ForgeOS Model](https://forgeos.readthedocs.io/en/latest/five-minute-model/), [Alpha Golden Path](https://forgeos.readthedocs.io/en/latest/golden-path/), and [Stable Alpha Surface](https://forgeos.readthedocs.io/en/latest/stable-alpha/). The important distinction is that external coding agents are the primary ForgeOS workflow; integrated AI SDK features are available for apps that need in-product AI, but they are not the main development loop.
12
+
13
+ ## Agent-First Quickstart
14
+
15
+ ```bash
16
+ bun install --ignore-scripts
17
+ bun run forge generate
18
+ bun run forge do inspect --json
19
+ bun run forge dev
20
+ bun run forge dev --once --json
21
+ bun run forge inspect all --json
22
+ bun run forge inspect framework --json
23
+ bun run forge doctor
24
+ bun run forge verify --standard
25
+ bun run forge verify --strict
26
+ ```
27
+
28
+ Node is supported for the CLI/runtime path as well:
29
+
30
+ ```bash
31
+ npm install
32
+ npm run forge:node -- generate
33
+ npm run forge:node -- dev --once --json
34
+ npm run forge:node -- inspect framework --json
35
+ ```
36
+
37
+ When working as an AI coder, read:
38
+
39
+ ```txt
40
+ AGENTS.md
41
+ src/forge/_generated/agentContract.json
42
+ src/forge/_generated/runtimeRules.md
43
+ src/forge/_generated/appMap.md
44
+ src/forge/_generated/operationPlaybooks.md
45
+ ```
46
+
47
+ These files describe the app surface, runtime rules, generated files, policies, secrets, workflows, UI routes, commands to run, and common repair/refactor playbooks.
48
+
49
+ ## Create a Test App
50
+
51
+ Public one-command app creation:
52
+
53
+ ```bash
54
+ npm create forgeos-app@alpha notes-app -- --template minimal-web
55
+ cd notes-app
56
+ npm run dev
57
+ ```
58
+
59
+ Equivalent lower-level command without installing ForgeOS globally:
60
+
61
+ ```bash
62
+ npm exec --package forgeos@alpha -- forge new notes-app --template minimal-web --package-manager npm
63
+ ```
64
+
65
+ If ForgeOS is already installed or you are inside this repository:
66
+
67
+ ```bash
68
+ forge new notes-app --template minimal-web --package-manager npm
69
+ cd notes-app
70
+ npm run dev -- --open
71
+ ```
72
+
73
+ `forge dev` starts the API runtime and the web dev server together when a `web/` app exists. The `--once --json` mode is the central agent/CI diagnostic entrypoint: it checks generated drift, guardrails, frontend routes/bindings, doctor status, impact, and the last test/UI reports in one deterministic response.
74
+
75
+ Template apps ignore `src/forge/_generated/`, `forge.lock`, and operational `.forge/**` work dirs by default so a freshly created app does not flood git or the editor with generated files. Run `forge generate` after checkout or before verification to recreate the agent contract, client SDK, frontend graph, capability map, and runtime manifests.
76
+ Templates also include workspace editor excludes for generated/runtime directories so source files stay visually prominent.
77
+
78
+ ## Production-Shaped Golden Path
79
+
80
+ For a real multi-tenant app with WorkOS/AuthKit, start with the golden-path
81
+ planner instead of piecing together commands from docs:
82
+
83
+ ```bash
84
+ forge golden-path plan --auth workos --target docker --real --production --json
85
+ ```
86
+
87
+ The canonical path is:
88
+
89
+ ```bash
90
+ forge field-test create vendor-access --auth workos --template vendor-access --package-manager npm --install --git --json
91
+ cd vendor-access
92
+ npm run forge -- workos env --client-id client_... --write --json
93
+ npm run forge -- workos setup --real --file workos-seed.yml --json
94
+ npm run forge -- auth prove --provider workos --real --client-id client_... --file workos-seed.yml --json
95
+ npm run forge -- field-test run --realistic --json
96
+ npm run forge -- deploy readiness --production --json
97
+ npm run forge -- deploy package --target docker
98
+ ```
99
+
100
+ For an existing app, ask ForgeOS for the current blocking stage:
101
+
102
+ ```bash
103
+ forge golden-path status --real --production --json
104
+ ```
105
+
106
+ It reports whether the app can publish, which stage blocks publication, and the
107
+ next command to run. WorkOS FGA is optional; ordinary B2B apps can ship with
108
+ AuthKit, RBAC permission claims, Forge policies, and tenant isolation.
109
+
110
+ If the AuthKit client id is already known, pass it to the status command so the
111
+ next action is copy/paste exact instead of using `client_...` placeholders:
112
+
113
+ ```bash
114
+ forge golden-path status --real --production --client-id client_... --json
115
+ ```
116
+
117
+ When the WorkOS CLI can confirm a client id exists but cannot expose the value,
118
+ `golden-path status` asks for `forge workos env --client-id client_... --write
119
+ --json`; ForgeOS then writes the OIDC/JWKS and web public env values without
120
+ dashboard clicks or shell-specific env syntax. The higher-level
121
+ `forge auth prove --provider workos --real --client-id client_... --file
122
+ workos-seed.yml --json` wrapper performs the same env preparation before it
123
+ proves hosted WorkOS setup.
124
+
125
+ For release or external smoke testing, choose the Forge package source explicitly:
126
+
127
+ ```bash
128
+ forge new smoke-app --template minimal-web --package-manager npm --forge-spec "npm:forgeos@alpha"
129
+ forge new local-app --template minimal-web --package-manager npm --local-forge
130
+ ```
131
+
132
+ `--forge-spec` writes that dependency spec into the generated app, while `--local-forge` keeps the monorepo/local package workflow. The npm package is published as `forgeos`, but generated apps keep the dependency key, CLI binary, and import surface as `forge` (`forge`, `forge/server`, `forge/react`) by using npm alias specs such as `"forge": "npm:forgeos@alpha"`. CI uses both `--forge-spec "file:$GITHUB_WORKSPACE"` and a packed tarball smoke to prove freshly created apps can install ForgeOS and run outside the framework workspace.
133
+
134
+ For broader field testing:
135
+
136
+ ```bash
137
+ npm run field:test -- --dry-run --json
138
+ npm run field:test -- --package-managers npm --templates minimal-web --forge-spec "file:." --install --json
139
+ ```
140
+
141
+ The scheduled/manual `Field Tests` workflow expands that coverage across Linux, macOS, Windows, Node 22, Node 24, and npm/pnpm/yarn/bun.
142
+
143
+ ## External Runtimes And Adapters
144
+
145
+ ForgeOS can import services written outside TypeScript through the Forge Protocol.
146
+ External runtimes publish a `forge.manifest.json` that describes commands, queries,
147
+ transport, policies, risk metadata, tenant scope, and schemas. Forge then emits
148
+ the same machine-readable app/API/agent artifacts and exposes runtime bridge
149
+ endpoints for those entries.
150
+
151
+ The Go example starts a manifest-backed service:
152
+
153
+ ```bash
154
+ cd examples/go-billing
155
+ go run . --manifest --base-url http://127.0.0.1:8787 > forge.manifest.json
156
+ go run . --addr 127.0.0.1:8787 --base-url http://127.0.0.1:8787
157
+ ```
158
+
159
+ In a Forge app:
160
+
161
+ ```bash
162
+ forge manifest validate ./forge.manifest.json --json
163
+ forge manifest import ./forge.manifest.json --json
164
+ forge generate
165
+ forge run billing.createInvoice --args '{"title":"Invoice"}' --user-id u1 --tenant-id tenant-a --role admin
166
+ forge query billing.listInvoices --args '{}' --user-id u1 --tenant-id tenant-a --role admin
167
+ ```
168
+
169
+ For Java, see [`adapters/java`](adapters/java/README.md),
170
+ [`adapters/java-spring-boot-starter`](adapters/java-spring-boot-starter/README.md),
171
+ and [`examples/java-billing`](examples/java-billing/README.md).
172
+
173
+ See [`docs/forge-protocol.md`](docs/forge-protocol.md), [`schemas/forge-manifest.schema.json`](schemas/forge-manifest.schema.json),
174
+ and [`adapters/go`](adapters/go/README.md).
175
+
176
+ ## What ForgeOS Generates
177
+
178
+ ```txt
179
+ src/forge/_generated/
180
+ api.ts/json
181
+ client.ts, clientTypes.ts, clientApi.ts
182
+ react.ts, reactManifest.ts/json
183
+ appGraph.ts/json
184
+ dataGraph.ts/json
185
+ runtimeGraph.ts/json
186
+ runtimeMatrix.ts/json
187
+ policyRegistry.ts/json
188
+ permissionMatrix.ts/json
189
+ tenantScope.ts/json
190
+ secretRegistry.ts/json
191
+ aiRegistry.ts/json
192
+ workflowRegistry.ts/json
193
+ liveQueryRegistry.ts/json
194
+ agentContract.ts/json
195
+ capabilityMap.ts/json/md
196
+ agentAdapterManifest.ts/json
197
+ testGraph.ts/json
198
+ uiTestManifest.ts/json
199
+ uiRoutes.ts/json
200
+ uiScenarios.ts/json
201
+ ```
202
+
203
+ Project-level generated context:
204
+
205
+ ```txt
206
+ AGENTS.md
207
+ forge.lock
208
+ .forge/test-plans/**
209
+ .forge/repairs/**
210
+ .forge/refactors/**
211
+ .forge/ui-runs/**
212
+ ```
213
+
214
+ ## Core Capabilities
215
+
216
+ | Area | What exists now |
217
+ | --- | --- |
218
+ | Compiler | AppGraph, DataGraph, RuntimeGraph, PackageGraph, deterministic generated artifacts, drift checks |
219
+ | Runtime | commands, queries, liveQueries, actions, workflows, durable outbox, local dev server |
220
+ | Data | schema compiler, SQL DDL, migrations, PGlite/Postgres adapter, tenant scope metadata |
221
+ | Policies | RBAC policy registry, permission matrix, simulation, strict policy checks |
222
+ | Auth | dev headers, JWT, OIDC discovery/JWKS verification via `jose`, production-mode guardrails |
223
+ | RLS | Postgres RLS SQL compiler/checks for DB-enforced tenant isolation |
224
+ | Secrets/env | secret registry, env schema, redaction, strict `process.env` checks |
225
+ | AI | Vercel AI SDK v6 engine, provider registry, `ctx.ai`, `ctx.agent.run`, `aiTool`, `agent`, `/ai/agents/run` JSON automation, `/ai/agents/chat` UIMessage streaming, `forge ai trace`, structural and model-level redteam probes, mock mode, telemetry without prompt/output retention by default |
226
+ | Frontend | generated client SDK, React/Next hooks, template app, liveQuery client support |
227
+ | LiveQuery | durable invalidation log, reconnect/resume semantics, production hardening checks |
228
+ | DeltaDB | ambient local recorder plus inferred work sessions and semantic timelines for Forge commands, dev file saves, generated artifacts, runtime calls, policies, proofs, diagnostics, `forge timeline`, `forge explain`, and optional `forge session` correction |
229
+ | Agent memory | opt-in Codex and Claude Code hooks, Cursor MCP/rules setup, normalized external agent events, redacted local memory, and `forge mcp serve` |
230
+ | Brownfield import | static TypeScript/JavaScript app inventory with routes, frontend calls, env usage, candidate entries, risk report, migration plan, and hidden-by-default imported agent contract |
231
+ | Self-host | compose/deploy artifacts and self-host checks |
232
+ | Agent contract | `AGENTS.md`, `agentContract.json`, app maps, runtime rules, playbooks, inspect/doctor |
233
+ | Authoring | `forge make`, feature blueprints, safe refactor plans, package upgrade plans |
234
+ | Testing/repair | impact-based test planner, repair loop, structured review, UI/browser test bridge |
235
+ | Adapters | Forge Protocol manifest import plus Go, Java, and Spring Boot adapter support for executable external commands and queries |
236
+ | Intent router | `forge do` maps objectives like fix, verify, connect UI, and add feature into plans, files, risks, and next commands |
237
+ | Full-stack map | `frontendGraph` + `capabilityMap` connect routes, components, hooks, runtime entries, tables, policies, and gaps |
238
+ | Dev loop | `forge dev` prints API/Web URLs, phase health, capability coverage, cache status, diagnostics, and next action |
239
+ | Templates | source-only templates and showcase app avoid committing generated artifacts by default |
240
+ | Verification | `forge verify --smoke`, `--standard`, and `--strict` report per-step duration/command metadata, use impact-selected tests for the standard loop, and time out package scripts predictably |
241
+
242
+ ## Command Map
243
+
244
+ Prefer task-oriented commands first:
245
+
246
+ ```bash
247
+ forge do "<objective>" --json
248
+ forge do fix --json
249
+ forge do connect-ui --json
250
+ forge do verify --json
251
+ forge dev --once --json
252
+ forge dev
253
+ forge inspect all --json
254
+ forge inspect framework --json
255
+ forge inspect capabilities --json
256
+ forge delta status
257
+ forge timeline
258
+ forge timeline --session current
259
+ forge explain <thing>
260
+ forge explain session current
261
+ forge session list
262
+ forge agent memory --json
263
+ forge mcp serve
264
+ forge import analyze --json
265
+ forge inspect imported --json
266
+ forge doctor
267
+ forge verify --standard
268
+ forge verify --strict
269
+ forge impact --changed --json
270
+ forge test plan --changed --json
271
+ forge test run --changed --timeout-ms 120000 --json
272
+ forge repair diagnose --from-last-test-run --json
273
+ forge repair diagnose --from-last-ui-run --json
274
+ forge review run --changed --json
275
+ forge ui smoke --json
276
+ ```
277
+
278
+ Common command groups:
279
+
280
+ | Command | Purpose |
281
+ | --- | --- |
282
+ | `forge generate` | Analyze source and emit generated artifacts |
283
+ | `forge generate --check` | Fail on generated drift |
284
+ | `forge check --json` | Validate guardrails and emit diagnostics with fix hints |
285
+ | `forge verify --smoke` | Fast local gate: generated drift, Forge checks, typecheck when present, no tests/lint |
286
+ | `forge verify --standard` | Agent development gate: generated drift, Forge/security checks, typecheck, and impact-selected tests |
287
+ | `forge verify --strict` | Full handoff/CI gate: generated drift, Forge/security checks, typecheck, full TestGraph in bounded parallel/isolated chunks, lint |
288
+ | `forge verify --script-timeout-ms <ms>` | Run package scripts with a predictable timeout and machine-readable timeout diagnostics |
289
+ | `forge verify --test-jobs <n>` | Tune strict TestGraph chunk parallelism; `FORGE_VERIFY_TEST_JOBS` is also supported |
290
+ | `forge verify --strict --test-plan --json` | Print the strict TestGraph scheduler plan without running tests |
291
+ | `forge do "<objective>" --json` | Guided intent router: choose the right workflow, files, risks, and next action |
292
+ | `forge inspect <target> --json` | Inspect generated app/data/runtime/policy/client/agent/UI surfaces |
293
+ | `forge inspect framework --json` | Inspect ForgeOS framework modules, CLI commands, templates, examples, tests, and preferred entrypoints |
294
+ | `forge doctor --json` | Human/agent health check for project coherence |
295
+ | `forge dev` | Interactive local loop: generated checks, API runtime, DB, worker, watch mode, frontend server, URLs, and next agent checks |
296
+ | `forge dev --once --json` | One-shot diagnostic orchestrator for agents/CI: generated drift/cache hit, check, frontend, capability map, doctor, impact, reports, next actions |
297
+ | `forge run`, `forge query`, `forge live` | Execute and inspect runtime entries locally |
298
+ | `forge db`, `forge rls` | Diff/migrate/status and inspect/check RLS |
299
+ | `forge policy`, `forge secrets`, `forge env`, `forge auth` | Security and configuration operations |
300
+ | `forge make` | Scaffold resources, commands, queries, policies, actions, workflows |
301
+ | `forge feature` | Validate/plan/apply feature blueprints |
302
+ | `forge refactor` | Plan/apply/rollback safe refactors and targeted codemods |
303
+ | `forge impact`, `forge test` | Compute change impact and run targeted checks |
304
+ | `forge test run --timeout-ms <ms>` | Run impact-selected checks with a per-command timeout |
305
+ | `forge repair` | Diagnose failures and produce repair plans |
306
+ | `forge review` | Structured code review with findings and suggested commands |
307
+ | `forge ui` | Browser/UI smoke, scenario, route, snapshot, doctor, and reports |
308
+ | `forge deps` | Package upgrade planning and application |
309
+ | `forge release` | Release/source-map bridge and symbolication |
310
+ | `forge agent`, `forge agent-contract` | Agent-facing contract, adapter exports, context, install, ingest, and memory commands |
311
+ | `forge mcp serve` | MCP server for external agents to read Forge context, memory, timeline, and inspect surfaces |
312
+ | `forge import analyze`, `forge import inspect` | Brownfield TypeScript/JavaScript and Java/Spring app inventory with reviewed migration planning |
313
+ | `forge inspect imported --json` | Inspect `.forge/import` analysis artifacts |
314
+ | `forge self-host` | Self-host packaging and checks |
315
+
316
+ Refactor codemods are AST-aware where safety matters most:
317
+
318
+ - `forge refactor extract-action` is binding-aware and preserves unrelated imports, type-only imports, and shadowed locals.
319
+ - `forge refactor rename command <oldName> <newName>` rewrites command declarations, generated client references, React hook usage, tests, and safe string references while preserving unrelated symbols.
320
+ - `forge refactor rename field <table.field> <table.field>` rewrites structured TS/JS/JSX/TSX and JSON references, preserves locals, and scopes the field change to files/objects linked to the target table. For example, `tickets.priority -> tickets.urgency` does not rewrite a generic `priority` prop in a component with no `tickets` binding.
321
+ - `forge refactor rename table <from> <to>` rewrites table definitions, `ctx.db.<table>` access, policy strings, JSON/blueprints, and import/export specifiers while preserving unrelated locals with the same name.
322
+
323
+ ## Runtime Rules
324
+
325
+ Commands are transactional and deterministic:
326
+
327
+ - allowed: `ctx.db`, `ctx.emit`, buffered telemetry
328
+ - forbidden: network packages, direct integrations, `ctx.secrets`, `ctx.ai`, direct `process.env`
329
+
330
+ Queries and liveQueries are read-only:
331
+
332
+ - allowed: scoped DB reads
333
+ - forbidden: writes, emits, secrets, AI, network integrations
334
+
335
+ Actions and workflows handle side effects after commit:
336
+
337
+ - allowed: integrations, secrets, AI, network packages, retries
338
+ - expected: idempotent behavior and traceable telemetry
339
+
340
+ Use `src/forge/_generated/runtimeRules.md` as the canonical generated version.
341
+
342
+ ## Showcase App
343
+
344
+ See [`examples/showcase-forge-app`](examples/showcase-forge-app/README.md).
345
+
346
+ ```bash
347
+ cd examples/showcase-forge-app
348
+ npm install
349
+ npm run generate
350
+ npm run dev
351
+ ```
352
+
353
+ For the reproducible public proof path:
354
+
355
+ ```bash
356
+ npm run proof:inspect
357
+ npm run proof:dev
358
+ npm run proof:capabilities
359
+ npm run proof:verify
360
+ ```
361
+
362
+ Read [`examples/showcase-forge-app/PUBLIC_PROOF.md`](examples/showcase-forge-app/PUBLIC_PROOF.md) for the full walkthrough.
363
+
364
+ Examples are source-only where practical: generated artifacts, `forge.lock`, package lockfiles, and operational `.forge/**` state are recreated locally. The showcase demonstrates tenant-scoped data, policies, commands, queries, liveQueries, outbox actions, workflows, mock AI, telemetry trace IDs, generated React hooks, `agentContract`, `frontendGraph`, `capabilityMap`, and the standard agent handoff loop.
365
+
366
+ ## Platform Support
367
+
368
+ | Platform | Support |
369
+ | --- | --- |
370
+ | Linux | Supported for MVP development |
371
+ | macOS | Supported for MVP development |
372
+ | Windows (WSL) | Supported for MVP development |
373
+ | Windows (native) | Experimental, with `forge doctor windows` and `forge setup windows` |
374
+
375
+ ForgeOS is Bun-first but no longer Bun-only. The package bin runs through Node via `tsx`, the dev server has a `node:http` fallback, package scripts use the detected package manager, and the Postgres adapter uses `Bun.SQL` when available or the `postgres` npm package under Node.
376
+
377
+ Known Windows note: ForgeOS resolves Bun through a Windows-safe resolver and ignores known non-Bun `Kiro-Cli\bun` shims. If your shell still resolves a broken app association, invoke Bun from the real install path:
378
+
379
+ ```powershell
380
+ & "$env:USERPROFILE\.bun\bin\bun.exe"
381
+ ```
382
+
383
+ Native Windows diagnostics:
384
+
385
+ ```powershell
386
+ node .\bin\forge.mjs doctor windows --json
387
+ node .\bin\forge.mjs setup windows --json
388
+ ```
389
+
390
+ `forge doctor windows` checks Node, npm, Git, safe Bun resolution, suspicious Bun shims, Git long-path support, PowerShell execution policy, and symlink support. `forge setup windows` is dry-run by default and only applies supported environment fixes with `--yes`.
391
+
392
+ For Node-only local checks, use:
393
+
394
+ ```powershell
395
+ node .\bin\forge.mjs dev --once --json
396
+ node .\bin\forge.mjs inspect framework --json
397
+ ```
398
+
399
+ ## Verification
400
+
401
+ Fast focused checks:
402
+
403
+ ```bash
404
+ bun run typecheck
405
+ bun run lint
406
+ bun test tests/<area>
407
+ bun run forge generate --check
408
+ forge verify --changed
409
+ ```
410
+
411
+ Full gate:
412
+
413
+ ```bash
414
+ bun test --timeout 120000
415
+ bun run forge verify --strict
416
+ ```
417
+
418
+ UI bridge note: `forge ui` uses Playwright when installed. Without Playwright, `forge ui doctor --json` reports `FORGE_UI_PLAYWRIGHT_MISSING` with fix hints instead of silently failing.
419
+
420
+ Frontend bridge note: `forge inspect frontend --json` and `forge dev --once --json` expose routes, components, `ForgeProvider`, generated client bindings, raw runtime fetch warnings, and fix hints. Agents should use this before editing UI wiring.
421
+
422
+ CI note: the main GitHub Actions gate runs the full Bun-based verification path on Ubuntu. A separate Node breadth smoke matrix runs on Ubuntu, Windows, and macOS with Node 22 and 24, including template package-manager smoke for npm, pnpm, yarn, and Bun.
423
+
424
+ ## npm Release
425
+
426
+ ForgeOS publishes to npm as `forgeos` and exposes the executable as `forge`.
427
+
428
+ Release automation uses Changesets plus npm Trusted Publishing:
429
+
430
+ ```bash
431
+ npm run changeset
432
+ npm run version-packages
433
+ npm run release:smoke
434
+ ```
435
+
436
+ For the first prerelease publish, use the alpha dist-tag explicitly:
437
+
438
+ ```bash
439
+ npm run release:publish-local-alpha -- --dry-run
440
+ npm run release:publish-alpha
441
+ ```
442
+
443
+ The normal path is:
444
+
445
+ ```txt
446
+ merge feature PR with changeset
447
+ -> publish.yml opens/updates a version PR
448
+ merge version PR
449
+ -> publish.yml publishes through npm OIDC Trusted Publisher
450
+ ```
451
+
452
+ Configure npm Trusted Publisher for package `forgeos`:
453
+
454
+ | Field | Value |
455
+ | --- | --- |
456
+ | Provider | GitHub Actions |
457
+ | Organization/user | `Stahldavid` |
458
+ | Repository | `forge` |
459
+ | Workflow filename | `publish.yml` |
460
+ | Environment | blank |
461
+ | Allowed action | `npm publish` |
462
+
463
+ Do not add `NPM_TOKEN` for normal alpha publishes. Alpha releases publish with the `alpha` dist-tag through npm OIDC Trusted Publisher so prerelease builds do not become `latest` accidentally. Configure `NPM_TOKEN` only when maintainers intentionally want the workflow to promote `latest` with `npm dist-tag add forgeos@<version> latest`; otherwise that step is skipped and `latest` may lag behind `alpha` during hardening. Use `release:publish-local-alpha -- --dry-run` only to validate the staged tarball locally; real npm publishing should go through `release:publish-alpha`, which dispatches `publish.yml` and uses npm OIDC Trusted Publisher. The workflow checks whether the package version already exists before installing dependencies or running tests, then uses `id-token: write`, Node 24/npm 11+, and provenance for the actual publish. `npm run release:smoke` runs `npm pack`, creates a fresh app with the packed tarball, installs dependencies, runs `forge dev --once --json`, and verifies the app smoke path.
464
+
465
+ ## Milestone History
466
+
467
+ ```txt
468
+ H1 Hardening, CI, examples
469
+ H2 Reference integration quality
470
+ H3 DataGraph Compiler
471
+ H4 Local command/action runtime
472
+ H5 Local dev server
473
+ H6 DataGraph-backed persistence runtime
474
+ H7 Durable outbox worker
475
+ H8 Lightweight workflow engine
476
+ H9 Telemetry bridge
477
+ H10 Auth, policy engine, tenant isolation
478
+ H11 Secrets & environment runtime
479
+ H12 AI workflow integration
480
+ H13 Query runtime & typed API surface
481
+ H14 Frontend client SDK core
482
+ H15 LiveQuery/Reactivity MVP
483
+ H16 React/Next hooks
484
+ H17 Minimal frontend app template
485
+ H18 Self-host packaging
486
+ H19 Agent Contract & Project Introspection Layer
487
+ H20 Production Auth / JWT & OIDC v1
488
+ H21 Postgres RLS Compiler & DB-enforced tenant isolation
489
+ H22 Package Upgrade Planner
490
+ H23 Release / Source Map Bridge
491
+ H24 Production LiveQuery Hardening
492
+ H25 Authoring primitives: forge make
493
+ H26 Feature Blueprint Compiler
494
+ H27 Safe Refactor / Codemod Engine
495
+ H28 Impact-Based Test Planner
496
+ H29 Repair Loop
497
+ H30 Agent Adapter Export
498
+ H31 Forge Review / Structured Code Review
499
+ H32 UI / Browser Test Bridge
500
+ H33 Intent Router / Guided Dev Loop
501
+ H34 Full-Stack App Contract v2
502
+ H35 Capability Map
503
+ H36 Template hygiene / git noise
504
+ H37 Convex-style forge dev panel
505
+ H38 Fast generated check visibility
506
+ H39 Showcase app
507
+ H40 Windows/runtime hardening
508
+ H41 Node-compatible CLI/runtime
509
+ H42 Verify observability and quieter app workspaces
510
+ H43 Native AI tools and agent loop
511
+ H44 Ambient DeltaDB recorder
512
+ H45 Automatic work-session inference
513
+ H46 Automatic change grouping
514
+ H47 Semantic timeline
515
+ H48 Agent Memory Bridge
516
+ H49 Brownfield import analysis
517
+ ```
518
+
519
+ ## Remaining Hardening Before Public Release
520
+
521
+ - Keep expanding semantic codemods beyond the current AST-aware `extract-action`, `rename command`, `rename field`, and `rename table` paths.
522
+ - Reduce command-selection risk with more task routers and richer inline diagnostics.
523
+ - Keep hardening native Windows setup beyond diagnostics and safe automatic environment fixes.
524
+ - Keep broadening package manager CI from template smoke toward install/build smoke for pnpm and yarn apps.
525
+ - Broaden UI bridge coverage with installed Playwright browsers in CI.