mit einem Klick
ak-task
// Full task lifecycle: create → assign → monitor → review → reject/complete. Use when asked to add a feature, fix a bug, create a task, 加个功能, or 修个 bug.
// Full task lifecycle: create → assign → monitor → review → reject/complete. Use when asked to add a feature, fix a bug, create a task, 加个功能, or 修个 bug.
| name | ak-task |
| description | Full task lifecycle: create → assign → monitor → review → reject/complete. Use when asked to add a feature, fix a bug, create a task, 加个功能, or 修个 bug. |
| argument-hint | <feature or bug description> |
Create a task, assign it, then monitor → review → reject/complete.
This is a leader workflow.
If ak says no leader identity exists for the current runtime, create one first:
ak identity create --username <username> [--name <name>]
The leader chooses its own username and optional full name.
Assume this workflow runs in two explicit modes:
If execution hits a blocker after confirmation, use the available tools and repository context to resolve it. If the blocker cannot be resolved without external authorization or production mutation, fail fast with the exact blocker and the next required action instead of waiting in the middle of the workflow.
Immediately after this skill is invoked, create and maintain an explicit task plan/checklist in the agent UI. This checklist is a guardrail against attention drift during clarification, preview, and execution handoff.
The checklist must include the full lifecycle:
Keep this checklist current:
ak create task, explicitly mark planning/creation complete and mark
monitoring/review as in progress before any final user-facing summary.Parse the user's input:
Before choosing or creating workers, read references/runtime-delegation.md. Before creating any worker, also read references/agent-creation.md and follow its Worker Profile Preview.
ak get board # pick the right board
ak get label --board <board> # existing board label taxonomy
ak get agent -o json # available agents, load, runtime_available
ak get model --runtime <name> # provider-reported models for a runtime
ak get repo # registered repos
If there's only one board, use it. Otherwise ask which board.
Before creating the task, understand what's involved:
ak get task --board <board-id>Use AskUserQuestion to interactively resolve any uncertainties before creating the task. For each ambiguous point, present options for the user to choose from:
Labels are board-level taxonomy, not free-form task notes. Use them only for stable filtering dimensions that will remain useful across tasks.
Before previewing the task:
ak get label --board <board-id> and reuse existing labels whenever possible.## Spec.Recommended categories:
vX.Y, for example v1.4; avoid patch versions or suffixes unless the board already uses that granularity.frontend, backend, api, database, cli, infra, docs, ui, security, or test.feature, bug, or refactor.Avoid labels for temporary process state, runtime/provider choice, tools, libraries, branches, files, or one-off implementation details. Examples that usually belong in the task description instead of labels: blocked, testing, needs-review, codex, copilot, gemini, github, cloudflare, tailwind, sqlite, prompt-fix, and file names.
When labels overlap, prefer the canonical stable form: infra over infrastructure, bug over bugfix, database over db, and frontend for UI implementation unless the task is specifically visual polish.
Create missing reusable labels before task creation:
ak create label --board <board-id> --name v1.4 --color "#22C55E" --description "Version 1.4"
ak create label --board <board-id> --name backend --color "#38BDF8" --description "Backend/API work"
ak create label --board <board-id> --name bug --color "#F87171" --description "Bug fix"
Useful color defaults:
#22C55E#A78BFA#38BDF8#22D3EE#F87171#F59E0B#71717ABefore creating workers or tasks, determine the worker runtime.
runtime matches it and whose runtime_available is true.references/agent-creation.md.ak get model --runtime <runtime> -o json and use a provider-reported model ID.Keep iterating — each answer may reveal new questions. Only proceed to create when all points are resolved and the user has confirmed the final task spec.
If nothing is ambiguous (simple, clear-cut request), skip straight to the task preview below.
Use the runtime's structured question tool during the pre-task-creation phase:
AskUserQuestion.request_user_input.For Codex Default mode, verify the feature flag before relying on interactive prompts:
codex features list | rg default_mode_request_user_input
Expected:
default_mode_request_user_input under development true
If it is not enabled, tell the user to enable the feature flag themselves and restart Codex before continuing:
codex features enable default_mode_request_user_input
Do not run this command for the user. The current Codex session will not gain the tool after an automatic config change; the user must enable it and reopen Codex. Do not switch Codex into Plan mode as a workaround. Plan mode injects Codex-native planning behavior and conflicts with this leader workflow.
Before creating, show the user the exact task that will be created using AskUserQuestion. Format the preview as:
📋 Task Preview
Title: <concise action phrase>
Board: <board-name>
Repo: <repo-name>
Agent: <agent-name>
Runtime: <agent-runtime>
Labels: <labels>
Depends on: <task-ids or "none">
## Goal
<one sentence>
## Files
- <file path> — <what changes>
## Spec
<concrete behavior: inputs, outputs, edge cases, error handling>
## Checks
- [ ] <verifiable condition — reviewer will check each one in Gate 2>
Examples by task type:
- API: "POST /api/items returns 201 with { id, name }"
- API: "empty name returns 400 with validation error"
- UI: "clicking Submit creates the item and navigates to detail page"
- UI: "empty form shows inline validation, submit button stays disabled"
- CLI: "ak get task --board xxx prints task table with status column"
---
Create this task? (y/n)
Everything from ## Goal through ## Checks is the exact text that will be passed to --description. The header fields above it (Title, Board, Agent, Runtime, etc.) are metadata for display only — do not include them in --description. The user must see the full description before it's sent to the agent.
Before running ak create task, verify:
runtime_available: true.--assign-to uses the selected agent ID.On confirmation, create the task:
ak create task \
--board <board-id> \
--repo <repo-id> \
--assign-to <agent-id> \
--title "<concise action phrase>" \
--description "<detailed spec>" \
--labels "<comma-separated>"
--assign-to is mandatory. Always include it on create. Only assign to an agent whose runtime_available is true. If the right role only exists on an unavailable runtime, create a new worker with the required capability profile on an available runtime and assign to that worker. Use references/agent-creation.md; do not create workers from role/runtime alone.
Dependencies: If this task touches files that overlap with other in-flight tasks, add --depends-on <task-id>. Create all related tasks upfront with DAG dependencies — don't wait for one to finish before creating the next.
--description; do not rely on chat context.runtime_available: true.--depends-on for real blockers or overlapping context. Parallel tasks must not fight over the same files, data model, or API contract.ak create label --board <board-id> --name <name> --color <hex> --description "<desc>".Report to user: task ID, title, assigned agent.
Block on ak wait instead of writing polling loops. Exit codes: 0 condition met, 2 task cancelled, 124 timeout.
ak wait task <task-id> --until in_review --timeout 1h
case $? in
0) ;; # ready for review → Step 6
2) echo "task cancelled — abort" ; exit 1 ;;
124) echo "timed out — investigate" ;; # fall through to investigation
esac
Run ak wait task --help for the full flag list.
Before starting or recovering any wait, follow
references/wait-monitoring.md. The same wait policy applies to task waits and
board waits.
On timeout (124) or if you suspect the agent is stuck, investigate immediately — don't just re-wait:
ak logs --lines 20ps aux | grep "claude.*session"Pre-check: CI status. Before reviewing, verify CI has passed on the PR:
gh pr checks <pr-number> --repo <owner>/<repo>
If CI is pending or failed, reject immediately — worker must wait for CI to pass before submitting for review:
ak task reject <task-id> --reason "CI not green — wait for CI to pass before submitting for review"
Three gates — code review, functional acceptance, and agent notes review — must
pass before merging. Follow the shared verification policy in
references/leader-verification.md, including waiver evidence and verification
infrastructure learning.
Read the full PR diff and review against the task spec:
gh pr view <pr-number> --repo <owner>/<repo> --json title,body,additions,deletions,changedFiles
gh pr diff <pr-number> --repo <owner>/<repo>
Check:
Fails → reject immediately, don't proceed to Gate 2.
Apply references/leader-verification.md. Passing tests, CI, and code review
is not completion. Validate every task check from the product/user perspective.
If verification cannot be completed, follow the shared attempt budget, waiver,
and verification infrastructure learning rules.
Read task notes before merging:
ak get note --task <task-id>
Check:
Agent YAML using the same metadata.name username as the current agent.If the completion summary is missing or unclear, reject and ask the worker to add it.
If no proposal is present, continue. If a proposal is present, review it using references/runtime-delegation.md. Apply it only when the proposal is durable, role-appropriate, and not task-specific.
Any gate fails or is blocked → Reject. List all issues in the reason.
ak task reject <task-id> --reason "<all issues, specific and actionable>"
After reject, go back to Step 5 and keep monitoring. If the failure reveals a durable worker behavior problem, apply references/runtime-delegation.md#leader-driven-profile-iteration: use reject to correct the current active session, or close/cancel the task if it is too far off-course; update the worker profile only after the current task is no longer being worked, and never change the agent runtime.
All gates pass, or Gate 2 is explicitly waived after the required attempt budget → Post verification comment, then merge.
Post evidence on the PR before merging using the verification comment template in
references/leader-verification.md. Before running gh pr merge, re-read the
comment and confirm it satisfies the shared policy.
If the PR has merge conflicts, reject instead of merging — the worker agent will rebase, fix, and resubmit:
ak task reject <task-id> --reason "merge conflicts with main — rebase and resubmit"
Then merge:
gh pr merge <pr-number> --repo <owner>/<repo> --squash --delete-branch
The daemon's PR Monitor will mark the task done. Do not manually run
ak task complete unless the PR Monitor lag rule in
references/wait-monitoring.md applies.
Remove local review artifacts from the repo root after verifying each path belongs to this workflow:
/tmp/ak-review-*playwright-report/test-results/Tasks in todo status cannot be cancelled — delete them directly:
ak delete task <task-id>
For tasks in in_progress or in_review: always close the PR first, then cancel. Closing the PR without canceling is fine — PR Monitor will auto-cancel. But canceling without closing the PR leaves orphaned PRs.
gh pr close <pr-number> --repo <owner>/<repo> --delete-branch
ak task cancel <task-id>
If a rejected task stays in_progress without being picked up:
--assign-to on recreateInvestigate the failure. If it's a source bug, reject with details. If it's flaky CI, re-trigger.
If the blocker appears to be an ak bug, missing capability, confusing UX, documentation gap, or skill workflow problem, file an issue in the official repo after collecting a minimal reproduction.
If the leader agent makes a process error, violates this skill, merges/rejects incorrectly, skips a required gate, misinterprets conflicting skill instructions, or has to be corrected by the user about expected skill behavior, do not stop at a chat apology or "next time" promise. Summarize the failure as a durable skill-improvement issue so future agents and external projects can benefit from the lesson. Include:
gh issue create \
--repo saltbo/agent-kanban \
--title "ak-task: <short process or skill problem summary>" \
--body "$(cat <<'EOF'
## Summary
<what failed or what capability is missing>
## Command
ak <command and flags>
## Expected
<what should have happened>
## Actual
<exact error text or observed behavior>
## Context
- ak version:
- OS:
- Runtime:
- Auth type: user | machine | agent
- Board/task/repo IDs, if relevant:
## Reproduction
1. <step>
2. <step>
## Proposed Skill Change
<specific wording or rule that would prevent recurrence>
EOF
)"
Never include API keys, session tokens, private keys, .env contents, or private repository data. If gh is unavailable, open https://github.com/saltbo/agent-kanban/issues/new and paste the same content.
ak create task, continue immediately into monitoring/review work (ak wait task ...) in the same turn whenever possible. Do not send a final answer merely reporting that the task was created unless the user explicitly says to stop, cancel, abort, or only create the task.--depends-on or be merged--assign-to on create — never create a task without assigning an agentsaltbo/agent-kanban documenting the failure and proposed skill change. Do this in addition to any immediate local skill edit; do not replace it with an apology or private note.CLI reference for agents — how to claim tasks, log progress, submit for review
Plan and execute a project — either a new version of an existing project, or a brand new product from scratch. Analyzes gaps, creates board with tasks and dependencies, assigns to agents. Use when asked to plan a version, build a product, create a project, or 规划版本.