1---
2name: prep
3description: Examine one ticket, work out the fix, and write the plan back onto the ticket — description, risk, effort, priority — without implementing anything. Use when the user types /prep, or says "look at this ticket", "plan this ticket", "propose a fix for LAB-123", "scope this ticket", "groom this ticket", "make this ticket ready". Portable across Claude Code, Codex, and any agent that reads skills.
4---
5
6# prep — propose the fix, update the ticket, build nothing
7
8Input: one ticket (ID, URL, or "this ticket" from the conversation). Output: the
9same ticket, rewritten so someone else — a person or an agent — can pick it up
10and build it without asking a question.
11
12**Hard boundary: plan only.** No code edits, no branches, no commits, no PRs, no
13migrations, no deploys. Reading code, running read-only commands, and reproducing
14a bug are fine. If the fix turns out to be a one-liner, still don't make it —
15write it into the ticket.
16
17## Tracker access
18
19Default tracker is Linear. Use whichever is available, in this order:
20
211. The Linear MCP server, if one is connected to this agent.
222. The Linear GraphQL API with a key from `LINEAR_API_KEY` or the machine's
23 secret store (on macOS: `security find-generic-password -s linear-api-key -w`).
24 Never print the key.
25
26For a GitHub issue use `gh issue view` / `gh issue edit` and map the fields
27below onto labels. No tracker access → stop and say so; don't write the plan
28into a local file instead.
29
30## Steps
31
32### 1. Read the ticket — all of it
33
34Fetch the ticket by ID and confirm it's the right one (title matches what the
35user meant). Read the description, every comment, attachments and images,
36linked and parent/sub tickets, and the current project, estimate, priority,
37status and labels. Note what the reporter actually asked for versus what the
38title says.
39
40### 2. Understand it — research only as far as needed
41
42Find the cause or the shape of the work, at the depth the ticket needs:
43
44- **Clear and small** (copy, a known one-file change): locate the spot in the
45 code and move on. No research.
46- **Bug**: find the code path, and reproduce it or pin the cause from the code.
47 State whether the cause is *confirmed* (reproduced / read in code) or
48 *suspected*.
49- **Feature or unclear ask**: read the surrounding code and how similar things
50 are already done in the repo. Search open and recently closed tickets for
51 overlap.
52- **External unknown** (a vendor API, a library behaviour, a legal or pricing
53 fact): only then go to the web, primary sources first.
54
55Stop researching as soon as you can name the fix and its risk. If the ticket
56names no repo, work out which one from the team/project before reading code.
57
58### 3. Decide the fix
59
60One recommended approach, concrete enough to build from: what changes, where,
61and in what order. Mention an alternative only if it's a real contender, in one
62line with why it lost. If two approaches differ in a way only the owner can
63judge (product behaviour, money, scope), don't pick silently — see "Open
64questions" below.
65
66### 4. Rewrite the description
67
68Replace the description with the structure below. Keep everything true from the
69original — the reporter's words, links, screenshots — under **Source**; never
70drop information. Plain language first; file paths and identifiers are welcome
71in "Proposed fix" where a builder needs them.
72
73```markdown
74## What
75One or two sentences: the problem or the ask, as the user experiences it.
76
77## Why
78Who it affects and what it costs to leave it.
79
80## Where
81Product area / screen, plus repo and the main files involved.
82
83## Cause
84(bugs only) What's actually wrong — marked confirmed or suspected.
85
86## Proposed fix
87Numbered steps a builder can follow. Name files/functions. Include the test
88that should exist when it's done.
89
90## Risk
91Level: Low / Medium / High — one line why.
92- What could break, and who would notice
93- Blast radius: one screen / one app / shared code / data / money / outbound messages
94- Reversible? How to roll back
95- What must be checked before shipping
96
97## Done when
98Checkable acceptance criteria.
99
100## Open questions
101Only if any. Each with a recommended answer.
102
103## Source
104Who asked, where, when; original wording; links.
105```
106
107Drop a section that genuinely doesn't apply (no "Cause" on a feature, no "Open
108questions" when there are none). Never drop **Risk**.
109
110**Risk level guide.** Low: isolated, easy to revert, no data touched. Medium:
111shared code or several screens, or behaviour users will notice. High: data
112migrations, auth/permissions, payments, anything that sends messages to real
113people, or anything hard to undo.
114
115### 5. Set the fields
116
117- **Title** — fix it if it's vague or wrong: 2–6 plain words, verb-led, no codes.
118- **Effort** — the tracker's estimate field, on the team's own scale (read the
119 team settings; don't assume). Base it on the proposed fix, including tests
120 and verification.
121- **Priority** — Urgent / High / Medium / Low from impact (who's affected, how
122 badly, how soon). Never leave "No priority". If you change an existing
123 priority, say why in the comment.
124- **Project** — set if missing; best-fitting existing project in the team.
125- **Labels** — fix if wrong or missing (bug / feature / etc.).
126- **Status** — leave as is. Don't move it to in-progress; nobody is building.
127 Don't change the assignee.
128
129If the ticket duplicates another, don't plan it twice: carry any new detail
130into the keeper, mark this one Duplicate, and report that instead.
131
132### 6. Comment — only when it adds something
133
134Add one comment when any of these is true; otherwise none:
135
136- You changed priority, estimate or title — say from what to what, and why.
137- There are open questions the owner must answer before building.
138- Research turned up something that doesn't belong in the description (a dead
139 end worth not repeating, a related ticket, evidence of the repro).
140
141Keep it short. Don't paste the plan again.
142
143### 7. Read back and verify
144
145Re-fetch the ticket and check that the description, title, estimate, priority,
146project and labels actually stuck. Fix anything that didn't.
147
148## Reply to the user
149
150Short, no recap of the ticket body:
151
152```
153LAB-123 updated — <title>
154- fix: <one line>
155- effort: <estimate> · priority: <priority> · risk: <level>
156- open question: <only if any>
157```
158
159## Rules
160
1611. **Never implement.** The deliverable is the ticket.
1622. **Never lose information.** Rewriting the description keeps the original
163 facts and links.
1643. **Honest confidence.** A suspected cause is labelled suspected; an estimate
165 resting on an unknown says so in Risk.
1664. **One ticket per run** unless the user gives a list — then run the steps per
167 ticket and reply with one block per ticket.
1685. **Split, don't bloat.** If the fix is really two independent pieces of work,
169 propose the split in "Open questions" (or the comment) rather than creating
170 new tickets unasked.
171