Specification · draft v0.1 · MIT licence

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.

DocumentAnswersKey fieldsSchemaExample
Sphere contractWhat data is in this domain, where it comes from, what rules it guarantees, who owns itsphere, version, sources[].connection_ref, entities, rules, accesssphere-contract.schema.jsonclaims.v9
Capsule manifestWhat this function does, what it may read, how it was tested, who approved it, how it runskind, sphere, contract, tests, owner, build.model_use, runtime.llm_callscapsule-manifest.schema.jsonopen-claims-no-notes
ConstellationWhich capsules run in which order, and where a person decidessteps[].type (capsule or decision-point), on_failure, decided_byconstellation.schema.jsonfnol-triage

Invariants

Rules every conforming implementation keeps, whatever its technology.

  1. No model calls at run timeruntime.llm_calls is always none. A small local model for perception must be declared in runtime.local_model and tested.
  2. One sphere per capsuleA capsule reads only the sphere named in its manifest, through the contract version it was tested against.
  3. Owned and approvedEvery capsule and constellation names a team and an approver. No owner, no deployment.
  4. Tests before every deploytests.passed equals tests.total for a published capsule, including after regeneration.
  5. Contract changes are eventsA new contract version triggers regeneration and the full test suite for every bound capsule.
  6. 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.