Open source · MIT license
Write a markdown spec. Run forge build.
Forge compiles typed Spec API primitives into a task graph, routes work to
specialist models, and exposes builds, tasks, contracts, artifacts, events,
model routing, and verification through a local REST API.
How it works
No prompt engineering. No copy-pasting. Describe what you want, validate it locally, and run the build.
Install Forge, pick a template, and get a project directory with a pre-configured .forge/ folder.
Edit .forge/spec.md with typed primitives for models, APIs, UI bindings, tests, and deploy targets.
Run forge spec compile or forge build. Forge creates the task graph locally, routes each task, and verifies the result.
API plane
Run forge serve to expose the same build machinery behind a JSON API. External tools can validate specs, launch builds, inspect task state, stream events, route model calls, export contracts, and run deterministic verification.
forge build and POST /api/builds operate on the same project files under .forge/.
POST /api/spec/validate and POST /api/spec/compile turn markdown primitives into diagnostics and task graphs.
POST /api/builds, GET /api/tasks, task run, and task retry endpoints make builds scriptable.
Contracts, artifacts, events, audit logs, model health, and OpenAPI export stay queryable while the build runs.
Parse Spec API directives and return diagnostics.
Create a deterministic task graph.
Start a build job from the current project.
Inspect task state and dependencies.
Run a single dependency-ready task.
Retry a failed task with the same controls.
Read backend API, model, and event contracts.
Export current API contracts as OpenAPI.
Run deterministic verification checks.
Resolve the configured model chain for a role.
Stream build events over Server-Sent Events.
Inspect control-plane and build audit logs.
Agent pipeline
Forge passes machine-readable artifacts between Spec API compilation, building, review, and verification. The API plane stays small, while builder specializations handle the implementation slices.
.env, or embed eval(). All decisions are logged.
| Agent | Responsibility |
|---|---|
| planner | Still supports legacy free-form specs. Spec API projects use the deterministic compiler before model execution. |
| builder | Owns implementation through specializations like setup, backend, frontend, ci, deploy, and integration. |
| reviewer | Reads all code from the bus, validates cross-file consistency, and emits structured findings plus rework requests. |
| verifier | Runs deterministic post-review checks and produces machine-readable verification results for the orchestrator and policy layer. |
Templates
Each template ships with a pre-filled spec, build rules, and a firewall policy for its stack.
| web-app | React + Vite, FastAPI, SQLite, Tailwind |
| api-only | FastAPI, Pydantic, SQLite — no frontend |
| ai-app | React + FastAPI with OpenAI or Anthropic |
| chrome-ext | Chrome Manifest V3, vanilla JS or React |
| cli-tool | Python CLI, Click or Typer, Rich output |
| data-viz | Streamlit or React with Plotly / Recharts |
| slack-bot | Python, slack-bolt, FastAPI handler |
| discord-bot | Python, discord.py, slash commands |
Features
Forge treats building software as a process, not a single LLM call.
Backend publishes machine-readable endpoint schemas. Frontend consumes them. No more POST /api/users vs POST /users mismatches. Contracts persist to .forge/contracts.json across builds.
Builds, tasks, contracts, artifacts, audit logs, model routing, and event streams are available through forge serve.
Independent builder lanes like backend, ci, and deploy run concurrently through a dependency-aware scheduler.
Reviewer finds a bug in your backend? The rework goes back to the builder with the right specialization and affected files. One retry per file, tracked for observability.
Anthropic, OpenAI, Together, Groq, or local Ollama. Set an env var, switch with --provider.
Add to an existing project. Contracts from previous builds are loaded so new code knows what endpoints exist.
State, artifacts, contracts, and verification output are persisted under .forge/ so builds can be resumed and inspected.
Core install stays lightweight. Provider SDKs remain opt-in, and the CLI and API plane share the same project state under .forge/.