Repair one synthetic MDX file at a time.
- Read the frontmatter contract.
- Run
node scripts/repair-frontmatter.mjs --file <path>. - Only repair rules proven by the receipts:
- title from the first H1
- description from the opening paragraph’s first sentence
- invalid
sidebar.orderto999
- Preserve the body verbatim.
- Leave already-valid files unchanged.
- If the file contains private transcript material or secret markers, stop and escalate instead of repairing.