Manage Linear tickets with workflow automation
Manage Linear tickets with workflow automation, creating tickets from thoughts documents and updating status through the development lifecycle. Use this to track work from ideation to completion with automatic status updates during planning and implementation.
/plugin marketplace add coalesce-labs/catalyst/plugin install catalyst-dev@catalystinheritYou are tasked with managing Linear tickets, including creating tickets from thoughts documents, updating existing tickets, and following a structured workflow using the Linearis CLI.
First, verify that Linearis CLI is installed and configured:
if ! command -v linearis &> /dev/null; then
echo "❌ Linearis CLI not found"
echo ""
echo "Install with:"
echo " npm install -g --install-links ryanrozich/linearis#feat/cycles-cli"
echo ""
echo "Configure with:"
echo " export LINEAR_API_TOKEN=your_token"
echo " # or create ~/.linear_api_token file"
exit 1
fi
Read team configuration from .claude/config.json:
CONFIG_FILE=".claude/config.json"
# Read team key (e.g., "ENG", "PROJ")
TEAM_KEY=$(jq -r '.catalyst.linear.teamKey // "PROJ"' "$CONFIG_FILE")
# Read default team name (optional)
DEFAULT_TEAM=$(jq -r '.catalyst.linear.defaultTeam // null' "$CONFIG_FILE")
# Read thoughts repo URL
THOUGHTS_URL=$(jq -r '.catalyst.linear.thoughtsRepoUrl // "https://github.com/org/thoughts/blob/main"' "$CONFIG_FILE")
Configuration in .claude/config.json:
{
"linear": {
"teamKey": "ENG",
"defaultTeam": "Backend",
"thoughtsRepoUrl": "https://github.com/coalesce-labs/thoughts/blob/main"
}
}
If tools are available, respond based on the user's request:
I can help you with Linear tickets. What would you like to do?
1. Create a new ticket from a thoughts document
2. Add a comment to a ticket (I'll use our conversation context)
3. Search for tickets
4. Update ticket status or details
5. Move ticket through workflow
Then wait for the user's input.
This workflow ensures alignment through planning before implementation:
Note: These statuses must be configured in your Linear workspace settings. The Linearis CLI will read and use whatever states exist in your workspace.
Review and alignment happen at the plan stage (not PR stage) to move faster and avoid rework.
These commands automatically update ticket status:
/catalyst-dev:create_plan → Moves ticket to "Plan in Progress"/catalyst-dev:implement_plan → Moves to "In Dev"/catalyst-dev:create_pr → Moves to "In Review"/catalyst-dev:merge_pr → Moves to "Done"When referencing thoughts documents, always provide GitHub links:
thoughts/shared/... → {thoughtsRepoUrl}/repos/{project}/shared/...thoughts/{user}/... → {thoughtsRepoUrl}/repos/{project}/{user}/...thoughts/global/... → {thoughtsRepoUrl}/global/...Locate and read the thoughts document:
Analyze the document content:
Check for related context (if mentioned in doc):
Draft the ticket summary: Present a draft to the user:
## Draft Linear Ticket
**Title**: [Clear, action-oriented title]
**Description**:
[2-3 sentence summary of the problem/goal]
## Key Details
- [Bullet points of important details from thoughts]
- [Technical decisions or constraints]
- [Any specific requirements]
## Implementation Notes (if applicable)
[Any specific technical approach or steps outlined]
## References
- Source: `thoughts/[path]` ([View on GitHub](converted URL))
- Related code: [any file:line references]
---
Based on the document, this seems to be at the stage of: [ideation/planning/ready to implement]
Interactive refinement: Ask the user:
Note: Ticket will be created in "Backlog" status by default.
Create the Linear ticket using Linearis CLI:
# Create issue with linearis
linearis issues create \
--team "$TEAM_KEY" \
--title "[refined title]" \
--description "[final description in markdown]" \
--priority [1-4] \
--status "Backlog"
# Capture the created issue ID from output
ISSUE_ID=$(linearis issues create ... | jq -r '.id')
Note: Linearis creates issues in the team's default backlog state. To set specific status or assignee, create first then update:
# Assign to self
linearis issues update "$ISSUE_ID" --assignee "@me"
Post-creation actions:
Add at the top of the document:
---
linear_ticket: [TEAM-123]
created: [date]
---
When user wants to add a comment to a ticket:
Determine which ticket:
linearis issues read TEAM-123 to show ticket details and confirmFormat comments for clarity:
File reference formatting:
thoughts/user/example.md([View](url))Comment structure example:
Implemented retry logic in webhook handler to address rate limit issues.
Key insight: The 429 responses were clustered during batch operations, so exponential backoff
alone wasn't sufficient - added request queuing.
Files updated:
- `src/webhooks/handler.ts` ([GitHub](link))
- `thoughts/shared/rate_limit_analysis.md` ([GitHub](link))
Add comment with Linearis:
linearis comments create TEAM-123 --body "Your comment text here"
When moving tickets to a new status:
Get current status:
linearis issues read TEAM-123 | jq -r '.state.name'
Suggest next status based on workflow:
Backlog → Triage (for initial review)
Triage → Spec Needed (needs more detail) OR Research Needed (needs investigation)
Spec Needed → Research Needed (once problem outlined)
Research Needed → Research in Progress (starting research)
Research in Progress → Ready for Plan (research complete)
Ready for Plan → Plan in Progress (starting plan with /catalyst-dev:create_plan)
Plan in Progress → Plan in Review (plan complete)
Plan in Review → Ready for Dev (plan approved)
Ready for Dev → In Dev (starting work with /catalyst-dev:implement_plan)
In Dev → In Review (PR created)
In Review → Done (PR merged)
Automatic status updates: When certain commands are run, automatically update ticket status:
/catalyst-dev:create_plan with ticket → Move to "Plan in Progress"/catalyst-dev:implement_plan with ticket → Move to "In Dev"/catalyst-dev:create_pr with ticket → Move to "In Review"/catalyst-dev:merge_pr with ticket → Move to "Done"Manual status updates:
linearis issues update TEAM-123 --state "In Progress"
Add comment explaining the transition:
linearis comments create TEAM-123 --body "Moving to In Progress: Starting implementation"
When user wants to find tickets:
Gather search criteria:
Execute search:
# List all issues (linearis issues list only supports --limit, not --team)
linearis issues list --limit 100
# Filter by team using jq
linearis issues list --limit 100 | jq '.[] | select(.team.key == "TEAM")'
# Filter by status using jq
linearis issues list --limit 100 | jq '.[] | select(.state.name == "In Progress")'
# Filter by assignee using jq
linearis issues list --limit 100 | jq '.[] | select(.assignee.email == "user@example.com")'
# Search by text (filter JSON output with jq)
linearis issues list --limit 100 | \
jq '.[] | select(.title | contains("search term"))'
Present results:
When these commands are run, check if there's a related Linear ticket and update it:
During /catalyst-dev:create_plan:
During /catalyst-dev:implement_plan:
During /catalyst-dev:create_pr:
During /catalyst-dev:merge_pr:
# 1. Research and document
/catalyst-dev:research_codebase "authentication patterns"
# Saves to thoughts/shared/research/auth-patterns.md
# 2. Create ticket from research
/catalyst-dev:linear create thoughts/shared/research/auth-patterns.md
# Creates ticket in Backlog
# 3. Create plan
/catalyst-dev:create_plan
# Reads research, creates plan
# Ticket moves to "Plan in Progress" → "Plan in Review"
# 4. Implement
/catalyst-dev:implement_plan thoughts/shared/plans/2025-01-08-auth-feature.md
# Ticket moves to "In Dev"
# 5. Create PR
/catalyst-dev:create_pr
# Ticket moves to "In Review"
# 6. Merge PR
/catalyst-dev:merge_pr
# Ticket moves to "Done"
# Add progress comment
linearis comments create PROJ-123 --body "Completed phase 1, moving to phase 2"
# Move ticket forward
linearis issues update PROJ-123 --state "In Dev"
# Search for related tickets
linearis issues list --team PROJ | jq '.[] | select(.title | contains("authentication"))'
# List issues (only --limit supported, use jq for filtering)
linearis issues list --limit 50
# Filter by status using jq
linearis issues list --limit 100 | jq '.[] | select(.state.name == "In Progress")'
# Read specific issue
linearis issues read TICKET-123
# Create issue
linearis issues create "Title" --description "Description" --state "Todo"
# Update issue state
linearis issues update TICKET-123 --state "In Progress"
# Update assignee
linearis issues update TICKET-123 --assignee <user-id>
# Add comment
linearis comments create TICKET-123 --body "Comment text"
# List cycles
linearis cycles list --team TEAM [--active]
# Read cycle
linearis cycles read "Sprint 2025-10" --team TEAM
Linearis returns JSON, parse with jq:
# Get ticket status
linearis issues read TEAM-123 | jq -r '.state.name'
# Get ticket title
linearis issues read TEAM-123 | jq -r '.title'
# Get assignee
linearis issues read TEAM-123 | jq -r '.assignee.name'
# Filter list by keyword
linearis issues list --team TEAM | jq '.[] | select(.title | contains("bug"))'
.claude/config.json for team settingsThis command integrates seamlessly with the create_plan → implement_plan → validate_plan workflow while keeping Linear tickets in sync!