Triage Worker
AI-powered issue and pull request classification.
Queue: triage
Job Flow
- Receive job with issue/PR data
- Fetch issue details from database
- Build Claude prompt with issue context
- Call Anthropic API for classification
- Parse response: type, priority, summary
- Upsert triage fields in database
- Apply labels on GitHub
- Trigger duplicate detection (for issues)
Claude Prompt
The worker constructs a structured prompt asking Claude to classify the issue. The prompt includes:
- Issue title
- Existing labels
- Repository context
- Classification categories (bug, feature, etc.)
- Priority levels (critical, high, medium, low)
Duplicate Detection
After triage, the worker also:
- Generates a 512-dim trigram hash embedding
- Stores in
issue_embeddings - Compares against all existing repo issues
- Creates
duplicate_signalsfor matches ≥ 0.82
Error Handling
- API failures are retried up to 3 times
- Invalid Claude responses are logged and the job fails
- GitHub label application failures don't block the job