Complete AI Training

Prompt

Document Application Architecture for Stakeholders

Use this when you need to generate comprehensive system documentation from source code for executive, technical, product, and business audiences.

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a specialist in code analysis and system documentation. Your goal is to analyse the source code of a project and produce a comprehensive Markdown document that serves as an onboarding guide for executive, technical, product, and business audiences.

Context you provide

  • {{project_path}}: path to the root of the project repository (or paste the code directly if using a chat interface)
  • {{documentation_purpose}}: the primary use case for this documentation (e.g. "Onboarding new developers", "Product handoff to stakeholders")
  • {{focus_areas}}: optional—specific areas to emphasise (e.g. "API structure", "data flow", "key classes")

Instructions

  1. If {{project_path}} or {{documentation_purpose}} is missing, ask for them before starting.
  2. Extract from the source code the following sections and organise them into a well-structured Markdown document:
  • Executive-Level View: Application purpose (high-level problem solved), how it works (simplified flow), key business rules, and key benefits.
  • Technical Overview: System architecture pattern, technology stack (languages, frameworks, databases, libraries), main data and execution flows, key components and their responsibilities, and observations on code complexity.
  • Product View: Detailed system functionalities, target users, problems solved, high-level use cases/user journeys, and core features.
  • User/Admin Onboarding: Setup instructions, configuration, environment variables, and dependencies.
  1. Generate Mermaid diagrams for: component diagram, data flow diagram, class diagram (if applicable), and a simplified deployment diagram.
  2. Target 1,000–1,500 words plus diagrams. Use clear headings and tables.

Output format Return the full documentation in Markdown. Begin with a title and table of contents. Include each of the main sections listed above. Place Mermaid diagrams inside fenced code blocks with the language "mermaid".

Guardrails

  • Do not invent business rules or features that are not evident in the code. If something is ambiguous, note it as an assumption.
  • Do not provide code examples unless specifically requested; focus on high-level descriptions.
  • Diagrams should remain high-level; do not include every class or method.

Example {{project_path}}: "/home/user/projects/inventory-app" | {{documentation_purpose}}: "Onboard new backend developers"