# Hints, lint and suggestions

The context guard hints say what a ticket is missing; the suggestions fill in the missing refs.

## Hints and lint

Every read runs deterministic checks (72 hint types; offline, no LLM) and returns hints (`type`, `severity`, `message`, `suggested_action`, `target`, `data`). Do not guess what is missing: the hint says it.

- `block`: do not start (`has_blockers: true`); `warning`: start, but something is missing; `info`: nice to have. `tkt lint` exits 3, 2, 1.
- The CLI hides routine hints (`--all` shows them); they do not count toward the exit code. A hint never rejects a write. The list: [Context guard hints](/en/docs/reference/hints.md#ref-hints).
- Store-level hints look for stale and contradicting items: `tkt doctor` shows them all, `tkt lint decision://D263` the ones that involve the decision, `tkt decision new|edit` and `tkt gotcha new|edit` the ones that involve the item just written (stderr). An integrity hint (`"integrity": true`; listed first, marked `[integrity]`) stays a `warning`, but `tkt lint` exits 3 on it and doctor counts it an error.

### Details

**Phase:** every CLI command is `get`; only the API's `POST`/`PATCH` responses are `create` / `update`. In `get` the fill-in hints drop to `info` (`UNSCOPED_TICKET`, `NO_VERIFICATION_STEPS`, `EMPTY_DESCRIPTION`, `NO_CODE_LOCATIONS`, `MISSING_GROUP_DESCRIPTOR`, `AMBIGUOUS_ACCEPTANCE_CRITERIA`; `MISSING_CONTEXT_REFERENCE` only on a closed ticket), `MISSING_ACCEPTANCE_CRITERIA` from `block` to `warning`. Routine (`"routine": true`): `NO_OWNER`, `NO_ESTIMATE`, `NO_VALUE`, `UNVERIFIED_REPO_ANCHOR`; the CLI counts them in one line ("4 routine hint(s) hidden"), `--json` and the API list all. The only gate on `in_progress`: no `repoAnchor.repo` is `ERR_REPO_ANCHOR_MISSING` (and a `MISSING_REPO_ANCHOR` block). The installed vocabulary: `tkt meta --section hints`.

**Store level** (the graph rules over every declared edge, and fixed word lists, EN and HU, no AI). A missing target has its edge's code, in the bundle and in `tkt doctor` alike (`DANGLING_RELATIONSHIP`, `DANGLING_REFERENCE`, `MISSING_GROUP`, `DANGLING_DECISION`); the doctor's old codes are in `tkt meta --section hints` (`replaced_findings`). Retired codes (`"retired": true`) stay in the vocabulary; nothing emits them. Integrity: `RELATIONSHIP_CYCLE`: a cycle of `blockedBy`, `parent` or `supersededBy` (a hand edit, a merge or an import; a write refuses one with `ERR_REL_CYCLE`). `STALE_BY_DECISION`: an item builds on a decision that changed since its review stamp of it (a doc or gotcha that changed: `STALE_DOC`). A new link is stamped when it is written, so a doc written before the decision is not stale; an edit of the item resolves nothing, `tkt review <item> --ack decision://D7 --apply` does. `DECISION_RELATION_MISMATCH`: `supersededBy` on one, no `supersedes` on the other (fix: `tkt decision edit D263 --supersedes D261 --clear amends`). `ACTIVE_BUT_PROPOSED`: `active`, but a status line in the text says otherwise (`Status: proposed`, `Státusz: függőben`, `proposed until`). `UNRECORDED_REPLACEMENT`: the text names a decision as replaced (`instead of D21`, `a D21 helyett`, `replaces D21`) with no relationship. Not integrity: `LIFECYCLE` (`warning`), see containers; `LAGGING_PARENT` (`info`): an unchecked exit criterion whose tickets are all done.

## Ref suggestions

`tkt suggest refs PAY-001` proposes decisions, docs, gotchas and code paths with a reason, and links nothing: each comes with its accept (`tkt ticket ref add …`) and dismiss (`tkt suggest dismiss …`) command. `tkt ticket new` and `update` print the same on a terminal; to a pipe or an agent one line: `2 suggested refs: tkt suggest refs PAY-001`.

- A ref the body mentions is suggested even when inherited, with its `›` section (`--anchor`).
- What points at the ticket but its bundle does not deliver (a decision whose `origin` is the ticket, an active decision whose `affects` changes a doc or gotcha the ticket carries, a gotcha or doc whose `appliesTo` matches it), or a ticket its text names unlinked: the context guard warns `UNLINKED_ITEM` until you link it (a ticket: `--add-relates-to`) or dismiss it; a dismiss silences both.
- Scope: one ticket, `--group G`, or every open ticket (`--include-closed`).

### Details

**Signals (no AI):** the ticket names it (high); the target's `appliesTo` (high); an unreferenced backticked repo path (medium); BM25 wording overlap (3 docs, 2 gotchas, at least 2 shared terms; medium or low); two sources raise it a step. A group gotcha too broad (relevant to at most a third of 3+ open members): `action: narrow`; group docs are never narrowed, an epic is no target, a closed member mentioning it blocks it. Dismissals go to the review store (`reviews/`, commit it) and come back when the suggested item changes; `--undo` brings one back. **LLM** (optional; `--llm`, `--llm-cmd`, `AITODO_LLM_CMD`, `--llm-provider server`; `--no-llm`): text leaves the machine; a failure is a warning. Cached per ticket (key: the hash of that ticket's prompt; a new doc or gotcha asks all again); `--refresh` asks again; locally `.aitodo/cache/llm/refs/`, off with `AITODO_LLM_CACHE=0`; a failing batch keeps what came before it.

- `tkt suggest refs --json`: `llm {cached, asked, tickets}`; the text prints `LLM answers: 3 cached, 2 asked.`

## Commands on this page

- [`tkt suggest refs`](/en/docs/reference/commands/knowledge.md#tkt-suggest-refs): List ref suggestions
- [`tkt suggest dismiss`](/en/docs/reference/commands/knowledge.md#tkt-suggest-dismiss): Never show a suggestion again, until the suggested item changes (stored in reviews/)

## Related

- Reference: [Context guard hints](/en/docs/reference/hints.md): The 72 context guard hint types by severity; the tkt doctor findings: the doctor table.
- Hint · block: [`MISSING_REPO_ANCHOR`](/en/docs/reference/hints.md#MISSING_REPO_ANCHOR): No repoAnchor.repo anywhere in the chain (ticket, epic, groups)
- Hint · block: [`MISSING_ACCEPTANCE_CRITERIA`](/en/docs/reference/hints.md#MISSING_ACCEPTANCE_CRITERIA): An old feature or bug without a filled AC (a new one is refused, ERR\_TICKET\_CONTENT\_MISSING); a block only in the API's update answer, a warning on every CLI…
- Hint · warning: [`MISSING_CONTEXT_REFERENCE`](/en/docs/reference/hints.md#MISSING_CONTEXT_REFERENCE): No doc or gotcha is linked; a warning while the ticket is open, info when closed
- Hint · info: [`UNVERIFIED_REPO_ANCHOR`](/en/docs/reference/hints.md#UNVERIFIED_REPO_ANCHOR): The repo anchor's commit was never verified (routine)
- Error code · 409: [`ERR_REPO_ANCHOR_MISSING`](/en/docs/reference/errors.md#ERR_REPO_ANCHOR_MISSING): → in\_progress without an effective repoAnchor.repo
- Hint · warning: [`STALE_BY_DECISION`](/en/docs/reference/hints.md#STALE_BY_DECISION): An item builds on a decision that changed since its review stamp of it (tkt review; integrity)
- Hint · warning: [`DECISION_RELATION_MISMATCH`](/en/docs/reference/hints.md#DECISION_RELATION_MISMATCH): Two decisions disagree on their relation: supersededBy on one, no supersedes back on the other (integrity)
- Hint · warning: [`ACTIVE_BUT_PROPOSED`](/en/docs/reference/hints.md#ACTIVE_BUT_PROPOSED): An active decision whose text says it is proposed or pending (integrity)
- Hint · warning: [`UNRECORDED_REPLACEMENT`](/en/docs/reference/hints.md#UNRECORDED_REPLACEMENT): A decision's text names another decision as replaced, but no relationship joins them (integrity)
- Hint · info: [`LAGGING_PARENT`](/en/docs/reference/hints.md#LAGGING_PARENT): An unchecked milestone exit criterion whose tickets are all done
- Hint · warning: [`RELATIONSHIP_CYCLE`](/en/docs/reference/hints.md#RELATIONSHIP_CYCLE): blockedBy, parent or supersededBy links form a cycle: a hand edit, a merge or an import (integrity)
