Specification
Look System
kanonak.org
document-ast@1.3.0
document-ast
Badge
A small styled annotation rendered next to its surrounding inline content — the natural shape for "this resource is of type X" tags next to a heading, status…
Badge Label
Required visible text for the badge. Backends render it inside the chip / link.
Badge Target
Optional clickable target — the resource the badge links to. Same shape as `ResourceLink.target`: backends serialize this as the target's canonical URI. When…
Badge Tooltip
Optional hover-text for the badge. HTML backends emit as `title=` on the chip; Markdown backends emit as the link-title slot. Conventionally populated with the…
Block
Abstract marker class for block-level content in a narrative document. Subclassed by Heading, Paragraph, and (in future revisions) CodeBlock, BulletList,…
Children
The document's narrative block list, in render order. Backends that support narrative content (Markdown, HTML, plain-text) walk this channel. Structured-only…
CSS
A stylesheet (Cascading Style Sheets) source. Used by the stylesheet backend to pass CSS through verbatim, and by HTML backends that wrap RawBlock(text/css) in…
Document
Root of a document AST. Carries two parallel channels: `metadata` (structured key-value data, used by frontmatter/TOML/JSON backends) and `children` (a block…
DynamoDB Boolean
Emit as a DynamoDB `BOOL` attribute value. The hinted value must be a StringScalar holding exactly "true" or "false"; the backend emits `{ "BOOL": true }` / `{…
DynamoDB Null
Emit as a DynamoDB `NULL` attribute value. The hinted value is a StringScalar (its string content is ignored); the backend emits `{ "NULL": true }`.
DynamoDB Number
Emit as a DynamoDB `N` attribute value. The hinted value must be a StringScalar holding a numeric literal; the backend emits `{ "N": "<value>" }` (DynamoDB…
Entries
The ordered list of key-value pairs inside a StructuredMap. Order is significant and preserved through serialization.
Escape Hint
Per-StructuredEntry policy that tells each format backend how to serialize the entry's value. Lives on StructuredEntry rather than on the StructuredScalar…
Escape Hint
Optional. Serialization hint consulted by backends when emitting a value. If omitted, the backend applies its default escaping for the value's type. As of…
Escape-Hintable
Abstract marker class for AST nodes that may carry an `escapeHint` (added in 1.3.0). Two things are EscapeHintable: a StructuredEntry (the hint applies to the…
Heading
A section heading, numbered by `level` (1 = H1, 2 = H2, ...). Contains inline content in `inlines`. In Markdown backends this becomes `# text`, `## text`, etc;…
HTML
An HTML fragment, already rendered. HTML backends emit it unescaped (trusted passthrough). Non-HTML backends typically fall back to escaped-text behavior or…
Inline
Abstract marker class for inline (intra-paragraph) content: runs of text, emphasis, links, and so on. Inline instances live inside Block.inlines slots. v1.0.0…
Inlines
The ordered inline content of a block (Heading, Paragraph).
Integer Scalar
An integer leaf value. Serialized as a bare numeric literal by all backends (no quoting). Used for fields like an agent's `maxTurns`.
Integer Value
The numeric value of an IntegerScalar.
Items
The ordered elements of a StructuredList.
JSON
A JSON value (serialized as text). Backends may pretty-print or pass through depending on target format.
JSON-encoded
Emit as a JSON string literal. Produces a double-quoted, fully escaped value suitable for any JSON backend.
Key
The string key of a StructuredEntry.
Level
Heading depth, starting at 1. Markdown `# H1` is level 1, `## H2` is level 2, and so on.
Link Label
Optional display text for the link. When absent, backends fall back to a label derived from the target's `rdfs.label`, `rdfs.comment`, or local name —…
Link Tooltip
Optional hover-text for the link. HTML backends emit this as the anchor's `title=` attribute; Markdown backends emit it as the optional title slot of the link…
Markdown
CommonMark-flavored markdown. HTML backends run this content through a markdown renderer; Markdown backends emit it verbatim.
Media Type
A named IANA media type (MIME type). Used on RawBlock instances to tell backends how to interpret the raw content. Modeled as a named-instance vocabulary…
Media Type
The media type of the sibling `rawContent`. Backends dispatch on this URI: HTML backend runs `text/markdown` content through a markdown renderer, passes…
Metadata
The document's structured metadata channel. Backends that support key-value output (YAML frontmatter, TOML, JSON) serialize this channel. Narrative-only…
MIME Type
The canonical IANA MIME type string for this MediaType instance (e.g. "text/markdown", "text/html", "application/json"). Useful for interop with systems that…
Paragraph
A block of flowing text. Contains inline content in `inlines`. Markdown backends emit the inlines as a line followed by a blank line; HTML backends wrap in…
Plain Text
Unformatted text. Backends should emit without interpretation (but with format-appropriate escaping, e.g., HTML entity encoding).
Property Entries
The ordered list of (key, value) rows in this PropertyList. Order is significant and preserved through serialization.
Property Entry
One row in a PropertyList: a `propertyKey` (the row's label) and a `propertyValue` (the row's content, which is itself a list of Inline and/or Block nodes —…
Property Key
The string key (label) of a PropertyEntry. Rendered as `<dt>` in HTML, bold prefix in Markdown.
Property List
A block-level definition-list: an ordered sequence of (key, value) rows where each value can mix inline content (text, ResourceLinks) and nested blocks…
Property Tooltip
Optional hover-text for the property key — displayed on the `<dt>` in HTML backends. Conventionally populated by the universal renderer with the predicate's…
Property Value
The value of a PropertyEntry. List-valued — accepts a sequence of Inline nodes (Text, ResourceLink) and/or Block nodes (nested PropertyList, RawBlock, etc.).…
Raw
Emit the value verbatim, with no escaping. Unsafe if the value contains format-significant characters. Used today by SkillTransformer for the `description`…
Raw Block
A block of pre-formatted content in a declared media type. Borrowed from Pandoc's AST. Use for content that is already in a specific format (e.g., a…
Raw Content
The raw, pre-formatted content string of a RawBlock. Interpreted by backends according to the sibling `mediaType` property.
Resource Link
A clickable link to another Kanonak resource. `target` carries the resource being linked to (an ObjectProperty value at the transformation level resolves to a…
String Scalar
A string leaf value. Carries the raw unescaped string in `stringValue`. The containing StructuredEntry's `escapeHint` controls how backends serialize it.
String Value
The raw unescaped characters of a StringScalar. Backends apply per-EscapeHint escaping at serialization time.
Structured Entry
One key-value pair inside a StructuredMap. The optional `escapeHint` property tells each backend how to serialize the value — raw, YAML-safe scalar, TOML…
Structured List
An ordered collection of StructuredValues. Used for array-valued metadata fields (e.g., an agent's `tools` list). Backends serialize this as a YAML flow…
Structured Map
An ordered key-value collection. Entry order is significant and is preserved from the author's specification through to the output file. Backends that produce…
Structured Value
Abstract marker class for key-value / list / scalar data. Subclassed by StructuredMap, StructuredList, StringScalar, and IntegerScalar. Used for…
SVG
An SVG (Scalable Vector Graphics) fragment. Because SVG is valid inline HTML5, the HTML backend embeds it verbatim (trusted passthrough, same policy as…
Table
Tabular layout. `tableColumnLabels` is the ordered list of column header strings (the first label is conventionally an empty string when the leftmost column…
Table Cells
Ordered list of cell contents. List-valued; range is `rdfs.Resource` to permit the polymorphic Inline/Block mix (same convention as…
Table Column Labels
Ordered list of column header strings. The number of entries sets the table's column count.
Table Row
One row in a Table. `tableCells` is the ordered list of cell contents — each cell may be any Inline (Text, ResourceLink) or Block (nested PropertyList,…
Table Rows
Ordered list of TableRow entries.
Target
The resource being linked to. Backends serialize this as the target's canonical URI (publisher/package@version/name). Required.
Text
A run of plain text. Carries no formatting of its own. Backends may apply format-specific escaping (HTML entity encoding, etc.) when serializing.
Text
The raw character data of a Text inline.
TOML Multiline String
Emit as a TOML multiline basic string: triple-double-quoted, with embedded `"""` sequences escaped. Used today for the agent `developer_instructions` TOML key,…
TOML Single-line String
Emit as a TOML basic string: double-quoted with backslash escaping for quotes, backslashes, and newlines. Used today for TOML keys like `name`, `description`,…
Value
The value of a StructuredEntry. May be a scalar, list, or nested map.
YAML
A YAML document. Useful for embedding configuration snippets inside generated documentation.
YAML-safe Scalar
Emit as a YAML scalar, double-quoting and escaping if the value contains any YAML flow indicators (colon, hash, brackets, quotes, etc.), or as a block literal…