PRD
The PRD (Product Requirements Document) at docs/PRD.md is ralph’s source of truth for what to build. Tasks reference PRD sections, and ralph injects the relevant section content into each agent’s boot prompt.
Structure
Section titled “Structure”Use numbered sections so tasks can reference them precisely:
# My Project — Product Requirements Document
A CLI tool that does X.
## 1. Authentication
The system must support email/password authentication.
### 1.1 Registration
Users register with email and password. Passwords are hashed with bcrypt.Email must be unique and validated.
### 1.2 Login
Users authenticate with email and password. Returns a JWT tokenvalid for 24 hours.
## 2. API Endpoints
### 2.1 User Profile
GET /api/profile returns the authenticated user's profile data.How Ralph Uses It
Section titled “How Ralph Uses It”- Each task file has a
PRD Referencefield (e.g.,§1.1) - At boot time, ralph parses the PRD and extracts the referenced section
- The section content is injected into the boot prompt as
{{task.prdContent}} - The agent gets the exact requirements without reading the entire PRD
Best Practices
Section titled “Best Practices”Be specific and testable. Every requirement should be verifiable in code:
# GoodUsers register with email and password. Passwords must be at least 8 charactersand hashed with bcrypt. Duplicate emails return a 409 status.
# VagueThe system should handle user registration properly.Use numbered sections consistently. Tasks reference sections by number — renumbering breaks references.
Keep sections focused. Each section should map to one or a few tasks. If a section requires more than 3-4 tasks, split it into subsections.
Include constraints. Performance targets, security requirements, and compatibility notes belong in the PRD — they inform the agent’s implementation decisions.