Intelligent Context Automation for Jira Issues
Context Clues automatically generates contextual briefs when Jira issues move to "In Progress" by analyzing related work from both Jira and Notion, then using AI to create intelligent summaries that help developers understand the problem and find relevant resources.
# Clone and install
git clone <repository-url>
cd context-clues
npm install
# Configure environment
cp env.template .env
# Edit .env with your credentials (see Environment Variables section below)# Start the server
npm start
# Visit the OAuth endpoint in your browser
open http://localhost:8080/auth/notion
# Complete the OAuth flow to authenticate with Notion
# Tokens will be automatically stored in ~/.mcp/notion_tokens.jsonnpm run dev- Trigger: Issue β "In Progress"
- URL:
https://<your-service>/jira/context-brief - Headers:
X-Auth-Shared-Secret: <your-secret>,Content-Type: application/json
graph TB
subgraph "External Systems"
JIRA[Jira Cloud]
NOTION[Notion Workspace]
OPENAI[OpenAI API]
end
subgraph "Context Clues Service"
WEBHOOK[Webhook Endpoint]
SEARCH[Search Engine]
AI[AI Service]
COMMENT[Comment Poster]
end
JIRA -->|Webhook| WEBHOOK
WEBHOOK --> SEARCH
SEARCH --> JIRA
SEARCH --> NOTION
SEARCH --> AI
AI --> OPENAI
AI --> COMMENT
COMMENT --> JIRA
- Webhook Processing: Secure HMAC-verified webhook handling
- Intelligent Search: Parallel searches across Jira and Notion
- AI-Powered Briefs: GPT-4o-mini generates contextual summaries
- Secure Integration: Multi-layer security with rate limiting
- Cloud-Native: Deployed on Azure with Kubernetes support
| Document | Description |
|---|---|
| π Architecture Guide | Complete system architecture and components |
| π API Documentation | Detailed API endpoints and examples |
| π Deployment Guide | Azure and Kubernetes deployment instructions |
| π Security Documentation | Security architecture and best practices |
| ποΈ Infrastructure Guide | Azure infrastructure and Pulumi configuration |
| π Data Flow Guide | Complete data processing pipeline |
- Node.js: 18.x LTS or higher
- npm: 9.x or higher
- Docker: 20.x or higher (for containerization)
- Azure CLI: 2.50.0 or higher (for deployment)
# Install dependencies
npm install
# Start development server
npm run dev
# Run tests
npm test
# Build for production
npm run build# Server Configuration
PORT=8080
NODE_ENV=development
SHARED_SECRET=your-random-secret-here
# Jira Configuration
JIRA_BASE=https://yourcompany.atlassian.net
[email protected]
JIRA_API_TOKEN=your-jira-api-token
# OpenAI Configuration
OPENAI_API_KEY=sk-your-openai-api-key
# Notion Configuration (Traditional API - Optional)
NOTION_TOKEN=secret_your-notion-token
# Notion MCP OAuth Configuration (Required for Enhanced Search)
# These are automatically configured during OAuth flow
NOTION_REDIRECT_URI=http://localhost:8080/callback
NOTION_MCP_URL=https://mcp.notion.com/mcp# Deploy infrastructure
cd infrastructure
pulumi up
# Deploy application
az webapp deployment source config-zip \
--resource-group context-clues-sandbox \
--name context-clues-app-sandbox \
--src app.zip# Build and push container
docker build -t contextcluesregistry.azurecr.io/context-clues:v1.0.0 .
docker push contextcluesregistry.azurecr.io/context-clues:v1.0.0
# Deploy to Kubernetes
kubectl apply -f k8s/POST /jira/context-brief- Main webhook endpoint (HMAC secured)GET /health- Health check endpoint
GET /auth/notion- Initiate Notion OAuth flowGET /callback- OAuth callback handlerGET /auth/notion/status- Check OAuth authentication status
POST /test/brief- Simple brief generationPOST /test/webhook- Full webhook simulationPOST /jira/process- Process specific issue by key
- HMAC-SHA256 Verification: Webhook signature validation
- Rate Limiting: 10 requests/minute per IP
- IP Validation: Source IP monitoring and logging
- Input Sanitization: XSS and injection prevention
- Secret Management: Azure Key Vault integration
- Encrypted Transit: HTTPS/TLS for all communications
- Application Insights: Real-time performance monitoring
- Health Checks: Automated service health validation
- Structured Logging: Comprehensive request and error logging
- Alert System: Automated alerts for failures and performance issues
# Test webhook processing
curl -X POST http://localhost:8080/test/brief \
-H "Content-Type: application/json" \
-d '{"title": "Test Issue", "description": "Testing deployment"}'
# Test health endpoint
curl http://localhost:8080/health
# Test specific issue processing
curl -X POST http://localhost:8080/jira/process \
-H "Content-Type: application/json" \
-d '{"key": "PROJECT-123"}'- Parallel Processing: Concurrent Jira and Notion searches
- Horizontal Scaling: Kubernetes auto-scaling (2-10 replicas)
- Caching: In-memory result caching for similar queries
- Optimized Queries: Efficient JQL and Notion search queries
- Least Privilege: Minimal required permissions
- Secret Rotation: Regular credential updates
- Audit Logging: Complete request audit trail
- Network Security: VNet integration and private endpoints
- Compliance: SOC 2, ISO 27001, GDPR compliance
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Check the docs/ directory for detailed guides
- Issues: Report bugs and feature requests via GitHub Issues
- Security: Report security issues privately to the maintainers
jira notion automation context ai webhook azure kubernetes nodejs openai