使用 agkan CLI 工具管理任务时使用——包括创建、列出、更新任务,管理标签、阻塞关系,以及跟踪项目进度等。
agkan.是一项面向实际任务的技能,主要用于Overview.agkan是一个基于SQLite的CLI任务管理工具.它被优化用于与AI代理商的合作.. 7状态:冰盒 + 积压 → 准备 → 进展 → 审查 → 完成 → 关闭 → ui。它将相关步骤、工具调用和结果整理方式集中到统一流程中,帮助使用者更快完成目标并减少重复操作。
实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。
执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。
agkan 是一款基于 SQLite 的命令行任务管理工具,专为与 AI 代理协同工作而优化。
7 种状态: icebox → backlog → ready → in_progress → review → done → closed
# 显示面向 AI 代理的完整指南(概述、命令、工作流) agkan agent-guide
# 创建任务 agkan task add "标题" "正文" agkan task add "标题" --status ready --author "agent" agkan task add "子任务" --parent 1 agkan task add "标题" --file ./spec.md # 从文件读取正文内容 agkan task add "标题" --blocked-by 1,2 # 设置阻塞本任务的任务 ID 列表 agkan task add "标题" --blocks 3,4 # 设置本任务所阻塞的任务 ID 列表 agkan task add "标题" --assignees "alice,bob" # 设置任务负责人(逗号分隔) # 列出任务 agkan task list # 所有任务 agkan task list --status in_progress agkan task list --tree # 层级视图 agkan task list --root-only # 仅根任务 agkan task list --tag 1,2 # 按标签 ID 过滤 agkan task list --dep-tree # 依赖关系(阻塞)树状视图 agkan task list --sort title # 按字段排序(id / title / status / created_at / updated_at),默认为 created_at agkan task list --order asc # 排序顺序(asc / desc),默认为 desc agkan task list --assignees "alice,bob" # 按负责人过滤(逗号分隔) agkan task list --all # 包含所有状态(含 done 和 closed) # 获取任务详情 agkan task get# 搜索任务 agkan task find "关键词" agkan task find "关键词" --all # 包含 done/closed 状态的任务 # 更新任务(位置参数形式 — 向后兼容) agkan task update status in_progress # 更新任务(命名选项形式 — v1.6.0+) agkan task update --status in_progress agkan task update --title "新标题" agkan task update --body "新正文内容" agkan task update --author "agent" agkan task update --assignees "alice,bob" agkan task update --file ./spec.md # 从文件读取正文内容 agkan task update --status done --title "已更新的标题" # 支持多个选项组合 # 统计任务数量 agkan task count agkan task count --status ready --quiet # 仅输出数字 # 更新父子关系 agkan task update-parent agkan task update-parent null # 移除父任务 # 删除任务 agkan task delete
# task1 阻塞 task2(task2 必须等待 task1 完成后才能开始) agkan task block addagkan task block remove agkan task block list
# 标签管理 agkan tag add "frontend" agkan tag list agkan tag deleteagkan tag rename # 为任务添加/移除标签 agkan tag attach agkan tag detach agkan tag show
# 设置元数据 agkan task meta set# 获取元数据 agkan task meta get # 列出所有元数据 agkan task meta list # 删除元数据 agkan task meta delete
任务优先级通过 priority 键进行管理:
agkan task meta setpriority
| 值 | 含义 |
|---|---|
critical |
需立即处理;关键阻塞问题 |
high |
应被优先处理 |
medium |
常规优先级(默认) |
low |
如有空闲时间再处理 |
何时设置优先级: 优先级在规划阶段(agkan-planning-subtask)设定,即任务从 backlog 移至 ready 状态的同时。该职责归属于规划技能(planning skill)。负责选择待执行任务的技能(例如 agkan-run)将读取此值以决定下一个应处理的任务。
在选择或标记任务时,请遵循以下优先级顺序:
| 优先级 | 标签名 |
|---|---|
| 1 | bug |
| 2 | security |
| 3 | improvement |
| 4 | test |
| 5 | performance |
| 6 | refactor |
| 7 | docs |
这是权威定义,所有技能均以此表为准。
当需要机器解析时,请使用 --json 参数:
agkan task list --json agkan task get 1 --json agkan task count --json agkan tag list --json # 结合 jq 使用 agkan task list --status ready --json | jq '.tasks[].id'
agkan task list --json{
"totalCount": 10,
"filters": {
"status": "ready | null",
"author": "string | null",
"tagIds": [1, 2],
"rootOnly": false
},
"tasks": [
{
"id": 1,
"title": "任务标题",
"body": "正文 | null",
"author": "string | null",
"status": "icebox | backlog | ready | in_progress | review | done | closed",
"parent_id": "number | null",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"parent": "object | null",
"tags": [{ "id": 1, "name": "bug" }],
"metadata": [{ "key": "priority", "value": "high" }]
}
]
}
agkan task get --json {
"success": true,
"task": {
"id": 1,
"title": "任务标题",
"body": "正文 | null",
"author": "string | null",
"status": "backlog | ready | in_progress | review | done | closed",
"parent_id": "number | null",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
},
"parent": "object | null",
"children": [],
"blockedBy": [{ "id": 2, "title": "..." }],
"blocking": [{ "id": 3, "title": "..." }],
"tags": [{ "id": 1, "name": "bug" }],
"attachments": []
}
agkan task count --json{
"counts": {
"icebox": 0,
"backlog": 0,
"ready": 2,
"in_progress": 1,
"review": 0,
"done": 8,
"closed": 5
},
"total": 16
}
agkan task find --json {
"keyword": "搜索关键词",
"excludeDoneClosed": true,
"totalCount": 3,
"tasks": [
{
"id": 1,
"title": "任务标题",
"body": "正文 | null",
"author": "string | null",
"status": "ready",
"parent_id": "number | null",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"parent": "object | null",
"tags": [],
"metadata": []
}
]
}
agkan task block list --json {
"task": {
"id": 1,
"title": "任务标题",
"status": "ready"
},
"blockedBy": [{ "id": 2, "title": "...", "status": "in_progress" }],
"blocking": [{ "id": 3, "title": "...", "status": "ready" }]
}
agkan task meta list --json {
"success": true,
"data": [
{ "key": "priority", "value": "high" }
]
}
agkan tag list --json{
"totalCount": 3,
"tags": [
{
"id": 1,
"name": "bug",
"created_at": "2026-01-01T00:00:00.000Z",
"taskCount": 2
}
]
}
冰盒(Icebox)用于存放尚未准备好进入规划阶段的想法和候选任务。请定期审查其中内容,决定是否提升至下一阶段或直接关闭。
# 审查冰盒中的任务 agkan task list --status icebox # 当需求明确后,将其提升至 backlog agkan task updatestatus backlog # 若不再需要,则关闭 agkan task update status closed
冰盒 → 待办事项(Backlog)的条件:
冰盒 → 已关闭(Closed)的条件:
# 查看已分配给自己的任务 agkan task list --status ready agkan task get# 开始执行 agkan task update status in_progress # 完成任务 agkan task update status done
# 创建父任务 agkan task add "功能实现" --status ready # 添加子任务 agkan task add "设计" --parent 1 --status ready agkan task add "实现" --parent 1 --status backlog agkan task add "测试" --parent 1 --status backlog # 设置依赖关系(设计 → 实现 → 测试) agkan task block add 2 3 agkan task block add 3 4 # 查看整体结构 agkan task list --tree
在项目根目录下放置 .agkan.yml 文件来自定义数据库路径:
path: ./.agkan/data.db
或使用环境变量:AGENT_KANBAN_DB_PATH=/custom/path/data.db