Skip to content

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.rssplit, 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.

  • markdown-util exists at tier 0, depending on nothing but std, holding the byte-exact frontmatter split/compose and the NoteShape/Split fidelity types carved from determined-vault.
  • determined-vault re-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’s split_frontmatter and vaultpolish-core’s extract_frontmatter drop 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.
  • markdown-util crate — 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-util and against each migrated consumer.
  • Each Rust splitter (ontological, vaultpolish-core, sdlc desktop) migrated onto the unified framing, with its bespoke trim/fence logic deleted.

← Back to Milestones