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
Separating labels, and labels with spaces
Labels are separated by commas, or by repeating the flag:good first issue:
--quiet.
To find labels already stored this way in an existing database, run bd doctor
and look at the Label Whitespace check. It reports and never fails the run, so
a database with legacy damage still exits 0. Note that bd doctor is not yet
supported in embedded mode (GH#3794 enables embedded checks one at a time), so
this check currently reaches classic and server-mode databases only.
Import and batch ingest are deliberately left alone. They do not normalize,
do not warn, and this is intended rather than an oversight: an import must round
trip — what was exported is what is restored — and quietly rewriting a label on
the way in would make a JSONL file and the database it came from disagree.
Repair is a separate, deliberate act, which is what the bd doctor check above
is for.
Note that an unquoted space is not a label separator either — it ends the
flag’s value, so -l auth backend leaves backend as a stray positional
argument and the command fails.
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:bd create --parent copies the parent’s
labels onto the child by default (see GH#2100). If the epic carries a size marker
(e.g. large or sp:13) and children have their own estimates, every child
will also inherit the epic’s size label — so bd list -l large returns the
whole tree, not just epic-scale work. For per-child size labels, pass
--no-inherit-labels when creating children (team/domain labels you do want
shared can still be added explicitly).
Example:
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
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.
The pattern gives you both: complete history via events, fast queries via labels.
Example: Agent Role States
Common Dimensions
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