Runtime Config Schema
BIGGI config has two related but separate paths:
- The embedded BIGGI runtime loads and merges config locally.
- Cloud-served JSON Schema gives editors validation and completion for
biggi.jsonandbiggi.jsonc.
JSON Schema does not load, apply, or override runtime config.
{
"$schema": "https://app.biggi.dev/config.json"
}
Two separate paths
Changing runtime config precedence affects the first path. Adding or changing a config key affects both paths because the editor schema must describe keys the runtime accepts. See Embedded Runtime for runtime ownership.
Source of truth
The canonical runtime config source is Effect Schema Config.Info in packages/opencode/src/config/config.ts in stemcat/biggi. The runtime derives a .zod compatibility surface from Effect Schema for plugin and SDK consumers. Do not maintain a separate handwritten Zod definition for BIGGI config fields.
Cloud schema endpoint
Static source review of BIGGI-Org/cloud shows this route behavior:
- Editor fetches
https://app.biggi.dev/config.jsonbecause config file references$schema. - Cloud route
apps/web/src/app/config.json/route.tsfetcheshttps://opencode.ai/config.json. - Route runs
merge()and returns upstream schema with BIGGI additions and overrides. merge()overlays buckets fromapps/web/src/app/config.json/extras.ts.
Cloud source defines 1-hour upstream revalidation and edge-cache headers. This describes checked-in route behavior, not live deployment or cache state.
Overlay buckets
Reviewed cloud source overlays:
| Bucket | Purpose |
|---|---|
top | Top-level BIGGI keys and overrides |
agents | BIGGI primary agents under agent |
experimental | BIGGI experimental keys under experimental |
Nested runtime fields outside these buckets need a dedicated overlay bucket and matching merge() logic.
Failure mode
If the cloud overlay misses a valid runtime field, the runtime can accept config while the editor reports unknown property. Opposite drift is also possible: the cloud schema can advertise a field that the runtime no longer accepts.
Treat schema synchronization as cross-repository contract. Tests should detect both missing valid fields and stale overlay entries. Keep branch-specific drift findings in tracked issues or test output, not this architecture page.
Adding or changing BIGGI-only config key
- Add or update Effect Schema field with
biggi_changemarker inpackages/opencode/src/config/config.ts. - Generate JSON Schema shape:
bun --bun packages/opencode/script/schema.ts /tmp/biggi.json jq '.properties.<new_key>' /tmp/biggi.json
- Update matching bucket in
apps/web/src/app/config.json/extras.tsin cloud repo. - Extend
merge()inapps/web/src/app/config.json/route.tswhen new nested bucket is required. - Add assertion in
apps/web/src/tests/cli-config-schema.test.ts. - Audit stale overlay entries as well as missing additions.
The runtime schema source lives in stemcat/biggi. The public editor schema overlay lives in BIGGI-Org/cloud. A config-key change is incomplete until both repositories agree.
Source map
Repository column identifies source root for each relative path.
| Repository | Source path | Role |
|---|---|---|
stemcat/biggi | packages/opencode/src/config/config.ts | Canonical Effect Schema and derived .zod surface |
BIGGI-Org/cloud | apps/web/src/app/config.json/route.ts | Cloud overlay route |
BIGGI-Org/cloud | apps/web/src/app/config.json/extras.ts | BIGGI overlay buckets |
BIGGI-Org/cloud | apps/web/src/tests/cli-config-schema.test.ts | Cloud schema assertions |
Related pages
- Embedded Runtime - runtime config ownership
- Development Patterns - shared-file markers, BIGGI-owned boundaries, and cross-repository contributor workflow