fn list(status?: string, type?: string, assignee?: string, limit?: number)
List BD issues with optional filters
| Argument | Type | Required | Description |
|---|
| status? | string | no | Filter by status |
| type? | string | no | Filter by type |
| assignee? | string | no | Filter by assignee |
| limit? | number | no | Maximum issues to return |
fn query(q: string, limit?: number, includeClosed?: boolean, sort?: enum, reverse?: boolean)
Filter BD issues with bd\'s query language (e.g. "status=open AND type=bug")
| Argument | Type | Required | Description |
|---|
| q | string | yes | bd query language expression, e.g. "status=open AND type=bug" or "priority<=1 AND label=swarm". Comparisons use =, !=, <, <=, >, >= with AND/OR/NOT and parentheses; bd\ |
| limit? | number | no | Maximum issues to return |
| includeClosed? | boolean | no | Include closed issues (bd excludes them by default; needed for status=closed queries) |
| sort? | enum | no | Sort by field (bd's default order otherwise) |
| reverse? | boolean | no | Reverse sort order (has no effect unless sort is set) |
fn ready(assignee?: string, limit?: number)
List BD issues ready to work (no active blockers)
| Argument | Type | Required | Description |
|---|
| assignee? | string | no | Filter to issues assigned to this actor |
| limit? | number | no | Maximum issues to return |
fn show(id: string)
Show details for a BD issue by ID
| Argument | Type | Required | Description |
|---|
| id | string | yes | Issue ID (e.g., bd-mhw-1) |
fn create(title: string, description?: string, type?: string, priority?: number, labels?: array, assignee?: string, due?: string, externalRef?: string, parentId?: string)
Create a new BD issue
| Argument | Type | Required | Description |
|---|
| title | string | yes | Issue title |
| description? | string | no | Issue description |
| type? | string | no | Issue type (bug|feature|task|epic|chore|decision) |
| priority? | number | no | Priority (0-4, 0=highest) |
| labels? | array | no | Labels |
| assignee? | string | no | Assignee |
| due? | string | no | Due date |
| externalRef? | string | no | External reference |
| parentId? | string | no | Parent issue ID |
fn update(id: string, title?: string, description?: string, status?: string, priority?: number, assignee?: string, claim?: boolean, addLabels?: array, removeLabels?: array)
Update a BD issue (fields, labels, or atomic claim via claim: true)
| Argument | Type | Required | Description |
|---|
| id | string | yes | Issue ID (e.g., bd-mhw-1) |
| title? | string | no | New title |
| description? | string | no | New description |
| status? | string | no | New status (open|in_progress|blocked|closed|deferred) |
| priority? | number | no | New priority (0-4, 0=highest) |
| assignee? | string | no | New assignee |
| claim? | boolean | no | Atomically claim the issue (sets assignee to you, status to in_progress) |
| addLabels? | array | no | Labels to add |
| removeLabels? | array | no | Labels to remove |
fn close(id: string, reason?: string)
Close a BD issue by ID, preserving its real fields
| Argument | Type | Required | Description |
|---|
| id | string | yes | Issue ID (e.g., bd-mhw-1) |
| reason? | string | no | Closure reason |
fn reopen(ids: array, reason?: string)
Reopen one or more closed BD issues, optionally with a reason
| Argument | Type | Required | Description |
|---|
| ids | array | yes | Issue IDs to reopen |
| reason? | string | no | Reason for reopening |
fn dep(action?: enum, issueId: string, dependsOnId?: string, direction?: enum)
Manage BD dependencies: add, remove, or list them for an issue
| Argument | Type | Required | Description |
|---|
| action? | enum | no | Dependency action: add makes issueId depend on dependsOnId, remove unlinks them, list returns the dependency issues |
| issueId | string | yes | Issue ID (e.g., bd-mhw-1); for add/remove the side that depends on dependsOnId |
| dependsOnId? | string | no | The issue that issueId depends on (required for add/remove) |
| direction? | enum | no | List direction: down = what issueId depends on, up = what depends on issueId (list only) |
fn reclaim(ids?: array, maxAge?: string)
Revert stale in_progress BD issues (expired lease recovery) back to open
| Argument | Type | Required | Description |
|---|
| ids? | array | no | Only reclaim these issue IDs |
| maxAge? | string | no | Grace window past lease expiry, e.g. 10m or 1h; defaults to bd's own (10m) |
fn graph(rootId?: string, direction?: enum, depth?: number)
Return a BD dependency graph as structured nodes, typed edges, and layers (renderable as Mermaid)
| Argument | Type | Required | Description |
|---|
| rootId? | string | no | Anchor the graph at this issue; omit to graph all open issues |
| direction? | enum | no | downstream = what the root depends on, upstream = what depends on the root (requires rootId), both = the union |
| depth? | number | no | Maximum hops from rootId to include (-1 = unlimited; ignored when rootId is omitted) |