# Feedback intake and triage

`tkt feedback` reports land in an ordinary project with a server store, named by `AITODO_FEEDBACK_PROJECT`; triage is plain `tkt` on that project.

A reporter sees only their own reports in full.

```console
$ tkt store init --server https://tkt.ideathon.me --register --name aitodo-feedback --operator
```

## Details

- **Setup:** the command above in an empty triage directory (the operator; the invite path works too); the printed project id is the value of `AITODO_FEEDBACK_PROJECT`. Unset, unknown, or its store in its repo: every `/v1/feedback/**` is 404 `ERR_NOT_FOUND` (`tkt feedback` says no reports are taken); while it moves, 409 `ERR_STORE_MOVING`.
- **Callers** (`POST /v1/feedback/cli`, the `/cli` body without `files` and `stdin`, else 400 `ERR_BAD_REQUEST`): a `write`/`admin` token of any project; `read` 403 `ERR_AUTH_FORBIDDEN`, none and the operator secret 401.
- **Allowed:** `ticket new`, `ticket get <id>` (own only, else 404), `ticket list` (forced `--label from:<you>`), `search --similar <text>` (reporters only), `ticket section append <id> Cases --text <note>` (the server writes the `+1` line; at most 500 characters); anything else (help too) 403 `ERR_COMMAND_NOT_ALLOWED`.
- **A new report:** forced `--group intake --status backlog --label from:<your project id>` (the caller's such values are dropped, other labels stay); only `--type bug|feature` (missing 400, another 403); refused `--id --assignee --parent --blocked-by --relates-to --value --value-rationale --estimate --priority --release`. A missing or empty section: 422 `ERR_BODY_SECTION_MISSING` (the message lists every section of the kind and every missing one; sections outside the template are kept). `atk_…`, `sk-ant-…`, `Bearer …`, PEM blocks and `password=` / `token=` pairs become `[redacted]` (reply: `redacted`, `ticketId`, `kind`). Over 32 KB: 413 `ERR_PAYLOAD_TOO_LARGE`; over 20 reports plus cases per project per hour: 429 `ERR_RATE_LIMITED`. The run is the `/cli` runner (lock, a commit `<token> via <your project>` without the body; `AITODO_FEEDBACK_INTAKE=1`). The first report creates the `intake` group (prefix `FB`).
- **A reporter's view:** `tkt feedback status` (own: id, type, status, title); `tkt feedback status <ID>` (the whole own ticket: text, `## Resolution`, `## Reply`, refs, `## Cases`; another's is `ERR_NOT_FOUND`, as for an unknown id); `tkt feedback similar "…"` (from every project only id, title, type, status, number of cases, matched on the title); `tkt feedback plus1 <ID> --note "…"` (a `+1` line in any report's `## Cases`, closed ones too, without the project name, from the shared 20 an hour). Text, labels and the reporting project are never shown to another project.
- **Triage** (the intake's admin token): new = `backlog` in `intake` (`tkt ticket list --group intake --status backlog`; the `from:<project id>` label names the reporter); accepted = `tkt ticket move <id> --group <product> --yes` (a new id) or `--status todo`; done = `tkt ticket update <id> --status done`, a report straight from `todo`, with no repoAnchor and no `in_progress` / `in_review` (other tickets keep V8/V14); duplicate / wontfix = `canceled` + `tkt ticket section set <id> Resolution --text "duplicate of <id>"`; a reply = `tkt ticket section set <id> Reply --text "…"`; a link (e.g. the GitHub issue) = `tkt ticket ref add <id> <url>`.

## Related

- Env var: [`AITODO_FEEDBACK_PROJECT`](/en/docs/reference/env.md#AITODO_FEEDBACK_PROJECT): The project id of the feedback intake; unset: /v1/feedback/ is 404
- Env var: [`AITODO_FEEDBACK_INTAKE`](/en/docs/reference/env.md#AITODO_FEEDBACK_INTAKE): 1: this run is on the feedback intake store
