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.
Acceptance criteria
Section titled “Acceptance criteria”-
ops/validate.tsvalidates viacontractForType(type).validate(...), rendering findings to the existing OK/FAIL surface with per-error lines and exit codes preserved. -
ops/audit.tsvalidates via one contract call;frontmatter/*findings are serious (exit 1),structure/*/content/*informational (exit 0). -
authoring.tsperforms scaffold-time validation through the contract. - Frontmatter coercion is dropped; raw YAML is parsed and the
.basepath is left untouched. - The
validate/auditop suites and affected fixtures are updated to the finding surface and pass; thetask-defineAC-scan consumer still works.
Out of scope
Section titled “Out of scope”- Deleting the now-dead bespoke validator, AJV renderer, and body-schema.yaml manifests — that is the retire follow-on.