Skip to content

Frontmatter

SFMD documents MAY begin with a YAML frontmatter block.


---
key: value
---
  • Starts with a line containing exactly ---
  • Ends with a line containing exactly ---
  • MUST appear at the very beginning of the file (line 1)
  • Content between delimiters is parsed as YAML

FieldTypeDescription
titlestringDocument title
descriptionstringBrief summary of the document
authorstringAuthor name or identifier
tagslistCategorization tags
versionstringDocument version

All fields are optional. Additional fields MAY be included.


These fields are defined by the String runtime. They are valid SFMD frontmatter but have no effect in a plain CommonMark viewer.

FieldTypeDescription
namestringApp or tool name (fallback: filename)
defaultstringAction to run on open (act.{value})
categorystringapp or tool — for registry classification
envlistRequired environment variables

Declares environment variables the document requires at runtime. Each entry has a name, description, and optional default:

env:
- API_KEY: "Service API key"
- LANG: "Output language"
default: en

Variables without default are required. The runtime validates them before executing actions and provides the description as a hint on error.


---
title: Weather Dashboard
description: Real-time weather for configured cities
tags: [weather, dashboard]
---
# Weather Dashboard
Content starts here.
---
name: weather
description: Real-time weather dashboard
default: get_weather
---
# Weather Dashboard
`/act.get_weather --city "{city}"`
---
name: translate
default: translate
env:
- DEEPL_KEY: "DeepL API key"
- TARGET_LANG: "Topic language code"
default: en
---

  1. If present, frontmatter MUST be the first thing in the file. No blank lines or content before the opening ---.
  2. YAML content MUST be valid YAML.
  3. Frontmatter is metadata — it is not rendered as document content.
  4. A document without frontmatter is valid SFMD.
  5. The closing --- MUST be on its own line.
  6. All standard and runtime fields are optional.
  7. Unknown fields are preserved but ignored by the runtime.