AI That Implements Without Hesitation — How to Write a 20-Section, 3,500-Line Design Doc

Publishing the Table of Contents

You know that feeling when AI keeps asking, “and what about X?” mid-implementation? Honestly, every one of those questions is a hole in your design doc.

In the previous article, I argued that design doc completeness sets development speed. So what exactly makes a “complete” design doc?

Here’s the structure that pulled off 16 person-days → 2 hours.


The 20 Sections

#SectionPriorityRole
1Document overview★☆☆Purpose, audience, related docs
2Tech stack★★★What to use (with rationale)
3Architecture★★★System diagram, layer structure
4Data model★★★ER diagram, table relationships
5Table definitions★★★Column names, types, constraints
6State transitions★★☆Status transition rules
7API design★★★Endpoints, request/response types
8Permission design★★★Role × resource × operation matrix
9Security★★☆Auth, CSRF, input validation
10Infrastructure★★☆Docker, environment variables
11Screen flow★★★Which screen leads where
12-20Testing, seeds, etc.★☆☆As needed

The 7 ★★★ sections are what keep AI from having to think.


”Must-Write” Points for Each Section

Tech Stack: Write versions and rationale

Not “Use React” but “Next.js 15.x (App Router) — SSR/SSG integration needed.”

Data Model: Write down to column constraints

If types and constraints are fuzzy, AI asks questions every single time.

API Design: List every endpoint

Path, method, auth requirement, response type — all in one table.

Permission Design: RBAC matrix

Without this, AI asks “who can do this?” for every operation. Painful.

Screen Flow: Express as directory structure

It maps 1:1 to routing, so AI never hesitates about file placement.


Writing Order

OrderSectionWhy
1Tech stackEverything else depends on this
2Data model + tablesData determines API
3API designDerived from data model
4Permissions”Who can do what” for each API
5Architecture + screen flowVisualize the big picture
6RestAdd as needed

In Closing

Start with just the 7 ★★★ sections. Even that, on its own, dramatically changes AI-driven development speed.

If your next AI session pauses to ask questions, you might try noting which one and turning it into a section in your design doc. That’s how a complete design doc grows — one missing answer at a time.

Contact

Feel free to reach out with any questions or feedback.

Get in touch