该提示词用于从代码逆向梳理业务需求文档。输入一段代码,AI会详细梳理核心类的业务逻辑、提取关键业务规则与算法、识别边界条件和异常处理,并按规范输出Markdown格式的需求文档,包含业务流程图、接口说明、算法描述、版本变更记录,适合开发团队沉淀文档。

中文版提示词

请理解`xxxxx`这段代码的业务逻辑,完成以下任务:
1. 代码分析:详细梳理[核心类名]的核心业务逻辑;提取所有关键业务规则和算法实现;识别业务边界条件和异常处理机制。
2. 需求文档规范:使用Markdown格式编写需求文档;文档需包含业务流程图、核心接口说明、关键算法描述;对复杂业务逻辑添加详细注释。
3. 输出要求:将整理完成的业务需求文档保存到`xxx`目录下;文档命名为`xxx`;确保结构清晰并包含版本变更记录。
4. 质量要求:需求描述准确反映代码实现;关键业务点需与产品经理确认;文档应具备可追溯性和可验证性。

英文版提示词

Please understand the business logic of the code `xxxxx` and complete the following tasks:
1. Code analysis: thoroughly sort out the core business logic of the [core class name]; extract all key business rules and algorithm implementations; identify business boundary conditions and exception handling mechanisms.
2. Requirements document standards: Write the requirements document in Markdown format; it must include business flow diagrams, core interface descriptions, and key algorithm descriptions; add detailed notes for complex business logic.
3. Output requirements: Save the completed business requirements document to the `xxx` directory; name the document `xxx`; ensure a clear structure and include a version change history.
4. Quality requirements: The requirements description must accurately reflect the code implementation; key business points should be confirmed with the product manager; the document should be traceable and verifiable.

🛠️ **适用 AI 工具**:Claude、ChatGPT、Cursor、Copilot、DeepSeek、Gemini