Files
yixiong-claude-marketplace/plugins/huanxi/skills/huanxi-task/SKILL.md
T

92 lines
3.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: huanxi-task
description: "寰汐任务管理:创建任务(+create)、更新任务状态/进度(+update)、查看任务看板(+board)、设置执行人(+assign)。当用户说"创建任务"、"新建任务"、"更新任务"、"看任务板"、"任务分配"时触发。"
---
# 寰汐任务管理
**前置条件:先 Read `../huanxi-shared/SKILL.md`(缓存规则 + TTL 策略)**
---
## Shortcuts
| 指令 | 说明 |
|------|------|
| [`+create`](references/task-create.md) | 创建新任务(引导式填写) |
| `+update` | 更新任务状态/进度/截止日 |
| [`+board`](references/task-kanban.md) | 查看我的任务看板 |
| `+assign` | 设置/变更任务执行人 |
| `+get` | 查看单个任务详情 |
---
## +create:创建任务
详见 [references/task-create.md](references/task-create.md)
**快速概览:**
```
1. 确定所属模块(从 modules.json 缓存解析名字 → ID
2. 收集任务信息(标题、描述、截止日、优先级)
3. mcp__huanxi__task_create(module_id, title, ...)
4. [可选] 设置执行人 → mcp__huanxi__task_set_assignees(task_id, [user_id])
```
---
## +update:更新任务
```
Step 1: 确认任务 ID
→ 若用户已提供 task_id:直接使用
→ 若用户描述了任务名称:
a. mcp__huanxi__task_list_mine() 获取我的任务列表
b. 按标题关键词模糊匹配,列出候选任务供用户选择
c. 仍未找到(可能属于他人或已归档)→ 告知用户提供精确 task_id
Step 2: 展示当前任务状态,引导用户填写要修改的字段
Step 3: mcp__huanxi__task_update(task_id, {
title? : "新标题",
description? : "新描述",
progress? : 80, ← 0-100 整数
status? : "in_progress" | "done" | "todo",
due_date? : "YYYY-MM-DD",
priority? : "low" | "medium" | "high"
})
Step 4: 告知更新结果
```
---
## +assign:设置执行人
```
Step 1: 确认任务 ID
Step 2: 解析执行人名字 → user_id(查 users.json 缓存)
→ 详见 huanxi-org references/resolve-ids.md
Step 3: mcp__huanxi__task_set_assignees(task_id, assignee_ids=[user_id, ...])
(此操作幂等:传完整列表,不是追加)
Step 4: 告知设置结果
```
---
## +get:查看任务详情
```
Step 1: mcp__huanxi__task_get(task_id)
Step 2: 展示完整任务信息(标题/描述/状态/进度/执行人/截止日/评论数)
```
---
## 关键约束
- **任务创建后不自动认领**`task_create` 不会自动设置执行人,需要单独调用 `task_set_assignees`
- **执行人是完整列表**`task_set_assignees` 传入的是完整执行人 ID 列表(幂等替换),不是追加
- **progress 是整数**:0-100 的整数,不是小数或百分比字符串
- **模块创建权限**:用户必须是模块成员(任意角色)才能在该模块创建任务,否则返回 403