Skip to main content
Version: latest

kas task

Manage the full lifecycle of kasmos tasks — from registration through planning, implementation, review, and merge.

kas task <subcommand> [flags]

Alias: kas t

filename normalization

All subcommands that accept a <plan-file> argument automatically strip a trailing .md suffix. The stored identifier is always the extensionless slug (e.g. my-feature, not my-feature.md). This normalization also applies when ingesting content and when the SQLite store runs its migration.

subcommands

list

List all tasks with their status and branch.

kas task list [--status <status>]
# show all non-cancelled tasks
kas task list

# show only tasks in implementing state
kas task list --status implementing
flagdescription
--statusfilter by status: ready, planning, implementing, reviewing, verifying, done, cancelled

When --status is omitted, cancelled tasks are hidden from the output.


register

Register a task file (markdown) into the task store and set its initial status to ready.

kas task register <plan-file> [--branch <branch>] [--topic <topic>] [--description <desc>]
# register with defaults — branch defaults to plan/<slug>
kas task register tasks/my-feature.md

# register with an explicit branch and topic
kas task register tasks/my-feature.md --branch feature/my-feature --topic backend
flagdefaultdescription
--branchplan/<slug>git branch name for the task
--topictopic group (auto-created if needed)
--descriptionfirst # heading in filehuman-readable task description

The filename is resolved relative to the working directory. The stored key is strings.TrimSuffix(filepath.Base(filePath), ".md").


create

Create a new task entry directly in the store without requiring a file on disk.

kas task create <name> [--description <desc>] [--branch <branch>] [--topic <topic>] [--content <markdown>]
# minimal creation
kas task create my-feature

# with description and topic
kas task create my-feature --description "Add feature X" --topic frontend

# with inline content
kas task create my-feature --content "# my-feature\n\n## Wave 1\n### Task 1: implement X"
flagdefaultdescription
--descriptiontask description
--branchplan/<name>git branch name
--topictopic group
--contentinitial markdown content

show

Print the full plan content stored in the task store.

kas task show <plan-file>
kas task show my-feature

Returns an error if the task has no stored content.


update-content

Replace the plan content in the task store by reading from stdin.

kas task update-content <plan-file>
cat updated-plan.md | kas task update-content my-feature

Content must be piped via stdin — the command errors if stdin is a tty. The filename argument is normalized with strings.TrimSuffix(filename, ".md"). If content parse warnings occur (e.g. no wave headers), the content is still stored and a warning is printed to stderr but the command exits 0.


set-status

Force-override a task's status, bypassing the FSM transition rules.

kas task set-status <plan-file> <status> --force
kas task set-status my-feature ready --force
flagdescription
--forcerequired; confirms intent to bypass FSM (safety guard)

Valid statuses: ready, planning, implementing, reviewing, verifying, done, cancelled.


transition

Apply a named FSM event to a task, advancing or reversing its lifecycle state.

kas task transition <plan-file> <event>
kas task transition my-feature implement_start
eventdescription
plan_startready or planningplanning (start or restart planner)
planner_finishedplanningready (sets execution phase to planned)
implement_startready (planned-ready only) → implementing
implement_finishedimplementingreviewing
request_reviewdonereviewing (retrigger a reviewer without resetting)
review_approvedreviewing → verifying (when auto_readiness_review = true) or reviewing → done
review_changes_requestedreviewingimplementing (canonical event name)
review_changesalias for review_changes_requested accepted by the CLI only
verify_approvedverifyingdone
verify_failedverifyingimplementing
start_overdoneplanning (full reset)
reimplementdoneimplementing (resume without resetting branch)
cancelcancel the task from any active status
reopencancelledplanning

implement

Transition a task to implementing state and write a wave signal file for the TUI orchestrator.

kas task implement <plan-file> [--wave <n>]
kas task implement my-feature --wave 1
flagdefaultdescription
--wave1wave number to trigger (must be ≥ 1)

If the task is still in planning, the command first applies planner_finished (→ ready, setting execution phase to planned) then implement_start. If the task is ready but still in draft-ready state (execution phase is empty — the planner has not finished), the command returns an error. The wave signal file is written to .kasmos/signals/implement-wave-<n>-<plan-file>.


start

Transition a task to implementing and set up the git branch and worktree.

kas task start <plan-file>
kas task start my-feature

Walks planning → ready → implementing via the FSM if needed, then calls git worktree add using the stored branch name (defaulting to plan/<slug>). Prints the worktree path on success.


push

Commit any dirty changes in the task worktree and push to origin.

kas task push <plan-file> [--message <msg>]
kas task push my-feature --message "wip: implement first pass"
flagdefaultdescription
--message"update from kas"commit message for dirty changes

pr

Push the task branch and create (or reopen) a GitHub pull request.

kas task pr <plan-file> [--title <title>]
kas task pr my-feature
kas task pr my-feature --title "feat: implement feature X"
flagdefaultdescription
--titletask descriptionPR title

The PR body is generated from the plan content (goal, architecture, tech stack) and git log (commits, changed files, diff stats) using gh pr create.


merge

Merge the task branch into main and transition the task to done.

kas task merge <plan-file>
kas task merge my-feature

Runs git merge in the repo root, then applies review_approved via the FSM. If the task is not already in reviewing, it is advanced through implement_finished first.


start-over

Remove the task worktree, reset the branch from HEAD, and transition back to planning.

kas task start-over <plan-file>
kas task start-over my-feature

recover

Manually emit a recovery signal to unstick a task that is in the wrong phase or state.

kas task recover <plan-file> --action <action> [--feedback <text>]
kas task recover my-feature --action implement-finished
kas task recover my-feature --action review-approved
kas task recover my-feature --action verify-approved
kas task recover my-feature --action verify-failed --feedback "spec section 3 is not addressed"
flagdescription
--actionthe recovery action to perform (see table below)
--feedbackfeedback text; required for review-changes, verify-failed, and advance-review-cycle
actionsignal emittednotes
planner-finishedplanner_finished
architect-finishedelaborator_finished
implement-finishedimplement_finished
review-approvedreview_approved
review-changesreview_changes_requestedrequires --feedback
advance-review-cyclereview_changes_requestedrequires --feedback; alias for review-changes
verify-approvedverify_approvedonly valid while task is in verifying status
verify-failedverify_failedonly valid while task is in verifying status; requires --feedback

verify-approved and verify-failed are the manual recovery path for the master agent gate. Use them when the master agent session ended before it could emit a signal. The kas status command shows these hints automatically when a task is stuck in the verifying status.

Note: under normal operation with readiness_max_verify_cycles set, repeated verify_failed signals cause the daemon to automatically force-promote to verify_approved after the cap is reached — you do not need to intervene manually in that case.


Scan all tasks in the project and backfill ClickUp task IDs by parsing **Source:** ClickUp <ID> lines from plan content.

kas task link-clickup [--project <project>]
flagdescription
--projectoverride project name (default: derived from current directory)