# Linear issue template for AI agent delegation

Paste everything below the line into a Linear issue template (Team settings > Templates), or into a single issue before you delegate it. Replace each prompt with your own text and delete the lines you do not need. Keep the six headings: each one answers a question the agent cannot answer by reading the code.

Title: say the change you want. "Quote fields that contain commas in the invoices CSV export" tells the agent what to do. "Export is broken" only tells it someone is unhappy.

---

## Outcome

One or two sentences. What is true when this is done, in words someone could check by looking at the product.

## Context

- Repository: owner/name, and the app or package inside it
- Where to look: files, functions, routes, or an existing pattern to reuse
- Background: the bug report, error message, design or earlier pull request, quoted or linked

## Scope

- Change:
- Leave alone:

## Done when

- [ ] The behavior a user or caller can observe
- [ ] The test that covers it
- [ ] What must still work the way it did before

## Verify with

The exact command or commands that pass when the work is right. One per line.

## Hand back

- Branch from, and pull request into:
- Pull request title: include this issue's ID with a closing word, for example "Fixes ENG-123"
- Reviewer: the human assignee of this issue
- Stop and ask before: a schema change, a new dependency, anything outside Scope

---

## A filled-in example

Title: Quote fields that contain commas in the invoices CSV export

### Outcome

An invoice whose customer name contains a comma exports as one row, with the whole name in the Customer column.

### Context

- Repository: acme/billing, package apps/api
- Where to look: the export is built in src/exports/invoices-csv.ts. The customers export in src/exports/customers-csv.ts already quotes fields correctly. Reuse its writer.
- Background: "Baker, Hughes Ltd" is split across two columns in last month's export (support ticket linked below).

### Scope

- Change: the invoices CSV writer
- Leave alone: column order, the file name, the customers export

### Done when

- [ ] A name with a comma, a double quote or a line break survives the export in one column
- [ ] A unit test covers all three cases
- [ ] The existing export tests still pass

### Verify with

pnpm test exports

### Hand back

- Branch from main, pull request into main
- Pull request title: "Fixes BIL-482: quote fields in invoices CSV export"
- Reviewer: the assignee
- Stop and ask before: adding a dependency

---

From "How to Delegate a Linear Issue to an AI Agent and Get a PR Back", https://usemerlin.ai/blog/delegate-linear-issue-to-ai-agent
