| name | fix |
| description | Analyze Linear issues, validate them against the codebase, then implement fixes and create draft PRs. |
| argument-hint | <issue-numbers, e.g. A-690 A-691 A-692> |
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 merge-train/spartan using the issue's gitBranchName from Linear. For a fix scoped to the v5 release line, branch from merge-train/spartan-v5 (which targets v5-next) instead.
git stash
git checkout -B <gitBranchName> origin/merge-train/spartan
-
Implement the fix: Edit the relevant files.
-
Build: Run yarn build from yarn-project to 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>
-
Push & PR: Push the branch and create a draft PR. Use --base merge-train/spartan-v5 for v5-scoped fixes.
git push -u origin <gitBranchName>
gh pr create --draft --base merge-train/spartan --title "fix: ..." --body "..."
- The PR body should reference the Linear issue (e.g.
Fixes A-XXX).
-
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 |