This document defines the final CLI interface for the work tool.
It is a tool-agnostic, context-based CLI for managing work items across systems
such as Jira, GitHub, Linear, and Azure DevOps.
These commands define the only core state transitions.
work create <title> [options] [@context]
work start <wid>
work close <wid>
work reopen <wid>
Lifecycle semantics:
create→ item enters newstart→ new → activeclose→ active|new → closedreopen→ closed → active
Core states are derived, never set directly.
Contexts define tool + scope + credentials.
work context add <name> [options]
work context set <name>
work context list
work context show [<name>]
work context remove <name>
Example:
work context add gh-core --tool github --repo org/core
work context set gh-coreCredentials are always bound to a context, never to a tool.
work auth login [<context>]
work auth logout [<context>]
work auth status [<context>]
Rules:
- no global login
- no credential reuse across contexts
- missing or expired auth is a hard error
work get <wid>
work list [where <expr>] [@context]
Filtering by core state:
state = new | active | closed
Example:
work list where state=activework set <wid> attr=value [attr=value ...]
Attribute categories:
- Core:
title,description,assignee,state(read-only) - Capabilities:
priority,estimate,due_date - Native:
<tool>.<field>(e.g.jira.story_points)
Canonical relations:
parent_of child_of
precedes succeeds
blocks blocked_by
duplicates
duplicate_of has_duplicate
relates_to
Relations form a directed or undirected graph between work items.
work link <wid> <relation> <wid>
work unlink <wid> <relation> <wid>
Examples:
work link 123 parent_of 456
work link 123 precedes 456
work link 123 duplicates 456Constraints:
- only one parent per item
- no cycles in hierarchy or precedence
work move <wid> @target-context
Behavior:
- create equivalent item in target context
- link source and target items
- optionally close the source item
work comment <wid> <text>
work delete <wid>
work schema show
work schema show @context
work schema kinds
work schema attrs
work schema relations
This chapter defines how existing work items can be edited in a controlled, explicit, and adapter-compatible way.
Editing commands are mutating operations and always apply to exactly one work item.
Bulk edits, implicit mutations, or query-based updates are explicitly out of scope.
work edit <wid> [--field <value>]...
Edits one or more attributes of a single work item identified by <wid>.
Each invocation:
- targets exactly one work item
- performs atomic updates per field
- fails if the adapter does not support the requested change
The command is non-interactive by default and fully scriptable.
The following fields are defined at the CLI level. Adapters may support a subset.
| Field | Description |
|---|---|
title |
Short summary |
description |
Long-form text |
priority |
`low |
assignee |
User identifier or unassigned |
State transitions are not handled by work edit.
They must use lifecycle commands (start, close, reopen).
work edit ABC-123 --title "Fix login bug"
work edit ABC-123 --priority high
work edit ABC-123 --assignee unassigned
work edit ABC-123 --description "Updated problem analysis"Multiple fields may be updated in a single command:
work edit ABC-123 --priority high --assignee alicework edit <wid> --editor
When --editor is specified:
- the user’s
$EDITORis opened - only the
descriptionfield is edited - adapters may reject this mode if unsupported
Interactive editing is explicit opt-in and never the default.
The command fails if:
<wid>does not exist- the adapter does not support editing a field
- the update violates adapter constraints
Partial updates are not allowed. Either all requested fields are updated, or none are.
The following are intentionally not supported:
- editing multiple work items at once
- editing via
whereclauses - implicit editors
- adapter-specific hidden fields
work unset <wid> <field>
Clears the value of an optional field on a work item.
This command exists to avoid ambiguous empty values (e.g. --assignee "").
work unset ABC-123 assignee
work unset ABC-123 priorityThis chapter defines a stateless notification mechanism for reporting work items that match a query.
Notifications reuse the existing query model (where, order by, limit) and send results to named notification targets.
Notifications are explicit actions, not background automation.
A notification consists of:
- a query (
whereclause) - a target (identified by a user-defined name)
- a one-time execution
No polling, scheduling, or real-time subscriptions are implied.
work notify send where <expr> to <target>
Executes a query and sends the resulting work items to the specified notification target.
The command:
- evaluates the query in the active context
- formats the result set
- delivers it to the target
- exits
work notify send where kind=task and priority=high to slack-teamwork notify send where state=new order by priority desc limit 10 to email-meThe command fails if:
- the target does not exist
- the adapter does not support the target type
- delivery fails
Query evaluation and delivery are treated as a single operation.
A notification target is:
- identified by a user-defined name
- scoped to a context
- bound to a target type (e.g. slack, email, local)
Targets are configuration, not runtime state.
work notify target add <name> --type <type> [options]
Registers a new notification target under the given name.
Targets are:
- stored per user
- scoped to the active context
- referenced by name in
work notify send
work notify target add slack-team --type slack --channel "#alerts"work notify target list
Lists all configured notification targets for the current context.
work notify target remove <name>
Removes a previously configured notification target.
Adapters must explicitly declare:
- supported notification target types
- formatting constraints
- delivery guarantees
Adapters must not:
- introduce background execution
- schedule notifications
- persist query results
The following are intentionally out of scope:
- scheduled notifications
- watchers or subscriptions
- triggers or automation rules
- real-time updates
- Editing mutates one work item explicitly
- Notifications report query results explicitly
- All operations are synchronous and stateless
- No hidden automation or background state is introduced
Valid ID forms:
123
jira-abc:456
gh-core:ISSUE-9
Rules:
- IDs are opaque
- native IDs are never parsed
- context resolution happens before API calls
- verb always in position 1
@contextalways last- flat
attr=valuepairs - no implicit tool guessing
- no global login
work
├── create
├── start
├── close
├── reopen
├── get
├── list
├── set
├── edit
├── unset
├── link
├── unlink
├── move
├── comment
├── delete
├── notify
├── context
│ ├── add
│ ├── set
│ ├── list
│ ├── show
│ └── remove
├── auth
│ ├── login
│ ├── logout
│ └── status
└── schema
├── show
├── kinds
├── attrs
└── relations
Contexts define the boundary
Create creates existence
Start signals intent
Close finishes work
Reopen corrects reality
Everything else is metadata or relations