forgeos 0.1.0-alpha.69 → 0.1.0-alpha.70

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