# Manifest JSON Schema

The machine-readable contract for adapter manifests, served at a stable URL:

**<https://sabermage.github.io/spt-releases/manifest.schema.json>**

- Generated from the **same code that parses manifests** — the schema is
  always exactly what `spt adapter add` accepts structurally. It also ships
  as a release asset with every release.
- JSON Schema draft 2020-12; the `$id` is the canonical URL above and is
  stable across releases.
- Field doc-comments ride along as `description`s — the schema doubles as
  field-level documentation.
- Manifests are authored as **TOML**; the schema describes the equivalent
  data model (validate the TOML-parsed document).
- Cross-field rules the schema can't express (kind↔`[shell]` agreement,
  strategy/avenue required fields) are listed in the
  [manifest reference](../harness-contract/manifest.md#cross-field-rules-spt-adapter-add-enforces-these)
  and enforced by `spt adapter add`.

Example — validate a manifest mechanically (Python, any JSON-Schema
validator works the same way):

```python
import json, tomllib, urllib.request, jsonschema

schema = json.load(urllib.request.urlopen(
    "https://sabermage.github.io/spt-releases/manifest.schema.json"))
with open("manifest.toml", "rb") as f:
    manifest = tomllib.load(f)
jsonschema.validate(manifest, schema)   # raises on violation
print("manifest is structurally valid")
```
