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 product requirements and key entities into an ERD-ready schema spec: tables, fields, primary and foreign keys, relationships with cardinality, indexes, and constraints — with the modeling gaps named as open questions.
Schema design fails when structure runs ahead of requirements — tables nobody needed, many-to-many relationships discovered in production, foreign keys with no decided delete behavior. This prompt works the other way: it takes the product requirements, the known entities and workflows, and the constraints, and produces an ERD-ready textual specification — a domain model, an entity/table list, fields and types, relationships with explicit cardinality, primary and foreign keys with their on-delete behavior, access-pattern-driven indexes, constraints, data-lifecycle and privacy notes, and a diagram-ready relationship summary. It normalizes to 3NF by default and justifies any denormalization, traces every table and key back to a requirement, and refuses to guess where the requirements are silent — the unresolved modeling questions are named as open questions, not quietly decided. It is a design spec to review and turn into migrations, not a set of raw migrations and not a visual diagram.
Anchor to the requirements
Entities, keys, and relationships trace to stated requirements — the gaps become open questions, not guesses.
Model relationships explicitly
Every association gets a direction and a cardinality, and every many-to-many resolves to an explicit join table.
Make it ERD-ready
A diagram-ready relationship summary plus migration cautions, so the spec turns into tables and an ERD without rework.
Neither — it produces an ERD-ready textual specification. The instruction is "Do not draw a visual diagram; describe the relationships precisely enough that someone else could," and section 10 gives a diagram-ready relationship summary like "User 1—N Order." The notFor line sends production migrations elsewhere. It's a markdown design spec to review, then hand to whoever writes the migrations or draws the diagram.
It refuses to leave one implicit — section 4 requires "Resolve every many-to-many into an explicit join table," written as A —(N:M)— B with direction and meaning, e.g. "Order N—M Product via OrderItem." It normalizes to 3NF by default and justifies any denormalization. The prompt generates the spec; your team reviews the modeling before migrating.
It names the gap instead of guessing. The rule is "Where the requirements don't decide a modeling question, put it in Open Questions — don't quietly pick one," and section 11 collects every assumption and unresolved gap with the question that would settle each. So a foreign key with no decided on-delete behavior surfaces as an open question. You resolve those before turning the spec into migrations.
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 from idea to a shipped SaaS MVP — define and scope the requirements, design the architecture, API, and data model, then build it reviewed, tested, secured, cost-controlled, and deployed.
The full path to a backend you can put clients on — define the requirements, design the architecture, API contract, data model, and access control, then build it reviewed, tested, secured, and shipped.
The full path to an applicant tracking system — model jobs, candidates, and hiring stages, generate job descriptions and screening prompts, parse résumés into structured data, design the hiring API, set roles, review security, then ship.
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.
The full path to a pipeline that moves data without corrupting it — design the ingestion and transforms, extract and structure the sources, gate the quality, store it, then deliver and ship it monitored.