Documentation
¶
Overview ¶
Package cli implements the jaira command surface.
The CLI is the only write path into the store. Everything — the TUI, an agent working the board, a shell script — goes through the same core calls, so no caller can invent its own idea of what a valid ticket is. It is also designed to be driven by an agent over bash rather than by a human alone: read commands speak JSON on request, errors are machine-readable, and exit codes are a documented contract rather than an accident.
Index ¶
Constants ¶
const ( ExitOK = 0 ExitError = 1 // unexpected failure ExitUsage = 2 // bad flags or arguments (cobra's own convention) ExitValidation = 3 // a gate refused the operation ExitBlocked = 4 // unresolved dependencies ExitNotFound = 5 // no such ticket, or an ambiguous prefix )
Exit codes are part of the contract with any agent driving this tool. Changing one is a breaking change.
const ClaimTTL = 30 * time.Minute
ClaimTTL is how long a claim is honoured without being renewed.
Claims expire rather than being held until released, because there is no server to notice that a session died. A lease that outlives its holder would wedge the board and require manual unlocking — which, with no coordinator, means editing a file by hand. Expiry makes abandonment self-healing.
Variables ¶
This section is empty.
Functions ¶
func ClaimActive ¶
ClaimActive reports whether a ticket is claimed by someone other than sessionID.
func StaleClaim ¶ added in v0.1.1
func StaleClaim(t *ticket.Ticket, sessionID string) (holder string, since time.Duration, stale bool)
StaleClaim reports a claim that has expired and is therefore about to be stepped over: who held it, and how long ago it was last renewed.
Expiry is deliberate — there is no server to notice a session died, so a lease that outlived its holder would wedge the board — but until now it happened in silence. Two sessions could work the same ticket with nothing anywhere saying the second one walked over the first.
Types ¶
type Task ¶
type Task struct {
ID string `json:"id"`
Subject string `json:"subject"`
Description string `json:"description"`
Status string `json:"status"`
Owner string `json:"owner"`
BlockedBy []string `json:"blockedBy"`
Metadata map[string]any `json:"metadata"`
}
Task mirrors the shape of Claude Code's structured task tools (TaskCreate/TaskUpdate/TaskGet/TaskList). Only the fields jaira uses are modelled, and unknown fields are ignored, because this is an external API that has already changed once — it replaced the older flat TodoWrite list — and will change again. Keeping the adapter this thin is what makes the next change a small patch rather than a redesign.
Source Files
¶
- announce.go
- archive.go
- board.go
- checklist.go
- claim.go
- delete.go
- fetch.go
- flow.go
- home.go
- hook.go
- jsonget.go
- lanes.go
- links.go
- logbook.go
- market.go
- mergedriver.go
- milestones.go
- projects.go
- pull.go
- refs.go
- release.go
- resume.go
- roles.go
- root.go
- self.go
- session.go
- share.go
- snapshot.go
- sync.go
- tags.go
- tickets.go
- update.go
- validate.go
- whoami.go