Skip to content

T-E2B1-site-data-model-page-generated

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

Kill the drift class in the site’s hand-written Data model page: its entity count and tables derive from the PREFIXES registry and the entity schemas, per D-0009-reference-entity-and-docs-appendix §5. The page opens with “nine entity types” today — already false at ten, falser at eleven.

LocationRole today
site/src/content/docs/architecture/data-model.mdHand-written; hardcoded count, hand-maintained identity and roster tables
plugin/lib/model/identifier.tsPREFIXES — authoritative prefix/numbering registry
plugin/lib/model/entities/Per-type schema.json descriptions + properties; _common.json shared fields
plugin/lib/services/docs/site.tsThe generator pass the page joins

data-model.md is generated in docs generate site: static narrative blocks (schema layout, identity rationale, relationships diagram, task-status walk) + identity table from PREFIXES + roster table (Type / Role / Key fields beyond _common) from the schemas + a derived type count; AUTO-GENERATED banner; writeIfChanged idempotency.

  1. regenDataModelPage in site.ts: walk plugin/lib/model/entities/*/schema.json, derive each type’s role (description first sentence) and its properties minus _common.json’s; identity table rows from PREFIXES (Type / Prefix / Numbering / Wikilink shape); count computed.
  2. Static narrative preserved from the current page where still true; the relationships diagram stays a static block (design intent no schema carries).
  3. Content-parity check against the hand-written page before replacing it.
  4. Tests: one roster row per shipped type, derived count, idempotency.
LocationKindChange
plugin/lib/services/docs/site.tsmodifyregenDataModelPage + dry-run inventory row
site/src/content/docs/architecture/data-model.mdmodifyBecomes generated output (banner, derived tables)
plugin/lib/services/docs/tests/generate_site.test.tsmodifyData-model coverage
  • AC-1: The generated page carries the AUTO-GENERATED banner and a derived type count that matches plugin/lib/model/entities/*/schema.json (eleven once T-UE7T ships).
  • AC-2: A hand-edit to the page is reverted by sdlc docs generate site (writeIfChanged).
  • AC-3: Roster and identity tables list every shipped type with its prefix and key fields; tests pin this.
  • AC-4: npm --prefix site run build is green.
  • Generating the other hand-written architecture pages — they stay under /dev-update-docs semantic review.
  • T-UE7T — the RF row must exist so the first generated roster is complete (no churn one phase later).

T-UE7T


← Back to Tasks