Skip to main content

Writing PRDs for Omni Architect

Omni Architect transforms your PRD into validated Mermaid diagrams and Figma assets. The quality of the output depends heavily on how well your PRD is structured. This guide shows you how to write PRDs that maximize the effectiveness of the automated pipeline.

PRD Structure Essentials

Omni Architect’s parser (Phase 1) looks for specific patterns in your Markdown PRD to extract semantic meaning. Follow these structural guidelines for best results.

Use Clear Heading Hierarchy

The parser tokenizes your PRD by heading levels (H1, H2, H3):
# Project Name

## Feature: User Authentication

### User Story
...

### Acceptance Criteria
...

## Feature: Product Catalog
...
Use H2 (##) for features, H3 (###) for subsections like User Stories, Flows, and Acceptance Criteria. This hierarchy helps the parser correctly classify each section.

Writing User Stories

The parser recognizes user stories using the standard format pattern:
### User Story

Como **[persona]**, quero **[capability]**, para **[benefit]**.

(English version)
As a **[persona]**, I want to **[capability]**, so that **[benefit]**.
Example:
### User Story

As a **shopper**, I want to **complete my purchase in 3 steps or less**,
so that I have a **fast and frictionless experience**.
Always bold the key elements (persona, capability, benefit) using **bold** syntax. This helps the NER (Named Entity Recognition) extraction identify important domain concepts.

Defining Entities and Attributes

Entities form the foundation of ER Diagrams. Use tables to define entity attributes:
## Data Model

### Entity: User

| Attribute   | Type      | Description                  |
|-------------|-----------|------------------------------|
| id          | uuid      | Primary key                  |
| email       | string    | Unique email address         |
| name        | string    | User's full name             |
| role        | enum      | admin, customer, guest       |
| created_at  | datetime  | Account creation timestamp   |

### Relationships

- User **one-to-many** Order
- User **one-to-one** Cart
Why this matters:
  • The parser extracts entities and their attributes from tables
  • Relationship declarations map to ER Diagram relationships
  • Type information helps generate accurate database models

Documenting Flows

Flows generate the most important diagrams: flowcharts and sequence diagrams. Use numbered lists or explicit flow sections:
## Checkout Flow

### Flow: Complete Purchase

1. User views shopping cart
2. System checks if user is authenticated
   - If not authenticated → Redirect to Login/Signup
   - If authenticated → Continue
3. User selects shipping address
4. System calculates shipping cost
5. User selects payment method
6. System processes payment
   - If approved → Create order
   - If declined → Show error, return to payment
7. System sends confirmation email
8. System updates inventory
Explicitly mark decision points (“If/Else”) and error paths (“sad path”). These become conditional branches in flowcharts and improve your completeness score.

Writing Acceptance Criteria

Use checkbox lists for acceptance criteria. The parser tracks these for completeness scoring:
### Acceptance Criteria

- [ ] User can select saved address or add new one
- [ ] Shipping cost calculates in real-time
- [ ] Support for PIX, credit card, and bank slip
- [ ] Automatic confirmation email sent
- [ ] Order appears in user's order history within 5 seconds

Defining Dependencies

Explicitly state feature dependencies to generate accurate dependency graphs:
## Feature: Product Catalog

**Dependencies:** User Authentication (F001)

**Priority:** High
**Complexity:** Medium

### Description
...

Requirements Classification

Help the parser classify requirements by using clear labels:
## Functional Requirements

**FR001:** The system must support guest checkout
**FR002:** Users must be able to save multiple addresses

## Non-Functional Requirements

**Performance:** Checkout flow must complete in < 3 seconds (p95)
**Security:** All payment data must be PCI-DSS compliant
**Availability:** 99.9% uptime SLA

Completeness Score

The parser calculates a completeness score (0.0 - 1.0) based on:
ElementWeightHow to Improve
Features with priorities20%Add priority levels (High/Medium/Low)
User stories20%Use the standard “As a…I want…so that” format
Entities defined15%Include entity tables with attributes
Flows documented15%Document step-by-step flows with decision points
Acceptance criteria15%Add checkbox lists for each feature
Dependencies mapped10%State inter-feature dependencies
Non-functional requirements5%Include performance, security, availability requirements
If your completeness score is below 0.6, the parser will emit warnings with specific suggestions. Address these before proceeding to diagram generation.

Example: Well-Structured PRD

Here’s a complete example demonstrating all best practices:
# E-Commerce Platform v2

## Feature: User Authentication (F001)

**Priority:** High
**Complexity:** Medium
**Dependencies:** None

### User Story

As a **returning customer**, I want to **log in with my email and password**,
so that I can **access my saved cart and order history**.

### Flow: Login Process

1. User navigates to login page
2. User enters email and password
3. System validates credentials
   - If valid → Generate JWT token, redirect to dashboard
   - If invalid → Show error "Invalid credentials", allow retry
4. System logs authentication event

### Acceptance Criteria

- [ ] Email validation follows RFC 5322 standard
- [ ] Password minimum 8 characters
- [ ] Failed login attempts rate-limited (5 per minute)
- [ ] JWT token expires after 24 hours
- [ ] "Remember me" option available

### Entity: User

| Attribute   | Type      | Description                  |
|-------------|-----------|------------------------------|
| id          | uuid      | Primary key                  |
| email       | string    | Unique email address (UK)    |
| password    | string    | Bcrypt hashed password       |
| role        | enum      | customer, admin              |
| created_at  | datetime  | Account creation timestamp   |

### Non-Functional Requirements

**Security:** Passwords hashed with bcrypt (cost factor 12)
**Performance:** Login response time < 500ms (p95)
**Availability:** Auth service 99.95% uptime

PRD Anti-Patterns

Avoid these common mistakes:

❌ Vague User Stories

"Users should be able to buy products"

✅ Specific User Stories

As a **shopper**, I want to **add products to my cart and checkout in 3 steps**,
so that I can **complete my purchase quickly**.

❌ Missing Decision Points

1. User logs in
2. User views dashboard

✅ Complete Flow

1. User attempts login
2. System validates credentials
   - If valid → Redirect to dashboard
   - If invalid → Show error, allow retry
3. User views personalized dashboard

❌ Undefined Entities

"The system stores user information"

✅ Defined Entities

### Entity: User

| Attribute | Type   | Description |
|-----------|--------|-------------|
| id        | uuid   | Primary key |
| email     | string | Unique email|
| name      | string | Full name   |

Language and Locale

Omni Architect supports multiple languages. Set the locale parameter to match your PRD:
  • pt-BR: Portuguese (Brazil)
  • en-US: English (United States)
  • es-ES: Spanish (Spain)
If your PRD is in a different language than your locale setting, the system will auto-detect the language and translate labels in diagrams accordingly.

Pre-Flight Checklist

Before running Omni Architect, verify your PRD includes:
  • Clear H1/H2/H3 heading hierarchy
  • At least 3 features with priorities
  • User stories in standard format (“As a…I want…so that…”)
  • Entity tables with attributes and types
  • Step-by-step flows with decision points
  • Acceptance criteria as checkbox lists
  • Feature dependencies explicitly stated
  • Both functional and non-functional requirements

Next Steps

Validation Workflow

Learn how to use interactive, batch, and auto validation modes

Troubleshooting

Common PRD parsing issues and solutions

Build docs developers (and LLMs) love