SW-PAR-001: Goldmark-based markdown parser
#
- Package
- parser
- Priority
- Critical
- Status
- approved
The parser package shall use goldmark to walk the Markdown AST, extracting requirement IDs from headings and YAML attributes from fenced ```attr ``` blocks. The package shall also extract YAML frontmatter from .md files, with first-file-wins merge semantics across files in the same document directory, and parse files in parallel via a worker pool sized to runtime.NumCPU() with deterministic (file-order) result merging. Heading structure, parent chains, and content capture are defined in SW-PAR-002.
goldmark provides a battle-tested CommonMark AST. Deterministic merge ordering keeps output stable regardless of goroutine scheduling. Content-tree semantics live in SW-PAR-002.