T-N19Y-fix-stale-body-schema-doc-claims
Status: closed/done · Impact: medium · Complexity: small
After the markdown-contract adoption, the entity body artifact is the
contract(...) in each <type>/schema.ts, and the bespoke validator and the 11
body-schema.yaml manifests are deleted. But prose docs still cite those deleted
artifacts as live, which misleads anyone reading the entity definitions or the
plugin README. This task corrects the stale claims to point at schema.ts / the
contract.
The stale citations the audit surfaced:
| Location | Stale claim |
|---|---|
plugin/.../entities/task/definition.md (lines 68, 72) | names body-schema.yaml as the authoritative body spec |
plugin/.../entities/backlog/definition.md (line 50) | names body-schema.yaml |
plugin/.../entities/capability/definition.md (line 70) | names body-schema.yaml |
plugin/.../entities/decision/definition.md (line 72) | names body-schema.yaml |
plugin/.../entities/driver/definition.md (line 63) | names body-schema.yaml |
plugin/.../entities/milestone/definition.md (line 80) | names body-schema.yaml |
plugin/.../entities/principle/definition.md (line 75) | names body-schema.yaml |
plugin/.../entities/product/definition.md (line 63) | names body-schema.yaml |
plugin/.../entities/reference/definition.md (line 61) | names body-schema.yaml |
plugin/.../entities/standard/definition.md (line 70) | names body-schema.yaml |
plugin/.../entities/term/definition.md (line 63) | names body-schema.yaml |
README.md (lines 42-46) | claims each entity dir holds schema.json + body-template.md and that enforcement is via plugin/validators/validate_frontmatter.ts (all deleted; templates are .eta) |
plugin/cli/backlog_cli/README.md (line 47) | cites the deleted validate_frontmatter.ts |
plugin/conventions/schema-bump-checklist.md (line 61) | cites the deleted validate_frontmatter.ts |
| Location | Role today |
|---|---|
plugin/lib/model/entities/*/definition.md | 11 files name body-schema.yaml as the body spec; the live artifact is the contract(...) in <type>/schema.ts |
README.md | Claims entity dirs hold schema.json + body-template.md and that enforcement is via plugin/validators/validate_frontmatter.ts (~40-47) — all deleted; templates are .eta |
plugin/cli/backlog_cli/README.md | Cites the deleted validate_frontmatter.ts (line 47) |
plugin/conventions/schema-bump-checklist.md | Cites the deleted validate_frontmatter.ts (line 61) |
Approach
Section titled “Approach”Correct the stale prose to point at the contract in <type>/schema.ts. No code
changes.
- Rewrite the body-spec line in all 11 entity
definition.mdfiles to name thecontract(...)inschema.tsinstead ofbody-schema.yaml. - Fix
README.md(~40-47): drop the per-dirschema.json/body-template.mdclaim and thevalidate_frontmatter.tsenforcement line; state the.etatemplates and the contract-based validation path. - Fix the two checklist citations off
validate_frontmatter.ts(backlog_cli/README.md:47,schema-bump-checklist.md:61). - Grep
body-schema.yamlandvalidate_frontmatteracrossplugin/andREADME.mdto catch references beyond this list. The grep also surfacesplugin/lib/model/entities/_contracts.tsandproduct/body-template.eta— confirm whether those are live claims (fix) or historical notes (leave). - Re-run
sdlc docs generateif an edited file is a generator source.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
plugin/lib/model/entities/*/definition.md | modify | 11 files: repoint the body-spec line from body-schema.yaml to the contract(...) in schema.ts |
README.md | modify | Drop the schema.json / body-template.md / validate_frontmatter.ts claims (~40-47); name the .eta templates and contract validation |
plugin/cli/backlog_cli/README.md | modify | Drop the validate_frontmatter.ts citation (line 47) |
plugin/conventions/schema-bump-checklist.md | modify | Drop the validate_frontmatter.ts citation (line 61) |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: Each of the 11 entity
definition.mdfiles no longer namesbody-schema.yamlas the body spec; the claim points at the contract in<type>/schema.ts. - AC-2:
README.md:42-46is corrected — it no longer claimsschema.json+body-template.mdper dir or enforcement viaplugin/validators/validate_frontmatter.ts; it reflects the.etatemplates and the contract-based validation path. - AC-3:
plugin/cli/backlog_cli/README.md:47andplugin/conventions/schema-bump-checklist.md:61no longer cite the deletedvalidate_frontmatter.ts. - AC-4: If any corrected file is a generator source,
sdlc docs generateis re-run so the generated docs stay in sync.
Out of scope
Section titled “Out of scope”- Historical decision records under
docs/planning/decisions/that mentionbody-schema.yaml— D-0004 reconciliation is covered by its own cleanup task.