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.
Turn UI requirements and component needs into a design-system spec: a component inventory with states, variants, responsive behavior, accessibility requirements, microcopy rules, and developer handoff notes.
A UI built screen by screen fragments into one-off buttons and inconsistent spacing. This prompt specifies the component system instead: from the product's UI context and component needs it produces a design-system specification — design principles, a component inventory, each component's states and variants, responsive behavior, accessibility requirements, content and microcopy rules, token guidance, interaction patterns, do/do-not examples, and the notes a developer needs to implement it. It is a structured textual spec, honestly scoped: it does not write CSS or component code, generate visual mockups or Figma files, review source code, or explain existing code — it is the specification those activities work from. It covers the states, variants, and accessibility that generic technical documentation leaves out.
Inventory before styling
A component inventory with a single responsibility each comes before any visual decision, so the system stays coherent.
Specify the hard parts
States, variants, responsive behavior, and accessibility — the places consistency breaks — are specified per component.
Hand off, don't hand-wave
Microcopy rules, token guidance, and implementation notes give a developer a spec to build from, with open questions named.
It gives TOKEN GUIDANCE, the categories to define (color, spacing, type, radius, elevation) and how components consume them, not final values unless you provided them. A rule explicitly refuses to write CSS, component code, or token values that weren't provided. The markdown-output-builder returns a textual spec; a developer implements the code and values from the IMPLEMENTATION HANDOFF NOTES.
Unresolved decisions go into section 12, OPEN QUESTIONS, rather than the model silently picking one. For inputs you lack you write "not specified" and the constraint is noted instead of guessed. COMPONENT STATES (default, hover, focus, active, disabled, loading, error, empty) is still specified per component, so ambiguity stays isolated to what you flagged, which you resolve before building.
The per-component hard parts: COMPONENT STATES, VARIANTS & RESPONSIVE BEHAVIOR, and ACCESSIBILITY REQUIREMENTS (keyboard interaction, focus order, ARIA roles, contrast, target sizes), the places consistency breaks that generic docs skip. It adds DO / DO-NOT EXAMPLES for the highest-risk components. It is a textual spec from markdown-output-builder, not a code review or a visual mockup.
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.
The full path to a business website that holds together — plan the content, structure the site, design the components, write the page copy, then ship it as one coherent whole.
The full path to a booking and reservation system — model resources, availability, and reservations, design the booking API, set customer accounts, wire calendar and notification integrations, design the UI, review security, then ship.
The full path to an inventory management system — model products, stock, locations, and movements, design the inventory API, set roles, plan supplier and POS integrations, design the UI, review data-integrity risks, then ship.
The full path to an internal admin panel — model the operational data it manages, design the management API, define RBAC and admin permissions, design the tables and forms, review risky admin actions, then ship to trusted internal users.
The full path to a two-sided platform — define the buyer-and-seller requirements, model the data, design the API, build roles and permissions, wire integrations, design the UI, then test, secure, and ship it.
The full path to a CRM that fits your sales process — define the contacts, deals, and pipeline, model the data that ties them together, then build the roles, integrations, and pipeline UI, and ship.
The full path to a store you own end to end — model the catalog and orders, design the storefront and checkout, add customer accounts and payments, then secure it, test it, and ship.
Structure a UI so it stays consistent as it grows — inventory the screens, break them into reusable components, specify the component system and its rules, then review the structure for drift.