AI coding tools have changed software development dramatically.
Today, tools such as Codex, Claude Code, Cursor, and other coding agents can generate entire features, create APIs, build interfaces, refactor code, write tests, and even interact with running applications.
But there is an important lesson that quickly becomes obvious when working on larger projects:
Giving an AI a large prompt is not the same as giving it a software engineering process.
If you simply tell an AI agent:
Build me a full-stack application with authentication, a dashboard, payments, AI features, and a mobile app.
it may produce a surprising amount of code.
The problem is that different parts of the application can slowly become inconsistent. Features may be implemented differently across platforms, database decisions may change halfway through development, buttons may exist without working actions, and the UI may look like a collection of unrelated AI-generated components.
A much better approach is to give the AI a structured development environment.
That usually means combining project documentation, design instructions, agent skills, and automated testing tools.
A useful structure might include:
project/
├── docs/
│ ├── PRD.md
│ ├── TRD.md
│ ├── USER_FLOWS.md
│ ├── UI_UX_DESIGN.md
│ ├── DATABASE_SCHEMA.md
│ └── IMPLEMENTATION_PLAN.md
│
├── skills/
├── apps/
├── packages/
└── README.md
Let us look at what each part does and why it becomes especially important when software is being built with AI.
1. PRD — Product Requirements Document
The Product Requirements Document, or PRD, describes what the product should do.
It focuses on the product rather than the implementation.
A PRD might define:
- the purpose of the application
- target users
- major features
- functional requirements
- user problems
- business rules
- feature priorities
- success criteria
- platform requirements
For example, imagine we are building a health tracking application.
The PRD might contain requirements such as:
Users must be able to:
- Create an account
- Sign in with Google or Apple
- Create daily entries
- Upload images
- View historical entries
- Compare entries over time
- Synchronize data across devices
- Receive AI-generated insights
Notice that the PRD does not necessarily say whether the backend uses Node.js, Go, Java, or Python.
That decision belongs somewhere else.
The easiest way to think about a PRD is:
What are we building, and why?
For AI coding agents, the PRD acts as the project's source of truth.
Instead of repeatedly explaining the application in prompts, the agent can refer back to PRD.md.
2. TRD — Technical Requirements Document
If the PRD explains what we are building, the Technical Requirements Document explains how we are going to build it.
A TRD usually contains decisions such as:
Frontend:
- React
- Next.js
- TypeScript
Mobile:
- React Native
Backend:
- Node.js
- REST API
Database:
- PostgreSQL
ORM:
- Prisma
Authentication:
- Google Sign-In
- Sign in with Apple
Storage:
- Object storage for user images
AI:
- LLM API
- Embeddings
- Vector database
- RAG pipeline
Deployment:
- Web hosting
- API hosting
- Managed PostgreSQL
It can go much deeper and describe:
- system architecture
- API conventions
- authentication strategy
- authorization
- caching
- background jobs
- error handling
- observability
- security
- deployment
- CI/CD
- testing strategy
The TRD prevents an AI agent from making architectural decisions independently every time it implements a feature.
Without one, you may eventually find something like this:
Feature A → REST API
Feature B → direct database access
Feature C → GraphQL
Feature D → completely different state management
Every individual decision might work.
Together, however, they create architectural chaos.
The TRD creates boundaries.
3. User Flows
User flows describe how users move through the application.
For example:
Open Application
↓
Authentication
↓
Dashboard
↓
Create Entry
↓
Upload Image
↓
Save Entry
↓
AI Analysis
↓
Results
This sounds simple, but it solves an important problem with AI-generated applications.
AI agents are very good at creating individual screens.
They are not automatically guaranteed to understand how every screen connects to every other screen.
A user flow therefore defines the expected journey.
More detailed flows might include alternative paths:
User opens application
↓
Already authenticated?
↓ Yes ↓ No
Dashboard Login
↓
Authenticate
↓
Dashboard
You should also define failure flows.
For example:
Upload Image
↓
Upload fails
↓
Show error
↓
Retry
or:
Subscription required
↓
Open Paywall
↓
Purchase successful?
↓ Yes ↓ No
Continue Stay Free
This makes navigation much easier for an AI agent to implement correctly.
4. UI/UX Design Specification
The UI/UX document explains what the application should look and feel like.
This is different from a PRD.
A PRD might say:
The dashboard must display recent projects.
The design specification might say:
Recent projects should appear in a horizontally scrollable section.
Each project card contains:
- Thumbnail
- Project name
- Last modified date
- Status
Cards use a 16px corner radius.
The section uses 24px horizontal padding.
A design document can define:
- colors
- typography
- spacing
- grid
- navigation
- button styles
- card styles
- border radius
- shadows
- responsive behavior
- mobile layouts
- desktop layouts
- hover states
- loading states
- empty states
- error states
- dark mode
This becomes particularly valuable in large AI-generated projects because one of the most common problems is design drift.
The first page may use:
12px radius
the second:
16px radius
and the third:
24px radius
The same thing can happen with colors, typography, button height, spacing, and animations.
A UI/UX specification gives the agent consistent constraints.
5. Database Schema
The database schema defines how application data is structured.
For example:
User
├── id
├── email
├── name
└── createdAt
Entry
├── id
├── userId
├── imageUrl
├── notes
├── createdAt
└── updatedAt
AIAnalysis
├── id
├── entryId
├── result
├── model
└── createdAt
Relationships should also be documented:
User
|
| 1:N
↓
Entry
|
| 1:1
↓
AIAnalysis
A proper schema document can include:
- models
- columns
- data types
- relationships
- foreign keys
- indexes
- unique constraints
- cascade behavior
- timestamps
- soft deletes
- migration strategy
This becomes extremely important once multiple agents or multiple development sessions are involved.
Otherwise, the AI may decide one day that a field should be called:
imageUrl
and later create another feature expecting:
imagePath
Documentation reduces this type of inconsistency.
6. Implementation Plan
The implementation plan converts the architecture into an actual development sequence.
For example:
# Implementation Plan
## Phase 1 — Foundation
- Initialize repository
- Configure TypeScript
- Configure linting
- Configure database
- Configure environment variables
## Phase 2 — Authentication
- Implement Google Sign-In
- Implement Apple Sign-In
- Create session management
- Add protected routes
## Phase 3 — Core Product
- Dashboard
- Create entry
- Edit entry
- Delete entry
- Image upload
## Phase 4 — AI
- AI analysis endpoint
- Embedding generation
- Vector database
- RAG pipeline
## Phase 5 — Testing
- Unit tests
- API tests
- Integration tests
- Playwright end-to-end tests
## Phase 6 — Production
- Production database
- Deployment
- Monitoring
- Analytics
For AI development, this document is particularly powerful.
Instead of asking the AI to build an entire platform in one enormous operation, the agent can work through controlled phases.
It also becomes easier to use Git properly.
For example:
feat: initialize project architecture
feat: implement authentication
feat: add dashboard
feat: implement image uploads
feat: add AI analysis pipeline
test: add end-to-end onboarding tests
Now the AI is not simply generating code.
It is executing a development plan.
Documentation Is Only Half of the System
Documents tell an AI agent what the software should be.
But another question remains:
How should the agent behave while creating it?
This is where agent skills become interesting.
Modern coding agents increasingly support reusable instruction files commonly represented as SKILL.md.
Instead of adding hundreds of design instructions to every prompt, developers can install or maintain reusable skills that define how an agent should approach a particular category of work.
Examples include:
- TasteSkill
- Web Design Guidelines
- Awesome Design Skills
- Image-to-Code workflows
These are fundamentally different from PRDs or TRDs.
Think of it this way:
PRD
→ What should the product do?
TRD
→ How should the system work?
Design Specification
→ How should the product look?
Agent Skill
→ How should the AI approach the work?
TasteSkill
One common problem with AI-generated frontend development is that technically correct interfaces often look extremely similar.
You have probably seen the pattern:
- giant hero text
- gradient background
- rounded cards everywhere
- excessive pill buttons
- predictable dashboard layouts
- weak typography hierarchy
- inconsistent spacing
- unnecessary animations
The code may be perfectly valid.
The design simply feels generated.
TasteSkill describes itself as an "anti-slop" frontend framework for AI agents and provides reusable skills aimed at improving layout, typography, spacing, motion, and general visual direction. It also includes specialized workflows such as image-to-code.
Conceptually, it adds another layer:
Product requirements
↓
Design requirements
↓
Taste / visual quality rules
↓
Implementation
Instead of saying only:
Build a pricing page.
an agent can operate with additional design constraints that encourage stronger visual hierarchy, intentional spacing, coherent motion, and less repetitive layouts.
That distinction matters.
A design system can define:
Primary color: #111111
Radius: 12px
Spacing: 8px scale
while a design skill can additionally guide the agent toward decisions such as:
Do not turn every section into a card.
Do not center every piece of content.
Establish a strong typography hierarchy.
Use motion only when it improves interaction.
Avoid repetitive AI-generated layouts.
The first defines tokens.
The second influences design judgment.
Web Design Guidelines
Taste alone is not enough.
An interface can look beautiful and still have terrible usability.
For example:
- keyboard navigation may not work
- focus indicators may be invisible
- mobile touch targets may be too small
- forms may provide poor error messages
- layouts may break on small screens
- text contrast may be insufficient
This is why interface auditing matters.
Vercel's Web Interface Guidelines cover areas such as interaction, accessibility, focus behavior, mobile usability, forms, content, and responsive interface decisions. Vercel also provides a web-design-guidelines agent skill specifically intended to review UI code against those guidelines.
This means we can use one agent workflow for creation:
Build the interface.
and another for review:
Audit the interface against the web design guidelines.
Identify:
- accessibility issues
- responsive problems
- missing interaction states
- keyboard navigation issues
- inconsistent UI behavior
This separation is useful because generation and review are different tasks.
The agent that created the interface should still be asked to challenge its own implementation.
Awesome Design Skills
Another interesting development is the emergence of libraries of reusable design skills.
Awesome Design Skills, for example, provides a collection of visual systems packaged as SKILL.md and DESIGN.md files for AI coding agents. These can define things such as typography, colors, spacing, components, accessibility rules, writing tone, and quality gates for a particular visual direction.
Instead of telling an agent:
Make it modern.
you can give it a more concrete visual system.
For example:
Bento
Minimal
Brutalist
Editorial
Glassmorphism
Clean
Artistic
The important idea here is not the name of any particular style.
The important idea is design consistency.
If an AI agent understands a defined visual language, every page can be generated from the same system.
That is much more reliable than repeatedly prompting:
Make this page look better.
Image-to-Code
Image-to-Code reverses the usual AI frontend workflow.
The normal workflow is:
Prompt
↓
AI interpretation
↓
Frontend
The result depends heavily on what the model imagines from the prompt.
An image-first workflow instead looks like this:
Reference Image
↓
Visual Analysis
↓
Design System Extraction
↓
Component Identification
↓
Implementation
↓
Visual Comparison
TasteSkill's image-to-code workflow, for example, is designed around generating or receiving visual references, analyzing them, and then implementing the frontend based on those references.
This can be much more reliable when reproducing:
- Figma designs
- screenshots
- mobile application mockups
- competitor references
- existing websites
- generated concept images
Imagine giving an AI 20 screenshots from a mobile application.
Instead of treating each screenshot as an independent page, the agent can first identify:
Shared navigation
Shared typography
Shared card system
Shared buttons
Shared spacing
Shared colors
Shared interaction patterns
Then it can extract reusable components.
For example:
Button
Card
NavigationBar
ProfileImage
SectionHeader
InputField
Modal
TabBar
Only after understanding the system does it start implementing individual screens.
That is much closer to how an experienced developer would approach the same task.
Playwright CLI: Let the AI Actually Use the Application
This may be one of the most important parts of the entire workflow.
A coding agent can read code and conclude:
The implementation looks correct.
That does not mean the application actually works.
A button can exist but do nothing.
A route can compile but lead to the wrong page.
A form can look correct but fail during submission.
A mobile layout can appear reasonable in code but break completely in a browser.
The solution is to let the agent interact with the running application.
Microsoft's Playwright CLI is specifically designed for browser automation by coding agents. It can open pages, interact with elements, type into forms, click buttons, inspect application state, and capture screenshots. Microsoft describes the CLI workflow as a token-efficient option for coding agents.
This allows workflows such as:
Open localhost:3000
Create a new account
Complete onboarding
Create an entry
Upload an image
Save the entry
Refresh the browser
Verify that the entry still exists
Edit the entry
Delete the entry
Test the same flow on a mobile viewport
Now the agent is no longer merely inspecting its own code.
It is acting as a user.
That distinction is huge.
AI Development Should Become a Loop
Combining all of these ideas produces a much stronger workflow.
IDEA
↓
PRD.md
↓
USER_FLOWS.md
↓
UI_UX_DESIGN.md
↓
DATABASE_SCHEMA.md
↓
TRD.md
↓
IMPLEMENTATION_PLAN.md
↓
AI CODING AGENT
↓
┌────────────┼────────────┐
↓ ↓ ↓
TasteSkill Design Image-to-Code
System
└────────────┼────────────┘
↓
CODE
↓
Web Design Guidelines
↓
UI AUDIT
↓
Playwright CLI
↓
REAL BROWSER TEST
↓
FIXES
↓
RETEST
↓
PRODUCTION
Notice that code generation occupies only one part of the process.
This is important.
The future of AI-assisted development is probably not:
Prompt → Code
It is much closer to:
Specify
↓
Design
↓
Plan
↓
Implement
↓
Inspect
↓
Test
↓
Fix
↓
Verify
AI participates in every stage.
Why Markdown Files Work So Well
Most of these documents can simply be Markdown files inside the repository.
For example:
docs/
├── PRD.md
├── TRD.md
├── USER_FLOWS.md
├── UI_UX_DESIGN.md
├── DATABASE_SCHEMA.md
└── IMPLEMENTATION_PLAN.md
This has several advantages.
First, documentation is version controlled together with the code.
When architecture changes:
git diff
can show not only the code changes but also changes to the architecture specification.
Second, AI agents can read the files directly.
Third, documentation can evolve together with the product.
If a feature changes, the workflow becomes:
Update PRD
↓
Update TRD if necessary
↓
Update database schema if necessary
↓
Update implementation plan
↓
Modify code
↓
Run tests
The documentation becomes part of the development system instead of something written once and forgotten.
A Better Way to Prompt Coding Agents
There is also a significant difference between these two prompts.
Prompt A
Build a SaaS application with authentication,
a dashboard, AI analysis and subscriptions.
Prompt B
Read:
docs/PRD.md
docs/TRD.md
docs/USER_FLOWS.md
docs/UI_UX_DESIGN.md
docs/DATABASE_SCHEMA.md
docs/IMPLEMENTATION_PLAN.md
Treat these documents as the source of truth.
Implement the next incomplete phase from IMPLEMENTATION_PLAN.md.
Follow the project's design skill and UI guidelines.
Do not introduce new architectural patterns unless required.
After implementation:
1. Run linting.
2. Run type checks.
3. Run unit tests.
4. Start the application.
5. Test the affected user flows with Playwright.
6. Check desktop and mobile layouts.
7. Fix discovered issues.
8. Retest.
9. Update IMPLEMENTATION_PLAN.md.
10. Commit the completed feature.
Prompt B gives the agent something much closer to an engineering environment.
That is where AI coding becomes much more powerful.
Documentation Does Not Replace Developers
An interesting consequence of AI coding is that software engineering knowledge may actually become more important, not less important.
An AI can generate thousands of lines of code quickly.
But someone still needs to decide:
- what should be built
- which architecture makes sense
- what the data model should look like
- what belongs in the API
- how features interact
- what constitutes good UX
- which security rules are required
- how the system should be tested
- whether the result actually solves the original problem
AI dramatically increases implementation speed.
That also means poor decisions can propagate dramatically faster.
A bad architectural decision made manually might affect three files before someone notices.
An AI agent can propagate it across 100 files in minutes.
Structure therefore becomes extremely important.
My Recommended AI Project Structure
For a serious AI-assisted project, I would start with something similar to this:
project/
│
├── docs/
│ ├── PRD.md
│ ├── TRD.md
│ ├── USER_FLOWS.md
│ ├── UI_UX_DESIGN.md
│ ├── DATABASE_SCHEMA.md
│ └── IMPLEMENTATION_PLAN.md
│
├── skills/
│ ├── design/
│ └── testing/
│
├── apps/
│ ├── web/
│ ├── mobile/
│ └── api/
│
├── packages/
│ ├── ui/
│ ├── database/
│ ├── shared/
│ └── config/
│
├── tests/
│ └── e2e/
│
├── AGENTS.md
└── README.md
The exact structure will obviously depend on the project.
The principle does not.
Give the AI:
context, constraints, architecture, design rules, an implementation plan, and a way to verify its own work.
Final Thoughts
AI coding agents are already capable of building surprisingly complex software.
But the quality difference between an average AI-generated project and a production-quality AI-assisted project usually does not come from writing a longer prompt.
It comes from creating a better development system around the agent.
PRDs define the product.
TRDs define the architecture.
User flows define behavior.
UI/UX specifications define the experience.
Database schemas define the data model.
Implementation plans define execution.
Design skills improve visual consistency.
Web guidelines provide quality checks.
Image-to-Code reduces visual ambiguity.
Playwright lets the agent verify the application in a real browser.
Put together, they transform the workflow from:
"AI, build my app."
into something much more powerful:
Here is the product.
Here is the architecture.
Here is the design language.
Here is the implementation plan.
Build it.
Test it.
Inspect it.
Fix it.
Prove that it works.
That, in my view, is a much better model for AI-assisted software development.
AI should not replace the engineering process.
It should operate inside one.