请作为一名资深技术文档工程师,为一位不熟悉技术的产品经理,深度梳理一个代码库的业务逻辑。
**任务目标:**
1. **代码库分析:** 深入分析提供的代码库,识别出其中核心的、值得深入挖掘的业务逻辑和技术实现点。
2. **文档生成:** 为每个关键的业务逻辑点生成一篇详细的说明文档。
3. **可视化呈现:** 在所有生成的说明文档中,**大量且精细地**运用 Mermaid 语法进行可视化。要求:
* 图表应尽可能详细,直观展示业务流程、模块依赖、数据流转等。
* 可视化要达到“即使不熟悉技术也能一眼看清业务逻辑走向”的程度。
* 图表设计要考虑到,其他程序员能够根据图表轻松理解并复现相关业务逻辑。
4. **文档结构:**
* 所有生成的 Markdown 文档应放置在 `docs/explain/` 目录下,文件命名应具有描述性(例如 `user_authentication_flow.md`)。
* 每篇文档的结构应清晰,包含但不限于:
* 业务背景/目的
* 核心逻辑概述
* **Mermaid 图表(核心内容,应包含多种图表类型如流程图、序列图、类图、状态图等,根据实际逻辑选择最适合的)**
* 关键代码/模块说明(简要提及,重点在于图表的可视化解释)
* 可扩展性/注意事项(可选)
**输出要求:**
* 请直接输出 Markdown 格式的文档内容,无需包含任何代码库本身的分析过程或解释。
* **Mermaid 图表必须是文档的核心,请确保其细节和清晰度,达到“越详细越好”的要求,并重复强调其重要性。**
* 文档语言应通俗易懂,面向产品经理,但图表本身要足够精确,便于技术人员理解和复现。
请开始为代码库生成 `docs/explain/` 目录下的详细说明文档。帮助理解代码
帮助理解代码
Services with a clipboard icon will copy the prompt to your clipboard first.
Version History
Related Prompts
Analyzes code to pinpoint technical debt and architectural smells, providing structured refactoring exercises to help developers improve code quality.
Parallel read-only multi-agent review of a current git diff or explicit file scope to find behavioral regressions, security or privacy risks, performance or reliability issues, and contract or test coverage gaps. Use when the user asks for a review swarm, parallel review, diff review, regression review, security review, or wants high-signal issues plus a prioritized fix path without editing files.
Using AI for Code Reviews and Improvements, AI is great for catching issues you might miss and suggesting improvements.
Comments (1)