TypeScript frontmatter consumers on markdown-util
Status: open/planned
Bring the TypeScript frontmatter splitters onto markdown-util’s unified framing
(D-4QGN-markdown-dialect-and-compatibility-profile item 5), so the fleet has
one framing behavior across languages and no parallel TypeScript reimplementation
of the split. The Rust splitters converge in
M-6TQL-markdown-util-extraction; this milestone is the TypeScript half, kept
separate because it crosses a language boundary and can move on its own schedule.
Two stages. First, a corpus-matched TypeScript port reaches the unified framing
without waiting on WASM: apps/sdlc/lib/util/frontmatter.ts and its ports
(packages/ts/agent-plugin/frontmatter.ts, site-builder, the vault-graph path
over markdown-contract) align their fence, BOM, and whitespace handling to the
shared conformance corpus from M-6TQL-markdown-util-extraction. Second, once
the WASM surface ships (M-F4RZ-wasm-ts-distribution), those consumers swap onto
compiled markdown-util and delete the hand-written split — one source of truth,
in Rust.
frontmatter.ts is the load-bearing one: it fans out across the sdlc lib and
skills and deliberately absorbs a trailing blank line into its close fence, so its
migration is the change to watch — the corpus makes the before/after explicit and
every downstream consumer stays green.
Success criteria
Section titled “Success criteria”-
apps/sdlc/lib/util/frontmatter.tsand its ports pass the shared framing corpus (M-6TQL-markdown-util-extraction): BOM recognition, CRLF, and the trailing-blank-line fence behavior match the unified framing, with explicit before/after fixtures for anything that changes. - Every current
frontmatter.tsconsumer across the sdlc lib and skills stays green through the port migration. - After M-F4RZ-wasm-ts-distribution lands, the TypeScript splitters route
through compiled
markdown-utilover WASM and their hand-written split logic is deleted.
Deliverables
Section titled “Deliverables”- Corpus-matched TypeScript port of the frontmatter split, aligned to the unified framing.
- Migration of
frontmatter.tsand its ports onto it, each deleting drifted private fence/whitespace logic. - WASM-backed replacement of the TypeScript split once M-F4RZ-wasm-ts-distribution provides the surface.
Out of scope
Section titled “Out of scope”- Extraction of
markdown-utiland the Rust splitter convergence (M-6TQL-markdown-util-extraction). - Building the WASM surface itself — M-F4RZ-wasm-ts-distribution owns it; this milestone consumes it.
- Link identity and malformed-input policy — still open in D-4QGN-markdown-dialect-and-compatibility-profile.