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.
| Location | Role today |
|---|---|
.claude/skills/project-check/check_entities.ts | Entity 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#parseOperationsTable | The shared capability that already parses a definition’s ## Operations table into Operation[] |
plugin/lib/util/frontmatter.ts | The intended shared frontmatter extractor |
Proposed
Section titled “Proposed”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.
Approach
Section titled “Approach”- Replace
readOperationsHeaderCellswith a call to the sharedparseOperationsTable, reading the header cells fromOperation.columns; delete the mirrored scan. - Replace the local
FRONTMATTER_REextraction withutil/frontmatter’sextractFrontmatter/parseFrontmatter. - Keep
FIELD_REF_RE/STATUS_REF_RE(the`field:`/ status prose-citation scans) as-is — they are not a markdown-structure parse. - Run
project-check-entitiesover the entity definitions; confirm identical OK / WARN / FAIL output, including the legacy-3-col Operations-table WARN.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
.claude/skills/project-check/check_entities.ts | modify | Replace the local FRONTMATTER_RE + readOperationsHeaderCells with the shared util/frontmatter extractor and parseOperationsTable; keep the field / status prose scans |
.claude/skills/project-check/tests/ | modify | Confirm/extend the check’s tests over the shared backing |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
check_entities.tsno longer declares a privateFRONTMATTER_REor areadOperationsHeaderCellsmirror; it consumesutil/frontmatterandparseOperationsTable. - AC-2:
project-check-entitiesproduces 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 ./.claudepasses.
Out of scope
Section titled “Out of scope”- Reimplementing
parseOperationsTableitself 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_REprose-citation scans — not markdown-structure parsing; they stay.
Dependencies
Section titled “Dependencies”- 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.
Post-mortem
Section titled “Post-mortem”Captured by /sdlc:task-work on 2026-06-30. PR: pending.
Acceptance criteria coverage
Section titled “Acceptance criteria coverage”TBD — filled at Step 8.
What worked
Section titled “What worked”TBD — filled at Step 8.
Friction and automation gaps
Section titled “Friction and automation gaps”TBD — filled at Step 8.