You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Prompt to create a Linear ticket when working on code fixes without a Linear branch
3
+
alwaysApply: true
4
+
---
5
+
6
+
# Linear Ticket Workflow
7
+
8
+
When starting work on a code fix, bug fix, or feature implementation, check the current git branch name:
9
+
10
+
```bash
11
+
git rev-parse --abbrev-ref HEAD
12
+
```
13
+
14
+
If the branch name does **not** contain a Linear ticket ID (pattern: `<name>/SDK-<number>-<description>`), ask the user if they'd like to create a Linear ticket and switch to a Linear-linked branch.
15
+
16
+
## When to prompt
17
+
18
+
- You are about to make or are making code changes (fixes, features, refactors)
19
+
- The current branch is `main`, `master`, or a branch without a ticket ID (e.g. `fadi/fix-something` instead of `fadi/SDK-1234-fix-something`)
20
+
21
+
## What to ask
22
+
23
+
Use the AskQuestion tool:
24
+
- "Your current branch doesn't have a Linear ticket. Want me to create one and switch to the Linear branch?"
25
+
- Options: "Yes, create a ticket" / "No, continue without one"
26
+
27
+
## If the user says yes
28
+
29
+
1. Create a Linear issue using the `save_issue` Linear MCP tool with a concise title describing the fix and assign it to `"me"`.
30
+
2. Retrieve the created issue using the `get_issue` Linear MCP tool to get the git branch name from the response.
31
+
3. Create and switch to the branch returned by Linear:
32
+
```bash
33
+
git checkout -b <branch-name-from-linear>
34
+
```
35
+
36
+
## If the user says no
37
+
38
+
Continue working on the current branch without further prompts about this.
0 commit comments