Skip to content

T-4WR3-rebase-check-entities-markdown-reads-on-contract

Status: closed/done · Impact: low · Complexity: small

.claude/skills/project-check/check_entities.ts re-declares its own FRONTMATTER_RE and a readOperationsHeaderCells that mirrors entity.ts#parseOperationsTable, duplicating parsing the model layer already does through markdown-contract. Re-pointing its frontmatter read and its Operations-table read at the shared capabilities removes the duplication and keeps one parser for the ## Operations table.

LocationRole today
.claude/skills/project-check/check_entities.tsEntity schema↔prose consistency check; declares a local FRONTMATTER_RE and a readOperationsHeaderCells that mirrors parseOperationsTable’s section-and-table scan
plugin/lib/model/entity.ts#parseOperationsTableThe shared capability that already parses a definition’s ## Operations table into Operation[]
plugin/lib/util/frontmatter.tsThe intended shared frontmatter extractor

check_entities.ts reads the ## Operations header via the shared parseOperationsTable (its Operation.columns) and reads frontmatter via the shared util/frontmatter helper — not its own FRONTMATTER_RE / readOperationsHeaderCells. The check’s findings (field-name drift, status drift, Operations-column drift) are unchanged.

  1. Replace readOperationsHeaderCells with a call to the shared parseOperationsTable, reading the header cells from Operation.columns; delete the mirrored scan.
  2. Replace the local FRONTMATTER_RE extraction with util/frontmatter’s extractFrontmatter / parseFrontmatter.
  3. Keep FIELD_REF_RE / STATUS_REF_RE (the `field:` / status prose-citation scans) as-is — they are not a markdown-structure parse.
  4. Run project-check-entities over the entity definitions; confirm identical OK / WARN / FAIL output, including the legacy-3-col Operations-table WARN.
LocationKindChange
.claude/skills/project-check/check_entities.tsmodifyReplace the local FRONTMATTER_RE + readOperationsHeaderCells with the shared util/frontmatter extractor and parseOperationsTable; keep the field / status prose scans
.claude/skills/project-check/tests/modifyConfirm/extend the check’s tests over the shared backing
  • AC-1: check_entities.ts no longer declares a private FRONTMATTER_RE or a readOperationsHeaderCells mirror; it consumes util/frontmatter and parseOperationsTable.
  • AC-2: project-check-entities produces the same OK / WARN / FAIL lines as before for the current entity set, including the legacy-3-col Operations-table WARN.
  • AC-3: bun test ./.claude passes.
  • Reimplementing parseOperationsTable itself on markdown-contract — that is [T-ZGO4-rebase-parse-operations-table-on-markdown-contract](/planning/tasks/rebase-parse-operations-table-on-markdown-contract/); this task only consumes it.
  • The FIELD_REF_RE / STATUS_REF_RE prose-citation scans — not markdown-structure parsing; they stay.
  • None — works against the current parseOperationsTable. If [T-ZGO4-rebase-parse-operations-table-on-markdown-contract](/planning/tasks/rebase-parse-operations-table-on-markdown-contract/) lands first, no further change is needed here.

Captured by /sdlc:task-work on 2026-06-30. PR: pending.

TBD — filled at Step 8.

TBD — filled at Step 8.

TBD — filled at Step 8.


← Back to Tasks