Overview
hermes kanban 是一个基于 SQLite 的持久化任务看板,可在多个 Hermes profile 之间共享。任务可以相互依赖、被原子化认领,并由指定 profile 在隔离工作空间中执行。
hermes kanban [--board <slug>] <子命令>
全局选项
--board <slug>— 指定操作的看板。默认为当前看板(通过hermes kanban boards switch <slug>或环境变量HERMES_KANBAN_BOARD设置)。
子命令
看板初始化
init
如果缺失则创建 kanban.db(幂等)。
hermes kanban init
boards
管理看板。每个项目/工作流一个看板。
hermes kanban boards list [--json] [--all]
hermes kanban boards create <slug> [--name NAME] [--description DESCRIPTION] [--icon ICON] [--color COLOR] [--switch] [--default-workdir PATH]
hermes kanban boards rm <slug> [--delete]
hermes kanban boards switch <slug>
hermes kanban boards show
hermes kanban boards rename <slug> <name>
hermes kanban boards set-default-workdir <slug> [path]
list/ls— 列出所有看板及其任务数。create/new— 创建新看板。rm/remove/delete— 归档看板(默认),使用--delete则彻底删除。switch/use— 设置当前活动看板。show/current— 打印当前活动看板的 slug。rename— 修改看板显示名称(slug 不可变)。set-default-workdir— 设置或清空看板的默认工作空间路径。
任务生命周期
create <title>
创建新任务。
hermes kanban create "Implement auth" --body "Add OAuth login" --assignee work --workspace worktree --priority 1
list / ls
列出任务。
hermes kanban list [--mine] [--assignee ASSIGNEE] [--status STATUS] [--tenant TENANT] [--session SESSION] [--archived] [--json] [--sort SORT]
show <task_id>
显示任务详情、评论与事件。
hermes kanban show <task_id> [--json] [--state-type {status,outcome}] [--state-name VALUE]
assign <task_id> <profile>
分配或重新分配任务。使用 none 取消分配。
hermes kanban assign <task_id> work
set-model <task_id> [model]
设置或清空任务的模型/提供商覆盖。
hermes kanban set-model <task_id> claude-sonnet --provider anthropic
hermes kanban set-model <task_id> none
reclaim <task_id>
释放运行中任务上的活跃 worker 认领。
hermes kanban reclaim <task_id> [--yes]
reassign <task_id> <profile>
将任务重新分配给其他 profile,可选择先释放原有认领。
hermes kanban reassign <task_id> <profile> [--reclaim] [--yes]
claim <task_id>
原子化认领一个就绪任务。
hermes kanban claim <task_id> [--ttl 900]
complete <task_id>...
标记一个或多个任务完成。
hermes kanban complete <task_id> --result "Done" --summary "Implemented" --metadata '{"files": ["auth.py"]}'
edit <task_id>
编辑已完成任务的恢复字段。
hermes kanban edit <task_id> --result "Updated" --summary "..."
block <task_id> [reason...]
标记一个或多个任务为阻塞。
hermes kanban block <task_id> "waiting for API" --kind dependency
unblock <task_id>...
将阻塞/已调度任务恢复为就绪或待办。
hermes kanban unblock <task_id> --reason "API ready"
schedule <task_id> [reason...]
将一个或多个任务放入已调度状态。
hermes kanban schedule <task_id> "deploy window" --ids t2 t3
promote <task_id> [reason...]
手动将待办/阻塞任务提升为就绪。
hermes kanban promote <task_id> "ready to start" [--force] [--dry-run] [--json]
archive <task_id>...
归档一个或多个任务。使用 --rm 永久删除已归档的任务 ID。
hermes kanban archive <task_id>... [--rm PURGE_IDS...]
任务分解
specify [task_id]
将 triage 列的任务补充为具体规范并提升为待办。
hermes kanban specify <task_id> [--all] [--tenant TENANT] [--author AUTHOR] [--json]
decompose [task_id]
将 triage 列的任务分解为子任务并路由到专业 profile。
hermes kanban decompose <task_id> [--all] [--tenant TENANT] [--author AUTHOR] [--json]
swarm <goal>
创建 Kanban Swarm v1 图:并行 worker → 验证者 → 综合者。
hermes kanban swarm "Refactor auth" --worker backend:Backend --worker frontend:Frontend --verifier reviewer --synthesizer writer
依赖关系
link <parent_id> <child_id>
添加父→子依赖。
hermes kanban link parent-task child-task
unlink <parent_id> <child_id>
移除父→子依赖。
hermes kanban unlink parent-task child-task
执行与监控
dispatch
执行一次调度:回收过期认领、提升就绪任务、生成 worker。
hermes kanban dispatch [--dry-run] [--max N] [--failure-limit N] [--json]
daemon
已弃用 —— 调度器现在运行在 gateway 中。请使用 hermes gateway start。
watch
实时将任务事件流输出到终端。
hermes kanban watch [--assignee ASSIGNEE] [--tenant TENANT] [--kinds KINDS] [--interval 0.5]
tail <task_id>
跟踪任务的事件流。
hermes kanban tail <task_id> [--interval SECONDS]
log <task_id>
打印任务的 worker 日志。
hermes kanban log <task_id> [--tail N]
runs <task_id>
显示任务的执行历史。
hermes kanban runs <task_id> [--json] [--state-type {status,outcome}] [--state-name VALUE]
heartbeat <task_id>
为运行中的任务发送心跳事件。
hermes kanban heartbeat <task_id> --note "still running"
上下文与附件
context <task_id>
打印任务 worker 看到的完整上下文。
comment <task_id> <text...>
为任务添加评论。
hermes kanban comment <task_id> "Waiting on review" --author user
attach <task_id> <path>
将本地文件附加到任务。
hermes kanban attach <task_id> ./log.txt --name deploy.log
attachments <task_id>
列出任务附件。
hermes kanban attachments <task_id> [--json]
attach-rm <attachment_id>
按 ID 删除附件。
通知
notify-subscribe <task_id>
将网关源订阅到任务的终止事件。
hermes kanban notify-subscribe <task_id> --platform telegram --chat-id 123456
notify-list [task_id]
列出通知订阅。
hermes kanban notify-list [<task_id>] [--json]
notify-unsubscribe <task_id>
从任务移除网关订阅。
hermes kanban notify-unsubscribe <task_id> --platform telegram --chat-id 123456
诊断与维护
diagnostics / diag
列出当前看板上的活跃诊断。
hermes kanban diagnostics [--severity {warning,error,critical}] [--task TASK] [--json]
assignees
列出已知 profile 及每个 profile 的任务数。
hermes kanban assignees [--json]
stats
显示各状态与负责人任务数,以及最久就绪任务时长。
hermes kanban stats [--json]
gc
回收旧任务事件、worker 日志和已归档工作空间。
hermes kanban gc [--event-retention-days N] [--log-retention-days N]
repair
检查数据库完整性并自动修复仅索引损坏。
hermes kanban repair [--json]
示例
# 创建并切换到新看板
hermes kanban init
hermes kanban boards create sprint-42 --switch
# 添加一个高优先级任务
hermes kanban create "Refactor auth module" --assignee backend --workspace worktree --priority 1
# 列出当前 profile 负责的就绪任务
hermes kanban list --mine --status ready
# 执行一次调度
hermes kanban dispatch --max 3
技巧
- 在其他命令前先运行一次
hermes kanban init创建数据库。 - 使用
--board <slug>进行一次性操作,或使用hermes kanban boards switch <slug>切换默认看板。 - 任务状态包括:triage、todo、ready、running、review、blocked、scheduled、done、archived。
- 使用
claim原子化领取就绪任务;dispatch是主执行循环。 daemon已弃用。请通过hermes gateway start或定时运行hermes kanban dispatch来调度。