Skip to content

Rewire entities validate, audit, and authoring onto the contracts

Status: closed/done · Impact: high · Complexity: large

With the consolidated contracts in place, make them the live validator: rewire entities validate, entities audit, and scaffold-time authoring to validate through contractForType(type) instead of the bespoke frontmatter/body paths. The user-facing CLI output contract (markers and exit codes) must stay byte-stable so the skills that parse it keep working.

  • ops/validate.ts validates via contractForType(type).validate(...), rendering findings to the existing OK/FAIL surface with per-error lines and exit codes preserved.
  • ops/audit.ts validates via one contract call; frontmatter/* findings are serious (exit 1), structure/*/content/* informational (exit 0).
  • authoring.ts performs scaffold-time validation through the contract.
  • Frontmatter coercion is dropped; raw YAML is parsed and the .base path is left untouched.
  • The validate/audit op suites and affected fixtures are updated to the finding surface and pass; the task-define AC-scan consumer still works.
  • Deleting the now-dead bespoke validator, AJV renderer, and body-schema.yaml manifests — that is the retire follow-on.

← Back to Tasks