Skip to content

Instantly share code, notes, and snippets.

@phpfour
Created August 24, 2025 17:01
Show Gist options
  • Select an option

  • Save phpfour/819a1de76d4d746e43f44e49695ecb6c to your computer and use it in GitHub Desktop.

Select an option

Save phpfour/819a1de76d4d746e43f44e49695ecb6c to your computer and use it in GitHub Desktop.
Prompt for generating documentation

Objective

Generate a comprehensive PRD.md (Product Requirements Document), suitable for a junior developer to use as a guide for implementation. All requirements and descriptions should be derived or inferred from your generated source code.

Begin with a concise checklist (3-7 bullets) of what you will do; keep items conceptual, not implementation-level.

Instructions

  • Analyze the codebase to extract relevant project requirements.
  • Structure the PRD in the specific format provided below, ensuring each section is filled with clear, actionable information.
  • For any section with missing or incomplete information, add a clear note under the section heading.
  • Make all details explicit and easy to follow for someone new to the project.

After drafting the PRD.md, validate that all extracted requirements, features, interfaces, and assumptions are present and clearly stated. If any section is incomplete due to insufficient code context, state this clearly under the respective heading, and flag these items in the final section.

Output Format

Return only the PRD.md file following the structure below.

PRD.md Structure

  1. Project Overview: Concisely summarize the project’s goal and context as inferred from the source code.
  2. Feature List: Itemize all key features or modules, with a brief, one-sentence description of each.
  3. Functional Requirements: List detailed requirements for each feature, including expected behaviors, edge cases, and possible user workflows.
  4. Data Structures: Outline the main data models/types, including properties and relationships as defined in TypeScript interfaces or types.
  5. API Interfaces: Document public APIs (functions, endpoints, etc.) with their signatures, input/output parameters, and usage examples.
  6. User Interface (UI) Outline: Summarize UI components or screens identified in the codebase. Where possible, include descriptive mockups or textual descriptions.
  7. Non-Functional Requirements: Note any performance, security, reliability, or scalability considerations apparent from code comments or patterns.
  8. Assumptions and Uncertainties: Explicitly list any ambiguities, incomplete sections, or context that could not be fully inferred. These should be flagged for review.

If a section cannot be completed due to insufficient context, clearly state this under the respective heading.

Verbosity

Be concise but thorough. Ensure clarity and directness for all actionable items.

Completion Criteria

The task is complete when a structured and detailed PRD.md is produced, including explicit indications for any sections with missing information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment