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.
- package/.agents/skills/forge-agent-fabric/SKILL.md +12 -0
- package/.npmignore +19 -19
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +12 -3
- package/LICENSE +21 -21
- package/README.md +522 -522
- package/adapters/java/README.md +68 -68
- package/adapters/java/pom.xml +47 -47
- package/adapters/java/src/main/java/dev/forgeos/adapter/Auth.java +20 -20
- package/adapters/java/src/main/java/dev/forgeos/adapter/Diagnostic.java +16 -16
- package/adapters/java/src/main/java/dev/forgeos/adapter/Entry.java +38 -38
- package/adapters/java/src/main/java/dev/forgeos/adapter/EntryKind.java +16 -16
- package/adapters/java/src/main/java/dev/forgeos/adapter/ErrorInfo.java +4 -4
- package/adapters/java/src/main/java/dev/forgeos/adapter/Forge.java +94 -94
- package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeCall.java +12 -12
- package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeContext.java +11 -11
- package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeHandler.java +8 -8
- package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeHttpHandler.java +179 -179
- package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeRegistry.java +121 -121
- package/adapters/java/src/main/java/dev/forgeos/adapter/Json.java +14 -14
- package/adapters/java/src/main/java/dev/forgeos/adapter/Manifest.java +14 -14
- package/adapters/java/src/main/java/dev/forgeos/adapter/RequestEnvelope.java +6 -6
- package/adapters/java/src/main/java/dev/forgeos/adapter/ResponseEnvelope.java +25 -25
- package/adapters/java/src/main/java/dev/forgeos/adapter/Risk.java +18 -18
- package/adapters/java/src/main/java/dev/forgeos/adapter/Schemas.java +36 -36
- package/adapters/java/src/main/java/dev/forgeos/adapter/Service.java +65 -65
- package/adapters/java/src/main/java/dev/forgeos/adapter/TransactionMode.java +18 -18
- package/adapters/java/src/main/java/dev/forgeos/adapter/TypedForgeHandler.java +6 -6
- package/adapters/java-spring-boot-starter/README.md +32 -32
- package/adapters/java-spring-boot-starter/pom.xml +49 -49
- package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeCommand.java +22 -22
- package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeExternalService.java +15 -15
- package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeQuery.java +16 -16
- package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeServiceBeanCondition.java +18 -18
- package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeSpringAutoConfiguration.java +16 -16
- package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeSpringRuntime.java +104 -104
- package/adapters/java-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +1 -1
- package/bin/forge.mjs +38 -38
- package/docs/agent-fabric-programs.md +168 -0
- package/docs/agent-fabric.md +16 -0
- package/docs/architecture/agent-fabric/README.md +28 -1
- package/docs/architecture/agent-fabric/REPOSITORY_MANIFEST_PLAN.md +13 -1
- package/docs/architecture/agent-fabric/WORKFLOW_PROGRAM_V2_ADR.md +41 -0
- package/docs/architecture/agent-fabric/WORKFLOW_PROGRAM_V2_EVIDENCE.md +109 -0
- package/docs/architecture/agent-fabric/WORKFLOW_PROGRAM_V2_PLAN.md +550 -0
- package/examples/agent-fabric-v2/README.md +54 -0
- package/examples/agent-fabric-v2/make-request.mjs +4 -0
- package/examples/agent-fabric-v2/migrate.workflow.ts +35 -0
- package/examples/agent-fabric-v2/registry.example.json +256 -0
- package/examples/agent-fabric-v2/workers/check.mjs +2 -0
- package/examples/agent-fabric-v2/workers/common.mjs +7 -0
- package/examples/agent-fabric-v2/workers/discover.mjs +2 -0
- package/examples/agent-fabric-v2/workers/migrate.mjs +4 -0
- package/examples/agent-fabric-v2/workers/review.mjs +3 -0
- package/examples/java-billing/pom.xml +60 -60
- package/examples/java-billing/src/main/java/dev/forgeos/examples/billing/CreateInvoiceInput.java +4 -4
- package/examples/java-billing/src/main/java/dev/forgeos/examples/billing/Invoice.java +11 -11
- package/examples/java-billing/src/main/java/dev/forgeos/examples/billing/Main.java +127 -127
- package/package.json +7 -1
- package/packages/eslint-plugin-forge/index.ts +15 -15
- package/packages/eslint-plugin-forge/package.json +10 -10
- package/packages/eslint-plugin-forge/src/check-source.ts +95 -95
- package/packages/eslint-plugin-forge/src/load-artifacts.ts +24 -24
- package/packages/eslint-plugin-forge/src/rule-no-forge-guard-violation.ts +93 -93
- package/schemas/agent-fabric/v0.1/control-event.schema.json +281 -281
- package/schemas/forge-manifest.schema.json +305 -305
- package/scripts/field-test-forgeos.mjs +1021 -1021
- package/src/forge/_generated/releaseManifest.json +1 -1
- package/src/forge/_generated/releaseManifest.ts +3 -3
- package/src/forge/agent-fabric/codex-sdk-worker.ts +39 -1
- package/src/forge/agent-fabric/index.ts +7 -0
- package/src/forge/agent-fabric/local-adaptive-digest-worker.mjs +26 -26
- package/src/forge/agent-fabric/local-task-server.ts +335 -313
- package/src/forge/agent-fabric/managed-workspace.ts +5 -4
- package/src/forge/agent-fabric/program-contract.ts +229 -0
- package/src/forge/agent-fabric/program-dsl.ts +112 -0
- package/src/forge/agent-fabric/program-service.ts +619 -0
- package/src/forge/agent-fabric/program-store.ts +117 -0
- package/src/forge/agent-fabric/program-types.ts +98 -0
- package/src/forge/agent-fabric/program-worker.ts +91 -0
- package/src/forge/agent-memory/mcp.ts +491 -477
- package/src/forge/agent-memory/sources/codex-hook-runner.mjs +343 -343
- package/src/forge/bench.ts +154 -154
- package/src/forge/cair/action-journal.ts +61 -61
- package/src/forge/cair/action-parser.ts +314 -314
- package/src/forge/cair/action-validator.ts +40 -40
- package/src/forge/cair/actions.ts +1818 -1818
- package/src/forge/cair/format.ts +77 -77
- package/src/forge/cair/index.ts +103 -103
- package/src/forge/cair/query.ts +478 -478
- package/src/forge/cair/snapshot.ts +315 -315
- package/src/forge/cair/types.ts +246 -246
- package/src/forge/cli/ai.ts +816 -816
- package/src/forge/cli/codex-app-server.ts +877 -877
- package/src/forge/cli/fabric.ts +210 -196
- package/src/forge/cli/index.ts +26 -26
- package/src/forge/cli/main.ts +4 -0
- package/src/forge/cli/next-actions.ts +23 -23
- package/src/forge/cli/parse.ts +5 -5
- package/src/forge/cli/release.ts +309 -309
- package/src/forge/cli/self-host.ts +510 -510
- package/src/forge/compiler/ai-registry/parse.ts +219 -219
- package/src/forge/compiler/app-graph/classify.ts +10 -10
- package/src/forge/compiler/app-graph/dup-symbol.ts +29 -29
- package/src/forge/compiler/app-graph/extract.ts +231 -231
- package/src/forge/compiler/app-graph/forge-apis.ts +25 -25
- package/src/forge/compiler/app-graph/index.ts +11 -11
- package/src/forge/compiler/app-graph/module-graph.ts +151 -151
- package/src/forge/compiler/app-graph/parser.ts +71 -71
- package/src/forge/compiler/app-graph/symbols.ts +48 -48
- package/src/forge/compiler/app-graph/types.ts +43 -43
- package/src/forge/compiler/app-graph/versions.ts +14 -14
- package/src/forge/compiler/cache/index.ts +17 -17
- package/src/forge/compiler/cache/key.ts +46 -46
- package/src/forge/compiler/cache/scheduler.ts +72 -72
- package/src/forge/compiler/cache/store.ts +78 -78
- package/src/forge/compiler/classifier/capabilities.ts +64 -64
- package/src/forge/compiler/classifier/classify.ts +76 -76
- package/src/forge/compiler/classifier/contexts.ts +188 -188
- package/src/forge/compiler/classifier/index.ts +18 -18
- package/src/forge/compiler/classifier/runtime-matrix.ts +45 -45
- package/src/forge/compiler/classifier/secrets.ts +31 -31
- package/src/forge/compiler/classifier/signals.ts +95 -95
- package/src/forge/compiler/client-sdk/build-manifest.ts +210 -210
- package/src/forge/compiler/data-graph/sql/serialize.ts +89 -89
- package/src/forge/compiler/data-graph/sql/types.ts +38 -38
- package/src/forge/compiler/diagnostics/index.ts +57 -57
- package/src/forge/compiler/emitter/artifact-kind.ts +14 -14
- package/src/forge/compiler/emitter/barrel.ts +47 -47
- package/src/forge/compiler/emitter/constants.ts +7 -7
- package/src/forge/compiler/emitter/emit.ts +223 -223
- package/src/forge/compiler/emitter/index.ts +24 -24
- package/src/forge/compiler/emitter/lock.ts +61 -61
- package/src/forge/compiler/external-manifest/registry.ts +196 -196
- package/src/forge/compiler/external-manifest/types.ts +91 -91
- package/src/forge/compiler/external-manifest/validate.ts +373 -373
- package/src/forge/compiler/frontend-graph/build.ts +623 -623
- package/src/forge/compiler/guards/artifacts.ts +96 -96
- package/src/forge/compiler/guards/check-import-guards.ts +106 -106
- package/src/forge/compiler/guards/index.ts +11 -11
- package/src/forge/compiler/guards/propagate-contexts.ts +57 -57
- package/src/forge/compiler/index.ts +17 -17
- package/src/forge/compiler/integration/index.ts +17 -17
- package/src/forge/compiler/integration/snapshot.ts +54 -54
- package/src/forge/compiler/integration/templates/convex.ts +70 -70
- package/src/forge/compiler/orchestrator/discover.ts +214 -214
- package/src/forge/compiler/orchestrator/guards.ts +5 -5
- package/src/forge/compiler/orchestrator/index.ts +27 -27
- package/src/forge/compiler/orchestrator/orphans.ts +51 -51
- package/src/forge/compiler/orchestrator/profile.ts +23 -23
- package/src/forge/compiler/orchestrator/serialize.ts +979 -979
- package/src/forge/compiler/orchestrator/verify.ts +35 -35
- package/src/forge/compiler/package-graph/capabilities-stub.ts +33 -33
- package/src/forge/compiler/package-graph/checksum.ts +107 -107
- package/src/forge/compiler/package-graph/exports-discovery.ts +91 -91
- package/src/forge/compiler/package-graph/extract-dts.ts +32 -32
- package/src/forge/compiler/package-graph/index.ts +24 -24
- package/src/forge/compiler/package-graph/jsdoc.ts +50 -50
- package/src/forge/compiler/package-graph/oracle.ts +326 -326
- package/src/forge/compiler/package-graph/read-file.ts +21 -21
- package/src/forge/compiler/package-graph/resolve.ts +131 -131
- package/src/forge/compiler/package-manager/adapter.ts +240 -240
- package/src/forge/compiler/package-manager/commands.ts +51 -51
- package/src/forge/compiler/package-manager/detect.ts +65 -65
- package/src/forge/compiler/package-manager/executor.ts +146 -146
- package/src/forge/compiler/package-manager/index.ts +22 -22
- package/src/forge/compiler/package-manager/parse-spec.ts +16 -16
- package/src/forge/compiler/primitives/compare.ts +26 -26
- package/src/forge/compiler/primitives/hash.ts +29 -29
- package/src/forge/compiler/primitives/header.ts +43 -43
- package/src/forge/compiler/primitives/index.ts +45 -45
- package/src/forge/compiler/primitives/paths.ts +24 -24
- package/src/forge/compiler/primitives/serialize.ts +66 -66
- package/src/forge/compiler/primitives/sort.ts +87 -87
- package/src/forge/compiler/recipes/helpers.ts +37 -37
- package/src/forge/compiler/sandbox/artifact-sanitize.ts +26 -26
- package/src/forge/compiler/sandbox/backends/child.ts +123 -123
- package/src/forge/compiler/sandbox/backends/docker.ts +173 -173
- package/src/forge/compiler/sandbox/index.ts +51 -51
- package/src/forge/compiler/sandbox/inspect.ts +143 -143
- package/src/forge/compiler/sandbox/inspector-entry.ts +115 -115
- package/src/forge/compiler/sandbox/limits.ts +31 -31
- package/src/forge/compiler/sandbox/scrub-env.ts +60 -60
- package/src/forge/compiler/sandbox/secret-scan.ts +54 -54
- package/src/forge/compiler/sandbox/serialize.ts +106 -106
- package/src/forge/compiler/sandbox/types.ts +7 -7
- package/src/forge/compiler/test-graph/build.ts +285 -285
- package/src/forge/compiler/types/app-graph.ts +87 -87
- package/src/forge/compiler/types/capability.ts +29 -29
- package/src/forge/compiler/types/classification.ts +9 -9
- package/src/forge/compiler/types/diagnostic.ts +2 -2
- package/src/forge/compiler/types/frontend-graph.ts +81 -81
- package/src/forge/compiler/types/import-guards.ts +19 -19
- package/src/forge/compiler/types/index.ts +98 -98
- package/src/forge/compiler/types/json.ts +3 -3
- package/src/forge/compiler/types/lock.ts +37 -37
- package/src/forge/compiler/types/runtime-matrix.ts +16 -16
- package/src/forge/compiler/types/runtime.ts +30 -30
- package/src/forge/compiler/types/sandbox.ts +24 -24
- package/src/forge/delta/broker-runner.mjs +5 -5
- package/src/forge/delta/classifier.ts +52 -52
- package/src/forge/delta/explain.ts +238 -238
- package/src/forge/delta/ids.ts +40 -40
- package/src/forge/delta/index.ts +25 -25
- package/src/forge/delta/redaction.ts +50 -50
- package/src/forge/delta/schema.ts +135 -135
- package/src/forge/delta/session.ts +142 -142
- package/src/forge/delta/timeline.ts +178 -178
- package/src/forge/dev/types.ts +63 -63
- package/src/forge/dev/watch.ts +119 -119
- package/src/forge/intent/index.ts +509 -509
- package/src/forge/make/types.ts +153 -153
- package/src/forge/refactor/index.ts +1937 -1937
- package/src/forge/refactor/runtime-rename.ts +598 -598
- package/src/forge/repair/rules/index.ts +476 -476
- package/src/forge/repository-analysis/runtime-observation.ts +9 -0
- package/src/forge/review/types.ts +211 -211
- package/src/forge/runtime/db/generated-client.ts +305 -305
- package/src/forge/runtime/runner/run-entry.ts +236 -236
- package/src/forge/version.ts +1 -1
- package/templates/agent-workroom/AGENTS.md +29 -29
- package/templates/agent-workroom/README.md +34 -34
- package/templates/agent-workroom/forge.config.ts +3 -3
- package/templates/agent-workroom/package.json +34 -34
- package/templates/agent-workroom/pnpm-workspace.yaml +2 -2
- package/templates/agent-workroom/src/actions/indexAgentSignal.ts +10 -10
- package/templates/agent-workroom/src/commands/openWorkroom.ts +61 -61
- package/templates/agent-workroom/src/commands/recordAgentSignal.ts +119 -119
- package/templates/agent-workroom/src/commands/recordCheckRun.ts +52 -52
- package/templates/agent-workroom/src/forge/schema.ts +54 -54
- package/templates/agent-workroom/src/policies.ts +6 -6
- package/templates/agent-workroom/src/queries/listWorkrooms.ts +11 -11
- package/templates/agent-workroom/src/queries/liveWorkroom.ts +63 -63
- package/templates/agent-workroom/tsconfig.json +16 -16
- package/templates/agent-workroom/web/index.html +13 -13
- package/templates/agent-workroom/web/package.json +21 -21
- package/templates/agent-workroom/web/src/App.tsx +345 -345
- package/templates/agent-workroom/web/src/main.tsx +13 -13
- package/templates/agent-workroom/web/src/styles.css +545 -545
- package/templates/agent-workroom/web/tsconfig.json +27 -27
- package/templates/b2b-support-web/package.json +37 -37
- package/templates/b2b-support-web/pnpm-workspace.yaml +2 -2
- package/templates/b2b-support-web/web/package.json +20 -20
- package/templates/minimal-web/package.json +34 -34
- package/templates/minimal-web/pnpm-workspace.yaml +2 -2
- package/templates/minimal-web/web/index.html +13 -13
- package/templates/minimal-web/web/src/styles.css +190 -190
- package/templates/nuxt-web/.vscode/settings.json +14 -14
- package/templates/nuxt-web/.yarnrc.yml +1 -1
- package/templates/nuxt-web/README.md +30 -30
- package/templates/nuxt-web/forge.config.ts +3 -3
- package/templates/nuxt-web/package.json +37 -34
- package/templates/nuxt-web/pnpm-workspace.yaml +2 -2
- package/templates/nuxt-web/src/actions/logNoteCreated.ts +11 -11
- package/templates/nuxt-web/src/commands/createNote.ts +26 -26
- package/templates/nuxt-web/src/forge/schema.ts +12 -12
- package/templates/nuxt-web/src/policies.ts +6 -6
- package/templates/nuxt-web/src/queries/listNotes.ts +8 -8
- package/templates/nuxt-web/src/queries/liveNotes.ts +8 -8
- package/templates/nuxt-web/tsconfig.json +17 -17
- package/templates/nuxt-web/web/app.vue +67 -67
- package/templates/nuxt-web/web/components/LiveNotes.vue +89 -89
- package/templates/nuxt-web/web/components/NoteComposer.vue +100 -100
- package/templates/nuxt-web/web/composables/forge.ts +13 -13
- package/templates/nuxt-web/web/composables/useNotes.ts +24 -24
- package/templates/nuxt-web/web/nuxt.config.ts +11 -11
- package/templates/nuxt-web/web/package.json +22 -19
- package/templates/nuxt-web/web/plugins/forge.client.ts +10 -10
- package/templates/nuxt-web/web/plugins/forge.server.ts +10 -10
- package/templates/nuxt-web/web/server/api/forge-health.get.ts +7 -7
- package/templates/nuxt-web/web/tsconfig.json +6 -6
- package/templates/vendor-access/.vscode/settings.json +14 -14
- package/templates/vendor-access/README.md +30 -30
- package/templates/vendor-access/package.json +35 -35
- package/templates/vendor-access/pnpm-workspace.yaml +2 -2
- package/templates/vendor-access/tsconfig.json +17 -17
- package/templates/vendor-access/web/index.html +13 -13
- package/templates/vendor-access/web/package.json +21 -21
- package/templates/vendor-access/web/src/styles.css +682 -682
- 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.
|