bumblebee-cli 0.1.1 → 0.3.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/dist/index.js +4214 -0
- package/dist/index.js.map +1 -0
- package/package.json +42 -28
- package/templates/skills/bb-agent/SKILL.md +180 -0
- package/templates/skills/bb-agent/references/bb-commands.md +124 -0
- package/templates/skills/bb-agent/references/investigate-workflow.md +150 -0
- package/templates/skills/bb-agent/references/parallel-workflow.md +105 -0
- package/templates/skills/bb-agent/references/prompts.md +144 -0
- package/templates/skills/bb-agent/references/status-transitions.md +93 -0
- package/templates/skills/bb-agent/references/workflow.md +178 -0
- package/README.md +0 -47
- package/bin/bb.mjs +0 -132
- package/python/bb_cli/__init__.py +0 -0
- package/python/bb_cli/api_client.py +0 -38
- package/python/bb_cli/bumblebee_cli.egg-info/PKG-INFO +0 -9
- package/python/bb_cli/bumblebee_cli.egg-info/SOURCES.txt +0 -21
- package/python/bb_cli/bumblebee_cli.egg-info/dependency_links.txt +0 -1
- package/python/bb_cli/bumblebee_cli.egg-info/entry_points.txt +0 -2
- package/python/bb_cli/bumblebee_cli.egg-info/requires.txt +0 -4
- package/python/bb_cli/bumblebee_cli.egg-info/top_level.txt +0 -5
- package/python/bb_cli/commands/__init__.py +0 -0
- package/python/bb_cli/commands/__pycache__/__init__.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/agent.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/auth.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/board.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/comment.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/init.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/item.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/label.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/project.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/sprint.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/story.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/task.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/agent.py +0 -1030
- package/python/bb_cli/commands/auth.py +0 -79
- package/python/bb_cli/commands/board.py +0 -47
- package/python/bb_cli/commands/comment.py +0 -34
- package/python/bb_cli/commands/init.py +0 -62
- package/python/bb_cli/commands/item.py +0 -192
- package/python/bb_cli/commands/label.py +0 -43
- package/python/bb_cli/commands/project.py +0 -111
- package/python/bb_cli/commands/sprint.py +0 -84
- package/python/bb_cli/config.py +0 -136
- package/python/bb_cli/main.py +0 -44
- package/python/pyproject.toml +0 -18
- package/scripts/build.sh +0 -20
- package/scripts/postinstall.mjs +0 -146
package/package.json
CHANGED
|
@@ -1,28 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "bumblebee-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Bumblebee
|
|
5
|
-
"
|
|
6
|
-
"bin": {
|
|
7
|
-
"bb": "./
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "bumblebee-cli",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Bumblebee - Dev Task Management + Claude Code Automation CLI",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"bb": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsup",
|
|
11
|
+
"dev": "tsup --watch",
|
|
12
|
+
"start": "node dist/index.js",
|
|
13
|
+
"typecheck": "tsc --noEmit",
|
|
14
|
+
"lint": "eslint src/",
|
|
15
|
+
"prepublishOnly": "npm run build"
|
|
16
|
+
},
|
|
17
|
+
"keywords": ["cli", "project-management", "claude", "ai-agent", "automation"],
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=20.0.0"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"templates"
|
|
25
|
+
],
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@clack/prompts": "^0.9.1",
|
|
28
|
+
"@iarna/toml": "^2.2.5",
|
|
29
|
+
"chalk": "^5.4.1",
|
|
30
|
+
"cli-table3": "^0.6.5",
|
|
31
|
+
"commander": "^13.1.0",
|
|
32
|
+
"execa": "^9.5.2",
|
|
33
|
+
"log-update": "^6.1.0",
|
|
34
|
+
"ofetch": "^1.4.1",
|
|
35
|
+
"p-limit": "^6.2.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^22.10.0",
|
|
39
|
+
"tsup": "^8.3.6",
|
|
40
|
+
"typescript": "^5.7.2"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bb-agent
|
|
3
|
+
description: |
|
|
4
|
+
Resolve work items or investigate problems using Bumblebee MCP tools + bb CLI.
|
|
5
|
+
Modes: (1) Action — verb + item IDs for specific phases (suggest, implement, split, run, test).
|
|
6
|
+
(2) Resolve — item IDs only → full lifecycle. (3) Investigate — free text → root cause analysis.
|
|
7
|
+
Auto-detects mode from arguments.
|
|
8
|
+
Invoke with: /bb-agent suggest BB-42 or /bb-agent BB-42 or /bb-agent login page returns 500
|
|
9
|
+
version: 4.0.0
|
|
10
|
+
user_invocable: true
|
|
11
|
+
arguments: "[action] work-item-IDs or free-text problem description"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Bumblebee Agent
|
|
15
|
+
|
|
16
|
+
Combined skill for resolving work items and investigating problems.
|
|
17
|
+
|
|
18
|
+
**Data operations** use MCP tools (`bumblebee_work_items`, `bumblebee_comments`, `bumblebee_projects`).
|
|
19
|
+
**Agent orchestration** uses the `bb agent` CLI commands (suggest, execute, test, run, merge).
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
/bb-agent suggest BB-42 ← action mode: analyze + propose solution
|
|
25
|
+
/bb-agent implement BB-42 ← action mode: implement + test + resolve
|
|
26
|
+
/bb-agent split BB-42 ← action mode: create sub-items from proposal
|
|
27
|
+
/bb-agent run BB-42 ← action mode: full auto-split autonomous run
|
|
28
|
+
/bb-agent test BB-42 ← action mode: run tests in worktree
|
|
29
|
+
/bb-agent reimplement BB-42 ← action mode: retry failed implementation
|
|
30
|
+
/bb-agent continue BB-42 ← action mode: resume incomplete work
|
|
31
|
+
/bb-agent integrate BB-42 ← action mode: merge children + docker test
|
|
32
|
+
/bb-agent BB-42 ← resolve mode: smart triage → best action
|
|
33
|
+
/bb-agent BB-42 BB-43 ← resolve multiple items
|
|
34
|
+
/bb-agent login page returns 500 ← investigate mode (free text)
|
|
35
|
+
/bb-agent create: build auth system ← create mode: create items from description
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Mode Detection
|
|
39
|
+
|
|
40
|
+
Parse arguments left-to-right:
|
|
41
|
+
|
|
42
|
+
1. **Action mode**: First token matches an action keyword → run that specific phase on the remaining item IDs
|
|
43
|
+
2. **Create mode**: Arguments start with `create:` → create items from the description text
|
|
44
|
+
3. **Resolve mode**: ALL tokens match work item ID regex → smart triage (see below)
|
|
45
|
+
4. **Investigate mode**: Any token is free text → investigation workflow
|
|
46
|
+
|
|
47
|
+
**Action keywords**: `suggest`, `implement`, `split`, `run`, `test`, `reimplement`, `continue`, `integrate`
|
|
48
|
+
**Item ID regex**: `^([A-Z]+-\d+|\d+|[0-9a-f-]{36})$`
|
|
49
|
+
|
|
50
|
+
## Action Mode
|
|
51
|
+
|
|
52
|
+
Each action maps to a specific phase. Always **fetch the item first** before any action.
|
|
53
|
+
|
|
54
|
+
### `suggest` — Analyze + Propose Solution
|
|
55
|
+
|
|
56
|
+
Analyze the work item and post a proposal comment with implementation plan + split analysis.
|
|
57
|
+
|
|
58
|
+
1. Fetch item + comments via MCP
|
|
59
|
+
2. Read knowledge base (CLAUDE.md, docs/knowledge.md)
|
|
60
|
+
3. Run `bb agent suggest <id_or_number>` from CLI
|
|
61
|
+
4. The suggest phase posts a `type: "proposal"` comment with:
|
|
62
|
+
- Analysis of the problem
|
|
63
|
+
- Implementation plan
|
|
64
|
+
- SPLIT_RESULT block (if item spans multiple packages)
|
|
65
|
+
5. Report the proposal summary to the user
|
|
66
|
+
|
|
67
|
+
### `implement` — Implement + Test + Resolve
|
|
68
|
+
|
|
69
|
+
Execute the full implementation lifecycle (same as Resolve mode):
|
|
70
|
+
|
|
71
|
+
Follow `references/workflow.md` steps 1–14:
|
|
72
|
+
Fetch → Triage → Knowledge → Branch → Status → Plan/Execute → Implement → Test → Self-review → Code simplify → Commit → Test gate → Comment → Resolve
|
|
73
|
+
|
|
74
|
+
### `split` — Create Sub-Items from Proposal
|
|
75
|
+
|
|
76
|
+
Parse the latest proposal comment and create child work items.
|
|
77
|
+
|
|
78
|
+
1. Fetch item + comments
|
|
79
|
+
2. Run `bb agent split <id_or_number>` from CLI
|
|
80
|
+
3. This parses the SPLIT_RESULT block from the latest proposal comment
|
|
81
|
+
4. Creates child items with `parent_id` set to the parent
|
|
82
|
+
5. Report created children to the user
|
|
83
|
+
|
|
84
|
+
### `run` — Full Autonomous Flow
|
|
85
|
+
|
|
86
|
+
Run the complete agent pipeline including auto-split if needed.
|
|
87
|
+
|
|
88
|
+
1. Run `bb agent run <id_or_number> --auto-split --target release/dev`
|
|
89
|
+
2. Pipeline: suggest → (split → batch-run children → integrate) or (execute → test → merge)
|
|
90
|
+
3. See `references/parallel-workflow.md` for details
|
|
91
|
+
|
|
92
|
+
### `test` — Run Tests in Worktree
|
|
93
|
+
|
|
94
|
+
Run tests for an item that's already been implemented in a worktree.
|
|
95
|
+
|
|
96
|
+
1. Run `bb agent test <id_or_number>` from CLI
|
|
97
|
+
2. Posts test report comment on the item
|
|
98
|
+
|
|
99
|
+
### `reimplement` — Retry Failed Implementation
|
|
100
|
+
|
|
101
|
+
Re-implement a failed item using feedback from previous attempt.
|
|
102
|
+
|
|
103
|
+
1. Fetch item + comments (reads previous plan + execution report + test failures)
|
|
104
|
+
2. Run `bb agent reimplement <id_or_number>` from CLI
|
|
105
|
+
3. Uses previous feedback to avoid repeating the same mistakes
|
|
106
|
+
|
|
107
|
+
### `continue` — Resume Incomplete Work
|
|
108
|
+
|
|
109
|
+
Continue work on an item that was started but not finished.
|
|
110
|
+
|
|
111
|
+
1. Run `bb agent continue <id_or_number>` from CLI
|
|
112
|
+
2. Reads previous comments to understand where work left off
|
|
113
|
+
|
|
114
|
+
### `integrate` — Merge Children + Docker Test
|
|
115
|
+
|
|
116
|
+
Merge all child branches and run integration tests.
|
|
117
|
+
|
|
118
|
+
1. Run `bb agent integrate <id_or_number> --target release/dev` from CLI
|
|
119
|
+
2. See `references/parallel-workflow.md` for the full integrate flow
|
|
120
|
+
|
|
121
|
+
## Resolve Mode (Smart Triage)
|
|
122
|
+
|
|
123
|
+
When only item IDs are provided without an action keyword, **smart triage** determines the best action based on item status:
|
|
124
|
+
|
|
125
|
+
| Item Status | Auto Action | Rationale |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| `open`, `confirmed`, `approved` | **suggest** | Item needs analysis first |
|
|
128
|
+
| `in_progress` | **continue** | Work already started, resume it |
|
|
129
|
+
| `failed` | **reimplement** | Previous attempt failed, retry with feedback |
|
|
130
|
+
| `in_review`, `resolved` | **skip** | Already done, report status |
|
|
131
|
+
| `needs_info` | **skip** | Missing info, ask user to clarify |
|
|
132
|
+
| `backlog`, `todo` | **suggest** | Needs analysis before work |
|
|
133
|
+
|
|
134
|
+
For multiple items: triage each independently, report plan, then execute sequentially or in parallel.
|
|
135
|
+
|
|
136
|
+
## Investigate Mode
|
|
137
|
+
|
|
138
|
+
Follow the investigation process in `references/investigate-workflow.md`:
|
|
139
|
+
|
|
140
|
+
1. **Understand** — parse problem description (what, where, when)
|
|
141
|
+
2. **Check duplicates** — `bumblebee_work_items(action="list", project_slug="...", data='{"status":"open"}')`, search for related items
|
|
142
|
+
3. **Reproduce** — attempt to reproduce the issue
|
|
143
|
+
4. **Trace root cause** — follow error through architecture layers
|
|
144
|
+
5. **Assess impact** — determine priority based on severity
|
|
145
|
+
6. **Create items** — `bumblebee_work_items(action="create", project_slug="...", data='{"title":"...","type":"bug","priority":"high"}')`
|
|
146
|
+
7. **Add details** — post investigation comment with root cause, steps, suggested fix
|
|
147
|
+
8. **Create sub-tasks** — break complex fixes into child items
|
|
148
|
+
9. **Summarize** — present findings and created items to user
|
|
149
|
+
|
|
150
|
+
## Create Mode
|
|
151
|
+
|
|
152
|
+
Arguments start with `create:` followed by a description:
|
|
153
|
+
- `/bb-agent create: build notification system` → creates items
|
|
154
|
+
- Type auto-detected: large scope → epic + children, small → task
|
|
155
|
+
- Uses `bumblebee_create_items` or `bumblebee_work_items(create)` MCP tools
|
|
156
|
+
|
|
157
|
+
## MCP Tools & CLI Reference
|
|
158
|
+
|
|
159
|
+
See `references/bb-commands.md` for the full reference.
|
|
160
|
+
|
|
161
|
+
## Key Rules
|
|
162
|
+
|
|
163
|
+
1. **Always fetch data first** — never assume data from the prompt
|
|
164
|
+
2. **Triage before working** — if lacking detail, ask for clarification and stop
|
|
165
|
+
3. **Check for duplicates** — search existing items before creating new ones
|
|
166
|
+
4. **One item per root cause** — don't create multiple items for symptoms
|
|
167
|
+
5. **Stay on your branch** — never switch branches mid-work
|
|
168
|
+
6. **Run tests** after implementation
|
|
169
|
+
7. **Self-review** all changes before finishing
|
|
170
|
+
8. **Post comments** summarizing changes or findings
|
|
171
|
+
9. **Follow existing patterns** — read CLAUDE.md and match conventions
|
|
172
|
+
|
|
173
|
+
## References
|
|
174
|
+
|
|
175
|
+
- `references/workflow.md` — resolve lifecycle (step-by-step)
|
|
176
|
+
- `references/investigate-workflow.md` — investigation process
|
|
177
|
+
- `references/bb-commands.md` — MCP tools + CLI command quick reference
|
|
178
|
+
- `references/prompts.md` — prompt templates for each phase
|
|
179
|
+
- `references/status-transitions.md` — valid status flows per type
|
|
180
|
+
- `references/parallel-workflow.md` — parallel split/integrate workflow
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Bumblebee Quick Reference
|
|
2
|
+
|
|
3
|
+
Data operations use **MCP tools**. Agent orchestration uses **`bb agent` CLI commands**.
|
|
4
|
+
|
|
5
|
+
## MCP Tools — Data Operations
|
|
6
|
+
|
|
7
|
+
### Projects
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
# List all projects
|
|
11
|
+
bumblebee_projects(action="list")
|
|
12
|
+
|
|
13
|
+
# Get project details
|
|
14
|
+
bumblebee_projects(action="get", project_slug="my-project")
|
|
15
|
+
|
|
16
|
+
# Create project
|
|
17
|
+
bumblebee_projects(action="create", data='{"name":"My Project","slug":"my-project","key":"MP"}')
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Work Items
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
# List items (with optional filters)
|
|
24
|
+
bumblebee_work_items(action="list", project_slug="my-project")
|
|
25
|
+
bumblebee_work_items(action="list", project_slug="my-project", data='{"status":"open"}')
|
|
26
|
+
bumblebee_work_items(action="list", project_slug="my-project", data='{"type":"bug"}')
|
|
27
|
+
bumblebee_work_items(action="list", project_slug="my-project", data='{"type":"task","status":"open"}')
|
|
28
|
+
bumblebee_work_items(action="list", project_slug="my-project", data='{"assignee":"thanhlc"}')
|
|
29
|
+
|
|
30
|
+
# Get item details
|
|
31
|
+
bumblebee_work_items(action="get", item_id="42")
|
|
32
|
+
|
|
33
|
+
# Create item
|
|
34
|
+
bumblebee_work_items(action="create", project_slug="my-project", data='{"title":"Fix 500 error on tree endpoint","type":"bug","priority":"high"}')
|
|
35
|
+
bumblebee_work_items(action="create", project_slug="my-project", data='{"title":"Add pagination to items list","type":"task","priority":"medium"}')
|
|
36
|
+
bumblebee_work_items(action="create", project_slug="my-project", data='{"title":"Fix schema validation","type":"task","parent_id":10}')
|
|
37
|
+
|
|
38
|
+
# Update item
|
|
39
|
+
bumblebee_work_items(action="update", item_id="42", data='{"status":"in_progress"}')
|
|
40
|
+
bumblebee_work_items(action="update", item_id="42", data='{"priority":"critical"}')
|
|
41
|
+
bumblebee_work_items(action="update", item_id="42", data='{"assignee":"thanhlc"}')
|
|
42
|
+
bumblebee_work_items(action="update", item_id="42", data='{"status":"in_review"}')
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Comments
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
# List comments
|
|
49
|
+
bumblebee_comments(action="list", work_item_id="42")
|
|
50
|
+
|
|
51
|
+
# Create comment
|
|
52
|
+
bumblebee_comments(action="create", work_item_id="42", data='{"body":"Investigation findings: ...","type":"discussion"}')
|
|
53
|
+
bumblebee_comments(action="create", work_item_id="42", data='{"body":"## Proposed Fix\\n...","type":"proposal"}')
|
|
54
|
+
bumblebee_comments(action="create", work_item_id="42", data='{"body":"## Changes Made\\n...","type":"agent_output"}')
|
|
55
|
+
bumblebee_comments(action="create", work_item_id="42", data='{"body":"<test report>","type":"test_report"}')
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Sprints
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
# List sprints
|
|
62
|
+
bumblebee_sprints(action="list", project_slug="my-project")
|
|
63
|
+
|
|
64
|
+
# Get sprint
|
|
65
|
+
bumblebee_sprints(action="get", sprint_id="1")
|
|
66
|
+
|
|
67
|
+
# Create sprint
|
|
68
|
+
bumblebee_sprints(action="create", project_slug="my-project", data='{"name":"Sprint 1","goal":"MVP features"}')
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## CLI Commands — Agent Orchestration
|
|
72
|
+
|
|
73
|
+
These commands manage the agent lifecycle (worktrees, Claude CLI spawning, merge). Keep using `bb agent` for these:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Suggest a plan (analysis only, no code changes)
|
|
77
|
+
bb agent suggest BB-42
|
|
78
|
+
|
|
79
|
+
# Full run: verify → execute → test → retry → merge
|
|
80
|
+
bb agent run BB-42 --auto-merge --target release/dev
|
|
81
|
+
|
|
82
|
+
# Skip verification, go straight to execute
|
|
83
|
+
bb agent run BB-42 --skip-verify -y
|
|
84
|
+
|
|
85
|
+
# Test in worktree
|
|
86
|
+
bb agent test BB-42
|
|
87
|
+
|
|
88
|
+
# Re-implement after failure
|
|
89
|
+
bb agent reimplement BB-42
|
|
90
|
+
|
|
91
|
+
# Continue incomplete work
|
|
92
|
+
bb agent continue BB-42
|
|
93
|
+
|
|
94
|
+
# Merge completed work
|
|
95
|
+
bb agent merge --target release/dev
|
|
96
|
+
|
|
97
|
+
# Clean up worktree
|
|
98
|
+
bb agent cleanup 42
|
|
99
|
+
|
|
100
|
+
# List active worktrees
|
|
101
|
+
bb agent worktrees
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## CLI Commands — Board View
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
bb board # all types
|
|
108
|
+
bb board --type story # stories only
|
|
109
|
+
bb board --type bug # bugs only
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Valid Values
|
|
113
|
+
|
|
114
|
+
### Types
|
|
115
|
+
epic, story, task, bug, feature, chore, spike
|
|
116
|
+
|
|
117
|
+
### Statuses
|
|
118
|
+
open, confirmed, approved, in_progress, in_review, resolved, closed, failed, needs_info, backlog, todo, done, cancelled, wont_fix
|
|
119
|
+
|
|
120
|
+
### Priorities
|
|
121
|
+
critical, high, medium, low, none
|
|
122
|
+
|
|
123
|
+
### Comment Types
|
|
124
|
+
discussion, proposal, agent_output, test_report, execution_report
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Investigation Workflow
|
|
2
|
+
|
|
3
|
+
Step-by-step process for investigating a problem and creating work items.
|
|
4
|
+
|
|
5
|
+
## Step 1: Understand the Problem
|
|
6
|
+
|
|
7
|
+
Parse the user's description to identify:
|
|
8
|
+
- **What**: The observed behavior (error, wrong data, performance issue)
|
|
9
|
+
- **Where**: Which service/component (API, Web, CLI, Agent)
|
|
10
|
+
- **When**: Under what conditions (specific input, timing, user action)
|
|
11
|
+
|
|
12
|
+
## Step 2: Check Existing Items
|
|
13
|
+
|
|
14
|
+
Search for duplicates or related items using MCP tools:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
bumblebee_work_items(action="list", project_slug="<slug>", data='{"status":"open"}')
|
|
18
|
+
bumblebee_work_items(action="list", project_slug="<slug>", data='{"type":"bug"}')
|
|
19
|
+
bumblebee_work_items(action="list", project_slug="<slug>", data='{"type":"task"}')
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Search by keywords in titles. If the problem already has an open item, update it instead of creating a new one.
|
|
23
|
+
|
|
24
|
+
## Step 3: Reproduce the Problem
|
|
25
|
+
|
|
26
|
+
Attempt to reproduce using the appropriate method:
|
|
27
|
+
|
|
28
|
+
| Service | How to Reproduce |
|
|
29
|
+
|---------|-----------------|
|
|
30
|
+
| **API** | `curl` or `httpx` to the endpoint directly |
|
|
31
|
+
| **Web** | Browser DevTools: Console errors, Network tab, snapshot |
|
|
32
|
+
| **CLI** | Run the `bb` command with verbose output |
|
|
33
|
+
| **Agent** | Check worktree state, agent comments, logs |
|
|
34
|
+
| **Database** | Query the relevant tables directly |
|
|
35
|
+
|
|
36
|
+
Capture:
|
|
37
|
+
- Exact error messages and stack traces
|
|
38
|
+
- HTTP status codes and response bodies
|
|
39
|
+
- Console errors and network failures
|
|
40
|
+
|
|
41
|
+
## Step 4: Trace the Root Cause
|
|
42
|
+
|
|
43
|
+
Follow the error upstream through the architecture layers:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
Web UI → API Client (fetch) → FastAPI Route → Service → SQLAlchemy → PostgreSQL
|
|
47
|
+
CLI → httpx → FastAPI Route → Service → SQLAlchemy → PostgreSQL
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Use these tools to trace:
|
|
51
|
+
- **Read source code** — find the handler, service function, model
|
|
52
|
+
- **Check schemas** — Pydantic validation, type mismatches
|
|
53
|
+
- **Check migrations** — `alembic current` vs schema drift
|
|
54
|
+
- **Check config** — `.env`, CORS origins, database URL
|
|
55
|
+
|
|
56
|
+
## Step 5: Assess Impact and Priority
|
|
57
|
+
|
|
58
|
+
| Priority | Criteria |
|
|
59
|
+
|----------|----------|
|
|
60
|
+
| **critical** | Data loss, security vulnerability, blocks all users |
|
|
61
|
+
| **high** | Core feature broken, no workaround, affects many users |
|
|
62
|
+
| **medium** | Feature degraded, workaround exists, moderate impact |
|
|
63
|
+
| **low** | Cosmetic, edge case, minor inconvenience |
|
|
64
|
+
|
|
65
|
+
## Step 6: Create Work Items
|
|
66
|
+
|
|
67
|
+
For each distinct root cause found, create a work item:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
bumblebee_work_items(action="create", project_slug="<slug>", data='{"title":"<actionable title>","type":"bug","priority":"high"}')
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Title Format
|
|
74
|
+
|
|
75
|
+
Use action-oriented titles that describe the fix, not just the symptom:
|
|
76
|
+
|
|
77
|
+
| Bad Title | Good Title |
|
|
78
|
+
|-----------|-----------|
|
|
79
|
+
| "Login broken" | "Fix 500 error on Google OAuth login when client_id not configured" |
|
|
80
|
+
| "Items not showing" | "Fix WorkItemTreeResponse missing depth/children_count defaults" |
|
|
81
|
+
| "Slow page" | "Add pagination to work items list endpoint (currently loads all)" |
|
|
82
|
+
|
|
83
|
+
### Description Template
|
|
84
|
+
|
|
85
|
+
After creating the item, add a detailed description via comment:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
bumblebee_comments(action="create", work_item_id="<id>", data='{"body":"## Problem\n<what is happening>\n\n## Root Cause\n<why it is happening — reference specific file:line>\n\n## Reproduction Steps\n1. <step 1>\n2. <step 2>\n3. <expected vs actual>\n\n## Suggested Fix\n<what needs to change>\n\n## Acceptance Criteria\n- [ ] <criterion 1>\n- [ ] <criterion 2>\n- [ ] <no regressions in related features>\n\n## Affected Files\n- `path/to/file.py:line`\n- `path/to/other.ts:line`","type":"discussion"}')
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Step 7: Create Sub-Tasks (If Complex)
|
|
92
|
+
|
|
93
|
+
If the fix requires multiple steps or touches multiple packages:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
# Create parent item
|
|
97
|
+
bumblebee_work_items(action="create", project_slug="<slug>", data='{"title":"Fix authentication flow across API and Web","type":"story","priority":"high"}')
|
|
98
|
+
|
|
99
|
+
# Create sub-tasks under the parent (use the parent's id from the response)
|
|
100
|
+
bumblebee_work_items(action="create", project_slug="<slug>", data='{"title":"Fix JWT token validation in API middleware","type":"task","parent_id":<parent_id>}')
|
|
101
|
+
bumblebee_work_items(action="create", project_slug="<slug>", data='{"title":"Update auth context in Web to handle token refresh","type":"task","parent_id":<parent_id>}')
|
|
102
|
+
bumblebee_work_items(action="create", project_slug="<slug>", data='{"title":"Add integration test for full auth flow","type":"task","parent_id":<parent_id>}')
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Step 8: Summarize Findings
|
|
106
|
+
|
|
107
|
+
Present the investigation results to the user:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
## Investigation Summary
|
|
111
|
+
|
|
112
|
+
**Problem**: <one-line summary>
|
|
113
|
+
**Root Cause**: <what's actually wrong>
|
|
114
|
+
**Impact**: <who/what is affected>
|
|
115
|
+
|
|
116
|
+
### Items Created
|
|
117
|
+
- BB-<N> <title> (priority: <p>, type: <t>)
|
|
118
|
+
- BB-<N> <title> (priority: <p>, type: <t>)
|
|
119
|
+
|
|
120
|
+
### Recommended Next Steps
|
|
121
|
+
1. <most urgent fix>
|
|
122
|
+
2. <secondary fix>
|
|
123
|
+
3. <preventive measure>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Common Investigation Patterns
|
|
127
|
+
|
|
128
|
+
### API Returns 500
|
|
129
|
+
1. Check uvicorn/FastAPI logs for the traceback
|
|
130
|
+
2. Test the endpoint with `curl` directly
|
|
131
|
+
3. Check if the Pydantic schema matches the SQLAlchemy model
|
|
132
|
+
4. Check if migrations are up to date
|
|
133
|
+
|
|
134
|
+
### Web Page Not Loading Data
|
|
135
|
+
1. Open browser DevTools → Network tab
|
|
136
|
+
2. Check for CORS errors in Console
|
|
137
|
+
3. Check if the API endpoint returns data via `curl`
|
|
138
|
+
4. Check React Query error state in components
|
|
139
|
+
|
|
140
|
+
### CLI Command Fails
|
|
141
|
+
1. Run with verbose/debug output
|
|
142
|
+
2. Check `~/.bumblebee/config.toml` for correct API URL and token
|
|
143
|
+
3. Test the API endpoint directly
|
|
144
|
+
4. Check Python package version matches API expectations
|
|
145
|
+
|
|
146
|
+
### Items Missing or Wrong Data
|
|
147
|
+
1. Query the database directly to see raw data
|
|
148
|
+
2. Check soft-delete filter (`deleted_at IS NULL`)
|
|
149
|
+
3. Check if project ownership matches (`project.owner_id == user.id`)
|
|
150
|
+
4. Check serialization schema for missing/wrong fields
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Parallel Development Workflow
|
|
2
|
+
|
|
3
|
+
Guide for splitting work items across packages and running agents in parallel.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
Use parallel mode when a work item:
|
|
8
|
+
- Affects 2+ packages (api/, web/, cli/)
|
|
9
|
+
- Has clearly separable scopes of work
|
|
10
|
+
- Benefits from independent implementation and testing
|
|
11
|
+
|
|
12
|
+
Do NOT split items that:
|
|
13
|
+
- Have tight cross-package dependencies requiring coordinated changes
|
|
14
|
+
- Are small enough to implement in a single pass
|
|
15
|
+
- Only affect one package
|
|
16
|
+
|
|
17
|
+
## Split Analysis Format
|
|
18
|
+
|
|
19
|
+
The suggest phase outputs a SPLIT_RESULT block:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
### SPLIT_RESULT
|
|
23
|
+
NEEDS_SPLIT: true
|
|
24
|
+
ITEMS:
|
|
25
|
+
- SCOPE: api
|
|
26
|
+
TITLE: API - add auth endpoints
|
|
27
|
+
DESCRIPTION: Create POST /api/auth/login and /api/auth/register
|
|
28
|
+
ACCEPTANCE_CRITERIA: Endpoints return JWT tokens, tests pass
|
|
29
|
+
- SCOPE: web
|
|
30
|
+
TITLE: Web - login page
|
|
31
|
+
DESCRIPTION: Create login form with email/password
|
|
32
|
+
ACCEPTANCE_CRITERIA: Form submits to API, redirects on success
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Commands
|
|
36
|
+
|
|
37
|
+
### Manual Flow (step-by-step)
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# 1. Analyze and propose split
|
|
41
|
+
bb agent suggest BB-42
|
|
42
|
+
|
|
43
|
+
# 2. Create sub-items from proposal
|
|
44
|
+
bb agent split BB-42
|
|
45
|
+
|
|
46
|
+
# 3. Run sub-items in parallel (each gets own worktree)
|
|
47
|
+
bb agent batch-run BB-43 BB-44 BB-45
|
|
48
|
+
|
|
49
|
+
# 4. Integration test + merge all
|
|
50
|
+
bb agent integrate BB-42 --target release/dev --cleanup
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Autonomous Flow (single command)
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
bb agent run BB-42 --auto-split --target release/dev
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
This runs: suggest → split → batch-run children → integrate.
|
|
60
|
+
Use `--no-auto-split` to disable and use the single-item flow.
|
|
61
|
+
|
|
62
|
+
## Batch-Run Behavior
|
|
63
|
+
|
|
64
|
+
`bb agent batch-run` runs items in parallel:
|
|
65
|
+
|
|
66
|
+
1. Each item gets its own git worktree under `~/.bumblebee/worktrees/{slug}/`
|
|
67
|
+
2. Each worktree has its own branch: `{prefix}/{key}_{slug}`
|
|
68
|
+
3. Claude Code runs in `--permission-mode bypassPermissions`
|
|
69
|
+
4. Max parallelism controlled by `--parallel N` (default: 2)
|
|
70
|
+
5. After execution: Docker tests per item
|
|
71
|
+
6. Passing items can auto-merge with `--auto-merge`
|
|
72
|
+
|
|
73
|
+
## Integrate Flow
|
|
74
|
+
|
|
75
|
+
`bb agent integrate` merges all child branches:
|
|
76
|
+
|
|
77
|
+
1. Validates all children are resolved/in_review
|
|
78
|
+
2. Creates temp branch: `integrate/{parent-key}`
|
|
79
|
+
3. Merges each child branch sequentially
|
|
80
|
+
4. Runs Docker tests on the integration branch
|
|
81
|
+
5. On pass: fast-forward target, mark parent resolved, cleanup
|
|
82
|
+
6. On fail: abort, post failure report, cleanup integration branch
|
|
83
|
+
|
|
84
|
+
### Conflict Handling
|
|
85
|
+
|
|
86
|
+
If a child branch has merge conflicts during integration:
|
|
87
|
+
- The integration aborts immediately
|
|
88
|
+
- A failure comment is posted on the parent item
|
|
89
|
+
- Manual conflict resolution is needed before re-running
|
|
90
|
+
|
|
91
|
+
## Error Handling
|
|
92
|
+
|
|
93
|
+
| Scenario | Behavior |
|
|
94
|
+
|----------|----------|
|
|
95
|
+
| Child execution fails | Continues other children, reports failure |
|
|
96
|
+
| Docker test fails | Triggers reimplement retry (up to 3x) |
|
|
97
|
+
| Merge conflict | Aborts integration, posts conflict details |
|
|
98
|
+
| All retries exhausted | Parent marked `failed`, manual fix needed |
|
|
99
|
+
|
|
100
|
+
## MCP Tools
|
|
101
|
+
|
|
102
|
+
For programmatic access (Claude Code agents):
|
|
103
|
+
|
|
104
|
+
- `bumblebee_split_item(parent_item_id, sub_items, project_slug)` — create children from JSON
|
|
105
|
+
- `bumblebee_create_items(project_slug, items)` — batch create with auto-type detection
|