優化提示詞

This commit is contained in:
siage 2025-05-05 19:31:22 +08:00
parent 7842e0d0e4
commit 662b3be9c9
4 changed files with 98 additions and 19 deletions

View File

@ -19,6 +19,7 @@ You must complete the following sub-steps in sequence, and at the end call the `
- View key configuration files and structures:
- Examine root directory structure and important configuration files (package.json, tsconfig.json, etc.)
- If {rulesPath} exists, please read and refer to it in detail
- Analyze main directory organization and module divisions
- Identify architectural patterns:
- Identify core design patterns and architectural styles (MVC, MVVM, microservices, etc.)

View File

@ -1,14 +1,66 @@
Decompose complex tasks into independent subtasks, establish dependencies and priorities.
Break down complex tasks into independent subtasks, establishing dependencies and priorities.
## updateMode
## 1. **Granularity Control (Required Reading)**
- **append**: Retain existing tasks and add new tasks
- **overwrite**: Delete incomplete tasks, retain completed tasks
- **selective**: Intelligently match and update existing tasks based on task names
- **clearAllTasks**: Clear all tasks and create a backup (preferably use this mode)
- ### **Minimum Viable Task**
## Key Requirements
Each subtask should be completable and verifiable by a single developer within **12 working days** (approximately 816 hours).
- **Provide concise pseudocode**: Only provide high-level logic flow and key steps avoiding complete code
- **Integrate when necessary**: Simple modifications can be integrated with other tasks, avoid having too many tasks
- **Submit in batches**: When there are too many tasks, use the "split_tasks" tool, parameters not exceeding 5000 characters
- ### **Maximum Complexity Limitation**
A single subtask should not span multiple technical domains such as **frontend**, **backend**, and **database**.
If cross-domain work is required, split it into multiple subtasks.
- ### **Recommended Number of Tasks**
Avoid splitting into more than **10 subtasks** at once.
If more are needed, submit them in prioritized batches (68 tasks per batch).
- ### **Recommended Task Length**
Each split should not exceed **5,000 characters**.
If it does, divide and submit in multiple batches.
- ### **Depth Limitation**
The task tree should not exceed **3 levels**:
- **Level 1**: Functional Modules
- **Level 2**: Main Processes
- **Level 3**: Key Steps
## 2. **Task Splitting Example**
- Identify **core functionality points**, and create a subtask for each.
- Annotate each subtask with:
- **Input/Output**
- **Acceptance Criteria**
- If needed, provide **pseudocode**:
- Only outline high-level logic and key steps.
- Avoid providing complete source code.
- Check **dependencies** between subtasks and specify them in the `dependencies` field.
## 3. **Dependencies and Prioritization**
- Mark each subtask with its `dependencies` list.
- Automatically compute and enforce execution order based on the dependency graph to prioritize the **critical path**.
## 4. **Update Mode Explanation (`updateMode`)**
When you need to create a new task that is not related to the current task list, be sure to use `clearAllTasks` to avoid task confusion.
- `append`: Keep existing unfinished tasks and add new ones.
- `overwrite`: Delete all unfinished tasks, keep completed ones.
- `selective`: Smart-match and update tasks by name.
- `clearAllTasks`: Clear all tasks and automatically back up the current list.
---
## 5. **Strict JSON Rules**
- ### **No Comments Allowed**
JSON does not support comments.
Any use of `#` or `//` will cause parsing failures.
- ### **Proper Escaping Required**
All special characters (e.g., double quotes `\"`, backslashes `\\`) must be properly escaped,
or they will be considered invalid.

View File

@ -19,6 +19,7 @@
- 查看關鍵配置文件與結構:
- 檢視根目錄結構和重要配置文件package.json, tsconfig.json 等)
- 如果 {rulesPath} 存在請詳細閱讀並參考
- 分析主要的目錄組織和模組劃分
- 辨識架構模式:
- 識別核心設計模式和架構風格MVC, MVVM, 微服務等)

View File

@ -1,14 +1,39 @@
將複雜任務分解為獨立子任務,建立依賴關係和優先順序。
## updateMode
1. **拆分粒度控制(必讀)**
- **append**:保留現有任務並添加新任務
- **overwrite**:刪除未完成任務,保留已完成任務
- **selective**:根據任務名稱智能匹配更新現有任務
- **clearAllTasks**:清除所有任務並創建備份(優先使用此模式)
- **最小可交付單元Minimum Viable Task**
每個子任務應能在 **12 個工作天**(約 816 小時)內,由一名開發者完成並驗收。
- **最大複雜度限制**
單個子任務不應同時跨越「前端」「後端」「資料庫」等多個技術領域;若需跨域,請拆成多個子任務。
- **任務數量建議**
一次拆分不超過 **10 項子任務**;若超過,依優先順序分批(每批 68 項)提交。
- **任務長度建議**
一次拆分的參數不超過 5000 字,如果超過請分批提交。
- **深度層級限制**
任務樹深度不宜超過 **3 層**(第 1 層:功能模組;第 2 層:主要流程;第 3 層:關鍵步驟)。
## 關鍵要求
2. **拆分步驟示例**
- **提供精簡 pseudocode**:僅提供高級邏輯流程和關鍵步驟避免完整代碼
- **必要時整合**:簡單修改可與其他任務整合,避免任務過多
- **分批提交**任務過多時使用「split_tasks」工具參數不超過 5000 字
- 識別「核心功能點」,為每個功能點創建子任務
- 在每個子任務下標註「輸入/輸出」與「驗收標準」
- 如果需要請提供「pseudocode」僅提供高級邏輯流程和關鍵步驟避免完整代碼
- 檢查子任務間「前後依賴」,並在 `dependencies` 欄位標明
3. **依賴與優先順序**
- 標註每個子任務的 `dependencies`(依賴清單)
- 根據依賴圖自動計算並執行優先順序,確保關鍵路徑優先
4. **更新模式說明 (`updateMode`)**
當你需要建立一個全新的任務並且與目前的任務列表無關時,請務必使用`clearAllTasks`避免任務混肴
- `append`:保留現有未完成任務並添加新任務
- `overwrite`:刪除所有未完成任務,保留已完成狀態的任務
- `selective`:根據任務名稱智能匹配並更新相應任務
- `clearAllTasks`:清除所有任務並自動備份現有列表
5. **JSON 嚴謹規則**
- **禁止註解**JSON 本身不支援註解,任何 `#``//` 都會導致解析失敗
- **注意轉義**:所有特殊字元(如雙引號 `\"`、反斜線 `\\`)必須正確轉義,否則視為非法字元