新增專案規則更新模式指南,強調遞迴檢查所有資料夾與檔案,並規範模糊請求的自主處理流程,提升規則更新的完整性與時效性。

This commit is contained in:
siage 2025-04-27 01:02:48 +08:00
parent d0c3bfac8a
commit 989af20885
2 changed files with 22 additions and 8 deletions

View File

@ -20,6 +20,7 @@ Please use the "process_thought" tool to consider the following questions
- Use imperative language to define rules, avoiding explanatory content
- Do not explain project functionality, but rather how to modify or add features
- Provide examples of what can and cannot be done
- Must **recursively** check all folders and files
**Strictly Prohibited:**
@ -66,9 +67,15 @@ The specification file should include, but is not limited to, the following cont
6. **Highlight Key Markers** - Use bold, warning markers, etc., to emphasize crucial rules and prohibitions
7. **Remove General Knowledge** - Prohibit including general development knowledge known to the LLM, only include project-specific rules
## Update Mode Guide
1. **Minimal Change** - When the user requests an update to the project rules, you should maintain existing rules unless necessary, modifying with the principle of minimal change.
2. **Timeliness** - You should check if existing rules are still effective or outdated, as the user may have modified or removed relevant code. You must correct or remove corresponding rules.
3. **Completeness** - You should check all folders and file contents of the existing project, as the user may have added or modified relevant code. You must supplement corresponding rules.
4. **Autonomous Handling of Vague Requests**: When receiving a vague instruction like "update rules" without specific details, the AI **MUST** first attempt to autonomously analyze the current codebase, recent changes (if available), and existing `rules.md` content to infer potential update points. List these inferred points and their rationale during the `process_thought` stage before proposing specific changes. **Strictly prohibit** asking the user for clarification on vague update requests before performing this autonomous analysis.
Please create a file named rules.md based on the guidelines above and store it at: {rulesPath}
**Now start calling the "process_thought" tool to think about how to write the specification file to guide the Coding Agent**
**After thinking, immediately edit the rules.md file. Calling the "analyze_task" tool is prohibited**
**If the file already exists or the user requests an update, consider if the rules are outdated and need supplementation or updates**
**In update mode, you should maintain existing rules unless necessary, modifying with the principle of minimal change**
**[AI Agent Action]** Now start calling the "process_thought" tool to think about how to write the specification file to guide the Coding Agent
**[AI Agent Action]** After thinking, immediately edit the rules.md file. Calling the "analyze_task" tool is prohibited
**[AI Agent Action]** Strictly prohibit not calling tools. The AI must autonomously complete the entire process from instruction receipt to execution unless encountering technical errors or unsolvable dependency conflicts. Do not interrupt the flow to seek user input unnecessarily.

View File

@ -20,6 +20,7 @@
- 使用命令式語言定義規則,避免解釋性內容
- 不要進行專案的功能解釋,而是如何修改功能或增加功能
- 請提供範例什麼事可以做的,什麼事不可以做的
- 必須**遞迴**檢查所有資料夾與檔案
**嚴重禁止:**
@ -66,9 +67,15 @@
6. **突出重點標記** - 使用粗體、警告標記等突出關鍵規則和禁忌
7. **移除通用知識** - 禁止包含 LLM 已知的通用開發知識,僅包含專案特定規則
## 更新模式指南
1. **最小變動** - 當用戶要求更新專案規則時,除非必要否則你應該雹持現有規則,以最小變更為原則的修改
2. **時效性** - 你應該檢查有的規則的是否有還效益或過時,因為用戶可能已經修改或移除相關程式,你必須修正或移除相應規則
3. **完整性** - 你應該檢查現有專案的所有資料夾及檔案內容,因為用戶可能已經有新增或修改相關程式,你必須補充相應的規則
4. **自主處理模糊請求**當收到如「更新規則」等未指定具體內容的模糊指令時AI **必須**首先嘗試自主分析當前程式碼庫、近期變更(如果可用)以及現有的 `rules.md` 內容,以推斷可能的更新點。在 `process_thought` 階段列出這些推斷點及其理由,然後再提出具體修改建議。在執行此自主分析之前,**嚴格禁止**就模糊的更新請求向用戶尋求澄清。
請根據以上指南,創建一個名為 rules.md 的文件並存放於: {rulesPath}
**現在開始呼叫 「process_thought」 工具思考如何撰寫出教導 Coding Agent 規範文件**
**思考完畢後請立即編輯 rules.md 文件禁止呼叫「analyze_task」工具**
**如果檔案已經存在或用戶要求更新,請思考規範是否已經過時,是否需要補充更新**
**如果是更新模式,除非必要否則你應該保持現有的規範,以最小變更為原則的修改**
**[AI Agent Action]**現在開始呼叫 「process_thought」 工具思考如何撰寫出教導 Coding Agent 規範文件
**[AI Agent Action]**思考完畢後請立即編輯 rules.md 文件禁止呼叫「analyze_task」工具
**[AI Agent Action]**嚴禁不呼叫工具。AI 必須自主完成從接收指令到執行修改的完整流程,除非遇到技術錯誤或無法解決的依賴衝突,否則不應中斷流程尋求用戶輸入。