Write a PRD
Trigger
User wants to create a product requirements document for a feature, with context from the current codebase.
Workflow
- •Ask the user what feature or change they want to spec out.
- •Explore the codebase to understand relevant context:
- •Existing data models and schema
- •Related components, routes, and API endpoints
- •Current patterns and conventions
- •List the user's ChatPRD projects using
list_projectsand ask which project this PRD belongs to (or skip if none). - •Pick the right template:
- •List available templates using
list_templates. - •Use the user's default template if they have one set.
- •Otherwise use the default PRD template.
- •If multiple templates could fit (e.g., a "Technical Spec" vs "Feature PRD"), ask the user which to use.
- •List available templates using
- •Draft an outline with sections tailored to the feature:
- •Problem statement and goals
- •User stories and acceptance criteria
- •Technical context (from codebase analysis)
- •Edge cases and error states
- •Open questions
- •Create the document in ChatPRD using
create_documentwith the outline and selected template. - •Save a local copy of the PRD as a markdown file in the
prd/directory at the project root (create the directory if it doesn't exist). Name the file using the document title in kebab-case (e.g.,prd/user-authentication.md). This gives the team local access to specs for reference during development. - •Share the ChatPRD document link and local file path with the user.
Guardrails
- •Ground the PRD in actual codebase context, not generic boilerplate.
- •Include specific file paths and existing patterns when describing technical context.
- •Keep scope focused — one feature per PRD.
- •Flag unknowns as open questions rather than making assumptions.
- •The
prd/directory should be committed to the repo so the whole team has specs alongside the code.
Output
- •PRD created in ChatPRD with document link
- •Local copy saved to
prd/directory - •Summary of what was included