SYS-FMT-001: Markdown requirement format
#
- Priority
- Critical
- Status
- approved
Each requirement shall be authored as a Markdown heading of any level (e.g., #, ##, ###) followed immediately by a fenced ```attr ``` YAML block, then free-form prose. The heading text is the requirement ID; an optional human-readable title may follow the ID after a colon and space (e.g., ## REQ-001: Login requirement). The first heading+attr pair encountered in a document determines the requirement level (reqLevel). Headings at reqLevel with adjacent attr blocks are top-level requirements; headings at reqLevel+1 with adjacent attr blocks are sub-requirements automatically linked to the preceding reqLevel parent. An optional *Rationale:* paragraph may follow the prose statement.
Headings without an adjacent attr block are treated as body text, enabling section dividers and annotations between requirements.
Dynamic level discovery decouples requirement hierarchy from hardcoded heading depths, making documents easier to generate programmatically. The isNextAttrBlock lookahead provides a universal detection mechanism — a heading is a requirement iff its next AST sibling is an attr fence. Sub-requirements express V-model decomposition naturally via Markdown's native heading hierarchy.