New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

A prompt designed to analyze a codebase

Multi-Audience Application Discovery & Documentation Prompt

by Valdecir Carvalho · CC0-1.0 license · updated Sep 9

Multi-Audience Application Discovery & Documentation Prompt cover

A prompt designed to analyze a codebase and generate comprehensive Markdown documentation tailored for executive, technical, product, and business audiences. It guides an AI to extract high-level system purpose, architecture, key…

Overview

A prompt designed to analyze a codebase and generate comprehensive Markdown documentation tailored for executive, technical, product, and business audiences. It guides an AI to extract high-level system purpose, architecture, key components, workflows, product features, business domains, and limitations, producing an onboarding and discovery document suitable for both technical and non-technical stakeholders.

The prompt

134 lines · 5,916 characters · paste it into ChatGPT, Claude or Gemini
1# **Prompt for Code Analysis and System Documentation Generation**
2
3You 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).
4
5## **Instructions**
6
7Analyze the provided source code and extract the following information, organizing it into a well-structured Markdown document:
8
9---
10
11## **1. Executive-Level View: Executive Summary**
12
13### **Application Purpose**
14- What is the main objective of this system?
15- What problem does it aim to solve at a high level?
16
17### **How It Works (High-Level)**
18- Describe the overall system flow in a concise and accessible way for a non-technical audience.
19- What are the main steps or processes the system performs?
20
21### **High-Level Business Rules**
22- Identify and describe the main business rules implemented in the code.
23- What are the fundamental business policies, constraints, or logic that the system follows?
24
25### **Key Benefits**
26- What are the main benefits this system delivers to the organization or its users?
27
28---
29
30## **2. Technical-Level View: Technology Overview**
31
32### **System Architecture**
33- Describe the overall system architecture based on code analysis.
34- Does it follow a specific pattern (e.g., Monolithic, Microservices, etc.)?
35- What are the main components or modules identified?
36
37### **Technologies Used (Technology Stack)**
38- List all programming languages, frameworks, libraries, databases, and other technologies used in the project.
39
40### **Main Technical Flows**
41- Detail the main data and execution flows within the system.
42- How do the different components interact with each other?
43
44### **Key Components**
45- Identify and describe the most important system components, explaining their role and responsibility within the architecture.
46
47### **Code Complexity (Observations)**
48- Based on your analysis, provide general observations about code complexity (e.g., well-structured, modularized, areas of higher apparent complexity).
49
50### **Diagrams**
51- Generate high-level diagrams to visualize the system architecture and behavior:
52 - Component diagram (focusing on major modules and their interactions)
53 - Data flow diagram (showing how information moves through the system)
54 - Class diagram (presenting key classes and their relationships, if applicable)
55 - Simplified deployment diagram (showing where components run, if detectable)
56 - Simplified infrastructure/deployment diagram (if infrastructure details are apparent)
57- **Create the diagrams above using Mermaid syntax within the Markdown file. Diagrams should remain high-level and not overly detailed.**
58
59---
60
61## **3. Product View: Product Summary**
62
63### **What the System Does (Detailed)**
64- Describe the system’s main functionalities in detail.
65- What tasks or actions can users perform?
66
67### **Who the System Is For (Users / Customers)**
68- Identify the primary target audience of the system.
69- Who are the end users or customers who benefit from it?
70
71### **Problems It Solves (Needs Addressed)**
72- What specific problems does the system help solve for users or the organization?
73- What needs does it address?
74
75### **Use Cases / User Journeys (High-Level)**
76- What are the main use cases of the system?
77- How do users interact with the system to achieve their goals?
78
79### **Core Features**
80- List the most important system features clearly and concisely.
81
82### **Business Domains**
83- Identify the main business domains covered by the system (e.g., sales, inventory, finance).
84
85---
86
87## **Analysis Limitations**
88
89- What were the main limitations encountered during the code analysis?
90- Briefly describe what constrained your understanding of the code.
91- Provide suggestions to reduce or eliminate these limitations.
92
93---
94
95## **Document Guidelines**
96
97### **Document Format**
98- The document must be formatted in Markdown, with clear titles and subtitles for each section.
99- Use lists, tables, and other Markdown elements to improve readability and comprehension.
100
101### **Additional Instructions**
102- Focus on delivering relevant, high-level information, avoiding excessive implementation details unless critical for understanding.
103- Use clear, concise, and accessible language suitable for multiple audiences.
104- Be as specific as possible based on the code analysis.
105- Generate the complete response as a **well-formatted Markdown (`.md`) document**.
106- Use **clear and direct language**.
107- Use **headings and subheadings** according to the sections above.
108
109### **Document Title**
110**Executive and Business Analysis of the Application – "<application-name>"**
111
112### **Document Summary**
113This document is the result of the source code analysis of the <system-name> system and covers the following areas:
114
115- **Executive-Level View:** Summary of the application’s purpose, high-level operation, main business rules, and key benefits.
116- **Technical-Level View:** Details about system architecture, technologies used, main flows, key components, and diagrams (components, data flow, classes, and deployment).
117- **Product View:** Detailed description of system functionality, target users, problems addressed, main use cases, features, and business domains.
118- **Analysis Limitations:** Identification of key analysis constraints and suggestions to overcome them.
119
120The analysis was based on the available source code files.
121
122---
123
124## **IMPORTANT**
125The analysis must consider **ALL project files**.
126Read and understand **all necessary files** required to perform the task and achieve a complete understanding of the system.
127
128---
129
130## **Action**
131Please analyze the source code currently available in my environment/workspace and generate the requested Markdown document.
132
133The output file name must follow this format:
134`<yyyy-mm-dd-project-name-app-discovery_cursor.md>`

Connects with Agent Alley MCP · agentalley.io/mcp

Details

Updated
Sep 9, 2026
License
CC0-1.0
Source
prompts.chat ↗
Creator
Valdecir Carvalho · 2 listings
View creator ↗

Similar prompts

See all →
SkillGenerate CHANGELOG.md entry from recent commitsSkillshare changelogrunkids/skillshare · by runkidsGenerate CHANGELOG.md entry from recent commits in conventional format. Also syncs the website changelog page. Use this skill whenever the user asks to: generate a changelog, document what changed between tags, or create a new CHANGELOG entry. If you see requests like "write the changelog for v0.17", what changed since last release", this is the skill to use. Do NOT manually edit CHANGELOG.md without this skill — it ensures proper formatting, user-perspective writing, and website changelog sync. For full release workflows (Release PR review, tests, draft assets, publication, announcements), use /release instead.★ 2.7k GitHub starsSkillUpdate website docs to match recent code changesSkillshare update docsrunkids/skillshare · by runkidsUpdate website docs to match recent code changes, cross-validating every flag against source. Use this skill whenever the user asks to: update documentation, sync docs with code, document a new flag or command, fix stale docs, or update the README. This skill covers all website/docs/ categories (commands, reference, understand, how-to, troubleshooting, getting-started) plus the built-in skill description and README. If you just implemented a feature and need to update docs, this is the skill to use. Never manually edit website docs without cross-validating flags against Go source first.★ 2.7k GitHub starsSkillRecords one architecture decision with alternativesArchitecture Decision Recorderlevnikolaevich/claude-code-skills · by levnikolaevichRecords one architecture decision with alternatives, consequences and status; does not design the whole system.★ 568 GitHub starsPromptAct as a GitHub Repository Analyst to perform in-depthGithub repository analysis and enhancementf/prompts.chat · by Mobin GhorbaniAct as a GitHub Repository Analyst to perform in-depth analysis and suggest improvements for repository structure, documentation, code quality, and community engagement.New listingPromptAct as a GitHub Repository Analystf/prompts.chat · by Yury SamAct as a GitHub Repository Analyst. You are an expert in software development and repository management with extensive experience in code analysis, documentation, and interaction with the GitHub community.New listingSkillRecords decisions and documentationDocumentation and adrsaddyosmani/agent-skills · by addyosmaniRecords decisions and documentation. Use when you need to document an architecture decision (ADR) or the reasoning behind a design choice, when changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.★ 98.7k GitHub stars

More from Valdecir Carvalho