# Cursor PRD Template for AI Coding

> Structured PRD rule template to prevent AI hallucinations in code editors

This document is the first in CJ Zafir's seven-part 'Coding Docs' framework designed for AI-assisted development tools like Cursor and Windsurf. It establishes a complete Project Requirements Document (PRD) formatted as an 'Always' active rule file (project\_requirements\_document.mdc) to provide persistent context during AI generation. By explicitly defining scope, user flows, and technical boundaries, it stops language models from making unprompted assumptions.

## The prompt

Template structure (as shown for AI Code Product Hunt):

- Rule type: Always, attached to every chat and command+K request; header instructs 'Update this rule if user requested changes to the project requirement'.

- \#\# 1. Project Overview: what the product is (web marketplace where no-code developers and indie hackers list startups for sale; listings with name, website, industry, revenue, user base, images; buyers explore via search filters; buyers/sellers connect via real-time chat; Google auth via Clerk), plus goals, key objectives and success metrics.

- \#\# 2. In-Scope vs Out-of-Scope: in-scope includes user auth/onboarding (Clerk), seller dashboard listing form, real-time chat, grid-style dashboard with filters (industry, selling price, MRR), sidebar navigation, seller analytics and reporting, admin dashboard, image upload (JPEG/PNG/GIF with size and dimension guidelines), mobile responsive design.

- \#\# 3. User Flow: signup via Clerk Google auth → onboarding → sellers fill listing form, buyers browse grid; edit/delete listings with pre-populated forms; buyers initiate chat with message of intent; admin dashboard moderates in background; mobile equally responsive.

- \#\# 4. Core Features: User Authentication and Onboarding (Clerk, intuitive onboarding); Seller Listing Management (detailed form, edit/delete with confirmation modal); Real-Time Chat (privacy settings, online/offline status, block, moderation); Dashboard and Filtering (grid display, filters for industry/selling price/MRR); Navigation (left sidebar); Analytics and Reporting for Sellers (listing views, inquiry responses, reporting dashboard); Administrative Moderation (approve/reject listings, flag content); Asset Management (JPEG/PNG/GIF, 2 MB limit, 1200x800 recommended); Mobile Optimization (responsive, larger touch targets).

- \#\# 5. Tech Stack & Tools: Frontend — Next.js 14 (app router), TypeScript, Tailwind CSS, Shadcn UI and Radix UI, Lucide Icons; Backend & Storage — Supabase, Clerk; Additional Tools & AI — GPT o1, Claude 3.5 Sonnet, Cursor; Starter Kit — CodeGuide Starter Pro (github.com/codeGuide-dev/codeguide-starter-pro).

- \#\# 6. Non-Functional Requirements: Performance (fast load \<2s, optimized image handling, minimal chat latency); Security (role-based access controls especially for admin dashboard); Compliance & Usability (responsive across devices, web accessibility standards, security audits).

- \#\# 7. Constraints & Assumptions: chat depends on server-side event handling and websocket support; Supabase uptime assumed; AI integrations stable; starter kit basis; payments intentionally excluded (managed externally).

- \#\# 8. Known Issues & Potential Pitfalls: rate limits/performance bottlenecks (caching, load balancing); user management & moderation (automated flagging, admin guidelines); asset handling (server-side image resizing/compression); cross-device consistency (responsive frameworks, testing cycles); third-party dependency risks (Clerk, Supabase, OpenAI — robust error handling and contingency plan).

Closing note: the PRD is a blueprint so subsequent documents (Tech Stack, Frontend Guidelines, Backend Structure) can be generated without ambiguity.

## What it is for

- Configure a persistent Cursor or Windsurf rule file to ground code generation
- Define clear project boundaries and out-of-scope tasks before generating code
- Document user flows and technical constraints to minimize hallucinations across chat prompts

## Key points

- Project overview outlining core value proposition, objectives, and success metrics
- Explicit in-scope versus out-of-scope boundaries to control AI feature creep
- End-to-end user flow diagrams and step-by-step journeys
- Detailed feature specifications broken down into concrete functional requirements
- Non-functional performance, security, and accessibility benchmarks
- Explicit technical constraints, third-party assumptions, and potential pitfalls

## Pricing

Free

## Details

- Type: Prompt
- Category: [Development](https://xiry.app/topics/development.md)
- Topic: [AI Prompts](https://xiry.app/topics/ai/ai-prompts.md)
- Open source: no
- Platforms: other
- For: Developers building software with AI code editors like Cursor and Windsurf
- Tags: cursor, windsurf, prd, prompt engineering, ai coding, rules

## Why it was saved

- [@cjzafir, 27 March 2025](https://x.com/cjzafir/status/1905285498542923915): Doc \#1 of CJ Zafir's 7-doc 'Coding Docs' system (PRD, app flow, tech stack, frontend guidelines, backend structure, rules, implementation plan) that forms a knowledge base for AI coding models in Cursor/Windsurf, reducing AI assumptions and hallucinations. The full template is on screen to copy.

## Related

- [agency-agents](https://xiry.app/resources/agency-agents): Curated library of specialized AI agent personas and workflows for Claude Code (GitHub repo, Open source)
- [Senior Product Manager PRD Prompt](https://xiry.app/resources/prd-prompt-for-llms): System prompt to convert rough software ideas into structured, agent-ready PRDs (Prompt, Free)
- [15 ChatGPT Prompts by Topic (Atul Kumar)](https://xiry.app/resources/15-chatgpt-prompts-by-topic-atul-kumar): A cheat sheet of 15 business and marketing prompts for ChatGPT. (Prompt, Free)
- [5-Year Life Prediction Prompt Sequence](https://xiry.app/resources/5-year-life-prediction-prompt-sequence): Three-step transactional analysis prompt sequence for forecasting your future life trajectory (Prompt, Free)
- [9 ChatGPT Prompts for Accelerated Learning](https://xiry.app/resources/9-chatgpt-prompts-for-accelerated-learning): A collection of reusable ChatGPT prompts designed for studying and mastering topics (Prompt, Free)
- [Absolute Mode](https://xiry.app/resources/absolute-mode): A system prompt that removes conversational fluff and engagement-seeking behaviors from LLMs (Prompt, Free)

Updated 11 October 2026. Page: https://xiry.app/resources/cursor-prd-template-for-ai-coding

Make your own library: Xiry takes your saved reels, tweets, Reddit bookmarks and Watch Later videos, makes them searchable and pulls the useful stuff out, like this library. It's invite-only for now; join the waitlist at https://xiry.app/#waitlist.
