Skip to main content
Labels provide flexible, multi-dimensional categorization for issues beyond the structured fields (status, priority, type). Use labels for cross-cutting concerns, technical metadata, and contextual tagging without schema changes.

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)
  • 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)

Quick Start

Separating labels, and labels with spaces

Labels are separated by commas, or by repeating the flag:
A space does not separate labels. bd honours the word boundaries your shell already decided, exactly as it does for a filename containing a space — so all three of these create the single label good first issue:
Because that is also what a missed comma looks like, bd warns when it stores a label containing a space:
The warning is advice, not an error — the label is stored as asked. Silence it with --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:
Example:

2. Domain/Feature Area

Group by business domain:
Example:

3. Size/Effort Estimates

Quick effort indicators:
Interaction with label inheritance: 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:
Example:

5. Release Management

Track release targeting:
Example:

6. Team/Ownership

Indicate ownership or interest:
Example:

7. Special Markers

Process or workflow flags:
Example:

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

Output:

Bulk Operations

Add labels in batch during creation:
Script to add label to multiple issues:
Remove label from multiple issues:

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:
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:
Example agent workflow:

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 state
  • mode:degraded / mode:normal - operational mode
  • status:idle / status:working - worker status
  • health:healthy / health:failing - component health
Implementation:
  1. Create an event bead (full context, immutable history)
  2. Update the role bead’s labels (current state cache)
Key principle: Events are the source of truth. Labels are a cache for fast queries.

Why This Pattern?

Fast queries without event scanning:
History preserved:
State recovery:

Common State Dimensions

State Transitions

Always create an event before changing state labels:

Querying State

Best Practices

  1. Use namespaced dimensions - Prefix with role type if ambiguous
  2. Keep value sets small - 2-4 values per dimension
  3. Document valid values - List allowed values in role docs
  4. Always create events first - Never update labels without history
  5. Treat labels as ephemeral - Rebuild from events if corrupted

Future Helpers

The pattern suggests helper commands (see bd-7l67):
Until helpers exist, use the manual pattern above.

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

  1. Create an event bead with full context (immutable, audit trail)
  2. 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

  1. Always create the event first - Labels are cache; events are truth
  2. Remove old value before adding new - Prevents dimension:value1 + dimension:value2 conflicts
  3. Use consistent dimension names - Establish team conventions early
  4. Keep dimensions orthogonal - patrol and mode are independent concerns

Querying State

Helper Commands

For convenience, use these helpers:
The set-state command atomically:
  1. Creates an event bead with the reason (source of truth)
  2. Removes the old dimension label if present
  3. Adds the new dimension:value label (cache)
See bd set-state for full command reference.

Troubleshooting

Labels Not Showing in List

Labels require explicit fetching. The bd 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