Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,3 @@ DAYTONA_API_KEY=
SCHEMAFORGE_MODEL=cloudflare/deepseek-v4-flash
# Public repo the skill imports from (used by import_skill.py)
GITHUB_REPO_URL=https://github.com/ronakgupta03/schemaforge

# Cloudflare deployment (scripts/apply-cf-secrets.sh)
# NEON_CONNECTION_URL is required env (Neon owner connection URL; never commit)
# NEON_CONNECTION_URL=postgresql://neondb_owner:<password>@<endpoint>.neon.tech/neondb?sslmode=require
# REDIS_URL=rediss://default:<password>@<endpoint>.upstash.io:6379
# CLOUDFLARE_AUTH_TOKEN=
# CLOUDFLARE_ACCOUNT_ID=
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ coverage/
# Python packaging metadata (generated by uv pip install -e)
*.egg-info/

packages/cli/ui-dist/
packages/cli/.sfenv/
packages/cli/mcp-servers/
packages/cli/core/
Expand Down
50 changes: 31 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ Demo video (1080p, ≤3:00): _link added after the final take_ ·
Submission write-up: [`docs/submission-writeup.md`](docs/submission-writeup.md).

> The built-in TrueForge UI does not render `mermaid` code blocks by
> default (it only syntax-highlights them). If you are running the local
> UI, run `python scripts/patch-trueforge-mermaid.py` once to inject the
> mermaid runtime into the served frontend (idempotent; re-run after any
> `npx` re-fetch). Verified: impact-graph mermaid blocks render as SVG.
> default (it only syntax-highlights them). The CLI patches the served
> frontend automatically on every launch (`scripts/patch-trueforge-mermaid.py`,
> idempotent). Verified: impact-graph mermaid blocks render as SVG.

## How it works

Expand Down Expand Up @@ -118,24 +117,37 @@ explains — it never guesses about code or schema.
npx @schemaforge/schemaforge
```

Boots the full local stack (TrueForge + postgres-mcp + github-mcp + registry
Evidence UI) and opens the browser at http://localhost:5173. Running
services on the default ports are reused instead of restarted. First run
creates a Python venv and installs the engine + MCP dependencies.
Boots the full local stack (TrueForge + postgres-mcp + github-mcp + registry)
and opens the TrueForge chat UI at http://[::1]:8790. Running services on the
default ports are reused instead of restarted. First run creates a Python
venv and installs the engine + MCP dependencies.

**Configure everything in the UI — nothing is hardcoded.** The Settings tab
has five sections:
The UI is the TrueForge chat at http://[::1]:8790. The CLI patches the
served frontend on every launch so impact-graph mermaid blocks render
inside chat; evidence artifacts (`graph.mmd`, `report.md`, `migration.sql`,
`diff.patch`, `verify.json`) are saved per session in the sandbox and
downloadable from chat. **Configure everything in the UI — nothing is
hardcoded.** The stock TrueForge Settings tab has four sections:

1. **Models**: Configure LLM provider API keys (OpenAI, Anthropic, Gemini, Cloudflare) and choose the active model for SchemaForge.
2. **MCP Servers**: Inspect discovered MCP servers and toggle which servers are attached to the agent.
3. **Connectors**: Set up the production PostgreSQL connection (database DSN / URL) and the GitHub connector with your token and repository.
4. **Sandbox**: Enable or disable the Daytona sandbox environment used for isolated migration execution and verification.
5. **Apply Agent**: Re-generate the agent manifest and apply it to TrueForge. Unconfigured services are simply omitted: without a Postgres connector, the agent skips prod introspection and apply; without a GitHub connector, it saves `out/diff.patch` locally instead of opening a PR. Nothing crashes.
2. **Connectors**: Inspect discovered MCP servers and toggle which servers are attached to the agent.
3. **Skills**: Manage the `schemaforge-migration` git skill.
4. **Sandbox providers**: Configure the Daytona sandbox environment used for isolated migration execution and verification.

The development workspace additionally runs a forked TrueForge UI
(`trueforge-ui-fork`) that adds SchemaForge evidence tabs
(Impact / Report / Changes / Verification / Activity) and a SchemaForge
Settings section — production PostgreSQL DSN, GitHub token + default repo,
config token, and an **Apply Agent** button that re-generates the agent
manifest. The published package does not bundle that fork; artifacts are
still downloadable from chat in the stock UI.

Unconfigured services are simply omitted: without a Postgres connector, the agent skips prod introspection and apply; without a GitHub connector, it saves `out/diff.patch` locally instead of opening a PR. Nothing crashes.

## Run it — full local stack (all components, dev setup)

Everything boots from the CLI — venv, MCP servers, registry, TrueForge, and
the Evidence UI — and already-running services on the default ports are
the local mirror — and already-running services on the default ports are
reused instead of restarted:

```bash
Expand All @@ -155,9 +167,9 @@ First run creates the venv (`~/.schemaforge/.sfenv`) and installs the engine
| -------------- | ----- | -------------------------------------------- |
| `postgres-mcp` | 8001 | prod-Postgres MCP (config endpoint on 9001) |
| `github-mcp` | 8002 | GitHub MCP (config endpoint on 9002) |
| `sf-registry` | 9010 | Settings-tab backend |
| TrueForge | 8790 | `npx @truefoundry/trueforge`, local SQLite mode |
| Evidence UI | 5173 | Settings tab + agent chat (opens in browser) |
| `sf-registry` | 9010 | SchemaForge config/settings backend |
| TrueForge | 8790 | `npx @truefoundry/trueforge`, local SQLite mode — chat UI (SchemaForge evidence tabs in the dev-workspace fork) |
| local mirror | 5173 | proxies `/api/sf` config endpoints + redirects to the TrueForge UI |

The agent is registered automatically (apply-agent). Configure everything in
the Settings tab: Models → Connectors (prod Postgres DSN + GitHub
Expand All @@ -175,7 +187,7 @@ docker compose -f demo-app/prod-postgres/docker-compose.yml up -d
bash demo-app/seed_prod.sh
```

Then chat with `schemaforge` in the Evidence UI and prompt, e.g.: "Split the
Then chat with `schemaforge` in the TrueForge UI and prompt, e.g.: "Split the
users table into users and user_profiles. user_profiles gets id, user_id
(1:1 FK), address, date_of_birth. users keeps id, name, email. The API
response shape of /users must not change."
Expand Down
2 changes: 1 addition & 1 deletion agent/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ in order:
for all generated artifacts (graph.mmd, report.md, db.json, code.json,
*.sql, diff.patch) when `SF_SESSION_ID` is set in the sandbox environment;
otherwise use `/workspace/out/`. This keeps each chat session's files in
its own directory so the Evidence UI can load them later.
its own directory so the TrueForge UI evidence tabs can load them later.

## Tool inventory (detect at runtime — some servers may be absent)

Expand Down
8 changes: 0 additions & 8 deletions deploy/Dockerfile.github-mcp

This file was deleted.

8 changes: 0 additions & 8 deletions deploy/Dockerfile.postgres-mcp

This file was deleted.

9 changes: 0 additions & 9 deletions deploy/Dockerfile.registry

This file was deleted.

5 changes: 0 additions & 5 deletions deploy/Dockerfile.trueforge

This file was deleted.

135 changes: 0 additions & 135 deletions deploy/README.md

This file was deleted.

Loading