Markdown Output Prompt — Lock the Document Structure
The contract that stops AI documents from restructuring themselves: a pinned section skeleton, forced tables, and strict consistency rules.
Every entry a "## Question?" heading with a self-contained answer — FAQs grouped by topic, phrased the way users actually ask.
FAQs fail when they're written from the company's perspective: headings nobody would type, answers that reference other answers. This setup generates FAQ pages with the format forced at the type level — every entry is a "## Question?" heading phrased exactly as a user would ask it, followed by a self-contained answer with no "see above" — organized into topic sections (General, Getting Started, Troubleshooting, Billing & Plans). Code blocks are allowed for the how-do-I questions that need them.
Feed the question themes
List the questions (or ticket patterns) below the prompt; the page comes back grouped and formatted.
Check the question phrasing
"Phrase each heading exactly as a user would ask it" — headings users would type are headings search engines reward.
Enforce self-containment
No "see above" means every answer survives being deep-linked — which is how FAQ answers are actually consumed.
The prompt fixes exactly four sections, General, Getting Started, Troubleshooting, and Billing & Plans, in that order, and the CONSISTENCY RULES tell the model to put extra material inside the closest existing section rather than add new top-level headings. To change that taxonomy you edit the DOCUMENT STRUCTURE block before generating; the result is markdown you publish yourself.
The DOCUMENT rules ban "see above" so every answer survives being deep-linked in isolation. FAQ entries are consumed one at a time from search, so an answer leaning on a neighbour breaks when landed on directly. The markdown-output-builder enforces this in the generated markdown; you still review that each answer actually stands alone before shipping.
No tables. The TABLE RULES require comparisons as nested bullet lists instead, and the MARKDOWN RULES forbid HTML tags entirely. Code is allowed: the CODE RULES permit fenced code blocks with a language tag. The markdown-output-builder returns the raw document starting at the "# " title with no code-fence wrapper, per the OUTPUT RULES, ready to paste into your docs.
The contract that stops AI documents from restructuring themselves: a pinned section skeleton, forced tables, and strict consistency rules.
Overview, Installation, Usage, Examples, Configuration — the README skeleton with required, runnable code examples.
Overview, Authentication, Endpoints, Error Handling, Rate Limits — endpoint docs in an identical structure, with parameter tables and runnable examples forced.
Summary, Why It Matters, What Happens Next — the executive summary contract for readers who will never open the source.
Stop getting 'Sure, here is the JSON…' — the output-contract pattern that forces models to return only parseable JSON: schema, example, and a strict rule block.
The JSON won't parse and you can't see why. Deterministic cause-sniffing — trailing commas, single quotes, unclosed brackets — and the repair prompt that fixes it.
Build prompts that produce documents in a fixed structure — headings, sections, and tables.