Break down a Jira ticket into beads (feature + tasks) for agent implementation. Creates properly structured parent-child relationships and task dependencies.
This skill breaks down a Jira ticket into properly structured beads that can be implemented by agents using the ralph.sh script. It creates:
--parentjira-cli installed and authenticated (via ~/.netrc)bd (beads) CLI configured in the repobd init)jira issue view <TICKET-ID> --comments 5
Understand:
Break the work into tasks that:
Common task patterns:
bd create --title="<TICKET-ID>: <Brief description>" \
--type=feature \
--priority=2 \
--description="## Context
<Paste or summarize the Jira ticket context>
## Acceptance Criteria
<Paste or summarize acceptance criteria>
## Tasks
This feature is broken into the following tasks (see children)."
Capture the feature bead ID (e.g., main-abc) for use as parent.
For each task, create a bead with --parent pointing to the feature:
bd create --title="<Descriptive task title>" \
--type=task \
--priority=2 \
--parent=<FEATURE-BEAD-ID> \
--description="## Context
<Why this task is needed, what it accomplishes>
## Acceptance Criteria
- <Specific, verifiable condition 1>
- <Specific, verifiable condition 2>
- <etc>"
Task title guidelines:
Use bd dep add to establish ordering. The syntax is:
bd dep add <blocked-task> <blocking-task>
# Meaning: <blocked-task> depends on <blocking-task>
Example dependency chain:
# Task B depends on Task A (A must complete before B)
bd dep add <task-b-id> <task-a-id>
# Task C depends on Task B
bd dep add <task-c-id> <task-b-id>
Common dependency patterns:
Type changes first:
bd dep add <implementation-task> <type-task>
Core before UI:
bd dep add <ui-task> <core-task>
Mocks before tests:
bd dep add <test-task> <mock-task>
Fan-out pattern (multiple tasks depend on one):
bd dep add <task-b> <task-a>
bd dep add <task-c> <task-a>
bd dep add <task-d> <task-a>
# Show feature with children
bd show <FEATURE-BEAD-ID>
# Check what's ready to work
bd ready
# Check what's blocked
bd blocked
Jira ticket: HHMM-804 - Don't show $0 when balance is undefined
Feature bead:
bd create --title="HHMM-804: Don't show \$0 when balance is undefined" \
--type=feature --priority=2
# Returns: main-cu0
Task beads:
# Layer 1: Type changes (no dependencies)
bd create --title="Update NetWorthAccount type to allow undefined balance" \
--type=task --priority=2 --parent=main-cu0 \
--description="## Context
The NetWorthAccount type currently requires a balance. We need to make it optional.
## Acceptance Criteria
- balance field allows undefined/null
- Type changes compile
- Downstream aware of change"
# Returns: main-6nj
# Layer 2: Core implementation (depends on type)
bd create --title="Update convert-to-net-worth-account.ts to not default balance to 0" \
--type=task --priority=2 --parent=main-cu0 \
--description="..."
# Returns: main-r57
bd dep add main-r57 main-6nj # r57 depends on 6nj
# Layer 2: Mock utilities (depends on type)
bd create --title="Update mock-net-worth-account.ts test utilities" \
--type=task --priority=2 --parent=main-cu0 \
--description="..."
# Returns: main-jjc
bd dep add main-jjc main-6nj # jjc depends on 6nj
# Layer 3: Component updates (depend on core)
bd create --title="Update web components to handle undefined balances" \
--type=task --priority=2 --parent=main-cu0 \
--description="..."
# Returns: main-yh8
bd dep add main-yh8 main-r57 # yh8 depends on r57
# Layer 4: Tests (depend on mocks and implementation)
bd create --title="Update existing tests for undefined balance handling" \
--type=task --priority=2 --parent=main-cu0 \
--description="..."
# Returns: main-ycu
bd dep add main-ycu main-jjc # ycu depends on jjc (mocks)
bd dep add main-ycu main-r57 # ycu depends on r57 (implementation)
Resulting structure:
main-cu0 (feature) - HHMM-804: Don't show $0...
├── main-6nj (task) - Update type [READY]
├── main-r57 (task) - Update converter [blocked by 6nj]
├── main-jjc (task) - Update mocks [blocked by 6nj]
├── main-yh8 (task) - Update components [blocked by r57]
└── main-ycu (task) - Update tests [blocked by r57, jjc]
Too big (split it):
Just right:
Too small (combine):
After creating beads, use ralph.sh (aliased as r) to implement:
r HHMM-804 # Work sequentially (safe)
r HHMM-804 --auto # Skip confirmations
r HHMM-804 --parallel # Parallel (use with caution)
The script will:
--parentbd ready--parent=<feature-id>bd dep addbd show <feature-id> and bd readyr <TICKET-ID> to start implementation