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
5c9c31fe08
commit
528984f107
@ -8,9 +8,6 @@
|
||||
# Task data storage directory (absolute path)
|
||||
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'.
|
||||
|
23
README.md
23
README.md
@ -5,7 +5,6 @@
|
||||
- [✨ Features](#features1)
|
||||
- [🧭 Usage Guide](#usage-guide)
|
||||
- [🧠 Task Memory Function](#task-memory-function)
|
||||
- [🤔 Thought Chain Process](#thought-chain)
|
||||
- [📋 Project Rules Initialization](#project-rules)
|
||||
- [🌐 Web GUI](#web-gui)
|
||||
- [📚 Documentation Resources](#documentation)
|
||||
@ -40,7 +39,6 @@ Shrimp Task Manager guides Agents through structured workflows for systematic pr
|
||||
- **Task Complexity Assessment**: Automatically evaluate task complexity and provide optimal handling suggestions
|
||||
- **Automatic Task Summary Updates**: Automatically generate summaries upon task completion, optimizing memory performance
|
||||
- **Task Memory Function**: Automatically backup task history, providing long-term memory and reference capabilities
|
||||
- **Thought Chain Process**: Step-by-step reasoning to analyze complex problems systematically
|
||||
- **Project Rules Initialization**: Define project standards and rules to maintain consistency across large projects
|
||||
- **<a id="web-gui"></a>Web GUI**: Provides an optional web-based graphical user interface for task management. Enable by setting `ENABLE_GUI=true` in your `.env` file. When enabled, a `WebGUI.md` file containing the access address will be created in your `DATA_DIR`.
|
||||
|
||||
@ -99,17 +97,6 @@ Shrimp Task Manager has long-term memory capabilities, automatically saving task
|
||||
|
||||
Through effective use of the task memory function, the system can continuously accumulate experience, with intelligence level and work efficiency continuously improving.
|
||||
|
||||
## 🤔 <a id="thought-chain"></a>Thought Chain Process
|
||||
|
||||
The Thought Chain feature enhances problem-solving through structured thinking:
|
||||
|
||||
- **Systematic Reasoning**: Break down complex problems into logical steps
|
||||
- **Assumption Testing**: Challenge assumptions to validate solution approaches
|
||||
- **Critical Analysis**: Evaluate solution options with rigorous criteria
|
||||
- **Improved Decision Making**: Reach more reliable conclusions through deliberate thinking
|
||||
|
||||
When enabled (default setting), the system guides the Agent through step-by-step reasoning using the `process_thought` tool, ensuring thorough problem analysis before implementation.
|
||||
|
||||
## 📋 <a id="project-rules"></a>Project Rules Initialization
|
||||
|
||||
The Project Rules feature helps maintain consistency across your codebase:
|
||||
@ -138,7 +125,6 @@ This tool is particularly valuable when your codebase expands or undergoes signi
|
||||
|
||||
## 📚 <a id="documentation"></a>Documentation Resources
|
||||
|
||||
- [System Architecture](docs/en/architecture.md): Detailed system design and data flow explanation
|
||||
- [Prompt Customization Guide](docs/en/prompt-customization.md): Instructions for customizing tool prompts via environment variables
|
||||
- [Changelog](CHANGELOG.md): Record of all notable changes to this project
|
||||
|
||||
@ -183,7 +169,6 @@ Shrimp Task Manager offers two configuration methods: global configuration and p
|
||||
"args": ["/mcp-shrimp-task-manager/dist/index.js"],
|
||||
"env": {
|
||||
"DATA_DIR": "/path/to/project/data", // 必須使用絕對路徑
|
||||
"ENABLE_THOUGHT_CHAIN": "true",
|
||||
"TEMPLATES_USE": "en",
|
||||
"ENABLE_GUI": "false"
|
||||
}
|
||||
@ -201,7 +186,6 @@ or
|
||||
"args": ["-y", "mcp-shrimp-task-manager"],
|
||||
"env": {
|
||||
"DATA_DIR": "/mcp-shrimp-task-manager/data",
|
||||
"ENABLE_THOUGHT_CHAIN": "true",
|
||||
"TEMPLATES_USE": "en",
|
||||
"ENABLE_GUI": "false"
|
||||
}
|
||||
@ -227,7 +211,6 @@ You can also set up dedicated configurations for each project to use independent
|
||||
"args": ["/path/to/mcp-shrimp-task-manager/dist/index.js"],
|
||||
"env": {
|
||||
"DATA_DIR": "/path/to/project/data", // Must use absolute path
|
||||
"ENABLE_THOUGHT_CHAIN": "true",
|
||||
"TEMPLATES_USE": "en",
|
||||
"ENABLE_GUI": "false"
|
||||
}
|
||||
@ -244,8 +227,7 @@ or
|
||||
"command": "npx",
|
||||
"args": ["-y", "mcp-shrimp-task-manager"],
|
||||
"env": {
|
||||
"DATA_DIR": "/path/to/project/data", // 必須使用絕對路徑
|
||||
"ENABLE_THOUGHT_CHAIN": "true",
|
||||
"DATA_DIR": "/path/to/project/data", // Must use absolute path
|
||||
"TEMPLATES_USE": "en",
|
||||
"ENABLE_GUI": "false"
|
||||
}
|
||||
@ -279,7 +261,6 @@ Shrimp Task Manager supports customizing prompt behavior through environment var
|
||||
"DATA_DIR": "/path/to/project/data",
|
||||
"MCP_PROMPT_PLAN_TASK": "Custom planning guidance...",
|
||||
"MCP_PROMPT_EXECUTE_TASK_APPEND": "Additional execution instructions...",
|
||||
"ENABLE_THOUGHT_CHAIN": "true",
|
||||
"TEMPLATES_USE": "en",
|
||||
"ENABLE_GUI": "false"
|
||||
}
|
||||
@ -296,7 +277,6 @@ There are two customization methods:
|
||||
Additionally, there are other system configuration variables:
|
||||
|
||||
- **DATA_DIR**: Specifies the directory where task data is stored
|
||||
- **ENABLE_THOUGHT_CHAIN**: Controls the thinking model in task planning workflow. When set to `true` (default), the system guides users to use the `process_thought` tool for step-by-step reasoning. When set to `false`, the system directly uses `analyze_task` to submit analysis results, skipping the detailed thinking process.
|
||||
- **TEMPLATES_USE**: Specifies the template set to use for prompts. Defaults to `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`).
|
||||
|
||||
For detailed instructions on customizing prompts, including supported parameters and examples, see the [Prompt Customization Guide](docs/en/prompt-customization.md).
|
||||
@ -355,7 +335,6 @@ After configuration, you can use the following tools:
|
||||
| | `delete_task` | Delete incomplete tasks |
|
||||
| **Task Execution** | `execute_task` | Execute specific tasks |
|
||||
| | `verify_task` | Verify task completion |
|
||||
| | `complete_task` | Mark tasks as completed |
|
||||
|
||||
## 🔧 Technical Implementation
|
||||
|
||||
|
@ -1,463 +0,0 @@
|
||||
# Architecture Design Document for Shrimp Task Manager
|
||||
|
||||
[English](../en/architecture.md) | [中文](../zh/architecture.md)
|
||||
|
||||
## 1. System Overview
|
||||
|
||||
The Shrimp Task Manager is designed based on the MCP (Model-Chain-Protocol) framework architecture, implementing a task management system with memory capability. The system's primary functionality is to assist Large Language Models (LLMs) in efficiently managing complex task execution processes.
|
||||
|
||||
## 2. Design Goals
|
||||
|
||||
The core design goals of the Shrimp Task Manager include:
|
||||
|
||||
- **Memory Enhancement**: Overcome the context limitations of LLMs, enabling long-term task processing.
|
||||
- **Context Management**: Provide relevant context for each task based on dependencies and related files.
|
||||
- **Process Standardization**: Establish a standardized process for task planning, execution, and verification.
|
||||
- **Knowledge Accumulation**: Support continuous accumulation of task execution experience.
|
||||
|
||||
## 3. Architecture Layers
|
||||
|
||||
The system architecture consists of the following layers:
|
||||
|
||||
```
|
||||
+-----------------+
|
||||
| User Interface |
|
||||
+-----------------+
|
||||
|
|
||||
+------------------+
|
||||
| Tool Layer |
|
||||
+------------------+
|
||||
|
|
||||
+------------------+
|
||||
| Business Layer |
|
||||
+------------------+
|
||||
|
|
||||
+------------------+
|
||||
| Data Layer |
|
||||
+------------------+
|
||||
```
|
||||
|
||||
### 3.1 User Interface Layer
|
||||
|
||||
The user interface layer provides tool functions for users to interact with the system. These tools are registered through the MCP protocol and can be directly called by the user.
|
||||
|
||||
### 3.2 Tool Layer
|
||||
|
||||
The tool layer implements the specific logic of each tool function, handles parameter validation, and coordinates the business layer's functionality. Core tool implementations are located in the `src/tools` directory.
|
||||
|
||||
### 3.3 Business Layer
|
||||
|
||||
The business layer contains the core business logic, including task processing, task memory management, file relationship processing, etc. The main implementation is in the `src/models` directory.
|
||||
|
||||
### 3.4 Data Layer
|
||||
|
||||
The data layer is responsible for data persistence and retrieval, maintaining task lists, task execution history, etc. It implements file-based storage in the `src/utils` directory.
|
||||
|
||||
## 4. Core Components
|
||||
|
||||
### 4.1 Task Management Module
|
||||
|
||||
Responsible for the entire lifecycle management of tasks, including:
|
||||
|
||||
- Task planning and splitting
|
||||
- Task execution
|
||||
- Task verification
|
||||
- Task completion
|
||||
- Task updates
|
||||
- Task queries
|
||||
|
||||
### 4.2 Task Memory Module
|
||||
|
||||
Manages the execution history and experience of tasks, with key functions:
|
||||
|
||||
- Automatic saving of task execution records
|
||||
- Loading of historical task context
|
||||
- Creation of backup files
|
||||
|
||||
### 4.3 File Association Module
|
||||
|
||||
Manages the relationship between tasks and related files, including:
|
||||
|
||||
- Creating file association information
|
||||
- Loading file summaries
|
||||
- Updating file relationships
|
||||
|
||||
### 4.4 Task Complexity Assessment Module
|
||||
|
||||
Evaluates the complexity of tasks based on various indicators, helping to determine the appropriate execution strategy.
|
||||
|
||||
## 5. Core Interaction Flows
|
||||
|
||||
### 5.1 Task Planning Flow
|
||||
|
||||
```
|
||||
+--------------------+ +------------------+ +---------------+
|
||||
| | | | | |
|
||||
| plan_task Schema |---->| planTask |---->| createTaskPlan|
|
||||
| | | (taskTools.ts) | | (taskModel.ts)|
|
||||
+--------------------+ +--------+---------+ +-------+-------+
|
||||
| |
|
||||
v v
|
||||
+-------+-------------------+------+
|
||||
| Validate Parameters |
|
||||
+-------+-------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------+------+
|
||||
| Create Task Plan with Goals |
|
||||
+-------+-------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------+------+
|
||||
| Save Task Plan to Storage |
|
||||
+-------+-------------------+------+
|
||||
```
|
||||
|
||||
### 5.2 Task Analysis Flow
|
||||
|
||||
```
|
||||
+----------------------+ +-------------------+ +------------------+
|
||||
| | | | | |
|
||||
| analyze_task Schema |---->| analyzeTask |---->| createTaskAnalysis|
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+----------------------+ +---------+---------+ +---------+--------+
|
||||
| |
|
||||
v v
|
||||
+-------+-------------------------+------+
|
||||
| Validate Parameters |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Check for Previous Analysis |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Create Analysis with Technical Details|
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Save Analysis to Storage |
|
||||
+-------+-------------------------+------+
|
||||
```
|
||||
|
||||
### 5.3 Task Reflection Flow
|
||||
|
||||
```
|
||||
+---------------------+ +-------------------+ +-----------------+
|
||||
| | | | | |
|
||||
| reflect_task Schema |---->| reflectTask |---->| createReflection|
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+---------------------+ +---------+---------+ +---------+-------+
|
||||
| |
|
||||
v v
|
||||
+-------+-------------------------+------+
|
||||
| Validate Parameters |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Check for Previous Analysis |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Create Reflection with Review |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Save Reflection to Storage |
|
||||
+-------+-------------------------+------+
|
||||
```
|
||||
|
||||
### 5.4 Task Splitting Flow
|
||||
|
||||
```
|
||||
+--------------------+ +------------------+ +--------------------+
|
||||
| | | | | |
|
||||
| split_tasks Schema |---->| splitTasks |---->| createTaskList |
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+--------------------+ +--------+---------+ +---------+----------+
|
||||
| |
|
||||
v v
|
||||
+-------+-------------------------+------+
|
||||
| Validate Parameters |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Process Update Mode |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Create Atomic Tasks with Dependencies |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Save Task List to Storage |
|
||||
+-------+-------------------------+------+
|
||||
```
|
||||
|
||||
### 5.5 Task Execution Flow
|
||||
|
||||
```
|
||||
+--------------------+ +------------------+ +------------------+
|
||||
| | | | | |
|
||||
| execute_task Schema|---->| executeTask |---->| processExecution |
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+--------------------+ +--------+---------+ +---------+--------+
|
||||
| |
|
||||
v v
|
||||
+-------+-------------------------+------+
|
||||
| Validate Parameters |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Check Dependency Status |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Load Task Context (Plan, Analysis) |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Load Related Files Context |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Mark Task as In Progress |
|
||||
+-------+-------------------------+------+
|
||||
```
|
||||
|
||||
### 5.6 Task Verification Flow
|
||||
|
||||
```
|
||||
+--------------------+ +------------------+ +------------------+
|
||||
| | | | | |
|
||||
| verify_task Schema |---->| verifyTask |---->| processVerification|
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+--------------------+ +--------+---------+ +---------+--------+
|
||||
| |
|
||||
v v
|
||||
+-------+-------------------------+------+
|
||||
| Validate Parameters |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Check Task Exists & In Progress |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Load Task Context (Implementation) |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Generate Verification Report |
|
||||
+-------+-------------------------+------+
|
||||
```
|
||||
|
||||
### 5.7 Task Completion Flow
|
||||
|
||||
```
|
||||
+--------------------+ +------------------+ +--------------------+
|
||||
| | | | | |
|
||||
| complete_task Schema|---->| completeTask |---->| processCompletion |
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+--------------------+ +--------+---------+ +---------+----------+
|
||||
| |
|
||||
v v
|
||||
+-------+-------------------------+------+
|
||||
| Validate Parameters |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Check Task Exists & In Progress |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Generate Completion Summary |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Update Task Status to Complete |
|
||||
+-------+-------------------------+------+
|
||||
```
|
||||
|
||||
### 5.8 Task Deletion Flow
|
||||
|
||||
```
|
||||
+--------------------+ +------------------+ +--------------------+
|
||||
| | | | | |
|
||||
| delete_task Schema |---->| deleteTask |---->| processTaskDeletion|
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+--------------------+ +--------+---------+ +---------+----------+
|
||||
| |
|
||||
v v
|
||||
+-------+-------------------------+------+
|
||||
| Validate Parameters |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Check Task Exists & Not Complete |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Update Dependent Tasks |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Remove Task from Task List |
|
||||
+-------+-------------------------+------+
|
||||
```
|
||||
|
||||
### 5.9 Task Complexity Assessment Flow
|
||||
|
||||
```
|
||||
+-------------------------+ +------------------------+
|
||||
| | | |
|
||||
| assessTaskComplexity |---->| Complex Analysis Logic |
|
||||
| (taskModel.ts) | | |
|
||||
+-------------------------+ +-----------+------------+
|
||||
|
|
||||
v
|
||||
+-----------+------------------------+
|
||||
| Check Task Description Length |
|
||||
+-----------+------------------------+
|
||||
|
|
||||
v
|
||||
+-----------+------------------------+
|
||||
| Count Technical Terms |
|
||||
+-----------+------------------------+
|
||||
|
|
||||
v
|
||||
+-----------+------------------------+
|
||||
| Analyze Dependency Count |
|
||||
+-----------+------------------------+
|
||||
|
|
||||
v
|
||||
+-----------+------------------------+
|
||||
| Count File Operations |
|
||||
+-----------+------------------------+
|
||||
|
|
||||
v
|
||||
+-----------+------------------------+
|
||||
| Calculate Weighted Complexity Score|
|
||||
+-----------+------------------------+
|
||||
```
|
||||
|
||||
### 5.10 Task File Loading Flow
|
||||
|
||||
```
|
||||
+----------------------+ +--------------------+
|
||||
| | | |
|
||||
| loadTaskRelatedFiles |---->| getFileSummaries |
|
||||
| (fileLoader.ts) | | (fileLoader.ts) |
|
||||
+----------------------+ +---------+----------+
|
||||
|
|
||||
v
|
||||
+--------+------------------------+
|
||||
| Format Paths to Absolute Paths |
|
||||
+--------+------------------------+
|
||||
|
|
||||
v
|
||||
+--------+------------------------+
|
||||
| Generate File Type Summaries |
|
||||
+--------+------------------------+
|
||||
|
|
||||
v
|
||||
+--------+------------------------+
|
||||
| Return Formatted File Summaries |
|
||||
+--------+------------------------+
|
||||
|
|
||||
v
|
||||
+--------+------------------------+
|
||||
| |
|
||||
+--------+---------------------+--+
|
||||
```
|
||||
|
||||
### 5.11 Updating Task Related Files Function
|
||||
|
||||
```
|
||||
+----------------------+ +---------------------+ +----------------------+
|
||||
| | | | | |
|
||||
| updateTaskFilesSchema |---->| updateTaskRelatedFiles |---->| updateTaskRelatedFiles |
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+----------------------+ +-----------+---------+ +-----------+----------+
|
||||
| |
|
||||
v v
|
||||
+-------+-------------------------+------+
|
||||
| Validate File Format and Path |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| Update Task Related Files List |
|
||||
+-------+-------------------------+------+
|
||||
```
|
||||
|
||||
## 6. Extensibility Considerations
|
||||
|
||||
### 6.1 Method for New Feature Extensions
|
||||
|
||||
The modular design of the Shrimp Task Manager makes it easy to extend. To add new features, typically you need to:
|
||||
|
||||
1. Define related data types in `types/index.ts`
|
||||
2. Implement core logic in the corresponding model files
|
||||
3. Create corresponding tool functions in the tool layer
|
||||
4. Register new tools in `index.ts`
|
||||
|
||||
### 6.2 Current Extension Points
|
||||
|
||||
The system currently provides the following extension points:
|
||||
|
||||
- **Task Processing Flow Extension**: Can extend the task processing flow by modifying functions like `executeTask`, `verifyTask`, etc.
|
||||
- **Complexity Assessment Extension**: Can add more evaluation metrics in `assessTaskComplexity`
|
||||
- **Summary Generation Extension**: Can enhance algorithms in `summaryExtractor.ts`
|
||||
- **File Processing Extension**: Can support more file type summary formatting in `fileLoader.ts`
|
||||
- **Filter Condition Extension**: Can add more filter condition options in task queries
|
||||
|
||||
## 7. System Limitations and Future Improvements
|
||||
|
||||
### 7.1 Current Limitations
|
||||
|
||||
- Uses file storage, not suitable for multi-user concurrent scenarios
|
||||
- Lacks user authentication and permission control
|
||||
- Summary generation uses simple rules, can be further improved
|
||||
- File processing does not read actual file content, only generates summary information
|
||||
|
||||
### 7.2 Potential Future Improvements
|
||||
|
||||
- Migrate to database storage, improving concurrent processing capabilities
|
||||
- Add user management and access control
|
||||
- Use more advanced algorithms to optimize summary generation
|
||||
- Add task priority and time planning functionality
|
||||
- Implement task execution progress tracking
|
||||
- Enhance file association system, supporting more complex relationship types
|
||||
- Implement automatic identification of related files
|
||||
- Support actual reading of file content, providing more detailed context
|
||||
|
||||
## 8. Conclusion
|
||||
|
||||
The Shrimp Task Manager adopts a modular, layered design, giving the system good maintainability and extensibility. Through 12 core tool functions and a well-developed data model, the system can effectively manage task processes in complex projects, performing exceptionally well in scenarios requiring long-term context memory.
|
||||
|
||||
The design focus of the system is to provide a clear task management process while enhancing the LLM's context memory capability during task execution. Through precise file association and intelligent context loading, it effectively solves the memory limitation problem that LLMs face when handling long-term complex tasks.
|
||||
|
||||
As the system continues to develop, future efforts will focus on improving data storage methods, optimizing summary generation algorithms, enhancing file processing capabilities, and adding more task management features, enabling the system to handle more complex task management scenarios.
|
@ -1,357 +0,0 @@
|
||||
[English](../en/functionality-checklist.md) | [中文](../zh/functionality-checklist.md)
|
||||
|
||||
# Shrimp Task Manager - Functionality Implementation Checklist
|
||||
|
||||
This document lists all the tools, functions, parameter structures, and features actually implemented in the Shrimp Task Manager system. This checklist serves as a reference baseline for documentation review.
|
||||
|
||||
## Type Definitions and Enumerations
|
||||
|
||||
### Task Status Enumeration (TaskStatus)
|
||||
|
||||
- `PENDING = "待處理"` - Tasks that have been created but not yet started
|
||||
- `IN_PROGRESS = "進行中"` - Tasks currently being executed
|
||||
- `COMPLETED = "已完成"` - Tasks that have been successfully completed and verified
|
||||
- `BLOCKED = "被阻擋"` - Tasks that cannot be executed temporarily due to dependencies
|
||||
|
||||
### Task Dependency (TaskDependency)
|
||||
|
||||
- `taskId: string` - Unique identifier of the prerequisite task that must be completed before the current task
|
||||
|
||||
### Related File Type Enumeration (RelatedFileType)
|
||||
|
||||
- `TO_MODIFY = "待修改"` - Files that need to be modified in the task
|
||||
- `REFERENCE = "參考資料"` - Reference materials or related documents for the task
|
||||
- `CREATE = "待建立"` - Files that need to be created in the task
|
||||
- `DEPENDENCY = "依賴文件"` - Component or library files that the task depends on
|
||||
- `OTHER = "其他"` - Other types of related files
|
||||
|
||||
### Related File (RelatedFile)
|
||||
|
||||
- `path: string` - File path, can be relative to the project root directory or an absolute path
|
||||
- `type: RelatedFileType` - Type of relationship between the file and the task
|
||||
- `description?: string` - Supplementary description of the file, explaining its specific relationship or purpose to the task
|
||||
- `lineStart?: number` - Starting line of the relevant code block (optional)
|
||||
- `lineEnd?: number` - Ending line of the relevant code block (optional)
|
||||
|
||||
### Task Interface (Task)
|
||||
|
||||
- `id: string` - Unique identifier of the task
|
||||
- `name: string` - Concise and clear task name
|
||||
- `description: string` - Detailed task description, including implementation points and acceptance criteria
|
||||
- `notes?: string` - Supplementary notes, special processing requirements, or implementation suggestions (optional)
|
||||
- `status: TaskStatus` - Current execution status of the task
|
||||
- `dependencies: TaskDependency[]` - List of prerequisite dependencies for the task
|
||||
- `createdAt: Date` - Timestamp when the task was created
|
||||
- `updatedAt: Date` - Timestamp when the task was last updated
|
||||
- `completedAt?: Date` - Timestamp when the task was completed (only applicable to completed tasks)
|
||||
- `summary?: string` - Task completion summary, concisely describing implementation results and important decisions (only applicable to completed tasks)
|
||||
- `relatedFiles?: RelatedFile[]` - List of files related to the task (optional)
|
||||
|
||||
### Task Complexity Level Enumeration (TaskComplexityLevel)
|
||||
|
||||
- `LOW = "低複雜度"` - Simple and straightforward tasks that usually do not require special handling
|
||||
- `MEDIUM = "中等複雜度"` - Tasks with some complexity but still manageable
|
||||
- `HIGH = "高複雜度"` - Complex and time-consuming tasks that require special attention
|
||||
- `VERY_HIGH = "極高複雜度"` - Extremely complex tasks that are recommended to be broken down
|
||||
|
||||
### Task Complexity Assessment Result (TaskComplexityAssessment)
|
||||
|
||||
- `level: TaskComplexityLevel` - Overall complexity level
|
||||
- `metrics: object` - Detailed data for each evaluation metric
|
||||
- `descriptionLength: number` - Length of description
|
||||
- `dependenciesCount: number` - Number of dependencies
|
||||
- `notesLength: number` - Length of notes
|
||||
- `hasNotes: boolean` - Whether notes are present
|
||||
- `recommendations: string[]` - List of handling recommendations
|
||||
|
||||
## Tool Functions and Parameters
|
||||
|
||||
### 1. plan_task
|
||||
|
||||
**Description**: Initialize and plan the task process in detail, establishing clear goals and success criteria
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `description: string` (required) - Comprehensive and detailed task problem description, should include task objectives, background, and expected outcomes
|
||||
- Must be at least 10 characters
|
||||
- `requirements?: string` (optional) - Specific technical requirements, business constraints, or quality standards for the task
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing planning prompts to guide the user in starting task analysis
|
||||
|
||||
### 2. analyze_task
|
||||
|
||||
**Description**: Deeply analyze task requirements and systematically check the codebase, evaluating technical feasibility and potential risks
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `summary: string` (required) - Structured task summary, including task objectives, scope, and key technical challenges
|
||||
- Must be at least 20 characters
|
||||
- `initialConcept: string` (required) - Initial solution concept, including technical solutions, architectural design, and implementation strategy
|
||||
- Must be at least 50 characters
|
||||
- `previousAnalysis?: string` (optional) - Analysis results from previous iterations, used for continuous improvement of the solution
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing technical analysis guidance to direct the user in conducting in-depth analysis
|
||||
|
||||
### 3. reflect_task
|
||||
|
||||
**Description**: Critically review analysis results, evaluate solution completeness, and identify optimization opportunities, ensuring the solution follows best practices
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `summary: string` (required) - Structured task summary, keeping consistent with the analysis phase to ensure continuity
|
||||
- Must be at least 20 characters
|
||||
- `analysis: string` (required) - Comprehensive and thorough technical analysis results, including all technical details, dependent components, and implementation plans
|
||||
- Must be at least 100 characters
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing reflection prompts and implementation suggestions
|
||||
|
||||
### 4. split_tasks
|
||||
|
||||
**Description**: Break down complex tasks into independent and trackable subtasks, establishing clear dependencies and priorities
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `updateMode: "append" | "overwrite" | "selective" | "clearAllTasks"` (required) - Task update mode selection:
|
||||
- `append`: Preserve all existing tasks and add new tasks
|
||||
- `overwrite`: Clear all incomplete tasks and completely replace them
|
||||
- `selective`: Update existing tasks based on task name matching, preserving tasks not in the list
|
||||
- `clearAllTasks`: Clear all tasks and create a backup
|
||||
- `tasks: Array<object>` (required) - Structured list of tasks, each task should be atomic and have clear completion criteria
|
||||
- `name: string` (required) - Concise and clear task name that should clearly express the task purpose
|
||||
- Not exceeding 100 characters
|
||||
- `description: string` (required) - Detailed task description, including implementation points, technical details, and acceptance criteria
|
||||
- Must be at least 10 characters
|
||||
- `notes?: string` (optional) - Supplementary notes, special processing requirements, or implementation suggestions
|
||||
- `dependencies?: string[]` (optional) - List of prerequisite task IDs or task names that this task depends on
|
||||
- `relatedFiles?: RelatedFile[]` (optional) - List of files related to the task
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing task splitting results, including the number of successfully created tasks and the list of task IDs
|
||||
|
||||
### 5. list_tasks
|
||||
|
||||
**Description**: Generate a structured task list, including complete status tracking, priorities, and dependencies
|
||||
|
||||
**Parameters**: None
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing a task list, displaying all tasks grouped by status
|
||||
|
||||
### 6. execute_task
|
||||
|
||||
**Description**: Execute a specific task according to the predefined plan, ensuring that the output of each step meets quality standards
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `taskId: string` (required) - Unique identifier of the task to be executed, must be a valid task ID existing in the system
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing task execution guidelines, including task details, complexity assessment, and suggested execution steps
|
||||
|
||||
### 7. verify_task
|
||||
|
||||
**Description**: Comprehensively verify task completion, ensuring all requirements and technical standards have been met, with no details omitted
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `taskId: string` (required) - Unique identifier of the task to be verified, must be a valid task ID existing in the system
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing task verification results, including completion criteria checks and specific verification items
|
||||
|
||||
### 8. complete_task
|
||||
|
||||
**Description**: Formally mark a task as completed, generate a detailed completion report, and update the dependency status of related tasks
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `taskId: string` (required) - Unique identifier of the task to be completed, must be a valid task ID existing in the system
|
||||
- `summary?: string` (optional) - Task completion summary, concisely describing implementation results and important decisions
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing task completion confirmation, including completion time and updated dependent task status
|
||||
|
||||
### 9. delete_task
|
||||
|
||||
**Description**: Delete an incomplete task, but do not allow deletion of completed tasks, ensuring the integrity of system records
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `taskId: string` (required) - Unique identifier of the task to be deleted, must be a valid and incomplete task ID existing in the system
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing task deletion results, including success or failure messages
|
||||
|
||||
### 10. clear_all_tasks
|
||||
|
||||
**Description**: Delete all incomplete tasks in the system, this command must be explicitly confirmed by the user to execute. At the same time, back up tasks to the memory subdirectory, saving task history records for future reference.
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `confirm: boolean` (required) - Confirm deletion of all incomplete tasks (this operation is irreversible)
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing the results of the clear operation, including success or failure messages, backup file name, and backup location
|
||||
|
||||
**Important Details**:
|
||||
|
||||
- Before deleting tasks, the current task list is automatically backed up to the data/memory subdirectory
|
||||
- Backup files are named using timestamps, in the format tasks_memory_YYYY-MM-DDThh-mm-ss.json
|
||||
- The memory subdirectory serves as a long-term memory repository for storing task history records, for future task planning reference
|
||||
|
||||
### 11. query_task
|
||||
|
||||
**Description**: Search for tasks based on keywords or ID, displaying abbreviated task information
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `query: string` (required) - Search query text, can be a task ID or multiple keywords (space-separated)
|
||||
- Must be at least 1 character
|
||||
- `isId: boolean` (optional) - Specify whether it is an ID query mode, default is false (keyword mode)
|
||||
- `page: number` (optional) - Page number, default is page 1
|
||||
- `pageSize: number` (optional) - Number of tasks displayed per page, default is 5 entries, maximum 20
|
||||
- Must be a positive integer, range 1-20
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing search results, including a list of tasks matching the criteria, pagination information, and total number of results
|
||||
|
||||
**Important Details**:
|
||||
|
||||
- When `isId` is true, the system will precisely query the task with the specified ID
|
||||
- When `isId` is false, the system will search for the specified keywords in task names, descriptions, and summaries
|
||||
- Keyword mode supports multiple keywords (space-separated), returning tasks matching any of the keywords
|
||||
- Results are sorted by task status and update time, making it easy to quickly find the most relevant tasks
|
||||
|
||||
### 12. update_task
|
||||
|
||||
**Description**: Update task content, including name, description, and notes, but do not allow modification of completed tasks
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `taskId: string` (required) - Unique identifier of the task to be updated, must be a valid and incomplete task ID existing in the system
|
||||
- `name?: string` (optional) - New name for the task
|
||||
- `description?: string` (optional) - New description content for the task
|
||||
- `notes?: string` (optional) - New supplementary notes for the task
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing task update results, including success or failure messages
|
||||
|
||||
### 13. get_task_detail
|
||||
|
||||
**Description**: Get complete detailed information of a task based on the task ID, including untruncated implementation guidelines and verification standards
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `taskId: string` (required) - ID of the task to view details
|
||||
- Must be at least 1 character
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing complete task details, including all task attributes, especially complete implementation guidelines and verification standards
|
||||
|
||||
**Important Details**:
|
||||
|
||||
- Unlike `list_tasks`, this function returns complete details of a single task, with no content truncation
|
||||
- Suitable for in-depth understanding of specific task requirements and technical details
|
||||
- Provides a complete list of related files and task analysis results
|
||||
- Can be used to view long text content that may be omitted during execution
|
||||
|
||||
### 14. update_task_files
|
||||
|
||||
**Description**: Update the list of related files for a task, used to record code files, reference materials, etc. related to the task
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `taskId: string` (required) - Unique identifier of the task to be updated, must be a valid and incomplete task ID existing in the system
|
||||
- `relatedFiles: Array<RelatedFile>` (required) - List of files related to the task
|
||||
- `path: string` (required) - File path, can be relative to the project root directory or an absolute path
|
||||
- `type: RelatedFileType` (required) - Type of relationship between the file and the task
|
||||
- `description?: string` (optional) - Supplementary description of the file
|
||||
- `lineStart?: number` (optional) - Starting line of the relevant code block
|
||||
- `lineEnd?: number` (optional) - Ending line of the relevant code block
|
||||
|
||||
**Return Value**:
|
||||
|
||||
- Returns a response containing file update results, including success or failure messages
|
||||
|
||||
## Important Details of Tool Functions
|
||||
|
||||
### Dependency (dependencies) Handling
|
||||
|
||||
- In `splitTasks` and other functions, the `dependencies` parameter accepts task names or task IDs (UUID)
|
||||
- The system converts string arrays to `TaskDependency` object arrays when creating or updating tasks
|
||||
- Task dependencies form a directed acyclic graph (DAG), used to determine task execution order and blocking status
|
||||
|
||||
### Task Complexity Assessment
|
||||
|
||||
- The system uses the `assessTaskComplexity` function to evaluate task complexity
|
||||
- Evaluation is based on multiple metrics: description length, number of dependencies, notes length, etc.
|
||||
- Complexity levels are determined based on thresholds defined in `TaskComplexityThresholds`
|
||||
- Complexity assessment results are used to generate appropriate handling recommendations
|
||||
|
||||
### File Processing Features
|
||||
|
||||
- The `loadTaskRelatedFiles` function does not actually read file contents, it only generates file information summaries
|
||||
- Files are sorted by type priority: TO_MODIFY > REFERENCE > DEPENDENCY > CREATE > OTHER
|
||||
- Supports specifying code block line number ranges for precise localization of key implementations
|
||||
|
||||
## Utility Functions
|
||||
|
||||
### Summary Extraction (summaryExtractor.ts)
|
||||
|
||||
- `extractSummary` - Extract short summaries from text, automatically handling Markdown format
|
||||
- `generateTaskSummary` - Generate task completion summaries based on task names and descriptions
|
||||
- `extractTitle` - Extract text suitable as titles from content
|
||||
|
||||
### File Loading (fileLoader.ts)
|
||||
|
||||
- `loadTaskRelatedFiles` - Generate content summaries of task-related files
|
||||
- `generateFileInfo` - Generate basic file information summaries
|
||||
|
||||
## Task Memory Feature
|
||||
|
||||
The Task Memory feature is an important characteristic of the Shrimp Task Manager, giving the system long-term memory capabilities to save, query, and utilize past task execution experiences.
|
||||
|
||||
### Core Implementation
|
||||
|
||||
1. **Automatic Backup Mechanism**:
|
||||
|
||||
- Dual backup functionality implemented in the `clearAllTasks` function
|
||||
- Task backups are saved in both the data directory and the data/memory subdirectory
|
||||
- Backup files are named using timestamps, in the format tasks_memory_YYYY-MM-DDThh-mm-ss.json
|
||||
|
||||
2. **Intelligent Prompt Guidance**:
|
||||
- Task memory retrieval guidelines added to the prompt in the `planTask` function
|
||||
- Guides Agents on how to find, analyze, and apply historical task records
|
||||
- Provides intelligent reference suggestions, promoting knowledge reuse
|
||||
|
||||
### Use Cases
|
||||
|
||||
- **During Task Planning**: Reference implementation plans and best practices from similar tasks
|
||||
- **During Problem Solving**: Consult similar problems encountered in the past and their solutions
|
||||
- **During Code Reuse**: Identify reusable components or patterns implemented in the past
|
||||
- **During Experience Learning**: Analyze past successful and failed cases, continuously optimize working methods
|
||||
|
||||
### Technical Points
|
||||
|
||||
- Use relative paths to reference the memory directory, maintaining code consistency and maintainability
|
||||
- Ensure the memory directory exists, automatically creating it if it doesn't
|
||||
- Maintain the original error handling pattern, ensuring system stability
|
||||
- The backup process is transparent and unnoticeable, not affecting the user's normal operation flow
|
||||
|
||||
This feature requires no additional tools or configuration. The system automatically saves historical records when tasks are cleared and provides intelligent guidance during task planning, allowing Agents to fully utilize past experiences and knowledge.
|
@ -16,22 +16,64 @@ This system allows users to customize the prompt content for each tool function
|
||||
|
||||
Where `[FUNCTION_NAME]` is the name of the tool function in uppercase. For example, for the task planning function `planTask`, the corresponding environment variable name is `MCP_PROMPT_PLAN_TASK`.
|
||||
|
||||
## Multi-language Prompt Templates
|
||||
|
||||
Shrimp Task Manager supports prompt templates in multiple languages, configurable via the `TEMPLATES_USE` environment variable:
|
||||
|
||||
- Currently supported languages: `en` (English) and `zh` (Traditional Chinese)
|
||||
- Default is `en` (English)
|
||||
|
||||
### Switching Languages
|
||||
|
||||
Set in the `mcp.json` configuration:
|
||||
|
||||
```json
|
||||
"env": {
|
||||
"TEMPLATES_USE": "zh" // Use Traditional Chinese templates
|
||||
}
|
||||
```
|
||||
|
||||
Or in the `.env` file:
|
||||
|
||||
```
|
||||
TEMPLATES_USE=zh
|
||||
```
|
||||
|
||||
### Custom Templates
|
||||
|
||||
You can create your own template set:
|
||||
|
||||
1. Copy an existing template set (e.g., `src/prompts/templates_en` or `src/prompts/templates_zh`) to your directory specified by `DATA_DIR`
|
||||
2. Rename the copied directory (e.g., `my_templates`)
|
||||
3. Modify the template files to meet your needs
|
||||
4. Set the `TEMPLATES_USE` environment variable to your template directory name:
|
||||
|
||||
```json
|
||||
"env": {
|
||||
"DATA_DIR": "/path/to/project/data",
|
||||
"TEMPLATES_USE": "my_templates"
|
||||
}
|
||||
```
|
||||
|
||||
The system will prioritize your custom templates and fall back to the built-in English templates if specific template files cannot be found.
|
||||
|
||||
## Supported Tool Functions
|
||||
|
||||
All major functions in the system support prompt customization through environment variables:
|
||||
|
||||
| Function Name | Environment Variable Prefix | Description |
|
||||
| --------------- | ---------------------------- | ------------------- |
|
||||
| `planTask` | `MCP_PROMPT_PLAN_TASK` | Task planning |
|
||||
| `analyzeTask` | `MCP_PROMPT_ANALYZE_TASK` | Task analysis |
|
||||
| `reflectTask` | `MCP_PROMPT_REFLECT_TASK` | Solution evaluation |
|
||||
| `splitTasks` | `MCP_PROMPT_SPLIT_TASKS` | Task splitting |
|
||||
| `executeTask` | `MCP_PROMPT_EXECUTE_TASK` | Task execution |
|
||||
| `verifyTask` | `MCP_PROMPT_VERIFY_TASK` | Task verification |
|
||||
| `completeTask` | `MCP_PROMPT_COMPLETE_TASK` | Task completion |
|
||||
| `listTasks` | `MCP_PROMPT_LIST_TASKS` | List tasks |
|
||||
| `queryTask` | `MCP_PROMPT_QUERY_TASK` | Query tasks |
|
||||
| `getTaskDetail` | `MCP_PROMPT_GET_TASK_DETAIL` | Get task details |
|
||||
| Function Name | Environment Variable Prefix | Description |
|
||||
| ------------------ | ------------------------------- | ------------------------ |
|
||||
| `planTask` | `MCP_PROMPT_PLAN_TASK` | Task planning |
|
||||
| `analyzeTask` | `MCP_PROMPT_ANALYZE_TASK` | Task analysis |
|
||||
| `reflectTask` | `MCP_PROMPT_REFLECT_TASK` | Solution evaluation |
|
||||
| `splitTasks` | `MCP_PROMPT_SPLIT_TASKS` | Task splitting |
|
||||
| `executeTask` | `MCP_PROMPT_EXECUTE_TASK` | Task execution |
|
||||
| `verifyTask` | `MCP_PROMPT_VERIFY_TASK` | Task verification |
|
||||
| `listTasks` | `MCP_PROMPT_LIST_TASKS` | List tasks |
|
||||
| `queryTask` | `MCP_PROMPT_QUERY_TASK` | Query tasks |
|
||||
| `getTaskDetail` | `MCP_PROMPT_GET_TASK_DETAIL` | Get task details |
|
||||
| `processThought` | `MCP_PROMPT_PROCESS_THOUGHT` | Thought chain processing |
|
||||
| `initProjectRules` | `MCP_PROMPT_INIT_PROJECT_RULES` | Initialize project rules |
|
||||
|
||||
## Environment Variable Configuration Methods
|
||||
|
||||
@ -151,11 +193,6 @@ The parameters supported by each function are as follows:
|
||||
|
||||
- `{task}` - Task details
|
||||
|
||||
### completeTask Supported Parameters
|
||||
|
||||
- `{task}` - Task details
|
||||
- `{completionTime}` - Completion time
|
||||
|
||||
### listTasks Supported Parameters
|
||||
|
||||
- `{status}` - Task status
|
||||
|
@ -5,7 +5,6 @@
|
||||
- [✨ 功能特點](#功能特點1)
|
||||
- [📖 使用指南](#使用指南)
|
||||
- [🧠 任務記憶功能](#任務記憶功能)
|
||||
- [🤔 思維鏈過程](#思維鏈過程)
|
||||
- [📋 專案規範初始化](#專案規範初始化)
|
||||
- [🌐 網頁圖形介面](#網頁圖形介面)
|
||||
- [📚 文件資源](#文件資源)
|
||||
@ -95,17 +94,6 @@
|
||||
|
||||
通過有效利用任務記憶功能,系統能夠不斷積累經驗,智能化程度和工作效率將持續提升。
|
||||
|
||||
## 🤔 <a id="思維鏈過程"></a>思維鏈過程
|
||||
|
||||
思維鏈功能通過結構化思考增強問題解決能力:
|
||||
|
||||
- **系統化推理**:將複雜問題分解為邏輯步驟
|
||||
- **假設測試**:挑戰假設以驗證解決方案的可行性
|
||||
- **批判性分析**:使用嚴格標準評估各種解決方案選項
|
||||
- **改進決策過程**:通過深思熟慮達成更可靠的結論
|
||||
|
||||
當啟用此功能(預設設定)時,系統會引導 Agent 使用 `process_thought` 工具進行逐步推理,確保在實施前進行徹底的問題分析。
|
||||
|
||||
## 📋 <a id="專案規範初始化"></a>專案規範初始化
|
||||
|
||||
專案規範功能有助於維持代碼庫的一致性:
|
||||
@ -134,7 +122,6 @@
|
||||
|
||||
## 📚 <a id="文件資源"></a>文件資源
|
||||
|
||||
- [系統架構](architecture.md):詳細的系統設計與數據流說明
|
||||
- [提示詞自定義指南](prompt-customization.md):透過環境變數自定義工具提示詞的說明
|
||||
- [更新日誌](CHANGELOG.md):記錄此專案的所有重要變更
|
||||
|
||||
@ -179,7 +166,6 @@ npm run build
|
||||
"args": ["/mcp-shrimp-task-manager/dist/index.js"],
|
||||
"env": {
|
||||
"DATA_DIR": "/mcp-shrimp-task-manager/data",
|
||||
"ENABLE_THOUGHT_CHAIN": "true",
|
||||
"TEMPLATES_USE": "en",
|
||||
"ENABLE_GUI": "false"
|
||||
}
|
||||
@ -196,7 +182,6 @@ or
|
||||
"args": ["-y", "mcp-shrimp-task-manager"],
|
||||
"env": {
|
||||
"DATA_DIR": "/mcp-shrimp-task-manager/data",
|
||||
"ENABLE_THOUGHT_CHAIN": "true",
|
||||
"TEMPLATES_USE": "en",
|
||||
"ENABLE_GUI": "false"
|
||||
}
|
||||
@ -222,7 +207,6 @@ or
|
||||
"args": ["/path/to/mcp-shrimp-task-manager/dist/index.js"],
|
||||
"env": {
|
||||
"DATA_DIR": "/path/to/project/data", // 必須使用絕對路徑
|
||||
"ENABLE_THOUGHT_CHAIN": "true",
|
||||
"TEMPLATES_USE": "en",
|
||||
"ENABLE_GUI": "false"
|
||||
}
|
||||
@ -239,7 +223,6 @@ or
|
||||
"args": ["-y", "mcp-shrimp-task-manager"],
|
||||
"env": {
|
||||
"DATA_DIR": "/path/to/project/data", // 必須使用絕對路徑
|
||||
"ENABLE_THOUGHT_CHAIN": "true",
|
||||
"TEMPLATES_USE": "en",
|
||||
"ENABLE_GUI": "false"
|
||||
}
|
||||
@ -273,7 +256,6 @@ or
|
||||
"DATA_DIR": "/path/to/project/data",
|
||||
"MCP_PROMPT_PLAN_TASK": "自定義規劃指導...",
|
||||
"MCP_PROMPT_EXECUTE_TASK_APPEND": "附加執行說明...",
|
||||
"ENABLE_THOUGHT_CHAIN": "true",
|
||||
"TEMPLATES_USE": "en",
|
||||
"ENABLE_GUI": "false"
|
||||
}
|
||||
@ -290,7 +272,6 @@ or
|
||||
此外,還有其他系統配置變數:
|
||||
|
||||
- **DATA_DIR**:指定任務數據存儲的目錄
|
||||
- **ENABLE_THOUGHT_CHAIN**:控制任務規劃工作流中的思考模式。當設置為 `true`(預設值)時,系統引導用戶使用 `process_thought` 工具進行逐步推理。當設置為 `false` 時,系統直接使用 `analyze_task` 提交分析結果,跳過詳細的思考過程。
|
||||
- **TEMPLATES_USE**:指定提示詞使用的模板集。預設為 `en`。目前可用的選項有 `en` 和 `zh`。若要使用自定義模板,請將 `src/prompts/templates_en` 目錄複製到 `DATA_DIR` 指定的位置,重新命名複製的目錄(例如,`my_templates`),並將 `TEMPLATES_USE` 設置為新的目錄名稱(例如,`my_templates`)。
|
||||
|
||||
有關自定義提示詞的詳細說明,包括支援的參數和範例,請參閱[提示詞自定義指南](prompt-customization.md)。
|
||||
@ -349,7 +330,6 @@ or
|
||||
| | `delete_task` | 刪除未完成的任務 |
|
||||
| **任務執行** | `execute_task` | 執行特定任務 |
|
||||
| | `verify_task` | 檢驗任務完成情況 |
|
||||
| | `complete_task` | 標記任務為已完成 |
|
||||
|
||||
## 📄 <a id="許可協議"></a>許可協議
|
||||
|
||||
|
@ -1,573 +0,0 @@
|
||||
# 蝦米任務管理器系統架構
|
||||
|
||||
[English](../en/architecture.md) | [中文](../zh/architecture.md)
|
||||
|
||||
本文檔描述蝦米任務管理器的系統架構設計,包括各組件的功能、交互方式和數據流。
|
||||
|
||||
## 1. 系統整體架構
|
||||
|
||||
蝦米任務管理器採用模塊化設計,基於 MCP (Model Context Protocol) 協議實現與 LLM 的互動。系統由以下核心組件構成:
|
||||
|
||||
```
|
||||
+------------------+
|
||||
| |
|
||||
| MCP 客戶端 |
|
||||
| (如 Cursor IDE) |
|
||||
| |
|
||||
+---------+--------+
|
||||
|
|
||||
| MCP 協議
|
||||
|
|
||||
+---------v--------+
|
||||
| |
|
||||
| 工具註冊層 | <-- 新增 delete_task 工具
|
||||
| (index.ts) | 新增 clear_all_tasks 工具
|
||||
| | 新增 update_task 工具
|
||||
| | 新增 update_task_files 工具
|
||||
+---------+--------+
|
||||
|
|
||||
|
|
||||
+------------------+------------------+
|
||||
| | |
|
||||
+---------v--------+ +-------v---------+
|
||||
| | | |
|
||||
| 工具實現層 | | 模型邏輯層 |
|
||||
| (taskTools.ts) | | (taskModel.ts) |
|
||||
| | | |
|
||||
+------------------+ +-------+---------+
|
||||
|
|
||||
|
|
||||
+---------v--------+
|
||||
| |
|
||||
| 數據存儲層 |
|
||||
| (JSON 文件) |
|
||||
| |
|
||||
+------------------+
|
||||
```
|
||||
|
||||
## 2. 主要組件說明
|
||||
|
||||
### 2.1 工具註冊層 (index.ts)
|
||||
|
||||
工具註冊層負責將各功能工具註冊到 MCP 系統中,使其能夠被 LLM 訪問和使用。
|
||||
|
||||
**主要功能**:
|
||||
|
||||
- 註冊 `plan_task` 工具函數,用於任務規劃
|
||||
- 註冊 `analyze_task` 工具函數,用於任務分析
|
||||
- 註冊 `reflect_task` 工具函數,用於批判性審查分析結果
|
||||
- 註冊 `split_tasks` 工具函數,用於將複雜任務分解為子任務
|
||||
- 註冊 `list_tasks` 工具函數,用於生成任務清單
|
||||
- 註冊 `execute_task` 工具函數,用於執行特定任務
|
||||
- 註冊 `verify_task` 工具函數,用於驗證任務完成度
|
||||
- 註冊 `complete_task` 工具函數,用於標記任務為完成狀態
|
||||
- 註冊 `delete_task` 工具函數,用於刪除未完成的任務
|
||||
- 註冊 `clear_all_tasks` 工具函數,用於清除所有未完成的任務
|
||||
- 註冊 `update_task` 工具函數,用於更新任務內容
|
||||
- 註冊 `update_task_files` 工具函數,用於更新任務相關文件列表
|
||||
|
||||
### 2.2 工具實現層 (tools/\*.ts)
|
||||
|
||||
工具實現層包含具體工具函數的實現,處理參數解析、驗證和結果格式化。
|
||||
|
||||
**核心文件**:
|
||||
|
||||
- `taskTools.ts`: 任務管理相關工具
|
||||
- `fileLoader.ts`: 任務相關文件的摘要生成工具
|
||||
|
||||
**主要功能**:
|
||||
|
||||
- 實現 `planTask` 工具函數,初始化並詳細規劃任務流程
|
||||
- 實現 `analyzeTask` 工具函數,深入分析任務需求
|
||||
- 實現 `reflectTask` 工具函數,批判性審查分析結果
|
||||
- 實現 `splitTasks` 工具函數,將複雜任務分解為獨立且可追蹤的子任務
|
||||
- 實現 `listTasks` 工具函數,生成結構化任務清單
|
||||
- 實現 `executeTask` 工具函數,按照預定義計劃執行特定任務
|
||||
- 實現 `verifyTask` 工具函數,全面驗證任務完成度
|
||||
- 實現 `completeTask` 工具函數,正式標記任務為完成狀態
|
||||
- 實現 `deleteTask` 工具函數,刪除未完成的任務
|
||||
- 實現 `clearAllTasks` 工具函數,刪除所有未完成的任務
|
||||
- 實現 `updateTask` 工具函數,更新任務內容
|
||||
- 實現 `updateTaskRelatedFiles` 工具函數,更新任務相關文件列表
|
||||
|
||||
### 2.3 模型邏輯層 (models/\*.ts)
|
||||
|
||||
模型邏輯層包含核心業務邏輯和數據處理函數,負責實現各種功能的邏輯處理。
|
||||
|
||||
**核心文件**:
|
||||
|
||||
- `taskModel.ts`: 任務數據模型和操作
|
||||
|
||||
**主要功能**:
|
||||
|
||||
- 在 `taskModel.ts` 中實現創建、讀取、更新和刪除任務的功能
|
||||
- 在 `taskModel.ts` 中實現 `deleteTask` 函數,刪除未完成的任務
|
||||
- 在 `taskModel.ts` 中實現 `clearAllTasks` 函數,刪除所有未完成的任務
|
||||
- 在 `taskModel.ts` 中實現 `updateTask` 函數,更新任務內容
|
||||
- 在 `taskModel.ts` 中實現 `updateTaskRelatedFiles` 函數,更新任務相關文件列表
|
||||
- 在 `taskModel.ts` 中實現 `assessTaskComplexity` 函數,評估任務複雜度
|
||||
- 在 `taskModel.ts` 中實現 `loadTaskById` 函數,載入特定任務
|
||||
- 在 `taskModel.ts` 中實現 `completeTask` 函數,標記任務為完成狀態
|
||||
|
||||
### 2.4 數據模型定義 (types/index.ts)
|
||||
|
||||
定義系統中使用的所有數據類型和接口。
|
||||
|
||||
**主要類型**:
|
||||
|
||||
- `TaskStatus` 枚舉:定義任務狀態,包括待處理、進行中、已完成和被阻擋
|
||||
- `TaskDependency` 接口:定義任務依賴關係
|
||||
- `RelatedFileType` 枚舉:定義文件關聯類型,如待修改、參考資料、待建立、依賴文件和其他
|
||||
- `RelatedFile` 接口:定義任務相關文件結構
|
||||
- `Task` 接口:定義任務的完整數據結構
|
||||
- `TaskComplexityLevel` 枚舉:定義任務複雜度級別,如低複雜度、中等複雜度、高複雜度和極高複雜度
|
||||
- `TaskComplexityThresholds` 常量:定義複雜度評估閾值
|
||||
- `TaskComplexityAssessment` 接口:記錄複雜度評估結果
|
||||
|
||||
### 2.5 工具函數 (utils/\*.ts)
|
||||
|
||||
提供各種輔助功能的工具函數。
|
||||
|
||||
**核心文件**:
|
||||
|
||||
- `summaryExtractor.ts`: 實現摘要提取和生成功能
|
||||
- `fileLoader.ts`: 實現任務相關文件的摘要生成功能
|
||||
|
||||
**主要功能**:
|
||||
|
||||
- 實現 `extractSummary` 函數,從文本中提取簡短摘要
|
||||
- 實現 `generateTaskSummary` 函數,基於任務名稱和描述生成任務完成摘要
|
||||
- 實現 `extractTitle` 函數,從內容中提取適合作為標題的文本
|
||||
- 實現 `loadTaskRelatedFiles` 函數,生成任務相關文件的內容摘要
|
||||
- 實現 `generateFileInfo` 函數,生成文件基本資訊摘要
|
||||
|
||||
### 2.6 數據存儲層
|
||||
|
||||
使用 JSON 文件作為數據存儲,保存任務信息。
|
||||
|
||||
**核心文件**:
|
||||
|
||||
- `data/tasks.json`: 存儲所有任務數據
|
||||
- `data/backups/`: 存儲任務數據備份
|
||||
|
||||
## 3. 數據流
|
||||
|
||||
### 3.1 任務刪除流程
|
||||
|
||||
```
|
||||
LLM 調用 delete_task
|
||||
|
|
||||
v
|
||||
識別任務是否存在
|
||||
|
|
||||
v
|
||||
檢查任務狀態(拒絕刪除已完成任務)
|
||||
|
|
||||
v
|
||||
檢查依賴關係(拒絕刪除有依賴的任務)
|
||||
|
|
||||
v
|
||||
執行刪除操作
|
||||
|
|
||||
v
|
||||
返回結果給 LLM
|
||||
```
|
||||
|
||||
### 3.2 任務複雜度評估流程
|
||||
|
||||
```
|
||||
LLM 調用 execute_task
|
||||
|
|
||||
v
|
||||
載入任務信息
|
||||
|
|
||||
v
|
||||
評估任務複雜度
|
||||
|
|
||||
+------------> 計算描述長度
|
||||
| |
|
||||
+------------> 計算依賴數量
|
||||
| |
|
||||
+------------> 計算注記長度
|
||||
| |
|
||||
+------------> 檢查是否有注記
|
||||
| |
|
||||
v v
|
||||
確定複雜度級別 <----- 應用評估閾值
|
||||
|
|
||||
v
|
||||
生成處理建議
|
||||
|
|
||||
v
|
||||
更新任務提示,包含複雜度信息
|
||||
|
|
||||
v
|
||||
返回增強後的任務執行提示給 LLM
|
||||
```
|
||||
|
||||
### 3.3 任務完成流程
|
||||
|
||||
```
|
||||
LLM 調用 complete_task
|
||||
|
|
||||
v
|
||||
載入任務信息
|
||||
|
|
||||
v
|
||||
檢查是否提供摘要
|
||||
|
|
||||
+---- 有 ----> 使用提供的摘要
|
||||
|
|
||||
+---- 無 ----> 自動生成摘要
|
||||
|
|
||||
+---> 基於任務名稱和描述
|
||||
|
|
||||
+---> 提取關鍵信息
|
||||
|
|
||||
+---> 格式化摘要文本
|
||||
|
|
||||
v
|
||||
更新任務狀態為已完成
|
||||
|
|
||||
v
|
||||
保存摘要到任務記錄
|
||||
|
|
||||
v
|
||||
返回結果給 LLM
|
||||
```
|
||||
|
||||
### 3.4 清除所有任務流程
|
||||
|
||||
```
|
||||
LLM 調用 clear_all_tasks
|
||||
|
|
||||
v
|
||||
檢查確認參數(必須為 true)
|
||||
|
|
||||
v
|
||||
創建數據備份
|
||||
|
|
||||
v
|
||||
載入當前任務列表
|
||||
|
|
||||
|
|
||||
v
|
||||
篩選出未完成的任務
|
||||
|
|
||||
v
|
||||
執行批量刪除
|
||||
|
|
||||
v
|
||||
更新數據文件
|
||||
|
|
||||
v
|
||||
返回清除結果給 LLM
|
||||
```
|
||||
|
||||
### 3.5 更新任務內容流程
|
||||
|
||||
```
|
||||
LLM 調用 update_task
|
||||
|
|
||||
v
|
||||
載入任務信息
|
||||
|
|
||||
v
|
||||
檢查任務是否存在
|
||||
|
|
||||
v
|
||||
檢查任務狀態(阻止更新已完成任務)
|
||||
|
|
||||
v
|
||||
驗證更新參數(至少提供一個更新字段)
|
||||
|
|
||||
v
|
||||
執行更新操作
|
||||
|
|
||||
v
|
||||
返回更新結果給 LLM
|
||||
```
|
||||
|
||||
### 3.6 更新任務相關文件流程
|
||||
|
||||
```
|
||||
LLM 調用 update_task_files
|
||||
|
|
||||
v
|
||||
載入任務信息
|
||||
|
|
||||
v
|
||||
檢查任務是否存在
|
||||
|
|
||||
v
|
||||
檢查任務狀態(阻止更新已完成任務)
|
||||
|
|
||||
v
|
||||
驗證文件列表格式
|
||||
|
|
||||
v
|
||||
處理每個相關文件
|
||||
| |
|
||||
| +---> 驗證文件路徑
|
||||
| |
|
||||
| +---> 檢查行號範圍(如有提供)
|
||||
| |
|
||||
| +---> 驗證文件類型
|
||||
|
|
||||
v
|
||||
更新任務的相關文件列表
|
||||
|
|
||||
v
|
||||
返回更新結果給 LLM
|
||||
```
|
||||
|
||||
### 3.7 文件處理流程
|
||||
|
||||
```
|
||||
處理任務相關文件
|
||||
|
|
||||
v
|
||||
根據文件類型進行優先級排序
|
||||
| |
|
||||
| +---> 待修改 > 參考資料 > 依賴文件 > 待建立 > 其他
|
||||
|
|
||||
v
|
||||
生成文件摘要
|
||||
| |
|
||||
| +---> 對於指定行號範圍的文件,生成該範圍的摘要
|
||||
| |
|
||||
| +---> 對於一般文件,生成整體內容摘要
|
||||
|
|
||||
v
|
||||
返回文件摘要結果
|
||||
```
|
||||
|
||||
## 4. 系統交互圖
|
||||
|
||||
### 4.1 LLM 與任務管理器交互
|
||||
|
||||
```
|
||||
+-------+ 1.調用工具 +----------------+
|
||||
| |------------------>| |
|
||||
| LLM | | 蝦米任務管理器 |
|
||||
| |<------------------| |
|
||||
+-------+ 4.返回結果 +-------+--------+
|
||||
|
|
||||
+-------v--------+
|
||||
| |
|
||||
| JSON 數據存儲 |
|
||||
| |
|
||||
+----------------+
|
||||
```
|
||||
|
||||
### 4.2 工具層與模型層交互
|
||||
|
||||
```
|
||||
+-------------+ 調用 +-------------+ 讀寫 +------------+
|
||||
| |------------->| |------------>| |
|
||||
| 工具實現層 | | 模型邏輯層 | | 數據存儲層 |
|
||||
| |<-------------| |<------------| |
|
||||
+-------------+ 返回結果 +-------------+ 返回數據 +------------+
|
||||
```
|
||||
|
||||
## 5. 核心功能架構圖
|
||||
|
||||
### 5.1 任務規劃功能
|
||||
|
||||
```
|
||||
+----------------+ +----------------+ +------------------+
|
||||
| | | | | |
|
||||
| planTaskSchema |---->| planTask |---->| 任務規劃響應生成 |
|
||||
| | | (taskTools.ts) | | |
|
||||
+----------------+ +-------+--------+ +------------------+
|
||||
```
|
||||
|
||||
### 5.2 任務分析功能
|
||||
|
||||
```
|
||||
+----------------+ +----------------+ +------------------+
|
||||
| | | | | |
|
||||
| analyzeTaskSchema|---->| analyzeTask |---->| 技術分析指引生成 |
|
||||
| | | (taskTools.ts) | | |
|
||||
+----------------+ +-------+--------+ +------------------+
|
||||
```
|
||||
|
||||
### 5.3 任務反思功能
|
||||
|
||||
```
|
||||
+----------------+ +----------------+ +------------------+
|
||||
| | | | | |
|
||||
| reflectTaskSchema|---->| reflectTask |---->| 反思提示與建議生成|
|
||||
| | | (taskTools.ts) | | |
|
||||
+----------------+ +-------+--------+ +------------------+
|
||||
```
|
||||
|
||||
### 5.4 任務拆分功能
|
||||
|
||||
```
|
||||
+----------------+ +----------------+ +------------------+
|
||||
| | | | | |
|
||||
| splitTasksSchema|---->| splitTasks |---->| createTasks |
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+----------------+ +-------+--------+ +------------------+
|
||||
```
|
||||
|
||||
### 5.5 任務執行功能
|
||||
|
||||
```
|
||||
+----------------+ +----------------+ +------------------+
|
||||
| | | | | |
|
||||
| executeTaskSchema|---->| executeTask |---->| assessTaskComplexity|
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+----------------+ +-------+--------+ +------------------+
|
||||
|
|
||||
v
|
||||
+------+---------------------+------+
|
||||
| 任務執行指南和上下文生成 |
|
||||
+------+---------------------+------+
|
||||
```
|
||||
|
||||
### 5.6 任務驗證功能
|
||||
|
||||
```
|
||||
+----------------+ +----------------+ +------------------+
|
||||
| | | | | |
|
||||
| verifyTaskSchema|---->| verifyTask |---->| 任務驗證評估 |
|
||||
| | | (taskTools.ts) | | |
|
||||
+----------------+ +-------+--------+ +------------------+
|
||||
```
|
||||
|
||||
### 5.7 完成任務功能
|
||||
|
||||
```
|
||||
+----------------+ +----------------+ +------------------+
|
||||
| | | | | |
|
||||
| completeTaskSchema|---->| completeTask |---->| updateTaskSummary|
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+----------------+ +-------+--------+ +------------------+
|
||||
|
|
||||
v
|
||||
+------+--------+
|
||||
| summaryExtractor|
|
||||
| (utils) |
|
||||
+---------------+
|
||||
```
|
||||
|
||||
### 5.8 任務刪除功能
|
||||
|
||||
```
|
||||
+----------------+ +----------------+ +------------------+
|
||||
| | | | | |
|
||||
| deleteTaskSchema|---->| deleteTask |---->| modelDeleteTask |
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+----------------+ +-------+--------+ +------------------+
|
||||
|
|
||||
v
|
||||
+------+---------------------+------+
|
||||
| 檢查任務狀態和依賴關係 |
|
||||
+------+---------------------+------+
|
||||
```
|
||||
|
||||
### 5.9 清除所有任務功能
|
||||
|
||||
```
|
||||
+------------------+ +----------------+ +------------------+
|
||||
| | | | | |
|
||||
| clearAllTasksSchema|---->| clearAllTasks |---->| modelClearAllTasks|
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+------------------+ +-------+--------+ +------------------+
|
||||
|
|
||||
v
|
||||
+------+---------------------+------+
|
||||
| 確認參數檢查和數據備份 |
|
||||
+------+---------------------+------+
|
||||
|
|
||||
v
|
||||
+------+---------------------+------+
|
||||
| 篩選和批量刪除未完成任務 |
|
||||
+------+---------------------+------+
|
||||
```
|
||||
|
||||
### 5.10 更新任務功能
|
||||
|
||||
```
|
||||
+------------------+ +----------------+ +------------------+
|
||||
| | | | | |
|
||||
| updateTaskSchema |---->| updateTask |---->| updateTask |
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+------------------+ +-------+--------+ +------------------+
|
||||
|
|
||||
v
|
||||
+------+---------------------+------+
|
||||
| 檢查任務狀態和更新參數有效性 |
|
||||
+------+---------------------+------+
|
||||
```
|
||||
|
||||
### 5.11 更新任務相關文件功能
|
||||
|
||||
```
|
||||
+----------------------+ +---------------------+ +----------------------+
|
||||
| | | | | |
|
||||
| updateTaskFilesSchema |---->| updateTaskRelatedFiles |---->| updateTaskRelatedFiles |
|
||||
| | | (taskTools.ts) | | (taskModel.ts) |
|
||||
+----------------------+ +-----------+---------+ +-----------+----------+
|
||||
| |
|
||||
v v
|
||||
+-------+-------------------------+------+
|
||||
| 驗證文件格式和路徑有效性 |
|
||||
+-------+-------------------------+------+
|
||||
|
|
||||
v
|
||||
+-------+-------------------------+------+
|
||||
| 更新任務相關文件列表 |
|
||||
+-------+-------------------------+------+
|
||||
```
|
||||
|
||||
## 6. 擴展性考慮
|
||||
|
||||
### 6.1 新功能擴展方式
|
||||
|
||||
蝦米任務管理器的模塊化設計使其易於擴展。要添加新功能,通常需要:
|
||||
|
||||
1. 在 `types/index.ts` 中定義相關數據類型
|
||||
2. 在相應的模型文件中實現核心邏輯
|
||||
3. 在工具層創建對應的工具函數
|
||||
4. 在 `index.ts` 中註冊新工具
|
||||
|
||||
### 6.2 目前的擴展點
|
||||
|
||||
系統當前提供以下擴展點:
|
||||
|
||||
- **任務處理流程擴展**:可通過修改 `executeTask`、`verifyTask` 等函數擴展任務處理流程
|
||||
- **複雜度評估擴展**:可在 `assessTaskComplexity` 中添加更多評估指標
|
||||
- **摘要生成擴展**:可增強 `summaryExtractor.ts` 中的算法
|
||||
- **文件處理擴展**:可在 `fileLoader.ts` 中支持更多文件類型的摘要格式化
|
||||
- **過濾條件擴展**:可在任務查詢中添加更多過濾條件選項
|
||||
|
||||
## 7. 系統限制與未來改進
|
||||
|
||||
### 7.1 當前限制
|
||||
|
||||
- 使用文件存儲,不適合多用戶並發場景
|
||||
- 缺乏用戶認證和權限控制
|
||||
- 摘要生成使用簡單規則,可進一步改進
|
||||
- 文件處理不讀取實際文件內容,僅生成摘要信息
|
||||
|
||||
### 7.2 未來可能的改進
|
||||
|
||||
- 遷移到數據庫存儲,提高並發處理能力
|
||||
- 添加用戶管理和訪問控制
|
||||
- 使用更先進的算法優化摘要生成
|
||||
- 添加任務優先級和時間規劃功能
|
||||
- 實現任務執行進度追蹤
|
||||
- 增強文件關聯系統,支持更複雜的關係類型
|
||||
- 實現自動識別相關文件的能力
|
||||
- 支持實際讀取文件內容,提供更詳細的上下文
|
||||
|
||||
## 8. 結論
|
||||
|
||||
蝦米任務管理器採用模塊化、分層設計,使系統具有良好的可維護性和擴展性。通過 12 個核心工具函數和完善的數據模型,系統能夠有效地管理複雜項目的任務流程,特別在需要長期上下文記憶的場景中表現出色。
|
||||
|
||||
系統的設計重點在於提供清晰的任務管理流程,同時增強 LLM 在執行任務時的上下文記憶能力,通過精確的文件關聯和智能上下文載入,有效解決了 LLM 在處理長期複雜任務時的記憶限制問題。
|
||||
|
||||
隨著系統的進一步發展,未來將著重改進數據存儲方式、優化摘要生成算法、增強文件處理能力和添加更多任務管理功能,使系統能夠應對更多複雜的任務管理場景。
|
@ -1,357 +0,0 @@
|
||||
[English](../en/functionality-checklist.md) | [中文](../zh/functionality-checklist.md)
|
||||
|
||||
# 蝦米任務管理器 - 功能實現清單
|
||||
|
||||
本文檔列出蝦米任務管理器系統中所有實際實現的工具函數、參數結構和功能。此清單作為文檔審查的基準參考。
|
||||
|
||||
## 類型定義與枚舉
|
||||
|
||||
### 任務狀態枚舉 (TaskStatus)
|
||||
|
||||
- `PENDING = "待處理"` - 已創建但尚未開始執行的任務
|
||||
- `IN_PROGRESS = "進行中"` - 當前正在執行的任務
|
||||
- `COMPLETED = "已完成"` - 已成功完成並通過驗證的任務
|
||||
- `BLOCKED = "被阻擋"` - 由於依賴關係而暫時無法執行的任務
|
||||
|
||||
### 任務依賴關係 (TaskDependency)
|
||||
|
||||
- `taskId: string` - 前置任務的唯一標識符,當前任務執行前必須完成此依賴任務
|
||||
|
||||
### 相關文件類型枚舉 (RelatedFileType)
|
||||
|
||||
- `TO_MODIFY = "待修改"` - 需要在任務中修改的文件
|
||||
- `REFERENCE = "參考資料"` - 任務的參考資料或相關文檔
|
||||
- `CREATE = "待建立"` - 需要在任務中建立的文件
|
||||
- `DEPENDENCY = "依賴文件"` - 任務依賴的組件或庫文件
|
||||
- `OTHER = "其他"` - 其他類型的相關文件
|
||||
|
||||
### 相關文件 (RelatedFile)
|
||||
|
||||
- `path: string` - 文件路徑,可以是相對於項目根目錄的路徑或絕對路徑
|
||||
- `type: RelatedFileType` - 文件與任務的關係類型
|
||||
- `description?: string` - 文件的補充描述,說明其與任務的具體關係或用途
|
||||
- `lineStart?: number` - 相關代碼區塊的起始行(選填)
|
||||
- `lineEnd?: number` - 相關代碼區塊的結束行(選填)
|
||||
|
||||
### 任務介面 (Task)
|
||||
|
||||
- `id: string` - 任務的唯一標識符
|
||||
- `name: string` - 簡潔明確的任務名稱
|
||||
- `description: string` - 詳細的任務描述,包含實施要點和驗收標準
|
||||
- `notes?: string` - 補充說明、特殊處理要求或實施建議(選填)
|
||||
- `status: TaskStatus` - 任務當前的執行狀態
|
||||
- `dependencies: TaskDependency[]` - 任務的前置依賴關係列表
|
||||
- `createdAt: Date` - 任務創建的時間戳
|
||||
- `updatedAt: Date` - 任務最後更新的時間戳
|
||||
- `completedAt?: Date` - 任務完成的時間戳(僅適用於已完成的任務)
|
||||
- `summary?: string` - 任務完成摘要,簡潔描述實施結果和重要決策(僅適用於已完成的任務)
|
||||
- `relatedFiles?: RelatedFile[]` - 與任務相關的文件列表(選填)
|
||||
|
||||
### 任務複雜度級別枚舉 (TaskComplexityLevel)
|
||||
|
||||
- `LOW = "低複雜度"` - 簡單且直接的任務,通常不需要特殊處理
|
||||
- `MEDIUM = "中等複雜度"` - 具有一定複雜性但仍可管理的任務
|
||||
- `HIGH = "高複雜度"` - 複雜且耗時的任務,需要特別關注
|
||||
- `VERY_HIGH = "極高複雜度"` - 極其複雜的任務,建議拆分處理
|
||||
|
||||
### 任務複雜度評估結果 (TaskComplexityAssessment)
|
||||
|
||||
- `level: TaskComplexityLevel` - 整體複雜度級別
|
||||
- `metrics: object` - 各項評估指標的詳細數據
|
||||
- `descriptionLength: number` - 描述長度
|
||||
- `dependenciesCount: number` - 依賴數量
|
||||
- `notesLength: number` - 注記長度
|
||||
- `hasNotes: boolean` - 是否有注記
|
||||
- `recommendations: string[]` - 處理建議列表
|
||||
|
||||
## 工具函數與參數
|
||||
|
||||
### 1. plan_task
|
||||
|
||||
**描述**:初始化並詳細規劃任務流程,建立明確的目標與成功標準
|
||||
|
||||
**參數**:
|
||||
|
||||
- `description: string` (必填) - 完整詳細的任務問題描述,應包含任務目標、背景及預期成果
|
||||
- 必須至少 10 個字符
|
||||
- `requirements?: string` (選填) - 任務的特定技術要求、業務約束條件或品質標準
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含規劃提示的響應,用於引導用戶開始任務分析
|
||||
|
||||
### 2. analyze_task
|
||||
|
||||
**描述**:深入分析任務需求並系統性檢查代碼庫,評估技術可行性與潛在風險
|
||||
|
||||
**參數**:
|
||||
|
||||
- `summary: string` (必填) - 結構化的任務摘要,包含任務目標、範圍與關鍵技術挑戰
|
||||
- 必須至少 20 個字符
|
||||
- `initialConcept: string` (必填) - 初步解答構想,包含技術方案、架構設計和實施策略
|
||||
- 必須至少 50 個字符
|
||||
- `previousAnalysis?: string` (選填) - 前次迭代的分析結果,用於持續改進方案
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含技術分析指引的響應,用於指導用戶進行深入分析
|
||||
|
||||
### 3. reflect_task
|
||||
|
||||
**描述**:批判性審查分析結果,評估方案完整性並識別優化機會,確保解決方案符合最佳實踐
|
||||
|
||||
**參數**:
|
||||
|
||||
- `summary: string` (必填) - 結構化的任務摘要,保持與分析階段一致以確保連續性
|
||||
- 必須至少 20 個字符
|
||||
- `analysis: string` (必填) - 完整詳盡的技術分析結果,包括所有技術細節、依賴組件和實施方案
|
||||
- 必須至少 100 個字符
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含反思提示與實施建議的響應
|
||||
|
||||
### 4. split_tasks
|
||||
|
||||
**描述**:將複雜任務分解為獨立且可追蹤的子任務,建立明確的依賴關係和優先順序
|
||||
|
||||
**參數**:
|
||||
|
||||
- `updateMode: "append" | "overwrite" | "selective" | "clearAllTasks"` (必填) - 任務更新模式選擇:
|
||||
- `append`:保留所有現有任務並添加新任務
|
||||
- `overwrite`:清除所有未完成任務並完全替換
|
||||
- `selective`:根據任務名稱匹配更新現有任務,保留不在列表中的任務
|
||||
- `clearAllTasks`:清除所有任務並創建備份
|
||||
- `tasks: Array<object>` (必填) - 結構化的任務清單,每個任務應保持原子性且有明確的完成標準
|
||||
- `name: string` (必填) - 簡潔明確的任務名稱,應能清晰表達任務目的
|
||||
- 不超過 100 個字符
|
||||
- `description: string` (必填) - 詳細的任務描述,包含實施要點、技術細節和驗收標準
|
||||
- 必須至少 10 個字符
|
||||
- `notes?: string` (選填) - 補充說明、特殊處理要求或實施建議
|
||||
- `dependencies?: string[]` (選填) - 此任務依賴的前置任務 ID 或任務名稱列表
|
||||
- `relatedFiles?: RelatedFile[]` (選填) - 與任務相關的文件列表
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含任務拆分結果的響應,包括成功創建的任務數量和任務 ID 列表
|
||||
|
||||
### 5. list_tasks
|
||||
|
||||
**描述**:生成結構化任務清單,包含完整狀態追蹤、優先級和依賴關係
|
||||
|
||||
**參數**:無
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含任務清單的響應,按狀態分組顯示所有任務
|
||||
|
||||
### 6. execute_task
|
||||
|
||||
**描述**:按照預定義計劃執行特定任務,確保每個步驟的輸出符合質量標準
|
||||
|
||||
**參數**:
|
||||
|
||||
- `taskId: string` (必填) - 待執行任務的唯一標識符,必須是系統中存在的有效任務 ID
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含任務執行指南的響應,包括任務詳情、複雜度評估和執行步驟建議
|
||||
|
||||
### 7. verify_task
|
||||
|
||||
**描述**:全面驗證任務完成度,確保所有需求與技術標準都已滿足,並無遺漏細節
|
||||
|
||||
**參數**:
|
||||
|
||||
- `taskId: string` (必填) - 待驗證任務的唯一標識符,必須是系統中存在的有效任務 ID
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含任務驗證結果的響應,包括完成標準檢查和具體驗證項
|
||||
|
||||
### 8. complete_task
|
||||
|
||||
**描述**:正式標記任務為完成狀態,生成詳細的完成報告,並更新關聯任務的依賴狀態
|
||||
|
||||
**參數**:
|
||||
|
||||
- `taskId: string` (必填) - 待完成任務的唯一標識符,必須是系統中存在的有效任務 ID
|
||||
- `summary?: string` (選填) - 任務完成摘要,簡潔描述實施結果和重要決策
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含任務完成確認的響應,包括完成時間和更新的依賴任務狀態
|
||||
|
||||
### 9. delete_task
|
||||
|
||||
**描述**:刪除未完成的任務,但不允許刪除已完成的任務,確保系統記錄的完整性
|
||||
|
||||
**參數**:
|
||||
|
||||
- `taskId: string` (必填) - 待刪除任務的唯一標識符,必須是系統中存在且未完成的任務 ID
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含任務刪除結果的響應,包括成功或失敗的訊息
|
||||
|
||||
### 10. clear_all_tasks
|
||||
|
||||
**描述**:刪除系統中所有未完成的任務,該指令必須由用戶明確確認才能執行。同時將任務備份到 memory 子目錄,保存任務歷史記錄以供未來參考。
|
||||
|
||||
**參數**:
|
||||
|
||||
- `confirm: boolean` (必填) - 確認刪除所有未完成的任務(此操作不可逆)
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含清除操作結果的響應,包括成功或失敗的訊息、備份文件名和備份位置
|
||||
|
||||
**重要細節**:
|
||||
|
||||
- 在刪除任務前,會自動將當前任務列表備份到 data/memory 子目錄
|
||||
- 備份文件使用時間戳命名,格式為 tasks_memory_YYYY-MM-DDThh-mm-ss.json
|
||||
- memory 子目錄作為長期記憶庫,用於存儲任務歷史記錄,供未來任務規劃參考
|
||||
|
||||
### 11. query_task
|
||||
|
||||
**描述**:根據關鍵字或 ID 搜尋任務,顯示省略版的任務資訊
|
||||
|
||||
**參數**:
|
||||
|
||||
- `query: string` (必填) - 搜尋查詢文字,可以是任務 ID 或多個關鍵字(空格分隔)
|
||||
- 必須至少 1 個字符
|
||||
- `isId: boolean` (選填) - 指定是否為 ID 查詢模式,默認為否(關鍵字模式)
|
||||
- `page: number` (選填) - 分頁頁碼,默認為第 1 頁
|
||||
- `pageSize: number` (選填) - 每頁顯示的任務數量,默認為 5 筆,最大 20 筆
|
||||
- 必須為正整數,範圍 1-20
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含搜尋結果的響應,包括符合條件的任務列表、分頁資訊和總結果數量
|
||||
|
||||
**重要細節**:
|
||||
|
||||
- 當 `isId` 為 true 時,系統會精確查詢指定 ID 的任務
|
||||
- 當 `isId` 為 false 時,系統會在任務名稱、描述和摘要中搜尋指定關鍵字
|
||||
- 關鍵字模式支持多個關鍵字(以空格分隔),將返回符合任一關鍵字的任務
|
||||
- 結果會按任務狀態和更新時間排序,便於快速找到最相關的任務
|
||||
|
||||
### 12. update_task
|
||||
|
||||
**描述**:更新任務內容,包括名稱、描述和注記,但不允許修改已完成的任務
|
||||
|
||||
**參數**:
|
||||
|
||||
- `taskId: string` (必填) - 待更新任務的唯一標識符,必須是系統中存在且未完成的任務 ID
|
||||
- `name?: string` (選填) - 任務的新名稱
|
||||
- `description?: string` (選填) - 任務的新描述內容
|
||||
- `notes?: string` (選填) - 任務的新補充說明
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含任務更新結果的響應,包括成功或失敗的訊息
|
||||
|
||||
### 13. get_task_detail
|
||||
|
||||
**描述**:根據任務 ID 獲取任務的完整詳細信息,包括未截斷的實現指南和驗證標準等
|
||||
|
||||
**參數**:
|
||||
|
||||
- `taskId: string` (必填) - 欲檢視詳情的任務 ID
|
||||
- 必須至少 1 個字符
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含任務完整詳情的響應,包括所有任務屬性,特別是完整的實現指南和驗證標準
|
||||
|
||||
**重要細節**:
|
||||
|
||||
- 與 `list_tasks` 不同,此功能返回單個任務的完整詳情,沒有內容截斷
|
||||
- 適用於深入了解特定任務的要求和技術細節
|
||||
- 提供完整的相關文件列表和任務分析結果
|
||||
- 可用於檢視執行過程中可能被省略的長文本內容
|
||||
|
||||
### 14. update_task_files
|
||||
|
||||
**描述**:更新任務相關文件列表,用於記錄與任務相關的代碼文件、參考資料等
|
||||
|
||||
**參數**:
|
||||
|
||||
- `taskId: string` (必填) - 待更新任務的唯一標識符,必須是系統中存在且未完成的任務 ID
|
||||
- `relatedFiles: Array<RelatedFile>` (必填) - 與任務相關的文件列表
|
||||
- `path: string` (必填) - 文件路徑,可以是相對於項目根目錄的路徑或絕對路徑
|
||||
- `type: RelatedFileType` (必填) - 文件與任務的關係類型
|
||||
- `description?: string` (選填) - 文件的補充描述
|
||||
- `lineStart?: number` (選填) - 相關代碼區塊的起始行
|
||||
- `lineEnd?: number` (選填) - 相關代碼區塊的結束行
|
||||
|
||||
**返回值**:
|
||||
|
||||
- 返回一個包含文件更新結果的響應,包括成功或失敗的訊息
|
||||
|
||||
## 工具函數重要細節
|
||||
|
||||
### 依賴關係 (dependencies) 處理
|
||||
|
||||
- 在 `splitTasks` 和其他函數中,`dependencies` 參數允許接受任務名稱或任務 ID(UUID)
|
||||
- 系統會在任務創建或更新時將字串陣列轉換為 `TaskDependency` 物件陣列
|
||||
- 任務依賴關係形成有向無環圖(DAG),用於確定任務執行順序和阻塞狀態
|
||||
|
||||
### 任務複雜度評估
|
||||
|
||||
- 系統使用 `assessTaskComplexity` 函數評估任務的複雜度
|
||||
- 評估基於多個指標:描述長度、依賴數量、注記長度等
|
||||
- 根據 `TaskComplexityThresholds` 定義的閾值來判定複雜度級別
|
||||
- 複雜度評估結果用於生成適當的處理建議
|
||||
|
||||
### 文件處理功能
|
||||
|
||||
- `loadTaskRelatedFiles` 函數不實際讀取檔案內容,僅生成文件資訊摘要
|
||||
- 文件按類型優先級排序:待修改 > 參考資料 > 依賴文件 > 待建立 > 其他
|
||||
- 支持指定代碼區塊行號範圍,便於精確定位關鍵實現
|
||||
|
||||
## 實用工具函數
|
||||
|
||||
### 摘要提取 (summaryExtractor.ts)
|
||||
|
||||
- `extractSummary` - 從文本中提取簡短摘要,自動處理 Markdown 格式
|
||||
- `generateTaskSummary` - 基於任務名稱和描述生成任務完成摘要
|
||||
- `extractTitle` - 從內容中提取適合作為標題的文本
|
||||
|
||||
### 文件加載 (fileLoader.ts)
|
||||
|
||||
- `loadTaskRelatedFiles` - 生成任務相關文件的內容摘要
|
||||
- `generateFileInfo` - 生成文件基本資訊摘要
|
||||
|
||||
## 任務記憶功能
|
||||
|
||||
任務記憶功能是蝦米任務管理器的重要特性,它使系統具備長期記憶能力,能夠保存、查詢和利用過去的任務執行經驗。
|
||||
|
||||
### 核心實現
|
||||
|
||||
1. **自動備份機制**:
|
||||
|
||||
- 在 `clearAllTasks` 函數中實現雙重備份功能
|
||||
- 將任務備份同時保存在 data 目錄和 data/memory 子目錄
|
||||
- 使用時間戳命名備份文件,格式為 tasks_memory_YYYY-MM-DDThh-mm-ss.json
|
||||
|
||||
2. **智能提示指導**:
|
||||
- 在 `planTask` 函數的提示詞中添加任務記憶檢索指南
|
||||
- 指導 Agent 如何查找、分析和應用歷史任務記錄
|
||||
- 提供智能參考建議,促進知識重用
|
||||
|
||||
### 使用場景
|
||||
|
||||
- **任務規劃時**:參考類似任務的實施方案和最佳實踐
|
||||
- **問題解決時**:查閱過去遇到的類似問題及其解決方法
|
||||
- **代碼重用時**:識別過去實現的可重用組件或模式
|
||||
- **經驗學習時**:分析過去成功和失敗案例,持續優化工作方式
|
||||
|
||||
### 技術要點
|
||||
|
||||
- 使用相對路徑引用 memory 目錄,保持代碼的一致性和可維護性
|
||||
- 確保 memory 目錄存在,如不存在則自動創建
|
||||
- 保持原有的錯誤處理模式,確保系統穩定性
|
||||
- 備份過程透明無感,不影響用戶正常操作流程
|
||||
|
||||
此功能無需額外工具或配置,系統會自動在任務清除時保存歷史記錄,並在任務規劃時提供智能指導,使 Agent 能夠充分利用過去的經驗和知識。
|
@ -16,22 +16,64 @@
|
||||
|
||||
其中 `[FUNCTION_NAME]` 是工具函式的名稱,大寫形式。例如,對於任務規劃功能 `planTask`,相應的環境變數名稱為 `MCP_PROMPT_PLAN_TASK`。
|
||||
|
||||
## 多語言提示詞模板支持
|
||||
|
||||
蝦米任務管理器支持多種語言的提示詞模板,可通過 `TEMPLATES_USE` 環境變數設置:
|
||||
|
||||
- 當前支持的語言:`en`(英文)和 `zh`(繁體中文)
|
||||
- 默認為 `en`(英文)
|
||||
|
||||
### 切換語言
|
||||
|
||||
在 `mcp.json` 配置中設置:
|
||||
|
||||
```json
|
||||
"env": {
|
||||
"TEMPLATES_USE": "zh" // 使用繁體中文模板
|
||||
}
|
||||
```
|
||||
|
||||
或在 `.env` 文件中設置:
|
||||
|
||||
```
|
||||
TEMPLATES_USE=zh
|
||||
```
|
||||
|
||||
### 自定義模板
|
||||
|
||||
您可以創建自己的模板集:
|
||||
|
||||
1. 將現有模板集(如 `src/prompts/templates_en` 或 `src/prompts/templates_zh`)複製到 `DATA_DIR` 指定的目錄
|
||||
2. 重命名複製的目錄(例如:`my_templates`)
|
||||
3. 修改模板文件以符合您的需求
|
||||
4. 將 `TEMPLATES_USE` 環境變數設置為您的模板目錄名稱:
|
||||
|
||||
```json
|
||||
"env": {
|
||||
"DATA_DIR": "/path/to/project/data",
|
||||
"TEMPLATES_USE": "my_templates"
|
||||
}
|
||||
```
|
||||
|
||||
系統將優先使用您的自定義模板,如果找不到特定模板文件,會回退到內置的英文模板。
|
||||
|
||||
## 支援的工具函式
|
||||
|
||||
系統中的所有主要功能都支援透過環境變數自定義 prompt:
|
||||
|
||||
| 功能名稱 | 環境變數前綴 | 說明 |
|
||||
| --------------- | ---------------------------- | ------------ |
|
||||
| `planTask` | `MCP_PROMPT_PLAN_TASK` | 任務規劃 |
|
||||
| `analyzeTask` | `MCP_PROMPT_ANALYZE_TASK` | 任務分析 |
|
||||
| `reflectTask` | `MCP_PROMPT_REFLECT_TASK` | 方案評估 |
|
||||
| `splitTasks` | `MCP_PROMPT_SPLIT_TASKS` | 任務拆分 |
|
||||
| `executeTask` | `MCP_PROMPT_EXECUTE_TASK` | 任務執行 |
|
||||
| `verifyTask` | `MCP_PROMPT_VERIFY_TASK` | 任務驗證 |
|
||||
| `completeTask` | `MCP_PROMPT_COMPLETE_TASK` | 任務完成 |
|
||||
| `listTasks` | `MCP_PROMPT_LIST_TASKS` | 列出任務 |
|
||||
| `queryTask` | `MCP_PROMPT_QUERY_TASK` | 查詢任務 |
|
||||
| `getTaskDetail` | `MCP_PROMPT_GET_TASK_DETAIL` | 獲取任務詳情 |
|
||||
| 功能名稱 | 環境變數前綴 | 說明 |
|
||||
| ------------------ | ------------------------------- | -------------- |
|
||||
| `planTask` | `MCP_PROMPT_PLAN_TASK` | 任務規劃 |
|
||||
| `analyzeTask` | `MCP_PROMPT_ANALYZE_TASK` | 任務分析 |
|
||||
| `reflectTask` | `MCP_PROMPT_REFLECT_TASK` | 方案評估 |
|
||||
| `splitTasks` | `MCP_PROMPT_SPLIT_TASKS` | 任務拆分 |
|
||||
| `executeTask` | `MCP_PROMPT_EXECUTE_TASK` | 任務執行 |
|
||||
| `verifyTask` | `MCP_PROMPT_VERIFY_TASK` | 任務驗證 |
|
||||
| `listTasks` | `MCP_PROMPT_LIST_TASKS` | 列出任務 |
|
||||
| `queryTask` | `MCP_PROMPT_QUERY_TASK` | 查詢任務 |
|
||||
| `getTaskDetail` | `MCP_PROMPT_GET_TASK_DETAIL` | 獲取任務詳情 |
|
||||
| `processThought` | `MCP_PROMPT_PROCESS_THOUGHT` | 思維鏈處理 |
|
||||
| `initProjectRules` | `MCP_PROMPT_INIT_PROJECT_RULES` | 初始化專案規則 |
|
||||
|
||||
## 環境變數配置方法
|
||||
|
||||
@ -149,11 +191,6 @@ MCP_PROMPT_PLAN_TASK_APPEND=\n\n## 額外指導\n\n請特別注意以下事項
|
||||
|
||||
- `{task}` - 任務詳情
|
||||
|
||||
### completeTask 支援的參數
|
||||
|
||||
- `{task}` - 任務詳情
|
||||
- `{completionTime}` - 完成時間
|
||||
|
||||
### listTasks 支援的參數
|
||||
|
||||
- `{status}` - 任務狀態
|
||||
|
Loading…
x
Reference in New Issue
Block a user