Skip to content

T-G93C-mc-migrate-scan-placeholders

Status: planning/backlog · Impact: medium · Complexity: small

Two placeholder scanners still carry their own complete markdown parsers — the last hand-rolled markdown walks in the repo. Once W1 (T-2YLD-mc-structured-cells-upstream) ships position-preserving inline-code spans, both migrate onto the parse() projection plus the new inline-span overlay, deleting the bespoke walks:

  • plugin/lib/model/entities/task/ops/scan-placeholders.ts — its own FRONTMATTER_RE (:27), H2_RE (:28), FENCE_RE (:29), and TABLE_ROW_RE / TABLE_SEP_RE (:30-31), plus the inline-code masking that blanks spans before the placeholder regex runs.
  • plugin/skills/task-ensure-ready/scan_corpus_assumptions.ts — its near-identical twin (FRONTMATTER_RE ~:54, H2_RE ~:55, FENCE_RE ~:56, INLINE_CODE_RE ~:61, and the same fenced/inline masking + required-section walk).

Both lean on the W1 inline-span overlay to mask inline code, so neither needs to re-tokenize the document. The behavior they protect is byte-pinned placeholder detection, so the migration must keep detection results identical.

  • AC-1: scan-placeholders.ts reads the document via the parse() projection and masks inline code via the W1 inline-span overlay; its bespoke FRONTMATTER_RE / H2_RE / FENCE_RE / TABLE_*_RE walk and its hand-rolled inline-code masking are deleted.
  • AC-2: scan_corpus_assumptions.ts is migrated the same way; its FRONTMATTER_RE / H2_RE / FENCE_RE / INLINE_CODE_RE walk is deleted — no hand-rolled markdown parser remains in either file.
  • AC-3: Byte-pinned placeholder detection and inline-code masking are preserved (a `...` span is not a placeholder signal; fenced code is ignored); the scan-placeholders and scan-corpus-assumptions tests stay green.

T-2YLD-mc-structured-cells-upstream


← Back to Tasks