agent-kanban

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Agent Kanban — Task Management Skill

Agent Kanban — 任务管理Skill

Use the
agent-kanban
CLI (alias
ak
) to manage tasks on your kanban board.
使用
agent-kanban
CLI(别名
ak
)管理你的看板任务。

Setup

安装配置

bash
npm install -g agent-kanban
ak config set api-url https://your-instance.pages.dev
ak config set api-key <your-api-key>
bash
npm install -g agent-kanban
ak config set api-url https://your-instance.pages.dev
ak config set api-key <your-api-key>

Workflow

工作流程

When the daemon assigns you a task, you receive the task ID. Follow this flow:
当守护进程分配任务给你时,你会收到任务ID。请遵循以下流程:

1. View the task

1. 查看任务

bash
ak task list --format json
Find your assigned task and read the details.
bash
ak task list --format json
找到分配给你的任务并查看详情。

2. Claim the task

2. 认领任务

bash
ak task claim <task-id> --agent-name <your-name>
This confirms you are starting work and moves the task to "In Progress."
bash
ak task claim <task-id> --agent-name <your-name>
这会确认你开始工作,并将任务状态改为“进行中”。

3. Do the work

3. 执行工作

You are running in a git worktree. Implement the changes, run tests, commit your work.
你在git工作树中运行。实现变更、运行测试、提交工作。

4. Log progress

4. 记录进度

bash
ak task log <task-id> "Investigating the auth flow..."
ak task log <task-id> "Root cause: breaking change in v2.3"
bash
ak task log <task-id> "正在调查认证流程..."
ak task log <task-id> "根本原因:v2.3版本中的破坏性变更"

5. Create a PR and submit for review

5. 创建PR并提交审核

When the work is done, push your branch and create a pull request. Then submit the task for review with the PR URL:
bash
gh pr create --title "Fix JWT claim namespace" --body "Resolves task <task-id>"
ak task review <task-id> --pr-url <pr-url> --agent-name <your-name>
A human will review the PR and either complete or request changes.
工作完成后,推送你的分支并创建拉取请求(PR)。然后使用PR URL提交任务审核:
bash
gh pr create --title "修复JWT声明命名空间" --body "解决任务<task-id>"
ak task review <task-id> --pr-url <pr-url> --agent-name <your-name>
人工会审核PR,要么完成任务,要么要求修改。

Task Lifecycle

任务生命周期

Todo ──assign(daemon)──→ Todo (assigned) ──claim(agent)──→ In Progress
  ──review(agent)──→ In Review ──complete(human)──→ Done
  → Cancelled (cancel at any stage)
  → Todo (release — on crash or timeout)
  • assign: Daemon locks the task to you. Status stays
    todo
    , but no other agent can take it.
  • claim: You confirm you're starting. Status moves to
    in_progress
    .
  • review: You're done working. Status moves to
    in_review
    . A human will review.
  • complete: Human approves and completes. Status moves to
    done
    .
待办 ──分配(守护进程)──→ 待办(已分配) ──认领(Agent)──→ 进行中
  ──审核提交(Agent)──→ 审核中 ──完成(人工)──→ 已完成
  → 已取消(任何阶段可取消)
  → 待办(释放——崩溃或超时后)
  • assign:守护进程将任务锁定给你。状态保持
    todo
    ,但其他Agent无法领取。
  • claim:你确认开始工作。状态变为
    in_progress
  • review:你完成工作。状态变为
    in_review
    。将由人工审核。
  • complete:人工批准并完成任务。状态变为
    done

Creating Subtasks

创建子任务

When you discover follow-up work, create a task:
bash
ak task create \
  --title "Fix shared-lib JWT claim namespace" \
  --priority high \
  --agent-name <your-name>
Log the relationship:
bash
ak task log <original-task-id> "Created subtask for shared-lib fix"
当你发现后续工作时,创建任务:
bash
ak task create \
  --title "修复shared-lib JWT声明命名空间" \
  --priority high \
  --agent-name <your-name>
记录关联关系:
bash
ak task log <original-task-id> "创建子任务以修复shared-lib问题"

CLI Reference

CLI参考

CommandDescription
task create --title <t>
Create a task (optional: --priority, --labels, --input)
task list
List tasks (optional: --status, --label, --format)
task claim <id>
Claim an assigned task — start working
task log <id> <msg>
Add a progress log entry
task review <id>
Submit for review (required: --pr-url)
task cancel <id>
Cancel a task
board list
List all boards
board view
Show the kanban board
config set <key> <val>
Set api-url or api-key
命令描述
task create --title <t>
创建任务(可选参数:--priority, --labels, --input)
task list
列出任务(可选参数:--status, --label, --format)
task claim <id>
认领已分配的任务——开始工作
task log <id> <msg>
添加进度日志条目
task review <id>
提交审核(必填参数:--pr-url)
task cancel <id>
取消任务
board list
列出所有看板
board view
查看看板
config set <key> <val>
设置api-url或api-key

Smart Defaults

智能默认值

  • Output is JSON when piped (not a TTY), text in interactive terminals
  • Use
    --format json
    to force JSON output
  • 当通过管道输出(非TTY)时,输出格式为JSON;在交互式终端中输出文本
  • 使用
    --format json
    强制输出JSON格式

Error Handling

错误处理

  • 401 Unauthorized: Check your API key with
    ak config get api-key
  • 409 Conflict: Task is already claimed or not assigned to you
  • 404 Not Found: Task ID doesn't exist — check with
    task list
  • 401 Unauthorized:使用
    ak config get api-key
    检查你的API密钥
  • 409 Conflict:任务已被认领或未分配给你
  • 404 Not Found:任务ID不存在——使用
    task list
    检查

Rules

规则

  1. Always claim before working — don't start without claiming
  2. Never call
    task complete
    — only humans can complete tasks
  3. Always create a PR and submit via
    task review --pr-url <url>
    when done
  4. Log progress frequently — humans monitor the board
  5. Create subtasks when you find dependency gaps
  1. 工作前必须先认领任务——不要未认领就开始工作
  2. 切勿调用
    task complete
    ——只有人工可以完成任务
  3. 工作完成后务必创建PR并通过
    task review --pr-url <url>
    提交
  4. 频繁记录进度——人工会监控看板
  5. 当发现依赖缺口时创建子任务