Fix Issues
Given a list of Linear issue numbers, analyze each one against the codebase, then implement fixes and create draft PRs.
Phase 1: Triage (main context)
For each issue number provided:
- Fetch the full issue description using
mcp__linear-server__get_issue. - Investigate the codebase to determine if the issue is valid:
- Find the files/functions mentioned in the issue description.
- Read the relevant code and assess whether the described bug or problem actually exists.
- Produce a summary table for the user:
| Issue | Title | Verdict | Reasoning |
|---|---|---|---|
| A-XXX | ... | Valid / Invalid / Unclear | One-line explanation |
- Ask the user which issues to proceed with. Default is all valid issues.
- For each confirmed issue, set its Linear status to "In Progress" using
mcp__linear-server__save_issue.
Phase 2: Implementation
Work through each confirmed issue sequentially in the main checkout:
Stash & branch: Stash any uncommitted changes, then create a branch from
nextusing the issue'sgitBranchNamefrom Linear (or the component's merge train, see CLAUDE.md). For a fix scoped to the v5 release line, branch fromv5-nextinstead.git stash git checkout -B <gitBranchName> origin/nextImplement the fix: Edit the relevant files.
Build: Run
yarn buildfromyarn-projectto verify the fix compiles.Commit: Stage only the changed files and commit with a descriptive message.
- Message format:
fix: <short description> (A-XXX) - Include
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Message format:
Push & PR: Push the branch and create a draft PR. Use
--base v5-nextfor v5-scoped fixes.git push -u origin <gitBranchName> gh pr create --draft --base next --title "fix: ..." --body "..."- The PR body should reference the Linear issue (e.g.
Fixes A-XXX).
- The PR body should reference the Linear issue (e.g.
Return to original branch: Switch back and restore stashed changes before moving to the next issue.
git checkout <original-branch> git stash pop
Repeat for each issue.
After all issues are done
Report a summary table with the PR URL for each issue, or what went wrong if any failed.
| Issue | Title | PR |
|---|---|---|
| A-XXX | ... | URL or error |