Skip to main content

Module frontmatter

Module frontmatter 

Source
Expand description

Frontmatter parsing and canonical serialization.

Files are ----fenced YAML followed by a markdown body. Unlike the original Python tool — which hand-parsed a “constrained” flat YAML — this uses a real YAML parser (serde_norway), so custom fields may carry nested mappings, sequences, and multiline/block scalars. The serializer still emits canonical, minimal frontmatter (core fields first, then remaining keys alphabetically), formatting flat scalars and scalar lists inline and falling back to block YAML for complex custom values.

Structs§

Frontmatter
Parsed frontmatter, retaining the full YAML mapping so verify can inspect wrong-typed values (rather than failing to parse them).
ParseError
A frontmatter parse failure, carrying a human-readable message.

Constants§

RESERVED_FIELDS
Feature field keys with first-class meaning; everything else is a declared custom field (or rejected by verify). references is the uniform ID->title map linking to other features and work items; blocked_by / blocks are the directional blocker-relation maps (see refs.rs).
WI_RESERVED_FIELDS
Work-item reserved field keys. Work items share id/status/tags/ created/updated/references/blocked_by/blocks with features and add blocked_reason.

Functions§

parse
Split a file into (frontmatter, body), then parse the frontmatter as YAML.
serialize
Serialize frontmatter + body back into a complete file.