📋 Table of Contents
🎯 Overview
The Claude Linear Integration is an intelligent automation system that connects your Linear issues with Azure DevOps repositories, powered by Claude AI. It analyzes bug reports, creates implementation plans, and can even execute fixes automatically.
✨ Key Features
Smart Analysis
AI-powered analysis of Linear issues with context from comments and related tickets
Detailed Plans
Creates comprehensive implementation plans with testing considerations
Interactive Discussion
Discuss and iterate on plans directly in Linear comments
Automated Execution
Execute approved plans and automatically create pull requests
Branch Management
Flexible branch targeting with support for custom source and target branches
Folder Scoping
Focus analysis on specific folders/applications within monorepos and multi-app repositories
Full Integration
Works seamlessly with Linear, Azure DevOps, and Zoho Service Desk
🔄 Typical Workflow
1. Report Issue
Create an issue in Linear with details about the bug or feature request
2. Request Plan
Comment with claude-fix [repo-url] to generate an implementation plan
3. Review & Discuss
Use claude-plan to discuss and refine the plan as needed
4. Execute
Comment with claude-execute to implement the changes and create a PR
5. PR Review
Use claude-discuss in Azure DevOps PR for code reviews and questions
💬 Available Commands
claude-fix
Creates a detailed implementation plan for your issue.
What it does:
- Clones the repository and analyzes the codebase
- Focuses on specific folders/applications when using --folder
- Understands the issue context and requirements
- Creates a step-by-step implementation plan
- Identifies testing requirements and potential risks
claude-plan
Discuss and iterate on implementation plans.
What it does:
- Maintains conversation context across multiple comments
- Updates plans based on your feedback
- Answers questions about the implementation
- Tracks plan versions automatically
claude-execute
Execute the approved plan and create a pull request.
What it does:
- Implements all changes according to the plan
- Creates a new branch with descriptive name
- Commits changes with clear messages
- Creates a pull request in Azure DevOps
- Handles branch conflicts and retries
claude-help
Get help and documentation links directly in Linear.
What it does:
- Shows available commands and their usage
- Provides links to complete documentation
- Includes branch specification examples
- Perfect for new team members or quick reference
claude-complete
Mark work as complete and clean up temporary files.
What it does:
- Removes plan files and conversation history
- Cleans up branch configuration files
- Provides cleanup summary report
- Marks the issue as ready for closure
claude-discuss
Azure DevOps only: Have conversations directly in pull request comments.
What it does:
- Works directly in Azure DevOps PR comments
- Provides code reviews and explanations
- Maintains conversation context in PR threads
- Integrates with Linear ticket context when available
claude-plan for Linear discussions.
🌿 Advanced Branch & Folder Support
The integration supports flexible branch management and folder scoping to fit your team's workflow:
Branch Specification Methods
1. URL Fragment (GitHub-style)
Use the branch specified in the URL fragment as the source branch.
2. Command Line Flags
Specify source and target branches explicitly using flags.
3. Folder Scoping
Focus analysis on specific folders/applications within multi-app repositories.
Branch Validation
- Cannot contain spaces (unless quoted)
- Cannot contain special characters: @ ~ ^ : \ ? * [
- Cannot start or end with dots
- Cannot have consecutive dots (..)
Folder Path Validation
- Cannot contain dangerous sequences like ../
- Cannot start with / or ~ (absolute paths)
- Cannot contain control characters
- Cannot use reserved Windows names (CON, PRN, AUX, etc.)
Examples
✅ Valid Branch Names
feature/new-featurebugfix/issue-123developrelease/v1.2.0
❌ Invalid Branch Names
feature branch(space)bug@fix(@ symbol).hidden(starts with dot)invalid..name(double dots)
✅ Valid Folder Paths
frontend/apps/dashboardbackend/services/authdata/pipelines/etlml-models/training
❌ Invalid Folder Paths
../dangerous(parent dir)/absolute/path(absolute)folder//double(double slash)apps/CON/service(reserved name)
⚙️ Setup & Configuration
1. Linear Webhook Setup
Steps to Configure
- Go to Linear Settings → API → Webhooks
- Create a new webhook
- Set URL to:
https://claude.hazcheck.ai/webhook/linear - Select "Comments" under resource types
- Copy the webhook secret for configuration
2. Azure DevOps Service Hook (Optional)
For PR Discussions
- Go to your Azure DevOps project
- Navigate to Project Settings → Service hooks
- Create a new service hook subscription
- Select "Web Hooks" as the service
- Set URL to:
https://claude.hazcheck.ai/webhook/azure-devops - Select "Pull request commented on" as the event type
3. Environment Variables
📝 Examples & Use Cases
Example 1: Simple Bug Fix
Scenario
You have a bug in your authentication system that needs fixing.
Linear Issue
Comment
Expected Result
Claude will analyze the authentication code, identify the missing validation, and create a plan to add proper error handling.
Example 2: Feature Development with Branch Strategy
Scenario
Adding a new feature to the develop branch, targeting a release branch.
Comment
Discussion
Execution
Example 3: Cross-Platform Issue with Zoho Context
Scenario
A customer reported an issue via Zoho Service Desk, which was then created as a Linear issue.
Linear Issue
Claude automatically detects the Zoho ticket reference and includes additional context from the customer support conversation.
Example 4: Azure DevOps PR Discussions
Scenario
After Claude creates a pull request, team members can discuss the implementation directly in Azure DevOps.
PR Review Process
Code-Specific Questions
Benefits:
- Get instant code reviews and explanations
- Discuss implementation details before merging
- Maintain full context from the original Linear issue
- Educational for team members learning the codebase
Example 5: Using Control Commands
Getting Help
When team members need guidance on available commands or syntax.
Work Completion
After the pull request is merged and the issue is resolved, clean up temporary files and mark as complete.
Example 6: Folder Scoping for Multi-App Repositories
Scenario
You have a monorepo with multiple applications and want to fix a bug in the frontend dashboard component.
Repository Structure
Focus on Dashboard App Only
Claude will focus analysis only on the dashboard application code, ignoring other parts of the large repository.
Multiple Use Cases
Benefits
- ⚡ Faster Analysis: Claude focuses only on relevant code
- 🎯 Better Accuracy: More targeted fixes for specific components
- 🔇 Reduced Noise: Avoids analyzing unrelated parts of large repos
- 👥 Team Efficiency: Different teams can work on different folders simultaneously
Real-World Workflow
Morning Standup
Team identifies priority bugs from Linear
Plan Generation
Use claude-fix to get implementation plans
Team Review
Discuss plans using claude-plan
Execution
Approved plans executed with claude-execute
🔧 Troubleshooting
Common Issues
❌ No Response from Claude
Possible Causes:
- Webhook not configured correctly
- Bot user doesn't have access to the Linear team
- Command format is incorrect
Solutions:
- Try
claude-helpto test if the bot is responding - Check webhook URL and secret
- Verify bot permissions in Linear
- Use exact command format from examples
🔐 Repository Access Denied
Possible Causes:
- SSH key not configured for the repository
- Azure DevOps PAT token missing or expired
- Repository URL is incorrect
Solutions:
- Verify repository URL format
- Check Azure DevOps PAT permissions
- Ensure repository is accessible
🌿 Branch Not Found
Possible Causes:
- Specified branch doesn't exist
- Branch name contains invalid characters
- No access to the specified branch
Solutions:
- Verify branch exists in repository
- Check branch name validation rules
- Use quotes for branches with spaces
🚀 PR Creation Failed
Possible Causes:
- Azure DevOps PAT token insufficient permissions
- Target branch is protected
- PR already exists for the branch
Solutions:
- Check PAT token permissions
- Use manual PR creation link provided
- Review branch protection rules
💬 claude-discuss Not Working in PRs
Possible Causes:
- Azure DevOps webhook not configured
- PR comment webhook not triggering
- Bot user lacks PR access permissions
Solutions:
- Verify Azure DevOps service hook setup
- Check webhook endpoint is receiving events
- Ensure bot user has repository access
- Try the command in a new PR comment (not inline)
Debug Information
Getting Help
Useful Endpoints
- Health Check: /health - Verify system status
- Webhook Info: /webhook/info - Configuration details
- Bot Info: /bot/info - Linear bot user status
- Task Monitor: /monitor - Real-time task tracking
🔌 API Reference
Webhook Endpoints
Linear Webhook
Receives Linear webhook events for comment processing.
Azure DevOps Webhook
Receives Azure DevOps webhook events for PR comment processing.
Monitoring API
Task Status
Get status and output for a specific task.
Recent Tasks
List recent tasks with their status.