Engineering Markdown Output Validation

Validate Markdown Structure

Heading scan against the skeleton: missing sections, broken order, absent title — the README that shipped without its Examples.

Overview

Generated documents erode structurally: a section gets dropped, another swaps position, and the document still looks fine at a glance. This setup validates a README against its five-section skeleton and catches the two most common drops — Installation and Examples, the sections readers actually came for. The heading scan is real markdown parsing of #/##/### lines with order checking; the repair prompt restores the missing sections without touching the ones that survived.

How to use this resource

  1. Paste skeleton and document

    The expected sections in order; the generated markdown raw — heading scan does the rest.

  2. Read the missing-section fails

    Installation and Examples are the sections users need most — and the ones models drop first.

  3. Repair into the same document

    The repair prompt adds what's missing and keeps every surviving section verbatim.

Why This Works

  • A heading scan beats eyeballing for documents over a screen long
  • Order checking catches restructuring that presence checks miss
  • Severity weighting puts dropped sections above cosmetic issues

Best for

  • Doc generation pipelines with fixed skeletons
  • Repos generating READMEs at scale
  • Anyone whose generated docs "look complete"

Not for

  • Defining the document skeleton — that's the Markdown Output Builder
  • Reviewing the prose quality — structure validation, not editing

Use cases

  • Checking generated READMEs kept all five sections
  • Verifying docs pages before they merge
  • Catching the dropped section a reviewer would miss

FAQ

How does this catch a section that quietly got dropped from a generated README?

The AI Output Validator does a real heading scan of the #/##/### lines and checks them against the expected skeleton in order — in the loaded example it flags "Missing section: Installation" and "Missing section: Examples," the two sections readers came for. Order checking also catches a section that swapped position. It surfaces structural gaps; it doesn't review the prose quality, and it can't guarantee catching every content problem.

Will fixing the missing sections rewrite the parts that were already fine?

Surviving sections stay untouched: the REPAIR TASK returns only the corrected markdown under the rules "Keep everything that was already correct unchanged" and "Fix only the problems listed above," so untouched sections travel verbatim while Installation and Examples get restored. You run that repair prompt in your own assistant; the validator produces it but doesn't regenerate the document itself.

More resources from AI Output Validator

Resources that pair well

Related tools

Workflows that use this resource

Guides for this resource

Tip: Save time by exploring related resources and tools that integrate with this resource.