Files
graduation-design/.clinerules
ikmkj 3044ad47b3 feat: Refine AI rules and add SQL injection utility
Refactor the `.clinerules` file to provide clearer and more structured instructions for the AI agent. The rules are now more specific and better organized.

Add a new `SqlInjectionUtil.java` class to sanitize inputs and prevent potential SQL injection vulnerabilities.
2025-07-29 23:10:42 +08:00

12 lines
938 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 项目专用 AI 规则(.clinerules
1. 执行任务时先分析任务,再拆分为多个可执行的小任务,逐步执行。
2. 禁止启动或重启项目服务(例如 dev server、npm run dev、npm start 等)。
3. 若任务属于“新建项目”或“开发全新功能”,首先调用 context7 MCP 服务查找对应文档。
4. 若任务属于“修改已有业务逻辑”,禁止调用 context7步骤为
4.1 先查看前端功能对应的后端接口;
4.2 若后端接口已实现 → 返回前端逻辑;
4.3 若后端接口未实现 → 先完成后端,再处理前端。
5. 对文件的“写操作”(创建、修改、更新、删除)必须使用 filesystem MCP仅查看/读取文件时可使用 apply_diff。
6. 规则5失败时 fallback 顺序:
6.1 先尝试 apply_diff
6.2 若 apply_diff 仍失败 → 先保存文件 → 重新读取 → 再次 apply_diff。