An automated bug fix assistant that processes Slack conversations, creates Jira tickets, and generates GitHub pull requests with code fixes.
- Slack Integration: Monitors threads and processes bug reports
- Jira Integration: Automatically creates tickets with structured bug information
- GitHub Integration: Generates pull requests with AI-powered code fixes
- AI-Powered: Uses Anthropic Claude for intelligent bug analysis and fix generation
# Clone the repository
git clone <repository-url>
cd devsync
# Run setup script
python setup.pyCreate a .env file with the following variables:
# Anthropic API
ANTHROPIC_API_KEY=sk-ant-your-key-here
# Jira Configuration
JIRA_BASE_URL=https://your-domain.atlassian.net
JIRA_EMAIL=your-email@domain.com
JIRA_API_TOKEN=your-jira-token
JIRA_PROJECT_KEY=YOUR_PROJECT
JIRA_ISSUE_TYPE=Task
# GitHub Configuration
GITHUB_TOKEN=ghp_your-github-token
GITHUB_REPO=owner/repository-name
GITHUB_DEFAULT_BRANCH=main
# Slack Bot Configuration
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_APP_TOKEN=xapp-your-app-token
SLACK_SIGNING_SECRET=your-signing-secretpython slack_bot.py- Start a thread describing a bug or issue
- Mention
@DevSyncin the thread - The bot will:
- Parse the conversation into a structured bug report
- Create a Jira ticket
- Analyze the codebase for context
- Generate a code fix (if possible)
- Create a GitHub pull request
User: "Login fails when users enter special characters in email field"
Support: "Error occurs in auth_handler.py line 45"
@DevSync
The bot will:
- Create Jira ticket:
PROJ-123: Login fails with special characters - Analyze
auth_handler.pyand related code - Generate a fix for the email validation issue
- Create PR:
Fix: Email validation for special characters
slack_bot.py # Slack bot entry point
├── mcp_server.py # Workflow orchestrator
├── services/
│ └── anthropic_service.py # AI/LLM service
└── tools/
├── jira_tool.py # Jira API integration
└── github_tool.py # GitHub API integration
- Python 3.8+
- Anthropic API key
- Jira Cloud instance
- GitHub repository
- Slack app with bot permissions
slack-bolt- Slack bot frameworkanthropic- Claude AI integrationPyGithub- GitHub API clientjira- Jira API clientpython-dotenv- Environment variable management
JIRA_ISSUE_TYPE: Default issue type (Task, Bug, Story, etc.)JIRA_PROJECT_KEY: Project key for ticket creation
GITHUB_DEFAULT_BRANCH: Default branch for PR creation- Repository must have write permissions for the bot
- Uses Claude 3.5 Sonnet for bug analysis and fix generation
- Configurable temperature and token limits
- Bot not responding: Check Slack app permissions and token validity
- Jira ticket creation fails: Verify project key and issue type exist
- GitHub PR creation fails: Ensure repository access and branch permissions
- AI fix generation fails: Check Anthropic API key and quota
The bot outputs detailed logs to help diagnose issues:
- Workflow progress tracking
- API call results
- Error messages with context
config.py- Configuration managementmcp_server.py- Main workflow logicslack_bot.py- Slack bot implementationservices/- External service integrationstools/- API tool implementations
- Extend the workflow in
mcp_server.py - Add new tools in
tools/directory - Update configuration in
config.py - Test with the Slack bot
[Add your license information here]
For issues and questions, please create an issue or contact the development team.