Design Philosophy
When to use labels vs. structured fields:-
Structured fields (status, priority, type) → Core workflow state
- Status: Where the issue is in the workflow (
open,in_progress,blocked,closed) - Priority: How urgent (0-4)
- Type: What kind of work (
bug,feature,task,epic,chore)
- Status: Where the issue is in the workflow (
-
Labels → Everything else
- Technical metadata (
backend,frontend,api,database) - Domain/scope (
auth,payments,search,analytics) - Effort estimates (
small,medium,large) - Quality gates (
needs-review,needs-tests,breaking-change) - Team/ownership (
team-infra,team-product) - Release tracking (
v1.0,v2.0,backport-candidate)
- Technical metadata (
Quick Start
Common Label Patterns
1. Technical Component Labels
Identify which part of the system:2. Domain/Feature Area
Group by business domain:3. Size/Effort Estimates
Quick effort indicators:4. Quality Gates
Track what’s needed before closing:5. Release Management
Track release targeting:6. Team/Ownership
Indicate ownership or interest:7. Special Markers
Process or workflow flags:Filtering by Labels
AND Filtering (—label)
All specified labels must be present:OR Filtering (—label-any)
At least one specified label must be present:Combining AND/OR
Mix both filters for complex queries:Workflow Examples
Triage Workflow
Quality Gate Workflow
Release Planning
Component-Based Work Distribution
Label Management
Listing Labels
Bulk Operations
Add labels in batch during creation:Integration with Git Workflow
Labels are stored in the Dolt database and synced automatically with all issue data:Markdown Import/Export
Labels are preserved when importing from markdown:Best Practices
1. Establish Conventions Early
Document your team’s label taxonomy:2. Don’t Overuse Labels
Labels are flexible, but too many can cause confusion. Prefer:- 5-10 core technical labels (
backend,frontend,api, etc.) - 3-5 domain labels per project
- Standard process labels (
needs-review,needs-tests) - Release labels as needed
3. Clean Up Unused Labels
Periodically review:4. Use Labels for Filtering, Not Search
Labels are for categorization, not free-text search:- ✅ Good:
backend,auth,urgent - ❌ Bad:
fix-the-login-bug,john-asked-for-this
5. Combine with Dependencies
Labels + dependencies = powerful organization:AI Agent Usage
Labels are especially useful for AI agents managing complex workflows:Labels as State Cache
Labels can cache operational state for fast queries, enabling patterns where beads track both immutable history (events) and current state (labels).The Pattern
Convention:<dimension>:<value>
Examples:
patrol:muted/patrol:active- patrol suppression statemode:degraded/mode:normal- operational modestatus:idle/status:working- worker statushealth:healthy/health:failing- component health
- Create an event bead (full context, immutable history)
- Update the role bead’s labels (current state cache)
Why This Pattern?
Fast queries without event scanning:Common State Dimensions
| Dimension | Values | Use Case |
|---|---|---|
patrol: | active, muted | Patrol cycle suppression |
mode: | normal, degraded, maintenance | Operational mode |
status: | idle, working, blocked | Worker activity |
health: | healthy, warning, failing | Component health |
lock: | unlocked, locked | Exclusive access control |
State Transitions
Always create an event before changing state labels:Querying State
Best Practices
- Use namespaced dimensions - Prefix with role type if ambiguous
- Keep value sets small - 2-4 values per dimension
- Document valid values - List allowed values in role docs
- Always create events first - Never update labels without history
- Treat labels as ephemeral - Rebuild from events if corrupted
Future Helpers
The pattern suggests helper commands (see bd-7l67):Advanced Patterns
Component Matrix
Track issues across multiple dimensions:Sprint Planning
Technical Debt Tracking
Breaking Change Coordination
Operational State Pattern (Labels as Cache)
For orchestration systems, labels can cache the current operational state of “role beads” (issues representing agents or system components). This enables fast state queries without scanning event history.Convention: <dimension>:<value>
Use colon-separated labels with a dimension prefix and value suffix:
The Pattern
- Create an event bead with full context (immutable, audit trail)
- Update the role bead’s labels to reflect current state (fast lookup)
Why This Pattern?
Events are source of truth. Labels are cache.| Approach | Events Only | Labels as Cache |
|---|---|---|
| Query current state | Scan all events, find latest | bd list --label patrol:muted |
| Query state history | Natural (all events exist) | Query events |
| Audit trail | Complete | Complete (events still exist) |
| Performance | O(n) events | O(1) label lookup |
Example: Agent Role States
Common Dimensions
| Dimension | Values | Use Case |
|---|---|---|
patrol | active, muted, suspended | Agent patrol cycles |
mode | normal, degraded, maintenance | Operational modes |
status | idle, working, blocked | Work state |
health | healthy, warning, failing | Health checks |
sync | current, stale, syncing | Sync state |
Best Practices
- Always create the event first - Labels are cache; events are truth
- Remove old value before adding new - Prevents dimension:value1 + dimension:value2 conflicts
- Use consistent dimension names - Establish team conventions early
- Keep dimensions orthogonal - patrol and mode are independent concerns
Querying State
Helper Commands
For convenience, use these helpers:set-state command atomically:
- Creates an event bead with the reason (source of truth)
- Removes the old dimension label if present
- Adds the new dimension:value label (cache)
Troubleshooting
Labels Not Showing in List
Labels require explicit fetching. Thebd list command shows issues but not labels in human output (only in JSON).
Label Filtering Not Working
Check label names for exact matches (case-sensitive):Syncing Labels
Labels are stored in the Dolt database. If labels seem out of sync:See Also
- README.md - Main documentation
- AGENTS.md - AI agent integration guide
- Advanced Features - Advanced features and configuration