markdown-util tier-0 extraction
Status: closed/done · Version: 0.5.1
Carve the std-only frontmatter split/recompose core out of determined-vault’s
frontmatter.rs — split, compose, and the NoteShape / Split fidelity
types — into the tier-0 markdown-util crate named by
D-7VMX-markdown-ecosystem-strategy, then bring the repo’s divergent Rust
frontmatter splitters onto it and onto one framing (the TypeScript consumers get
their own milestone). One milestone covers both: the
carve-out is mechanical and byte-for-byte behavior-preserving for the eight
determined-* crates (same shape as yaml-splice); the convergence is what gives
markdown-util its point — one copy, one framing, no accidental divergence.
The crate is already pure — byte scan, no regex, BOM/CRLF/offset-preserving,
depends on nothing but std — so extraction is mechanical, and its framing
contract is owned by D-4QGN-markdown-dialect-and-compatibility-profile item 5
(one normative framing every consumer targets), so this needs no decision doc of
its own. Independent of the CST (M-C6XN-lossless-cst-core consumes it) and of
yaml-splice (M-2VYE-yaml-splice-extraction-and-writer-migrations); the two
extractions pull different parts of determined-vault and land in parallel.
Convergence is an intentional, corpus-verified behavior change, not an accident —
the Rust splitters that trim framing away today diverge by mistake.
vaultpolish-core’s extract_frontmatter and the sdlc desktop reader only read
parsed values, so they switch for free; apps/ontological-legacy’s split_frontmatter
trims the body, so its migration is the one to watch. The TypeScript consumers
reach the same framing in their own milestone
(M-D3KP-typescript-frontmatter-on-markdown-util) — a language boundary this one
doesn’t cross. The shared corpus proves each consumer reaches the unified framing
rather than freezing today’s trimming.
Success criteria
Section titled “Success criteria”-
markdown-utilexists at tier 0, depending on nothing butstd, holding the byte-exact frontmatter split/compose and theNoteShape/Splitfidelity types carved fromdetermined-vault. -
determined-vaultre-exports them; its eight sibling consumer crates (determined-notes,-contracts,-backup,-engine-client,-polish,-media,-ocr,-photos) stay green with no behavior change. - The framing fixtures from D-4QGN’s corpus scope (BOM, CRLF, empty/malformed
blocks, byte offsets, round-trip identity) run against
markdown-util. - Every Rust splitter converges onto
markdown-util’s framing, each corpus-verified:apps/ontological-legacy’ssplit_frontmatterandvaultpolish-core’sextract_frontmatterdrop their trimming, and the sdlc desktop reader switches. - The behavior-sensitive Rust migration — ontological’s body handling — carries explicit before/after fixtures, so the intended change is visible and no consumer breaks silently.
Deliverables
Section titled “Deliverables”-
markdown-utilcrate — unpublished until the derived-library promotion bar is met. - Compatibility re-exports in
determined-vault, keeping the current public paths byte-identical. - Shared framing conformance corpus, run against
markdown-utiland against each migrated consumer. - Each Rust splitter (ontological, vaultpolish-core, sdlc desktop) migrated onto the unified framing, with its bespoke trim/fence logic deleted.
Out of scope
Section titled “Out of scope”- Link identity (case sensitivity, suffix resolution, ambiguity) and malformed-input policy — separately contested, still open in D-4QGN-markdown-dialect-and-compatibility-profile.
- YAML value editing (M-2VYE-yaml-splice-extraction-and-writer-migrations).
- Markdown fence/lexing helpers beyond frontmatter split — later tier-0 additions, folded in once a consumer demands them, not speculated now.
- TypeScript consumption of the unified framing — its own milestone (M-D3KP-typescript-frontmatter-on-markdown-util), covering the corpus-matched port and the eventual WASM swap (M-F4RZ-wasm-ts-distribution).