ai-workflow-init 6.6.1 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/clarify-requirements.md +5 -3
- package/.claude/commands/create-plan.md +80 -70
- package/.claude/commands/execute-plan.md +3 -44
- package/.claude/commands/manage-epic.md +227 -0
- package/README.md +4 -88
- package/docs/ai/planning/epic-template.md +16 -125
- package/docs/ai/planning/feature-template.md +62 -26
- package/docs/ai/requirements/req-template.md +2 -1
- package/package.json +1 -1
- package/.claude/commands/beads-breakdown.md +0 -278
- package/.claude/commands/beads-create-epic-plan.md +0 -205
- package/.claude/commands/beads-done.md +0 -248
- package/.claude/commands/beads-next.md +0 -260
- package/.claude/commands/beads-status.md +0 -247
- package/.claude/commands/init-chat.md +0 -38
- package/.claude/commands/modify-plan.md +0 -208
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: beads-create-epic-plan
|
|
3
|
-
description: Creates a high-level epic plan document for architecture, flow, and task overview.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Goal
|
|
7
|
-
|
|
8
|
-
Create a high-level epic plan document (`docs/ai/planning/epic-{name}.md`) that focuses on architecture, data flow, and task overview. This plan is NOT executable - it serves as a reference for task-level plans.
|
|
9
|
-
|
|
10
|
-
## Workflow Alignment
|
|
11
|
-
|
|
12
|
-
- Provide brief status updates (1–3 sentences) before/after important actions.
|
|
13
|
-
- Generate plan automatically after gathering context.
|
|
14
|
-
- Link to Beads epic and requirement doc if available.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Step 1: Load Context
|
|
19
|
-
|
|
20
|
-
### 1a: Check for Current Epic Context
|
|
21
|
-
|
|
22
|
-
**Read:** `.beads/current-epic.json` (created by `/beads-breakdown`)
|
|
23
|
-
|
|
24
|
-
If exists:
|
|
25
|
-
- Extract epic_id, epic_title, source_file, tasks
|
|
26
|
-
- Use as primary context
|
|
27
|
-
|
|
28
|
-
If not exists:
|
|
29
|
-
- Ask user for epic ID or title
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
AskUserQuestion(questions=[{
|
|
33
|
-
question: "Which epic would you like to create a plan for?",
|
|
34
|
-
header: "Epic",
|
|
35
|
-
options: [
|
|
36
|
-
{ label: "Enter epic ID", description: "e.g., bd-auth or project-abc" },
|
|
37
|
-
{ label: "Enter epic title", description: "I'll search for it in Beads" }
|
|
38
|
-
],
|
|
39
|
-
multiSelect: false
|
|
40
|
-
}])
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Then run: `bd list --type epic` to find matching epic
|
|
44
|
-
|
|
45
|
-
### 1b: Load Epic Details from Beads
|
|
46
|
-
|
|
47
|
-
**Run:** `bd show {epic-id} --json`
|
|
48
|
-
|
|
49
|
-
Extract:
|
|
50
|
-
- Epic title, description
|
|
51
|
-
- Child tasks (IDs, titles, priorities, dependencies)
|
|
52
|
-
- Current status
|
|
53
|
-
|
|
54
|
-
### 1c: Load Requirement Doc (if linked)
|
|
55
|
-
|
|
56
|
-
If `source_file` exists in context:
|
|
57
|
-
- Read requirement doc
|
|
58
|
-
- Extract architecture hints, constraints, acceptance criteria
|
|
59
|
-
|
|
60
|
-
### 1d: Explore Codebase (optional)
|
|
61
|
-
|
|
62
|
-
**Tool:** Task(
|
|
63
|
-
subagent_type='Explore',
|
|
64
|
-
thoroughness='quick',
|
|
65
|
-
prompt="Identify existing architecture patterns relevant to {epic title}. Find similar features, common patterns, and key integration points. Return summarized findings."
|
|
66
|
-
)
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## Step 2: Generate Epic Plan
|
|
71
|
-
|
|
72
|
-
**Load template:** Read `docs/ai/planning/epic-template.md`
|
|
73
|
-
|
|
74
|
-
**Auto-derive epic name:**
|
|
75
|
-
- From epic title: "User Authentication System" → `epic-auth-system`
|
|
76
|
-
- Kebab-case, concise
|
|
77
|
-
|
|
78
|
-
**Generate content sections:**
|
|
79
|
-
|
|
80
|
-
### Section 1: Overview
|
|
81
|
-
- Problem statement from requirement doc or infer from epic title
|
|
82
|
-
- Goals from epic description
|
|
83
|
-
- Success metrics (derive from acceptance criteria if available)
|
|
84
|
-
|
|
85
|
-
### Section 2: Architecture
|
|
86
|
-
- Propose high-level architecture based on:
|
|
87
|
-
- Codebase exploration findings
|
|
88
|
-
- Similar features in codebase
|
|
89
|
-
- Standard patterns for this type of feature
|
|
90
|
-
- Keep diagram simple (ASCII art)
|
|
91
|
-
- List key components and their responsibilities
|
|
92
|
-
|
|
93
|
-
### Section 3: Task Breakdown
|
|
94
|
-
- Pull from Beads (via `bd show {epic-id}`)
|
|
95
|
-
- Include: task ID, title, priority, status, blocked by
|
|
96
|
-
- Show dependency graph
|
|
97
|
-
- Leave "Plan Doc" column empty (filled when `/create-plan` runs)
|
|
98
|
-
|
|
99
|
-
### Section 4: Data Flow
|
|
100
|
-
- Describe primary user/data flow
|
|
101
|
-
- Include error handling flow
|
|
102
|
-
- Keep high-level (details go in task plans)
|
|
103
|
-
|
|
104
|
-
### Section 5: API Contracts (if applicable)
|
|
105
|
-
- Only if epic involves API changes
|
|
106
|
-
- High-level endpoints overview
|
|
107
|
-
- Key data models (schema outline)
|
|
108
|
-
|
|
109
|
-
### Section 6: Key Decisions
|
|
110
|
-
- Document major architectural decisions
|
|
111
|
-
- Include alternatives considered and trade-offs
|
|
112
|
-
|
|
113
|
-
### Section 7: Risks & Mitigations
|
|
114
|
-
- Technical risks
|
|
115
|
-
- Dependency risks
|
|
116
|
-
- Timeline risks
|
|
117
|
-
|
|
118
|
-
### Section 8: Dependencies
|
|
119
|
-
- External services/APIs
|
|
120
|
-
- Internal teams/services
|
|
121
|
-
- Blockers that must be resolved
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
## Step 3: Create Epic Plan File
|
|
126
|
-
|
|
127
|
-
**File path:** `docs/ai/planning/epic-{name}.md`
|
|
128
|
-
|
|
129
|
-
**Frontmatter:**
|
|
130
|
-
```yaml
|
|
131
|
-
---
|
|
132
|
-
beads_epic: {epic-id}
|
|
133
|
-
requirement: {source_file or null}
|
|
134
|
-
---
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
**If file already exists:**
|
|
138
|
-
1. Backup to: `docs/ai/planning/archive/epic-{name}_{timestamp}.md`
|
|
139
|
-
2. Notify user: "Previous version backed up to archive/"
|
|
140
|
-
3. Overwrite main file
|
|
141
|
-
|
|
142
|
-
**Write file:** Write(file_path=..., content=...)
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Step 4: Update Context File
|
|
147
|
-
|
|
148
|
-
**Update:** `.beads/current-epic.json`
|
|
149
|
-
|
|
150
|
-
Add:
|
|
151
|
-
```json
|
|
152
|
-
{
|
|
153
|
-
"epic_plan": "docs/ai/planning/epic-{name}.md",
|
|
154
|
-
"updated_at": "{ISO timestamp}"
|
|
155
|
-
}
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## Step 5: Output Summary
|
|
161
|
-
|
|
162
|
-
```
|
|
163
|
-
✓ Created epic plan: docs/ai/planning/epic-{name}.md
|
|
164
|
-
|
|
165
|
-
Epic: {epic-id} "{Epic Title}"
|
|
166
|
-
Tasks: {count} ({ready} ready, {blocked} blocked)
|
|
167
|
-
|
|
168
|
-
Sections created:
|
|
169
|
-
✓ Overview
|
|
170
|
-
✓ Architecture
|
|
171
|
-
✓ Task Breakdown ({task count} tasks)
|
|
172
|
-
✓ Data Flow
|
|
173
|
-
{✓ API Contracts (if included)}
|
|
174
|
-
✓ Key Decisions
|
|
175
|
-
✓ Risks & Mitigations
|
|
176
|
-
✓ Dependencies
|
|
177
|
-
|
|
178
|
-
Next steps:
|
|
179
|
-
1. Review and refine the epic plan
|
|
180
|
-
2. Run `/beads-next` to claim a task
|
|
181
|
-
3. Run `/create-plan` to create detailed plan for the claimed task
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
---
|
|
185
|
-
|
|
186
|
-
## Notes
|
|
187
|
-
|
|
188
|
-
- **High-level only**: Epic plan focuses on architecture and overview, NOT implementation details
|
|
189
|
-
- **Not executable**: Use `/execute-plan` only on task-level plans (feature-*.md)
|
|
190
|
-
- **Reference document**: Task plans reference this for architectural context
|
|
191
|
-
- **Sync with Beads**: Task breakdown table should match Beads state
|
|
192
|
-
- **Update manually**: Architecture decisions and risks should be updated as epic progresses
|
|
193
|
-
|
|
194
|
-
### What Goes Where
|
|
195
|
-
|
|
196
|
-
| Content | Epic Plan | Task Plan |
|
|
197
|
-
|---------|-----------|-----------|
|
|
198
|
-
| Architecture overview | ✓ | Reference only |
|
|
199
|
-
| Data flow diagrams | ✓ | Detailed flow if needed |
|
|
200
|
-
| Task list & dependencies | ✓ | Single task focus |
|
|
201
|
-
| API contracts (overview) | ✓ | Detailed specs |
|
|
202
|
-
| Implementation phases | ✗ | ✓ |
|
|
203
|
-
| Pseudo-code | ✗ | ✓ |
|
|
204
|
-
| File-level changes | ✗ | ✓ |
|
|
205
|
-
| Acceptance criteria | High-level | Detailed per task |
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: beads-done
|
|
3
|
-
description: Closes current task, syncs to git, clears context, and shows next ready tasks.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Goal
|
|
7
|
-
|
|
8
|
-
Mark the current Beads task as complete, sync changes to git, clear the task context, and show what tasks are now ready (including any that were unblocked).
|
|
9
|
-
|
|
10
|
-
## Workflow Alignment
|
|
11
|
-
|
|
12
|
-
- Provide brief status updates (1–3 sentences) before/after important actions.
|
|
13
|
-
- Confirm before closing if there are uncommitted changes.
|
|
14
|
-
- Always sync to git after closing.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Step 1: Load Current Task Context
|
|
19
|
-
|
|
20
|
-
**Read:** `.beads/current-task.json`
|
|
21
|
-
|
|
22
|
-
If exists:
|
|
23
|
-
- Extract task_id, task_title, epic_id
|
|
24
|
-
- Proceed to Step 2
|
|
25
|
-
|
|
26
|
-
If not exists:
|
|
27
|
-
- Ask user which task to close
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
AskUserQuestion(questions=[{
|
|
31
|
-
question: "No active task context found. Which task would you like to close?",
|
|
32
|
-
header: "Close Task",
|
|
33
|
-
options: [
|
|
34
|
-
{ label: "Enter task ID", description: "e.g., bd-auth.1" },
|
|
35
|
-
{ label: "Show in-progress tasks", description: "List tasks I'm working on" },
|
|
36
|
-
{ label: "Cancel", description: "Don't close anything" }
|
|
37
|
-
],
|
|
38
|
-
multiSelect: false
|
|
39
|
-
}])
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
If "Show in-progress tasks":
|
|
43
|
-
- Run: `bd list --status=in_progress`
|
|
44
|
-
- Display list and ask user to select
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Step 2: Pre-Close Checks
|
|
49
|
-
|
|
50
|
-
### 2a: Check Git Status
|
|
51
|
-
|
|
52
|
-
**Run:** `git status --porcelain`
|
|
53
|
-
|
|
54
|
-
If uncommitted changes exist:
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
⚠️ Uncommitted changes detected:
|
|
58
|
-
|
|
59
|
-
{list of modified/added files}
|
|
60
|
-
|
|
61
|
-
These changes should be committed before closing the task.
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
AskUserQuestion(questions=[{
|
|
66
|
-
question: "You have uncommitted changes. How would you like to proceed?",
|
|
67
|
-
header: "Git Status",
|
|
68
|
-
options: [
|
|
69
|
-
{ label: "Commit changes first", description: "I'll commit, then run /beads-done again" },
|
|
70
|
-
{ label: "Close anyway", description: "Close task without committing (changes will remain staged)" },
|
|
71
|
-
{ label: "Cancel", description: "Don't close the task yet" }
|
|
72
|
-
],
|
|
73
|
-
multiSelect: false
|
|
74
|
-
}])
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
If "Commit changes first": Exit and let user commit.
|
|
78
|
-
If "Cancel": Exit without closing.
|
|
79
|
-
If "Close anyway": Proceed to Step 3.
|
|
80
|
-
|
|
81
|
-
### 2b: Check Planning Doc Status
|
|
82
|
-
|
|
83
|
-
**Read task details:** `bd show {task-id} --json`
|
|
84
|
-
|
|
85
|
-
Check if plan doc exists (from notes or known path).
|
|
86
|
-
|
|
87
|
-
If plan doc exists:
|
|
88
|
-
- Read planning doc
|
|
89
|
-
- Check if all phases are complete (all `[x]` checkboxes)
|
|
90
|
-
- If incomplete phases exist, warn user:
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
⚠️ Planning doc has incomplete tasks:
|
|
94
|
-
|
|
95
|
-
Phase 2: API Implementation
|
|
96
|
-
- [ ] Task 3: Incomplete
|
|
97
|
-
- [ ] Task 4: Incomplete
|
|
98
|
-
|
|
99
|
-
Are you sure you want to close this task?
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
AskUserQuestion(questions=[{
|
|
104
|
-
question: "Planning doc has incomplete tasks. Close anyway?",
|
|
105
|
-
header: "Incomplete",
|
|
106
|
-
options: [
|
|
107
|
-
{ label: "Close anyway", description: "Mark task as complete despite incomplete plan items" },
|
|
108
|
-
{ label: "Cancel", description: "Keep task open and finish the work" }
|
|
109
|
-
],
|
|
110
|
-
multiSelect: false
|
|
111
|
-
}])
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## Step 3: Close Task
|
|
117
|
-
|
|
118
|
-
### 3a: Ask for Close Reason (optional)
|
|
119
|
-
|
|
120
|
-
```
|
|
121
|
-
AskUserQuestion(questions=[{
|
|
122
|
-
question: "Add a closing note? (optional)",
|
|
123
|
-
header: "Close Note",
|
|
124
|
-
options: [
|
|
125
|
-
{ label: "Completed successfully", description: "Task finished as planned" },
|
|
126
|
-
{ label: "Completed with modifications", description: "Finished but deviated from original plan" },
|
|
127
|
-
{ label: "Custom note", description: "Enter a custom closing note" },
|
|
128
|
-
{ label: "No note", description: "Close without a note" }
|
|
129
|
-
],
|
|
130
|
-
multiSelect: false
|
|
131
|
-
}])
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### 3b: Execute Close
|
|
135
|
-
|
|
136
|
-
**Run:** `bd close {task-id} --reason "{close reason}"`
|
|
137
|
-
|
|
138
|
-
Capture output for confirmation.
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## Step 4: Update Epic Plan (if exists)
|
|
143
|
-
|
|
144
|
-
**Read:** `.beads/current-epic.json`
|
|
145
|
-
|
|
146
|
-
If epic_plan exists:
|
|
147
|
-
- Read epic plan file
|
|
148
|
-
- Update Task Breakdown table:
|
|
149
|
-
- Change status from `in_progress` to `closed`
|
|
150
|
-
- Add plan doc path if created
|
|
151
|
-
|
|
152
|
-
**Edit:** `docs/ai/planning/epic-{name}.md`
|
|
153
|
-
|
|
154
|
-
Update the task row:
|
|
155
|
-
```markdown
|
|
156
|
-
| {task-id} | {title} | P{n} | closed | - | feature-{name}.md |
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
## Step 5: Sync to Git
|
|
162
|
-
|
|
163
|
-
**Run:** `bd sync`
|
|
164
|
-
|
|
165
|
-
This will:
|
|
166
|
-
- Export Beads changes to JSONL
|
|
167
|
-
- Commit Beads changes
|
|
168
|
-
- Push to remote
|
|
169
|
-
|
|
170
|
-
Display sync result.
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
## Step 6: Clear Context
|
|
175
|
-
|
|
176
|
-
**Delete:** `.beads/current-task.json`
|
|
177
|
-
|
|
178
|
-
Context is cleared so `/create-plan` won't auto-link to this closed task.
|
|
179
|
-
|
|
180
|
-
---
|
|
181
|
-
|
|
182
|
-
## Step 7: Show Next Ready Tasks
|
|
183
|
-
|
|
184
|
-
**Run:** `bd ready --json`
|
|
185
|
-
|
|
186
|
-
Check if any tasks were unblocked by closing this task.
|
|
187
|
-
|
|
188
|
-
**Output:**
|
|
189
|
-
|
|
190
|
-
```
|
|
191
|
-
✓ Closed: {task-id} "{Task Title}"
|
|
192
|
-
✓ Synced to git
|
|
193
|
-
|
|
194
|
-
{If tasks were unblocked:}
|
|
195
|
-
🔓 Unblocked by this completion:
|
|
196
|
-
- {unblocked-task-id} "{title}" [now ready]
|
|
197
|
-
- {unblocked-task-id} "{title}" [now ready]
|
|
198
|
-
|
|
199
|
-
{Show ready tasks:}
|
|
200
|
-
📋 Ready to work ({count}):
|
|
201
|
-
1. {task-id} "{title}" (P{n})
|
|
202
|
-
2. {task-id} "{title}" (P{n})
|
|
203
|
-
|
|
204
|
-
{Show epic progress:}
|
|
205
|
-
📊 Epic Progress: {epic-id}
|
|
206
|
-
Completed: {closed}/{total} tasks ({percentage}%)
|
|
207
|
-
Remaining: {open + in_progress} tasks
|
|
208
|
-
|
|
209
|
-
Next steps:
|
|
210
|
-
- Run `/beads-next` to claim next task
|
|
211
|
-
- Run `/beads-status` to see full epic progress
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
**If all tasks in epic are complete:**
|
|
215
|
-
|
|
216
|
-
```
|
|
217
|
-
🎉 Epic Complete: {epic-id} "{Epic Title}"
|
|
218
|
-
|
|
219
|
-
All {total} tasks have been completed!
|
|
220
|
-
|
|
221
|
-
Next steps:
|
|
222
|
-
- Review epic plan for any follow-ups
|
|
223
|
-
- Close epic: `bd close {epic-id} --reason "All tasks complete"`
|
|
224
|
-
- Start new work: `/beads-breakdown`
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
---
|
|
228
|
-
|
|
229
|
-
## Notes
|
|
230
|
-
|
|
231
|
-
- **Git sync required**: Always syncs to git after closing to persist state
|
|
232
|
-
- **Context cleanup**: Clears current-task.json to prevent stale context
|
|
233
|
-
- **Epic progress**: Shows progress after each task completion
|
|
234
|
-
- **Unblocked tasks**: Highlights tasks that became ready after this completion
|
|
235
|
-
|
|
236
|
-
### Close vs Cancel
|
|
237
|
-
|
|
238
|
-
| Action | When to use |
|
|
239
|
-
|--------|-------------|
|
|
240
|
-
| Close (this command) | Task is complete, work is done |
|
|
241
|
-
| Cancel (`bd update --status open`) | Task is abandoned, need to unclaim |
|
|
242
|
-
|
|
243
|
-
### Error Recovery
|
|
244
|
-
|
|
245
|
-
If close fails:
|
|
246
|
-
- Check `bd doctor` for sync issues
|
|
247
|
-
- Manually run `bd sync` to retry
|
|
248
|
-
- Check git status for conflicts
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: beads-next
|
|
3
|
-
description: Shows ready tasks, allows claiming a task, and sets context for /create-plan.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Goal
|
|
7
|
-
|
|
8
|
-
Show available Beads tasks (in_progress and ready), let user claim a task, and set context so `/create-plan` knows which Beads task to link.
|
|
9
|
-
|
|
10
|
-
## Workflow Alignment
|
|
11
|
-
|
|
12
|
-
- Provide brief status updates (1–3 sentences) before/after important actions.
|
|
13
|
-
- Always show in_progress tasks first (user may have work in progress from previous session).
|
|
14
|
-
- Set context file for seamless integration with `/create-plan`.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Step 1: Check Current State
|
|
19
|
-
|
|
20
|
-
### 1a: Load Epic Context (if exists)
|
|
21
|
-
|
|
22
|
-
**Read:** `.beads/current-epic.json`
|
|
23
|
-
|
|
24
|
-
If exists:
|
|
25
|
-
- Use epic_id to filter tasks
|
|
26
|
-
- Show only tasks from current epic
|
|
27
|
-
|
|
28
|
-
If not exists:
|
|
29
|
-
- Show all tasks across all epics
|
|
30
|
-
|
|
31
|
-
### 1b: Get In-Progress Tasks
|
|
32
|
-
|
|
33
|
-
**Run:** `bd list --status=in_progress --json`
|
|
34
|
-
|
|
35
|
-
Parse output to get tasks currently being worked on.
|
|
36
|
-
|
|
37
|
-
### 1c: Get Ready Tasks
|
|
38
|
-
|
|
39
|
-
**Run:** `bd ready --json`
|
|
40
|
-
|
|
41
|
-
Parse output to get tasks with no blockers.
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Step 2: Display Task Overview
|
|
46
|
-
|
|
47
|
-
**Format output:**
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
## Beads Task Overview
|
|
51
|
-
|
|
52
|
-
{If epic context exists:}
|
|
53
|
-
**Current Epic**: {epic-id} "{Epic Title}"
|
|
54
|
-
**Epic Plan**: {epic-plan path or "Not created yet"}
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
### 🔄 In Progress ({count})
|
|
59
|
-
|
|
60
|
-
{If in_progress tasks exist:}
|
|
61
|
-
| Task ID | Title | Epic | Plan Doc |
|
|
62
|
-
|---------|-------|------|----------|
|
|
63
|
-
| {task-id} | {title} | {epic-id} | {plan path or "-"} |
|
|
64
|
-
|
|
65
|
-
{If no in_progress:}
|
|
66
|
-
No tasks in progress.
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
### ✅ Ready to Start ({count})
|
|
71
|
-
|
|
72
|
-
{If ready tasks exist:}
|
|
73
|
-
| # | Task ID | Title | Priority | Epic |
|
|
74
|
-
|---|---------|-------|----------|------|
|
|
75
|
-
| 1 | {task-id} | {title} | P{n} | {epic-id} |
|
|
76
|
-
| 2 | {task-id} | {title} | P{n} | {epic-id} |
|
|
77
|
-
| 3 | {task-id} | {title} | P{n} | {epic-id} |
|
|
78
|
-
|
|
79
|
-
{If no ready tasks:}
|
|
80
|
-
No tasks ready. Check blocked tasks with `bd blocked`.
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
### 🚫 Blocked ({count})
|
|
85
|
-
|
|
86
|
-
{task-id}: blocked by {blocker-id} "{blocker-title}"
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## Step 3: Ask User Action
|
|
92
|
-
|
|
93
|
-
**If in_progress tasks exist:**
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
AskUserQuestion(questions=[{
|
|
97
|
-
question: "You have tasks in progress. What would you like to do?",
|
|
98
|
-
header: "Action",
|
|
99
|
-
options: [
|
|
100
|
-
{ label: "Continue {task-id}", description: "Resume working on '{task-title}'" },
|
|
101
|
-
{ label: "Claim new task", description: "Pick a different task from ready list" },
|
|
102
|
-
{ label: "View task details", description: "Show full details of a specific task" }
|
|
103
|
-
],
|
|
104
|
-
multiSelect: false
|
|
105
|
-
}])
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
**If no in_progress, but ready tasks exist:**
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
AskUserQuestion(questions=[{
|
|
112
|
-
question: "Which task would you like to claim?",
|
|
113
|
-
header: "Claim Task",
|
|
114
|
-
options: [
|
|
115
|
-
{ label: "{task-1-id}: {title}", description: "Priority: P{n}" },
|
|
116
|
-
{ label: "{task-2-id}: {title}", description: "Priority: P{n}" },
|
|
117
|
-
{ label: "{task-3-id}: {title}", description: "Priority: P{n}" },
|
|
118
|
-
{ label: "View details first", description: "Show full details before claiming" }
|
|
119
|
-
],
|
|
120
|
-
multiSelect: false
|
|
121
|
-
}])
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
**If no tasks available:**
|
|
125
|
-
|
|
126
|
-
```
|
|
127
|
-
No tasks available to work on.
|
|
128
|
-
|
|
129
|
-
Options:
|
|
130
|
-
- Run `bd blocked` to see what's blocking tasks
|
|
131
|
-
- Run `/beads-breakdown` to create new tasks
|
|
132
|
-
- Run `bd list` to see all tasks
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## Step 4: Handle User Selection
|
|
138
|
-
|
|
139
|
-
### If "Continue {task-id}" (resume in_progress):
|
|
140
|
-
|
|
141
|
-
1. Load task details: `bd show {task-id} --json`
|
|
142
|
-
2. Check if plan doc exists (from notes or epic plan table)
|
|
143
|
-
3. Set context file (Step 5)
|
|
144
|
-
4. Output next steps
|
|
145
|
-
|
|
146
|
-
### If user selects a ready task to claim:
|
|
147
|
-
|
|
148
|
-
1. **Claim task:**
|
|
149
|
-
```bash
|
|
150
|
-
bd update {task-id} --status in_progress
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
2. **Load task details:** `bd show {task-id} --json`
|
|
154
|
-
|
|
155
|
-
3. **Set context file** (Step 5)
|
|
156
|
-
|
|
157
|
-
4. **Output confirmation:**
|
|
158
|
-
```
|
|
159
|
-
✓ Claimed: {task-id} "{Task Title}"
|
|
160
|
-
|
|
161
|
-
Task Details:
|
|
162
|
-
Priority: P{n}
|
|
163
|
-
Epic: {epic-id}
|
|
164
|
-
Blocked by: {none or list}
|
|
165
|
-
Blocks: {list of dependent tasks}
|
|
166
|
-
|
|
167
|
-
Next steps:
|
|
168
|
-
1. Run `/create-plan` to create detailed implementation plan
|
|
169
|
-
2. After planning, run `/execute-plan` to implement
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### If "View details first":
|
|
173
|
-
|
|
174
|
-
```
|
|
175
|
-
AskUserQuestion(questions=[{
|
|
176
|
-
question: "Which task details would you like to see?",
|
|
177
|
-
header: "View Task",
|
|
178
|
-
options: [
|
|
179
|
-
{ label: "{task-1-id}", description: "{title}" },
|
|
180
|
-
{ label: "{task-2-id}", description: "{title}" },
|
|
181
|
-
{ label: "{task-3-id}", description: "{title}" }
|
|
182
|
-
],
|
|
183
|
-
multiSelect: false
|
|
184
|
-
}])
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
Then run: `bd show {selected-task-id}`
|
|
188
|
-
|
|
189
|
-
Display full details and return to Step 3 for claiming.
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
## Step 5: Set Context for /create-plan
|
|
194
|
-
|
|
195
|
-
**Create/Update:** `.beads/current-task.json`
|
|
196
|
-
|
|
197
|
-
```json
|
|
198
|
-
{
|
|
199
|
-
"task_id": "{task-id}",
|
|
200
|
-
"task_title": "{Task Title}",
|
|
201
|
-
"epic_id": "{epic-id}",
|
|
202
|
-
"epic_title": "{Epic Title}",
|
|
203
|
-
"epic_plan": "{docs/ai/planning/epic-xxx.md or null}",
|
|
204
|
-
"priority": {priority number},
|
|
205
|
-
"blocked_by": [],
|
|
206
|
-
"blocks": ["{dependent-task-ids}"],
|
|
207
|
-
"claimed_at": "{ISO timestamp}"
|
|
208
|
-
}
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
This file is read by `/create-plan` to:
|
|
212
|
-
- Auto-populate beads metadata in frontmatter
|
|
213
|
-
- Reference epic plan for architecture context
|
|
214
|
-
- Link task to plan doc when created
|
|
215
|
-
|
|
216
|
-
---
|
|
217
|
-
|
|
218
|
-
## Step 6: Final Output
|
|
219
|
-
|
|
220
|
-
```
|
|
221
|
-
✓ Context set for: {task-id} "{Task Title}"
|
|
222
|
-
|
|
223
|
-
Ready for:
|
|
224
|
-
/create-plan → Create detailed implementation plan
|
|
225
|
-
/create-plan "{title}" → Create plan with custom title
|
|
226
|
-
|
|
227
|
-
To view task details anytime:
|
|
228
|
-
bd show {task-id}
|
|
229
|
-
|
|
230
|
-
To unclaim this task:
|
|
231
|
-
bd update {task-id} --status open
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
---
|
|
235
|
-
|
|
236
|
-
## Notes
|
|
237
|
-
|
|
238
|
-
- **Session persistence**: Context file (`.beads/current-task.json`) persists across sessions
|
|
239
|
-
- **One task at a time**: Only one task should be in_progress per developer
|
|
240
|
-
- **Epic filtering**: If working on an epic, only shows tasks from that epic
|
|
241
|
-
- **Parallel work**: Multiple developers can claim different tasks (Beads handles this)
|
|
242
|
-
|
|
243
|
-
### Task Status Flow
|
|
244
|
-
|
|
245
|
-
```
|
|
246
|
-
open → in_progress → closed
|
|
247
|
-
↓
|
|
248
|
-
(unclaim)
|
|
249
|
-
↓
|
|
250
|
-
open
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
### Context File Lifecycle
|
|
254
|
-
|
|
255
|
-
```
|
|
256
|
-
/beads-next (claim) → Creates .beads/current-task.json
|
|
257
|
-
/create-plan → Reads context, links plan doc
|
|
258
|
-
/execute-plan → Uses plan doc (context optional)
|
|
259
|
-
/beads-done → Deletes .beads/current-task.json
|
|
260
|
-
```
|