Skip to content
Frontmatter Reference
AutoXXS (320px)XS (375px)SM (640px)MD (768px)LG (1024px)XL (1280px)XXL (1536px)
SketchMaterialiOSTamagui
DataInjectionKeyPatternsServiceTransactionProcessResearchProductQualityPerformanceSpecDomainFunctionTechnologyArchitectureConfigMiddlewareDataDatabaseDrizzleMigrationModelop-sqliteSchemaSQLState ManagementDraftKeystoneMergePatchPatchesPersistenceReactiveRedoStoreUndoTestingDeviceFactoryIsolationTypeScriptZodTopicsCommunicationBidsNVCDesignDesign ImplicationsEducationPedagogyFoundationsPsychologyAttachmentFloodingRelatingAuthentic RelatingUIEditorReact Native

Frontmatter Reference

Fragment reference Frontmatter Reference
tags
referenceagent

Every .mdoc document begins with a YAML frontmatter block. All fields are written at the top level of the file, before any Markdoc tags.

FieldRequiredPurpose
typeyesDocument category: role, domain, feature, flow, story, milestone, manifest, blueprint
idyesUnqualified identifier in kebab-case β€” e.g. add-bookmark for feature/add-bookmark
domainnoUnqualified domain id (e.g. bookmark). Groups the document under a domain group in the sidebar.
titleyesHuman-readable display name shown in the sidebar and page heading
statusyesLifecycle stage: draft β†’ pending β†’ ready β†’ qa β†’ done
phasenoCurrent design phase number (features only)
tagsnoSpace-separated labels for filtering and grouping in the UI
contextnoList of qualified ids whose \{% tldr %\} blocks are injected as context when an agent reads this document β€” the primary mechanism for giving AI surrounding context
relatednoList of qualified ids rendered as β€œSee also” links in the sidebar

The qualified id of a document is always {type}/{id} β€” e.g. domain/auth, feature/add-bookmark. This is what appears in context, related, tag attributes, and get_document calls.

Surface-specific fields

Surface documents (.ui.mdoc) use the same base fields with these additions:

FieldRequiredNotes
typeyesAlways surface
statusyesdraft β†’ review β†’ ready