Three documents make it real
A sphere contract says what data a domain holds and who owns it. A capsule manifest says what a function does, what it may read, how it was proven and that it makes no model calls at run time. A constellation says how capsules combine into a bigger job and where a person decides. The drafts below are JSON Schemas with worked examples from the insurance walkthrough.
Specification by Muthukumar Subramanian. Feedback and proposals are welcome as GitHub issues.
The documents
Each schema follows JSON Schema 2020-12. Version strings in the spec field let tools check which draft a document follows.
| Document | Answers | Key fields | Schema | Example |
|---|---|---|---|---|
| Sphere contract | What data is in this domain, where it comes from, what rules it guarantees, who owns it | sphere, version, sources[].connection_ref, entities, rules, access | sphere-contract.schema.json | claims.v9 |
| Capsule manifest | What this function does, what it may read, how it was tested, who approved it, how it runs | kind, sphere, contract, tests, owner, build.model_use, runtime.llm_calls | capsule-manifest.schema.json | open-claims-no-notes |
| Constellation | Which capsules run in which order, and where a person decides | steps[].type (capsule or decision-point), on_failure, decided_by | constellation.schema.json | fnol-triage |
Invariants
Rules every conforming implementation keeps, whatever its technology.
- No model calls at run time
runtime.llm_callsis alwaysnone. A small local model for perception must be declared inruntime.local_modeland tested. - One sphere per capsuleA capsule reads only the sphere named in its manifest, through the contract version it was tested against.
- Owned and approvedEvery capsule and constellation names a team and an approver. No owner, no deployment.
- Tests before every deploy
tests.passedequalstests.totalfor a published capsule, including after regeneration. - Contract changes are eventsA new contract version triggers regeneration and the full test suite for every bound capsule.
- People decide where judgement is neededConstellations mark decision points explicitly; failures route to a person by default.
Example: a capsule manifest
From the insurance walkthrough. All names and figures are illustrative.
{
"spec": "compile-once/capsule-manifest/v0.1",
"capsule": "open-claims-no-notes",
"version": "1.0.0",
"kind": "query",
"sphere": "claims",
"contract": "claims.v9",
"request": "Show open claims over $50,000 with no adjuster notes.",
"tests": { "passed": 31, "total": 31, "suites": ["golden", "edge", "permission"] },
"owner": { "team": "Claims Operations", "approver": "Head of Claims Operations" },
"build": { "by": "forge", "model_use": "build-time-only" },
"runtime": { "llm_calls": "none", "p95_latency_ms": 38 }
}
Status: draft v0.1. Fields may change before v1.0. Schemas and examples are MIT licensed; the text on this page is CC BY 4.0.