# Reading a ticket

Reading the bundle, and line 1, which says what to deal with first.

## Reading a ticket

Read the bundle, never the Markdown file ([The Context Bundle](/en/docs/concepts/context-bundle.md#context-bundle)): `tkt ticket get PAY-001` prints all it delivers as Markdown, verbatim and unwrapped, every cut with the command that returns the whole. `--json` is the full machine bundle; `--brief` is a 80-column glance without the body; `--summary` adds about 120 words of LLM summary above it (no provider: the brief, exit 0).

### Details

- `--brief` with `--raw`: exit 2; `--brief` runs no Stage 2, so a missing repo file is not flagged.
- What other tickets record about this one shows too, derived at read time, nothing written (`direction: "incoming"` and `via` in `relationships[]`, own ones `"outgoing"`): `relates to:` (their `relatesTo`), `blocks:` (their `blockedBy`; `has_blockers` is unchanged), `mentioned by:` (this id in their body or description) and an epic's `## Children` part (id, title, status, AC). One hop, never followed further; a pair recorded on both sides shows once.

- `--summary`: what, why, where it stands, what is left; `tkt suggest`'s provider (`AITODO_LLM_CMD`, `--llm`, default `claude -p …`, `--llm-cmd`, `--llm-provider server`, [Team AI](/en/docs/guides/team/team-ai.md#team-llm)); `--no-llm` forces the fallback. A failure shows `ERR_LLM_PROVIDER` with the server's slug (e.g. `ERR_LLM_QUOTA`) and a stderr notice. Cached by what the model sees: an unchanged ticket, blockers, dependents and hints return the stored text (`(cached, <date>)`); `--refresh` asks again (only for a poor answer, not after an edit). Local cache `.aitodo/cache/llm/` (gitignored), the server LLM's on the server; `AITODO_LLM_CACHE=0` turns it off. The ticket is never written; the store API has no `view=summary`.

- The default view's parts, in order: the header (a `BLOCKED:` line when blocked), `## Body` (closed by a `---` line), the inherited `## Value`, the epic, `## Decisions` (a changer under the decision it changes), `## Files to read` (repo file and line range, no code), `## Other refs`, the groups, `## Hints`, `## Not delivered in full`, the `Completeness:` line; an empty part is left out.
- A delivered ref's heading is `### <ref> › <anchor> (<mode>)`, with `, cut 300/900` when cut; one not delivered shows `<ref> (<topic>)` and a `Not delivered: <reason>. Get it: <command>` line. Info and routine hints are named on one line; `--all` lists them (it changes only that part). The exit code is 0 (`tkt ticket lint` is for hints). On a server store the client renders it too. `tkt next --claim` and other commands keep their output; `--budget` applies to the default view.

- `tkt ticket get --raw` is the file alone, for debugging. `--json` fields: `ticket.body.markdown`, `groups[].descriptor`, `_source` / `_tier` on refs, `guard.completeness`.
- `--brief`: status, type, priority, assignee, epic, value and estimate, release, open milestones, `AC 3/5` with the open items, open blockers, how many wait on it, only warning/block hints. `--brief --json` = `GET /v1/tickets/{ticket_id}?view=brief` (`kind: "ticket_brief"`).
- `--summary --json` adds `summary`, `summarySource` (`llm` / `cache` / `fallback`), `generatedAt`, `setupHint`.
- `--json`'s `memberOf`: the releases (with the `via` path; the `release` field alone: `released as`), the milestones listing it, and `unreleased` for a done one.

## Line 1: what to deal with first

When a `tkt` answer carries something to act on (a `block` or `warning` hint, a human decision, a follow-up a write caused), line 1 is `<BLOCK|WARN> <subject>: <what is wrong and why it matters> → <next step, with the exact command>`, plus `(+N more)` when there are others. Deal with it first; the full hint list stays where it is. With nothing to act on, line 1 is the result, as always. Errors keep their `Error [ERR_…] … Fix: …` line.

For example `tkt next` with only backlog tickets: `WARN No startable ticket. Promoting backlog → todo is the user's call: ask them about PAY-003 → after a yes: tkt ticket update PAY-003 --status todo`.

### Details

Which item is line 1: a `block` before a `warning`; `info` and routine hints never. Within a level, the fixed order of the hint codes' texts decides, then the order they were emitted. `--json` and REST carry the same as the top-level `attention` object: `level` (`block` / `warning`), `code`, `subject`, `text`, `next`, `more`, `line`; `null` with nothing to act on. Codes beyond the hints: `ORIGIN_MOVED` (a decision's origin moved, the old ticket still delivers it), `ORIGIN_LINK_OVER_BUDGET` (the origin link pushed something out of the ticket's bundle), `PROMOTION_IS_THE_USERS_CALL`, `INHERITED_CUT`, `EPIC_TOO_LONG`, `REF_LOCATION_MISMATCH`, `CLAIM_OUTSIDE_FOCUS`.

## Commands on this page

- [`tkt ticket get`](/en/docs/reference/commands/ticket.md#tkt-ticket-get): Show a ticket with its Context Bundle (hints included)

## Related

- Concept: [The Context Bundle](/en/docs/concepts/context-bundle.md): One read that returns everything a ticket needs, the milestone tier included.
- Guide: [Team AI](/en/docs/guides/team/team-ai.md): Team AI: the server provides the LLM, with no key of your own.
