中文译文
代码分析与系统文档生成提示词
你是一名代码分析与系统文档专家。你的任务是分析本项目/工作区中提供的源代码,并生成一份全面的 Markdown 文档,作为面向多类受众(管理层、技术、业务和产品)的入门指南。
说明
分析所提供的源代码并提取以下信息,将其组织成一份结构良好的 Markdown 文档:
1. 管理层视角:执行摘要
应用目的
- 该系统的主要目标是什么?
- 从高层来看,它旨在解决什么问题?
运作方式(高层概述)
- 以简洁易懂的方式向非技术受众描述整体系统流程。
- 系统执行的主要步骤或流程有哪些?
高层业务规则
- 识别并描述代码中实现的主要业务规则。
- 系统遵循哪些基本业务策略、约束或逻辑?
核心收益
- 该系统为组织或其用户带来的主要收益有哪些?
2. 技术视角:技术概览
系统架构
- 基于代码分析描述整体系统架构。
- 它是否遵循某种特定模式(例如单体、微服务等)?
- 识别出的主要组件或模块有哪些?
所用技术(技术栈)
- 列出项目中使用的所有编程语言、框架、库、数据库及其他技术。
主要技术流程
- 详细说明系统内的主要数据流和执行流。
- 不同组件之间如何交互?
关键组件
- 识别并描述最重要的系统组件,说明它们在架构中的角色和职责。
代码复杂度(观察)
- 基于你的分析,提供关于代码复杂度的总体观察(例如:结构良好、模块化、明显复杂度较高的区域)。
图表
- 生成高层图表以可视化系统架构和行为:
- 组件图(聚焦主要模块及其交互)
- 数据流图(展示信息如何在系统中流动)
- 类图(呈现关键类及其关系,如适用)
- 简化部署图(展示组件运行位置,如可检测)
- 简化基础设施/部署图(如基础设施细节明显)
- 在 Markdown 文件中使用 Mermaid 语法创建上述图表。图表应保持高层,不要过于详细。
3. 产品视角:产品摘要
系统做什么(详细)
- 详细描述系统的主要功能。
- 用户可以执行哪些任务或操作?
系统面向谁(用户 / 客户)
- 确定系统的主要目标受众。
- 谁是受益的最终用户或客户?
它解决的问题(满足的需求)
- 系统帮助用户或组织解决哪些具体问题?
- 它满足了哪些需求?
用例 / 用户旅程(高层)
- 系统的主要用例是什么?
- 用户如何与系统交互以实现其目标?
核心功能
- 清晰简洁地列出最重要的系统功能。
业务领域
- 确定系统覆盖的主要业务领域(例如:销售、库存、财务)。
分析局限性
- 代码分析过程中遇到的主要局限性是什么?
- 简要描述是什么限制了你对代码的理解。
- 提供减少或消除这些局限性的建议。
文档指南
文档格式
- 文档必须采用 Markdown 格式,每个部分都要有清晰的标题和副标题。
- 使用列表、表格和其他 Markdown 元素来提高可读性和理解度。
附加说明
- 专注于提供相关的、高层次的 信息,避免过多的实现细节,除非这些细节对理解至关重要。
- 使用清晰、简洁且易于理解的语言,适合多种受众。
- 基于代码分析尽可能具体。
- 将完整回复生成为一份格式良好的 Markdown(
.md)文档。 - 使用清晰直接的语言。
- 根据上述各部分使用标题和副标题。
文档标题
应用程序的执行与业务分析 – “”
文档摘要
本文档是对 系统源代码分析的结果,涵盖以下领域:
- 执行层视角: 概述应用程序的用途、高层运作方式、主要业务规则和关键收益。
- 技术层视角: 有关系统架构、所用技术、主要流程、关键组件和图表(组件、数据流、类和部署)的详细信息。
- 产品视角: 详细描述系统功能、目标用户、解决的问题、主要用例、特性和业务领域。
- 分析局限性: 识别关键分析约束以及克服这些约束的建议。
该分析基于可用的源代码文件。
重要
分析必须考虑所有项目文件。
阅读并理解完成任务并实现对系统的完整理解所需的所有必要文件。
行动
请分析我当前环境/工作区中可用的源代码,并生成所要求的 Markdown 文档。
输出文件名必须遵循以下格式:
<yyyy-mm-dd-project-name-app-discovery_cursor.md>
English original
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 – ""
Document Summary
This document is the result of the source code analysis of the 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>