Skip to content

Latest commit

 

History

History
61 lines (49 loc) · 1017 Bytes

File metadata and controls

61 lines (49 loc) · 1017 Bytes

SMD JSON Contract

Status: draft 0.1

The SMD JSON contract is the reference interchange shape for renderers, UI agents, ingestion pipelines, and tests.

Generate it with:

smd export examples/contextfit.smd --format json

Top-Level Shape

{
  "metadata": {},
  "title": "Example",
  "preamble": "",
  "directives": [],
  "scenes": []
}

Scene

{
  "id": "intro",
  "title": "Opening",
  "attrs": {
    "id": "intro",
    "role": "hook"
  },
  "content": "",
  "directives": [],
  "line": 12
}

Directive

{
  "name": "claim",
  "attrs": {
    "id": "main-claim",
    "source": "whitepaper#claim"
  },
  "content": "The claim text.",
  "line": 18
}

Compatibility Rules

  • Unknown top-level fields should be ignored.
  • Unknown attrs fields should be preserved.
  • Scene IDs and directive IDs are stable handles.
  • UI state that is not semantically meaningful should live outside SMD.
  • Renderers should not replace SMD source with slide-specific output.