Skip to content

Embedded peer content

Status: open/planned · Kind: module · Audience: system

  • Mermaid, JSON Canvas, and future embedded formats are opaque tagged payload spans in the core — losslessly preserved, never modeled in the markdown AST enum — with typed parsing delegated to sibling crates through the contract’s leaf extension point.
  • JSON Canvas is the governance model: an independently versioned peer spec referenced from markdown, not a grammar extension.
  • Specialized editors and parsers over these sections attach at this seam later.

The fleet embeds structured non-markdown content — mermaid diagrams, JSON Canvas, .base queries, future DSLs — and needs typed handling without uglifying the core Rust API. The core sees a fenced block or embed as a tagged span: language/type tag plus raw bytes, preserved like any token run. A sibling crate registered against that tag (via the contract plane’s BlockKind/LeafSpec extension point) parses, validates, and types the payload, emitting the same Finding shape as every other plane. Adding a format is a new crate and a registration, never a core change.

Deliberately last in sequencing — the user’s corollary requirement. The seam ships with the contract plane; the sibling crates accrete on demand.


← Back to Capabilities