website/docs/multi-agent/routing.md
Automatic issue routing across repositories.
Routing enables:
Create .beads/routes.jsonl:
{"pattern": "frontend/**", "target": "frontend-repo", "priority": 10}
{"pattern": "backend/**", "target": "backend-repo", "priority": 10}
{"pattern": "docs/**", "target": "docs-repo", "priority": 5}
{"pattern": "*", "target": "main-repo", "priority": 0}
| Field | Description |
|---|---|
pattern | Glob pattern to match |
target | Target repository |
priority | Higher = checked first |
Patterns match against:
Examples:
{"pattern": "frontend/*", "target": "frontend"}
{"pattern": "*api*", "target": "backend"}
{"pattern": "label:docs", "target": "docs-repo"}
# Show routing table
bd routes list
bd routes list --json
# Test routing
bd routes test "Fix frontend button"
bd routes test --label frontend
# Add route
bd routes add "frontend/**" --target frontend-repo --priority 10
# Remove route
bd routes remove "frontend/**"
When creating issues, beads checks routes:
bd create "Fix frontend button alignment" -t bug
# Auto-routed to frontend-repo based on title match
Override with explicit target:
bd create "Fix button" --repo backend-repo
Track dependencies across repos:
# In frontend-repo
bd dep add bd-42 external:backend-repo/bd-100
# View cross-repo deps
bd dep tree bd-42 --cross-repo
Pull related issues from other repos:
# Hydrate issues from related repos
bd hydrate
# Preview hydration
bd hydrate --dry-run
# Hydrate specific repo
bd hydrate --from backend-repo
* pattern with lowest prioritybd routes test before committing