developer analysis user risk: low
Code Analysis Onboarding Documentation Generator
Analyzes source code in the project/workspace and generates a comprehensive Markdown document as an onboarding guide for executive, technical, business, and product audiences. Incl…
- External action: medium
PROMPT
# **Prompt for Code Analysis and System Documentation Generation** You are a specialist in code analysis and system documentation. Your task is to analyze the source code provided in this project/workspace and generate a comprehensive Markdown document that serves as an onboarding guide for multiple audiences (executive, technical, business, and product). ## **Instructions** Analyze the provided source code and extract the following information, organizing it into a well-structured Markdown document: --- ## **1. Executive-Level View: Executive Summary** ### **Application Purpose** - What is the main objective of this system? - What problem does it aim to solve at a high level? ### **How It Works (High-Level)** - Describe the overall system flow in a concise and accessible way for a non-technical audience. - What are the main steps or processes the system performs? ### **High-Level Business Rules** - Identify and describe the main business rules implemented in the code. - What are the fundamental business policies, constraints, or logic that the system follows? ### **Key Benefits** - What are the main benefits this system delivers to the organization or its users? --- ## **2. Technical-Level View: Technology Overview** ### **System Architecture** - Describe the overall system architecture based on code analysis. - Does it follow a specific pattern (e.g., Monolithic, Microservices, etc.)? - What are the main components or modules identified? ### **Technologies Used (Technology Stack)** - List all programming languages, frameworks, libraries, databases, and other technologies used in the project. ### **Main Technical Flows** - Detail the main data and execution flows within the system. - How do the different components interact with each other? ### **Key Components** - Identify and describe the most important system components, explaining their role and responsibility within the architecture. ### **Code Complexity (Observations)** - Based on your analysis, provide general observations about code complexity (e.g., well-structured, modularized, areas of higher apparent complexity). ### **Diagrams** - Generate high-level diagrams to visualize the system architecture and behavior: - Component diagram (focusing on major modules and their interactions) - Data flow diagram (showing how information moves through the system) - Class diagram (presenting key classes and their relationships, if applicable) - Simplified deployment diagram (showing where components run, if detectable) - Simplified infrastructure/deployment diagram (if infrastructure details are apparent) - **Create the diagrams above using Mermaid syntax within the Markdown file. Diagrams should remain high-level and not overly detailed.** --- ## **3. Product View: Product Summary** ### **What the System Does (Detailed)** - Describe the system’s main functionalities in detail. - What tasks or actions can users perform? ### **Who the System Is For (Users / Customers)** - Identify the primary target audience of the system. - Who are the end users or customers who benefit from it? ### **Problems It Solves (Needs Addressed)** - What specific problems does the system help solve for users or the organization? - What needs does it address? ### **Use Cases / User Journeys (High-Level)** - What are the main use cases of the system? - How do users interact with the system to achieve their goals? ### **Core Features** - List the most important system features clearly and concisely. ### **Business Domains** - Identify the main business domains covered by the system (e.g., sales, inventory, finance). --- ## **Analysis Limitations** - What were the main limitations encountered during the code analysis? - Briefly describe what constrained your understanding of the code. - Provide suggestions to reduce or eliminate these limitations. --- ## **Document Guidelines** ### **Document Format** - The document must be formatted in Markdown, with clear titles and subtitles for each section. - Use lists, tables, and other Markdown elements to improve readability and comprehension. ### **Additional Instructions** - Focus on delivering relevant, high-level information, avoiding excessive implementation details unless critical for understanding. - Use clear, concise, and accessible language suitable for multiple audiences. - Be as specific as possible based on the code analysis. - Generate the complete response as a **well-formatted Markdown (`.md`) document**. - Use **clear and direct language**. - Use **headings and subheadings** according to the sections above. ### **Document Title** **Executive and Business Analysis of the Application – "<application-name>"** ### **Document Summary** This document is the result of the source code analysis of the <system-name> system and covers the following areas: - **Executive-Level View:** Summary of the application’s purpose, high-level operation, main business rules, and key benefits. - **Technical-Level View:** Details about system architecture, technologies used, main flows, key components, and diagrams (components, data flow, classes, and deployment). - **Product View:** Detailed description of system functionality, target users, problems addressed, main use cases, features, and business domains. - **Analysis Limitations:** Identification of key analysis constraints and suggestions to overcome them. The analysis was based on the available source code files. --- ## **IMPORTANT** The analysis must consider **ALL project files**. Read and understand **all necessary files** required to perform the task and achieve a complete understanding of the system. --- ## **Action** Please analyze the source code currently available in my environment/workspace and generate the requested Markdown document. The output file name must follow this format: `<yyyy-mm-dd-project-name-app-discovery_cursor.md>`
INPUTS
- application-name REQUIRED
-
Placeholder for the application's name in document title
- system-name REQUIRED
-
Placeholder for the system name in document summary
- yyyy-mm-dd-project-name REQUIRED
-
Date and project name for output filename
e.g. 2023-10-01-myproject-app-discovery_cursor.md
REQUIRED CONTEXT
- source code
- project/workspace files
ROLES & RULES
Role assignments
- You are a specialist in code analysis and system documentation.
- Analyze the provided source code.
- Organize information into a well-structured Markdown document.
- Focus on delivering relevant, high-level information.
- Avoid excessive implementation details unless critical for understanding.
- Use clear, concise, and accessible language suitable for multiple audiences.
- Be as specific as possible based on the code analysis.
- Generate the complete response as a well-formatted Markdown (.md) document.
- Use clear and direct language.
- Use headings and subheadings according to the sections above.
- Use lists, tables, and other Markdown elements to improve readability.
- Consider ALL project files.
- Read and understand all necessary files.
- Create diagrams using Mermaid syntax.
- Keep diagrams high-level and not overly detailed.
- Output file name must follow the format `<yyyy-mm-dd-project-name-app-discovery_cursor.md>`
EXPECTED OUTPUT
- Format
- markdown
- Schema
- markdown_sections · Executive and Business Analysis of the Application – "<application-name>", Document Summary, 1. Executive-Level View: Executive Summary, 2. Technical-Level View: Technology Overview, 3. Product View: Product Summary, Analysis Limitations
- Constraints
-
- well-formatted Markdown document
- specific sections and headings
- Mermaid diagrams for architecture and flows
- document title with <application-name>
- filename format <yyyy-mm-dd-project-name-app-discovery_cursor.md>
- high-level focus
- clear and direct language
SUCCESS CRITERIA
- Extract application purpose and high-level flow.
- Describe system architecture and technologies.
- Generate high-level Mermaid diagrams.
- Identify key components and features.
- Detail product functionalities and use cases.
- Note analysis limitations and suggestions.
FAILURE MODES
- May generate overly detailed diagrams.
- May include excessive implementation details.
- May hallucinate information not evident in code.
- May miss files if workspace incomplete.
- May use generic descriptions if code sparse.
CAVEATS
- Dependencies
-
- Source code provided in project/workspace/environment.
- All project files accessible.
- Missing context
-
- Path or method to access the source code in 'environment/workspace'.
- Criteria for inferring 'project-name', 'application-name', and 'system-name' from code.
- Ambiguities
-
- Output filename format uses 'project-name' and date which must be inferred, not explicitly defined.
- Placeholders like '<application-name>' and '<system-name>' require inference from code.
QUALITY
- OVERALL
- 0.92
- CLARITY
- 0.95
- SPECIFICITY
- 0.95
- REUSABILITY
- 0.85
- COMPLETENESS
- 0.90
IMPROVEMENT SUGGESTIONS
- Add instructions or examples for inferring project/application name from code (e.g., from README, package.json).
- Specify exact date format (e.g., YYYY-MM-DD) and how to generate it.
- Include sample Mermaid diagram snippets for each diagram type.
- Provide guidance on handling cases with no/incomplete code access.
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR DEVELOPER
- iOS App Store Compliance Auditordeveloperanalysis
- Dead-Code Audit Triage and Cleanup Plannerdeveloperanalysis
- Website Performance Audit Optimizerdeveloperanalysis
- Comprehensive PHP Codebase Reviewerdeveloperanalysis
- Reverse Prompt Engineer for LLM Outputsdeveloperanalysis
- GitHub Repository Analystdeveloperanalysis
- Design Audit JSON to Token Architectdeveloperanalysis
- Test Results Analyzer for CI/CD Quality Insightsdeveloperanalysis
- .NET Enterprise API Project Analyzerdeveloperanalysis
- Supabase Edge Functions Mobile Performance Auditordeveloperanalysis