Skip to content

T-MW8E-mc-collapse-operations-table-parsers

Status: closed/done · Impact: medium · Complexity: medium

Two places hand-roll a ## Operations section walk plus pipe-splitting and must “agree on what counts as the Operations table”:

  • plugin/lib/model/entity.ts:466 parseOperationsTable (plus its splitRow helper at plugin/lib/model/entity.ts:531).
  • .claude/skills/project-check/check_entities.ts:251 readOperationsHeaderCells, which “Mirrors parseOperationsTable’s section-and-table scan” and feeds the Operations-table column-drift warning (checkOperationsTableShape).

Model the ## Operations section as a table(...) in each definition’s contract (or a shared spec) and read typed rows from the projection, deleting both hand-rolled walkers so there is one source of truth for the Operations table. This can use the existing table() content leaf and projection; it benefits from but does not strictly require W1.

  • AC-1: The ## Operations section is modeled as a table(...) contract (per-definition or a shared spec), and both entity.ts and check_entities.ts read typed Operations rows from the projection — one source of truth.
  • AC-2: parseOperationsTable + splitRow in entity.ts and readOperationsHeaderCells in check_entities.ts are removed (no second hand-rolled ## Operations walk + pipe-split remains).
  • AC-3: The existing Operations-table drift warning behavior is preserved — checkOperationsTableShape still flags the same legacy-header / column-drift cases and still treats absence (no ## Operations table) as not-drift; the project-check and entity tests stay green.

← Back to Tasks