mirror of
https://github.com/cjo4m06/mcp-shrimp-task-manager.git
synced 2025-07-26 07:52:25 +08:00
新增多語系支持的任務模板,包括英文和中文版本,提升任務管理的靈活性與可讀性,並整合相關工具描述,強化用戶體驗。
This commit is contained in:
parent
a51110f4fa
commit
291c5eeae9
@ -11,6 +11,14 @@ DATA_DIR=
|
||||
# Enable thought chain
|
||||
ENABLE_THOUGHT_CHAIN=true
|
||||
|
||||
# Set Templates
|
||||
# Specifies the template set to use for prompts.
|
||||
# Default is 'en'. Currently available options are 'en' and 'zh'.
|
||||
# To use custom templates, copy the 'src/prompts/templates_en' directory
|
||||
# to the location specified by DATA_DIR, rename the copied directory
|
||||
# (e.g., to 'my_templates'), and set TEMPLATES_USE to the new directory name (e.g., 'my_templates').
|
||||
TEMPLATES_USE=en
|
||||
|
||||
# ============================
|
||||
# Prompt Customization
|
||||
# ============================
|
||||
|
@ -75,13 +75,64 @@ export function generatePrompt(
|
||||
|
||||
/**
|
||||
* 從模板載入 prompt
|
||||
* @param templatePath 模板路徑
|
||||
* @returns 模板
|
||||
* @param templatePath 相對於模板集根目錄的模板路徑 (e.g., 'chat/basic.md')
|
||||
* @returns 模板內容
|
||||
* @throws Error 如果找不到模板文件
|
||||
*/
|
||||
export function loadPromptFromTemplate(templatePath: string): string {
|
||||
const template = fs.readFileSync(
|
||||
path.join(__dirname, "templates", templatePath),
|
||||
"utf-8"
|
||||
);
|
||||
return template;
|
||||
const templateSetName = process.env.TEMPLATES_USE || "en";
|
||||
const dataDir = process.env.DATA_DIR;
|
||||
const builtInTemplatesBaseDir = __dirname;
|
||||
|
||||
let finalPath = "";
|
||||
const checkedPaths: string[] = []; // 用於更詳細的錯誤報告
|
||||
|
||||
// 1. 檢查 DATA_DIR 中的自定義路徑
|
||||
if (dataDir) {
|
||||
// path.resolve 可以處理 templateSetName 是絕對路徑的情況
|
||||
const customFilePath = path.resolve(dataDir, templateSetName, templatePath);
|
||||
checkedPaths.push(`Custom: ${customFilePath}`);
|
||||
if (fs.existsSync(customFilePath)) {
|
||||
finalPath = customFilePath;
|
||||
}
|
||||
}
|
||||
|
||||
// 2. 如果未找到自定義路徑,檢查特定的內建模板目錄
|
||||
if (!finalPath) {
|
||||
// 假設 templateSetName 對於內建模板是 'en', 'zh' 等
|
||||
const specificBuiltInFilePath = path.join(
|
||||
builtInTemplatesBaseDir,
|
||||
`templates_${templateSetName}`,
|
||||
templatePath
|
||||
);
|
||||
checkedPaths.push(`Specific Built-in: ${specificBuiltInFilePath}`);
|
||||
if (fs.existsSync(specificBuiltInFilePath)) {
|
||||
finalPath = specificBuiltInFilePath;
|
||||
}
|
||||
}
|
||||
|
||||
// 3. 如果特定的內建模板也未找到,且不是 'en' (避免重複檢查)
|
||||
if (!finalPath && templateSetName !== "en") {
|
||||
const defaultBuiltInFilePath = path.join(
|
||||
builtInTemplatesBaseDir,
|
||||
"templates_en",
|
||||
templatePath
|
||||
);
|
||||
checkedPaths.push(`Default Built-in ('en'): ${defaultBuiltInFilePath}`);
|
||||
if (fs.existsSync(defaultBuiltInFilePath)) {
|
||||
finalPath = defaultBuiltInFilePath;
|
||||
}
|
||||
}
|
||||
|
||||
// 4. 如果所有路徑都找不到模板,拋出錯誤
|
||||
if (!finalPath) {
|
||||
throw new Error(
|
||||
`Template file not found: '${templatePath}' in template set '${templateSetName}'. Checked paths:\n - ${checkedPaths.join(
|
||||
"\n - "
|
||||
)}`
|
||||
);
|
||||
}
|
||||
|
||||
// 5. 讀取找到的文件
|
||||
return fs.readFileSync(finalPath, "utf-8");
|
||||
}
|
||||
|
50
src/prompts/templates_en/analyzeTask/index.md
Normal file
50
src/prompts/templates_en/analyzeTask/index.md
Normal file
@ -0,0 +1,50 @@
|
||||
**Please strictly follow the guidelines below**
|
||||
|
||||
## Codebase Analysis
|
||||
|
||||
### Task Summary
|
||||
|
||||
{summary}
|
||||
|
||||
### Solution Concept
|
||||
|
||||
{initialConcept}
|
||||
|
||||
## Technical Review Points
|
||||
|
||||
Pay attention to opportunities for code reuse, avoid reimplementing existing functionality, and mitigate technical debt risks.
|
||||
|
||||
### 1. Codebase Analysis
|
||||
|
||||
- Look for reusable components and similar implementations
|
||||
- Determine the appropriate location for the new functionality
|
||||
- Evaluate integration methods with existing modules
|
||||
|
||||
### 2. Technical Strategy Evaluation
|
||||
|
||||
- Consider modularity and scalability in the design
|
||||
- Assess the future compatibility of the proposal
|
||||
- Plan testing strategies and coverage
|
||||
|
||||
### 3. Risk and Quality Analysis
|
||||
|
||||
- Identify technical debt and performance bottlenecks
|
||||
- Evaluate security and data integrity
|
||||
- Check error handling mechanisms
|
||||
|
||||
### 4. Implementation Recommendations
|
||||
|
||||
- Follow project architectural style
|
||||
- Recommend implementation methods and technology choices
|
||||
- Propose clear development steps
|
||||
|
||||
{previousAnalysis}
|
||||
|
||||
## Next Actions
|
||||
|
||||
After completing the analysis, use the "reflect_task" tool to submit the final analysis, including:
|
||||
|
||||
1. **Original Task Summary** - Keep consistent with the first stage
|
||||
2. **Complete Analysis Results** - Technical details, interface dependencies, implementation strategy, acceptance criteria
|
||||
|
||||
Your analysis will determine the quality of the solution. Please comprehensively consider various technical factors and business constraints.
|
12
src/prompts/templates_en/analyzeTask/iteration.md
Normal file
12
src/prompts/templates_en/analyzeTask/iteration.md
Normal file
@ -0,0 +1,12 @@
|
||||
## Iterative Analysis
|
||||
|
||||
Please compare with the previous analysis results:
|
||||
|
||||
{previousAnalysis}
|
||||
|
||||
Please identify:
|
||||
|
||||
1. Resolved issues and the effectiveness of the solutions
|
||||
2. Remaining issues and their priorities
|
||||
3. How the new plan addresses unresolved issues
|
||||
4. New insights gained during the iteration
|
1
src/prompts/templates_en/clearAllTasks/backupInfo.md
Normal file
1
src/prompts/templates_en/clearAllTasks/backupInfo.md
Normal file
@ -0,0 +1 @@
|
||||
A backup has been automatically created: `{{backupFile}}`
|
7
src/prompts/templates_en/clearAllTasks/cancel.md
Normal file
7
src/prompts/templates_en/clearAllTasks/cancel.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Clear All Tasks Result
|
||||
|
||||
## Operation Canceled
|
||||
|
||||
Clear operation not confirmed. To clear all tasks, set the confirm parameter to true.
|
||||
|
||||
⚠️ This action will delete all unfinished tasks and cannot be undone.
|
5
src/prompts/templates_en/clearAllTasks/empty.md
Normal file
5
src/prompts/templates_en/clearAllTasks/empty.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Clear All Tasks Result
|
||||
|
||||
## Operation Hint
|
||||
|
||||
There are no tasks in the system to clear.
|
5
src/prompts/templates_en/clearAllTasks/index.md
Normal file
5
src/prompts/templates_en/clearAllTasks/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Clear All Tasks Result
|
||||
|
||||
## {responseTitle}
|
||||
|
||||
{message}{backupInfo}
|
5
src/prompts/templates_en/clearAllTasks/success.md
Normal file
5
src/prompts/templates_en/clearAllTasks/success.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Clear All Tasks Result
|
||||
|
||||
## Operation Successful
|
||||
|
||||
All unfinished tasks have been cleared.{backupInfo}
|
17
src/prompts/templates_en/completeTask/index.md
Normal file
17
src/prompts/templates_en/completeTask/index.md
Normal file
@ -0,0 +1,17 @@
|
||||
**Please strictly follow the guidelines below**
|
||||
|
||||
## Task Completion Confirmation
|
||||
|
||||
Task "{name}" (ID: `{id}`) was successfully marked as completed at {completionTime}.
|
||||
|
||||
## Task Summary Requirement
|
||||
|
||||
Please provide a summary for this completed task, including the following key points:
|
||||
|
||||
1. Task goals and main achievements
|
||||
2. Key points of the implemented solution
|
||||
3. Main challenges encountered and their solutions
|
||||
|
||||
**Important Note:**
|
||||
Please provide the task summary in the current response. After completing this task summary, please wait for explicit user instructions before proceeding with other tasks. Do not automatically start the next task.
|
||||
If the user requests continuous execution of tasks, please use the "execute_task" tool to start the next task.
|
5
src/prompts/templates_en/deleteTask/completed.md
Normal file
5
src/prompts/templates_en/deleteTask/completed.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Task Deletion Result
|
||||
|
||||
## Operation Rejected
|
||||
|
||||
Task "{taskName}" (ID: `{taskId}`) is completed and cannot be deleted. Deleting completed tasks is not allowed.
|
5
src/prompts/templates_en/deleteTask/index.md
Normal file
5
src/prompts/templates_en/deleteTask/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Task Deletion Result
|
||||
|
||||
## {responseTitle}
|
||||
|
||||
{message}
|
5
src/prompts/templates_en/deleteTask/notFound.md
Normal file
5
src/prompts/templates_en/deleteTask/notFound.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Task Deletion Result
|
||||
|
||||
## System Error
|
||||
|
||||
Task with ID `{taskId}` not found. Please use the "list_tasks" tool to confirm a valid task ID before trying again.
|
5
src/prompts/templates_en/deleteTask/success.md
Normal file
5
src/prompts/templates_en/deleteTask/success.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Task Deletion Result
|
||||
|
||||
## Operation Successful
|
||||
|
||||
The task has been successfully deleted.
|
3
src/prompts/templates_en/executeTask/analysisResult.md
Normal file
3
src/prompts/templates_en/executeTask/analysisResult.md
Normal file
@ -0,0 +1,3 @@
|
||||
## Analysis Background
|
||||
|
||||
{analysisResult}
|
15
src/prompts/templates_en/executeTask/complexity.md
Normal file
15
src/prompts/templates_en/executeTask/complexity.md
Normal file
@ -0,0 +1,15 @@
|
||||
## Task Complexity Assessment
|
||||
|
||||
- **Complexity Level:** {level}
|
||||
|
||||
{complexityStyle}
|
||||
|
||||
### Assessment Metrics
|
||||
|
||||
- Description Length: {descriptionLength} characters
|
||||
|
||||
- Number of Dependencies: {dependenciesCount}
|
||||
|
||||
### Handling Recommendations
|
||||
|
||||
{recommendation}
|
3
src/prompts/templates_en/executeTask/dependencyTasks.md
Normal file
3
src/prompts/templates_en/executeTask/dependencyTasks.md
Normal file
@ -0,0 +1,3 @@
|
||||
## Dependency Task Completion Summaries
|
||||
|
||||
{{ dependencyTasks }}
|
@ -0,0 +1,3 @@
|
||||
## Implementation Guide
|
||||
|
||||
{implementationGuide}
|
38
src/prompts/templates_en/executeTask/index.md
Normal file
38
src/prompts/templates_en/executeTask/index.md
Normal file
@ -0,0 +1,38 @@
|
||||
**Please strictly follow the guidelines below**
|
||||
|
||||
## Task Execution
|
||||
|
||||
**Name:** {name}
|
||||
|
||||
**ID:** `{id}`
|
||||
|
||||
**Description:** {description}
|
||||
|
||||
{notesTemplate}
|
||||
|
||||
{implementationGuideTemplate}
|
||||
|
||||
{verificationCriteriaTemplate}
|
||||
|
||||
{analysisResultTemplate}
|
||||
|
||||
{dependencyTasksTemplate}
|
||||
|
||||
{relatedFilesSummaryTemplate}
|
||||
|
||||
{complexityTemplate}
|
||||
|
||||
## Execution Steps
|
||||
|
||||
1. **Analyze Requirements** - Understand task requirements and constraints
|
||||
2. **Design Solution** - Develop implementation plan and testing strategy
|
||||
3. **Implement Solution** - Execute according to plan, handle edge cases
|
||||
4. **Test and Verify** - Ensure functional correctness and robustness
|
||||
|
||||
## Quality Requirements
|
||||
|
||||
- **Scope Management** - Only modify relevant code, avoid feature creep
|
||||
- **Code Quality** - Comply with coding standards, handle exceptions
|
||||
- **Performance Consideration** - Pay attention to algorithm efficiency and resource usage
|
||||
|
||||
Start executing the task according to instructions. After execution, please directly use the "verify_task" tool for verification.
|
1
src/prompts/templates_en/executeTask/notes.md
Normal file
1
src/prompts/templates_en/executeTask/notes.md
Normal file
@ -0,0 +1 @@
|
||||
**Notes:** {notes}
|
@ -0,0 +1,5 @@
|
||||
## Related Files
|
||||
|
||||
You can use the `update_task` tool to add related files to provide context during task execution.
|
||||
|
||||
{relatedFilesSummary}
|
@ -0,0 +1,3 @@
|
||||
## Verification Criteria
|
||||
|
||||
{verificationCriteria}
|
@ -0,0 +1,5 @@
|
||||
**Completed At:** {completedTime}
|
||||
|
||||
**Completion Summary:**
|
||||
|
||||
{summary}
|
1
src/prompts/templates_en/getTaskDetail/dependencies.md
Normal file
1
src/prompts/templates_en/getTaskDetail/dependencies.md
Normal file
@ -0,0 +1 @@
|
||||
**Dependencies:** {dependencies}
|
3
src/prompts/templates_en/getTaskDetail/error.md
Normal file
3
src/prompts/templates_en/getTaskDetail/error.md
Normal file
@ -0,0 +1,3 @@
|
||||
## System Error
|
||||
|
||||
An error occurred while retrieving task details: {errorMessage}
|
@ -0,0 +1,3 @@
|
||||
**Implementation Guide:**
|
||||
|
||||
{implementationGuide}
|
25
src/prompts/templates_en/getTaskDetail/index.md
Normal file
25
src/prompts/templates_en/getTaskDetail/index.md
Normal file
@ -0,0 +1,25 @@
|
||||
## Full Task Details
|
||||
|
||||
### {name}
|
||||
|
||||
**ID:** `{id}`
|
||||
|
||||
**Status:** {status}
|
||||
|
||||
**Description:**{description}
|
||||
|
||||
{notesTemplate}
|
||||
|
||||
{dependenciesTemplate}
|
||||
|
||||
{implementationGuideTemplate}
|
||||
|
||||
{verificationCriteriaTemplate}
|
||||
|
||||
{relatedFilesTemplate}
|
||||
|
||||
**Created At:** {createdTime}
|
||||
|
||||
**Updated At:** {updatedTime}
|
||||
|
||||
{complatedSummaryTemplate}
|
3
src/prompts/templates_en/getTaskDetail/notFound.md
Normal file
3
src/prompts/templates_en/getTaskDetail/notFound.md
Normal file
@ -0,0 +1,3 @@
|
||||
## Error
|
||||
|
||||
Task with ID `{taskId}` not found. Please verify the task ID is correct.
|
1
src/prompts/templates_en/getTaskDetail/notes.md
Normal file
1
src/prompts/templates_en/getTaskDetail/notes.md
Normal file
@ -0,0 +1 @@
|
||||
**Notes:** {notes}
|
3
src/prompts/templates_en/getTaskDetail/relatedFiles.md
Normal file
3
src/prompts/templates_en/getTaskDetail/relatedFiles.md
Normal file
@ -0,0 +1,3 @@
|
||||
**Related Files:**
|
||||
|
||||
{files}
|
@ -0,0 +1,3 @@
|
||||
**Verification Criteria:**
|
||||
|
||||
{verificationCriteria}
|
74
src/prompts/templates_en/initProjectRules/index.md
Normal file
74
src/prompts/templates_en/initProjectRules/index.md
Normal file
@ -0,0 +1,74 @@
|
||||
Please use the "process_thought" tool to consider the following questions
|
||||
|
||||
# Project Rules Initialization Guide
|
||||
|
||||
## Purpose
|
||||
|
||||
**This document is designed specifically for the AI Agent, not general developer documentation.**
|
||||
**A project specification file (rules.md) specifically for AI Agent operations MUST be generated.**
|
||||
|
||||
**Must focus on the following key objectives:**
|
||||
|
||||
- Clearly define project-specific rules and limitations, prohibiting general development knowledge
|
||||
- Provide project-specific information required by the AI for task execution
|
||||
- Offer clear guidance for the AI's decision-making process
|
||||
|
||||
**Mandatory Requirements:**
|
||||
|
||||
- The completed specification must enable the AI Agent to immediately understand which files must be referenced or modified
|
||||
- Clearly indicate multi-file 联动 modification requirements (e.g., modifying README.md requires simultaneous modification of /docs/zh/README.md)
|
||||
- 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
|
||||
|
||||
**Strictly Prohibited:**
|
||||
|
||||
- Including general development knowledge
|
||||
- Including general development knowledge already known to the LLM
|
||||
- Explaining project functionality
|
||||
|
||||
## Suggested Structure
|
||||
|
||||
Please use the following structure to create the specification file:
|
||||
|
||||
```markdown
|
||||
# Development Guidelines
|
||||
|
||||
## Heading
|
||||
|
||||
### Subheading
|
||||
|
||||
- Rule one
|
||||
- Rule two
|
||||
```
|
||||
|
||||
## Content Guide
|
||||
|
||||
The specification file should include, but is not limited to, the following content:
|
||||
|
||||
1. **Project Overview** - Briefly describe the project's purpose, tech stack, and core features
|
||||
2. **Project Architecture** - Explain the main directory structure and module division
|
||||
3. **Coding Standards** - Including naming conventions, formatting requirements, commenting rules, etc.
|
||||
4. **Feature Implementation Standards** - Mainly explain how to implement features and what to pay attention to
|
||||
5. **Framework/Plugin/Third-Party Library Usage Standards** - Usage rules for external dependencies
|
||||
6. **Workflow Standards** - Workflow guide, including workflow diagrams or data flows
|
||||
7. **Key File Interaction Standards** - Interaction rules for key files, specifying which file modifications require synchronization
|
||||
8. **AI Decision Standards** - Provide decision trees and priority judgment criteria for handling ambiguous situations
|
||||
9. **Prohibitions** - Clearly list practices that are forbidden
|
||||
|
||||
## Important Notes
|
||||
|
||||
1. **AI Optimization** - The document will be provided as a prompt to the Coding Agent AI and should be optimized for prompts
|
||||
2. **Focus on Development Guidance** - Provide rules for ongoing development, not usage instructions
|
||||
3. **Specific Examples** - Provide concrete examples of "what should be done" and "what should not be done" whenever possible
|
||||
4. **Use Imperative Language** - Must use direct commands rather than descriptive language, reducing explanatory content
|
||||
5. **Structured Presentation** - All content must be presented in structured formats like lists, tables, etc., for easy AI parsing
|
||||
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
|
||||
|
||||
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**
|
7
src/prompts/templates_en/listTasks/index.md
Normal file
7
src/prompts/templates_en/listTasks/index.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Task Management Dashboard
|
||||
|
||||
## Task Status Overview
|
||||
|
||||
{statusCount}
|
||||
|
||||
{taskDetailsTemplate}
|
3
src/prompts/templates_en/listTasks/notFound.md
Normal file
3
src/prompts/templates_en/listTasks/notFound.md
Normal file
@ -0,0 +1,3 @@
|
||||
# System Notification
|
||||
|
||||
Currently, there are no {statusText} tasks in the system. Please query tasks with other statuses or first use the "split_tasks" tool to create the task structure before proceeding.
|
13
src/prompts/templates_en/listTasks/taskDetails.md
Normal file
13
src/prompts/templates_en/listTasks/taskDetails.md
Normal file
@ -0,0 +1,13 @@
|
||||
### {name}
|
||||
|
||||
**ID:** `{id}`
|
||||
|
||||
**Description:** {description}
|
||||
|
||||
{complatedSummary}
|
||||
|
||||
**Dependencies:** {dependencies}
|
||||
|
||||
**Created At:** {createAt}
|
||||
|
||||
{complatedAt}
|
4
src/prompts/templates_en/planTask/hasThought.md
Normal file
4
src/prompts/templates_en/planTask/hasThought.md
Normal file
@ -0,0 +1,4 @@
|
||||
**Step 2: Must use "process_thought" to think through the answer (Directly using analyze_task is prohibited)**
|
||||
|
||||
1. **Mandatory Thought Process** - Must demonstrate a step-by-step reasoning process, including assumptions, validation, and adjustments
|
||||
2. Warning: You must first use the "process_thought" tool to think. Directly using analyze_task or providing a direct answer is strictly prohibited
|
62
src/prompts/templates_en/planTask/index.md
Normal file
62
src/prompts/templates_en/planTask/index.md
Normal file
@ -0,0 +1,62 @@
|
||||
**Please strictly follow the guidelines below**
|
||||
|
||||
## Task Analysis
|
||||
|
||||
{description}
|
||||
|
||||
## Requirements and Constraints
|
||||
|
||||
{requirements}
|
||||
|
||||
{tasksTemplate}
|
||||
|
||||
## Analysis Guidelines
|
||||
|
||||
1. Determine the task's goals and expected outcomes
|
||||
2. Identify technical challenges and key decision points
|
||||
3. Consider potential solutions and alternatives
|
||||
4. Evaluate the pros and cons of each solution
|
||||
5. Determine if the task needs to be broken down into subtasks
|
||||
6. Consider integration requirements with existing systems
|
||||
|
||||
## Task Memory Retrieval
|
||||
|
||||
Past task records are stored in **{memoryDir}**.
|
||||
|
||||
When using the query tool, judge based on the following scenarios:
|
||||
|
||||
- **Must Query (High Priority)**:
|
||||
|
||||
- Involves modifying or extending existing functionality, requiring understanding of the original implementation
|
||||
- Task description mentions referencing past work or existing implementation experience
|
||||
- Involves internal system technical implementation or key components
|
||||
- User requires memory query
|
||||
|
||||
- **Can Query (Medium Priority)**:
|
||||
|
||||
- New functionality has integration needs with the existing system, but implementation is partially independent
|
||||
- Functionality is standardized and needs to conform to system conventions
|
||||
- Unsure if similar implementations already exist
|
||||
|
||||
- **Can Skip (Low Priority)**:
|
||||
- Completely new, independent functionality
|
||||
- Basic setup or simple standard tasks
|
||||
- User explicitly instructs not to reference past records
|
||||
|
||||
> ※ Querying memory helps understand past solutions, learn from successful experiences, and avoid repeating mistakes.
|
||||
|
||||
## Information Gathering Guide
|
||||
|
||||
1. **Ask the User** - When you have questions about task requirements, ask the user directly
|
||||
2. **Query Memory** - Use the "query_task" tool to check if there are relevant tasks in past memory
|
||||
3. **Web Search** - When encountering terms or concepts you don't understand, use a web search tool to find answers
|
||||
|
||||
## Next Steps
|
||||
|
||||
⚠️ Important: Please read the rules in {rulesPath} before conducting any analysis or design ⚠️
|
||||
|
||||
**Step 1: Decide whether to query memory based on the task description**
|
||||
|
||||
- Determine if the task falls under a "Must Query" scenario. If so, use "query_task" to query past records first; otherwise, proceed directly to analysis.
|
||||
|
||||
{thoughtTemplate}
|
4
src/prompts/templates_en/planTask/noThought.md
Normal file
4
src/prompts/templates_en/planTask/noThought.md
Normal file
@ -0,0 +1,4 @@
|
||||
**Step 2: Submit analysis results using analyze_task**
|
||||
|
||||
1. **Task Summary** - Goals, scope, challenges, and constraints
|
||||
2. **Initial Solution Concept** - Feasible technical solutions and implementation plans
|
35
src/prompts/templates_en/planTask/tasks.md
Normal file
35
src/prompts/templates_en/planTask/tasks.md
Normal file
@ -0,0 +1,35 @@
|
||||
## Existing Task Reference
|
||||
|
||||
### Completed Tasks
|
||||
|
||||
{completedTasks}
|
||||
|
||||
### Unfinished Tasks
|
||||
|
||||
{unfinishedTasks}
|
||||
|
||||
## Task Adjustment Principles
|
||||
|
||||
1. **Completed Task Protection** - Completed tasks cannot be modified or deleted
|
||||
2. **Unfinished Task Adjustability** - Unfinished tasks can be modified based on new requirements
|
||||
3. **Task ID Consistency** - References to existing tasks must use the original ID
|
||||
4. **Dependency Integrity** - Avoid circular dependencies and dependencies on tasks marked for removal
|
||||
5. **Task Continuity** - New tasks should form a coherent whole with existing tasks
|
||||
|
||||
## Task Update Modes
|
||||
|
||||
### 1. **Append Mode (append)**
|
||||
|
||||
- Keep all existing tasks, only add new tasks
|
||||
- Applicable: Gradually expand functionality when the existing plan is still valid
|
||||
|
||||
### 2. **Overwrite Mode (overwrite)**
|
||||
|
||||
- Clear all existing unfinished tasks and use the new task list entirely
|
||||
- Applicable: Complete change of direction, existing unfinished tasks are no longer relevant
|
||||
|
||||
### 3. **Selective Update Mode (selective)**
|
||||
|
||||
- Selectively update tasks based on task name matching, retaining other existing tasks
|
||||
- Applicable: Partially adjust the task plan while retaining some unfinished tasks
|
||||
- How it works: Updates tasks with the same name, creates new tasks, retains other tasks
|
@ -0,0 +1,6 @@
|
||||
## Thinking Complete
|
||||
|
||||
Next, use "analyze_task" to submit the analysis results
|
||||
|
||||
1. **Task Summary** - Goals, scope, challenges, and constraints
|
||||
2. **Initial Solution Concept** - Feasible technical solutions and implementation plans
|
13
src/prompts/templates_en/processThought/index.md
Normal file
13
src/prompts/templates_en/processThought/index.md
Normal file
@ -0,0 +1,13 @@
|
||||
## Thought {thoughtNumber}/{totalThoughts} - {stage}
|
||||
|
||||
{thought}
|
||||
|
||||
**Tags:** {tags}
|
||||
|
||||
**Axioms Used:** {axioms_used}
|
||||
|
||||
**Assumptions Challenged:** {assumptions_challenged}
|
||||
|
||||
**Prohibitions:** You should prohibit all speculation. For any doubts, thoroughly review the relevant code or use web search tools to inquire.
|
||||
|
||||
{nextThoughtNeeded}
|
1
src/prompts/templates_en/processThought/moreThought.md
Normal file
1
src/prompts/templates_en/processThought/moreThought.md
Normal file
@ -0,0 +1 @@
|
||||
More thinking is needed, continue using the "process_thought" tool to think and find the answer
|
24
src/prompts/templates_en/queryTask/index.md
Normal file
24
src/prompts/templates_en/queryTask/index.md
Normal file
@ -0,0 +1,24 @@
|
||||
# Task Query Results
|
||||
|
||||
## Query Information
|
||||
|
||||
- Query Term: {query}
|
||||
|
||||
## Task List
|
||||
|
||||
The following tasks match the query:
|
||||
|
||||
{tasksContent}
|
||||
|
||||
## Pagination Information
|
||||
|
||||
- Current Page: {page} / {totalPages}
|
||||
- Items Per Page: {pageSize}
|
||||
- Total Results: {totalTasks}
|
||||
|
||||
You can specify the page parameter to view more results.
|
||||
|
||||
## Related Action Tips
|
||||
|
||||
- Use `get_task_detail {taskID}` to view full task details
|
||||
- Use `list_tasks` to view all tasks
|
15
src/prompts/templates_en/queryTask/notFound.md
Normal file
15
src/prompts/templates_en/queryTask/notFound.md
Normal file
@ -0,0 +1,15 @@
|
||||
# Task Query Results
|
||||
|
||||
## No Matching Results
|
||||
|
||||
No tasks found matching "{query}".
|
||||
|
||||
### Possible Reasons:
|
||||
|
||||
- The task ID you provided does not exist or is in the wrong format
|
||||
- The task may have been deleted
|
||||
- There might be a typo in the keywords
|
||||
- Try using shorter or similar keywords
|
||||
- The task list might be empty
|
||||
|
||||
You can use the `list_tasks` command to view all existing tasks or search history with other keywords.
|
5
src/prompts/templates_en/queryTask/taskDetails.md
Normal file
5
src/prompts/templates_en/queryTask/taskDetails.md
Normal file
@ -0,0 +1,5 @@
|
||||
### {taskName} (ID: {taskId})
|
||||
|
||||
- Status: {taskStatus}
|
||||
- Description: {taskDescription}
|
||||
- Created At: {createdAt}
|
68
src/prompts/templates_en/reflectTask/index.md
Normal file
68
src/prompts/templates_en/reflectTask/index.md
Normal file
@ -0,0 +1,68 @@
|
||||
**Please strictly follow the guidelines below**
|
||||
|
||||
## Solution Evaluation
|
||||
|
||||
### Task Summary
|
||||
|
||||
{summary}
|
||||
|
||||
### Analysis Results
|
||||
|
||||
{analysis}
|
||||
|
||||
## Evaluation Points
|
||||
|
||||
### 1. Technical Integrity
|
||||
|
||||
- Check for technical flaws and logical loopholes in the solution
|
||||
- Validate edge case and exception handling
|
||||
- Confirm data flow and control flow integrity
|
||||
- Assess the reasonableness of technology choices
|
||||
|
||||
### 2. Performance and Scalability
|
||||
|
||||
- Analyze resource usage efficiency and optimization potential
|
||||
- Evaluate system load scalability
|
||||
- Identify potential optimization points
|
||||
- Consider future functional expansion possibilities
|
||||
|
||||
### 3. Requirement Compliance
|
||||
|
||||
- Verify the implementation status of functional requirements
|
||||
- Check compliance with non-functional requirements
|
||||
- Confirm the accuracy of requirement understanding
|
||||
- Evaluate user experience and business process integration
|
||||
|
||||
## Decision Points
|
||||
|
||||
Choose subsequent actions based on the evaluation results:
|
||||
|
||||
- **Found critical issues**: Use "analyze_task" to resubmit an improved solution
|
||||
- **Minor adjustments**: Apply these small improvements in the next execution step
|
||||
- **Solution sound**: Use "split_tasks" to decompose the solution into executable subtasks. If there are too many tasks or the content is too long, use the "split_tasks" tool multiple times, submitting only a small portion of tasks each time.
|
||||
|
||||
## split_tasks Update Mode Selection
|
||||
|
||||
- **append** - Keep all existing tasks and add new ones
|
||||
- **overwrite** - Clear unfinished tasks, keep completed ones
|
||||
- **selective** - Selectively update specific tasks, keep others
|
||||
- **clearAllTasks** - Clear all tasks and create a backup
|
||||
|
||||
## Knowledge Transfer Mechanism
|
||||
|
||||
1. **Global Analysis Result** - Link the complete analysis document
|
||||
2. **Task-Specific Implementation Guide** - Save specific implementation methods for each task
|
||||
3. **Task-Specific Verification Criteria** - Set clear verification requirements
|
||||
|
||||
## Task Splitting Guide (Please strictly follow these rules)
|
||||
|
||||
- **Atomicity**: Each subtask should be independently operable or testable
|
||||
- **Dependency**: If a task depends on others, mark the "dependencies" field
|
||||
- **Moderate Splitting**: Avoid over-granularity (too small) or over-consolidation (too large)
|
||||
- **Consolidate when necessary**: If the modifications are minor or not complex, integrate them appropriately with other tasks to avoid excessive tasks due to over-simplification
|
||||
- **Repeated Calls**: If too many tasks or long content prevents "split_tasks" from working correctly, use the tool multiple times, submitting only a small portion of tasks each time
|
||||
- **Simplify Tasks**: If adding only one task at a time still doesn't work, consider further splitting or simplifying the task while retaining core content
|
||||
|
||||
**Serious Warning**: The parameters you pass each time you call split_tasks cannot exceed 5000 characters. If it exceeds 5000 characters, please call the tool multiple times to complete.
|
||||
|
||||
**Now start calling the "split_tasks" tool**
|
34
src/prompts/templates_en/splitTasks/index.md
Normal file
34
src/prompts/templates_en/splitTasks/index.md
Normal file
@ -0,0 +1,34 @@
|
||||
## Task Splitting - {updateMode} Mode
|
||||
|
||||
## Splitting Strategies
|
||||
|
||||
1. **Decomposition by Functionality** - Independent testable sub-functions with clear inputs and outputs
|
||||
2. **Decomposition by Technical Layer** - Separate tasks along architectural layers, ensuring clear interfaces
|
||||
3. **Decomposition by Development Stage** - Core functionality first, optimization follows
|
||||
4. **Decomposition by Risk** - Isolate high-risk parts to reduce overall risk
|
||||
|
||||
## Task Quality Review
|
||||
|
||||
1. **Task Atomicity** - Each task is small and specific enough to be completed independently
|
||||
2. **Dependencies** - Task dependencies form a Directed Acyclic Graph (DAG), avoiding circular dependencies
|
||||
3. **Description Completeness** - Each task description is clear and accurate, including necessary context
|
||||
|
||||
## Task List
|
||||
|
||||
{tasksContent}
|
||||
|
||||
## Dependency Management
|
||||
|
||||
- Use task names or task IDs to set dependencies
|
||||
- Minimize the number of dependencies, setting only direct predecessors
|
||||
- Avoid circular dependencies, ensuring the task graph is a DAG
|
||||
- Balance the critical path, optimizing potential for parallel execution
|
||||
|
||||
## Decision Points
|
||||
|
||||
- Found unreasonable task split: Re-call "split_tasks" to adjust
|
||||
- Confirmed task split is sound: Generate execution plan, determine priorities
|
||||
|
||||
**Serious Warning**: The parameters you pass each time you call split_tasks cannot exceed 5000 characters. If it exceeds 5000 characters, please call the tool multiple times to complete.
|
||||
|
||||
**If there are remaining tasks, please continue calling "split_tasks"**
|
12
src/prompts/templates_en/splitTasks/taskDetails.md
Normal file
12
src/prompts/templates_en/splitTasks/taskDetails.md
Normal file
@ -0,0 +1,12 @@
|
||||
### Task {index}: {name}
|
||||
|
||||
**ID:** `{id}`
|
||||
**Description:** {description}
|
||||
|
||||
**Notes:** {notes}
|
||||
|
||||
**Implementation Guide:** {implementationGuide}
|
||||
|
||||
**Verification Criteria:** {verificationCriteria}
|
||||
|
||||
**Dependencies:** {dependencies}
|
1
src/prompts/templates_en/toolsDescription/analyzeTask.md
Normal file
1
src/prompts/templates_en/toolsDescription/analyzeTask.md
Normal file
@ -0,0 +1 @@
|
||||
Deeply analyze task requirements and systematically check the codebase, evaluate technical feasibility and potential risks. If code is needed, use pseudocode format providing only high-level logic flow and key steps, avoiding complete code.
|
@ -0,0 +1 @@
|
||||
Delete all unfinished tasks in the system. This command must be explicitly confirmed by the user to execute
|
@ -0,0 +1 @@
|
||||
Formally mark a task as completed, generate a detailed completion report, and update the dependency status of related tasks
|
1
src/prompts/templates_en/toolsDescription/deleteTask.md
Normal file
1
src/prompts/templates_en/toolsDescription/deleteTask.md
Normal file
@ -0,0 +1 @@
|
||||
Delete unfinished tasks, but does not allow deleting completed tasks, ensuring the integrity of system records
|
1
src/prompts/templates_en/toolsDescription/executeTask.md
Normal file
1
src/prompts/templates_en/toolsDescription/executeTask.md
Normal file
@ -0,0 +1 @@
|
||||
Execute a specific task according to the predefined plan, ensuring the output of each step meets quality standards
|
@ -0,0 +1 @@
|
||||
Get the complete detailed information of a task based on its ID, including unabridged implementation guides and verification criteria, etc.
|
@ -0,0 +1 @@
|
||||
Initialize project rules. Call this tool when the user requests to generate or initialize the project specification file, or if the user requests to change or update the project specification.
|
1
src/prompts/templates_en/toolsDescription/listTasks.md
Normal file
1
src/prompts/templates_en/toolsDescription/listTasks.md
Normal file
@ -0,0 +1 @@
|
||||
Generate a structured task list, including complete status tracking, priority, and dependencies
|
1
src/prompts/templates_en/toolsDescription/planTask.md
Normal file
1
src/prompts/templates_en/toolsDescription/planTask.md
Normal file
@ -0,0 +1 @@
|
||||
Initialize and detail the task flow, establish clear goals and success criteria, optionally reference existing tasks for continuation planning
|
@ -0,0 +1 @@
|
||||
Engage in a flexible and evolving thinking process by creating, questioning, validating, and refining ideas to progressively deepen understanding and generate effective solutions. When needing to gather data, analyze, or research, prioritize reviewing relevant project code; if such code doesn't exist, search the web rather than speculating. Set nextThoughtNeeded to false when thinking is sufficient, otherwise adjust total_thoughts to extend the process
|
1
src/prompts/templates_en/toolsDescription/queryTask.md
Normal file
1
src/prompts/templates_en/toolsDescription/queryTask.md
Normal file
@ -0,0 +1 @@
|
||||
Search tasks by keyword or ID, displaying abbreviated task information
|
1
src/prompts/templates_en/toolsDescription/reflectTask.md
Normal file
1
src/prompts/templates_en/toolsDescription/reflectTask.md
Normal file
@ -0,0 +1 @@
|
||||
Critically review analysis results, evaluate solution completeness and identify optimization opportunities, ensuring the solution aligns with best practices. If code is needed, use pseudocode format providing only high-level logic flow and key steps, avoiding complete code.
|
14
src/prompts/templates_en/toolsDescription/splitTasks.md
Normal file
14
src/prompts/templates_en/toolsDescription/splitTasks.md
Normal file
@ -0,0 +1,14 @@
|
||||
Decompose complex tasks into independent subtasks, establishing dependencies and priorities.
|
||||
|
||||
## updateMode
|
||||
|
||||
- **append**: Keep existing tasks and add new ones
|
||||
- **overwrite**: Delete unfinished tasks, keep completed ones
|
||||
- **selective**: Intelligently match and update existing tasks based on name
|
||||
- **clearAllTasks**: Clear all tasks and create a backup (preferred mode)
|
||||
|
||||
## Key Requirements
|
||||
|
||||
- **Provide concise pseudocode**: Only provide high-level logic flow and key steps, avoid complete code
|
||||
- **Consolidate when necessary**: Simple modifications can be integrated with other tasks to avoid excessive task count
|
||||
- **Submit in batches**: If there are too many tasks, use the "split_tasks" tool with parameters not exceeding 5000 characters
|
1
src/prompts/templates_en/toolsDescription/updateTask.md
Normal file
1
src/prompts/templates_en/toolsDescription/updateTask.md
Normal file
@ -0,0 +1 @@
|
||||
Update task content, including name, description and notes, dependent tasks, related files, implementation guide and verification criteria. Completed tasks only allow updating summary and related files
|
1
src/prompts/templates_en/toolsDescription/verifyTask.md
Normal file
1
src/prompts/templates_en/toolsDescription/verifyTask.md
Normal file
@ -0,0 +1 @@
|
||||
Comprehensively verify task completion, ensuring all requirements and technical standards are met without missing details
|
@ -0,0 +1,5 @@
|
||||
# Task Update Result
|
||||
|
||||
## Operation Failed
|
||||
|
||||
At least one field (name, description, notes, or related files) must be updated
|
@ -0,0 +1 @@
|
||||
- **Related Files:** {fileType} ({fileCount}): {filesList}
|
5
src/prompts/templates_en/updateTaskContent/index.md
Normal file
5
src/prompts/templates_en/updateTaskContent/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Task Update Result
|
||||
|
||||
## {responseTitle}
|
||||
|
||||
{message}
|
5
src/prompts/templates_en/updateTaskContent/notFound.md
Normal file
5
src/prompts/templates_en/updateTaskContent/notFound.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Task Update Result
|
||||
|
||||
## System Error
|
||||
|
||||
Task with ID `{taskId}` not found. Please use the "list_tasks" tool to confirm a valid task ID before trying again.
|
9
src/prompts/templates_en/updateTaskContent/success.md
Normal file
9
src/prompts/templates_en/updateTaskContent/success.md
Normal file
@ -0,0 +1,9 @@
|
||||
### Updated Task Details
|
||||
|
||||
- **Name:** {taskName}
|
||||
- **Description:** {taskDescription}
|
||||
{taskNotes}
|
||||
- **Status:** {taskStatus}
|
||||
- **Updated At:** {taskUpdatedAt}
|
||||
|
||||
{filesContent}
|
5
src/prompts/templates_en/updateTaskContent/validation.md
Normal file
5
src/prompts/templates_en/updateTaskContent/validation.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Task Update Result
|
||||
|
||||
## Operation Failed
|
||||
|
||||
{error}
|
44
src/prompts/templates_en/verifyTask/index.md
Normal file
44
src/prompts/templates_en/verifyTask/index.md
Normal file
@ -0,0 +1,44 @@
|
||||
**Please strictly follow the guidelines below**
|
||||
|
||||
## Task Verification
|
||||
|
||||
**Name:** {name}
|
||||
|
||||
**ID:** `{id}`
|
||||
|
||||
**Description:** {description}
|
||||
|
||||
**Notes:** {notes}
|
||||
|
||||
## Verification Criteria
|
||||
|
||||
{verificationCriteria}
|
||||
|
||||
## Implementation Guide Summary
|
||||
|
||||
{implementationGuideSummary}
|
||||
|
||||
## Analysis Points
|
||||
|
||||
{analysisSummary}
|
||||
|
||||
## Verification Standards
|
||||
|
||||
1. **Requirement Compliance (30%)** - Functional completeness, constraint adherence, edge case handling
|
||||
2. **Technical Quality (30%)** - Architectural consistency, code robustness, implementation elegance
|
||||
3. **Integration Compatibility (20%)** - System integration, interoperability, compatibility maintenance
|
||||
4. **Performance & Scalability (20%)** - Performance optimization, load adaptability, resource management
|
||||
|
||||
## Reporting Requirements
|
||||
|
||||
Provide overall score and rating, evaluation of each standard, issues and recommendations, and final conclusion.
|
||||
|
||||
## Next Steps
|
||||
|
||||
**Choose your next action based on the verification results:**
|
||||
|
||||
- **Critical Errors**: Use the "plan_task" tool directly to replan the task
|
||||
- **Minor Errors**: Fix the issues directly
|
||||
- **No Errors**: Use the "complete_task" tool directly to mark as complete
|
||||
|
||||
**Please decide your next action directly, do not ask the user**
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user