| name | Dev Workflow Orchestrator |
| description | Full development workflow from idea to parallel execution. Use when planning features/bugfixes/refactors,
breaking work into beads tasks, selecting tasks to parallelize (max 4), launching Claude instances in
tmux worktrees, and cleaning up after completion. Triggers: "plan feature", "plan refactor", "plan bugfix",
"start parallel work", "launch parallel", "cleanup worktrees", "kill parallel", or /dev-workflow.
|
Dev Workflow Orchestrator
Orchestrates the full development cycle: Plan → Create Tasks → Select → Execute in Parallel → PR → Cleanup.
Workflow Overview
┌─────────────┐ ┌──────────────┐ ┌────────────────┐ ┌──────────────┐ ┌─────────┐
│ 1. PLAN │ → │ 2. CREATE │ → │ 3. SELECT │ → │ 4. EXECUTE │ → │ 5. DONE │
│ Idea/scope │ │ Beads tasks │ │ N tasks (≤4) │ │ Parallel PRs │ │ Cleanup │
└─────────────┘ └──────────────┘ └────────────────┘ └──────────────┘ └─────────┘
Quick Commands
.claude/skills/dev-workflow/scripts/dev-workflow.sh
.claude/skills/dev-workflow/scripts/dev-workflow.sh plan
.claude/skills/dev-workflow/scripts/dev-workflow.sh select
.claude/skills/dev-workflow/scripts/dev-workflow.sh cleanup
.claude/skills/dev-workflow/scripts/dev-workflow.sh status
Phase 1: Planning
When user describes a feature, bugfix, or refactor:
Step 1.1: Understand the Scope
Ask clarifying questions:
- What is the goal?
- What files/components are involved?
- Any constraints or dependencies?
Step 1.2: Break Down into Tasks
Create beads tasks for each discrete piece of work:
bd create --title="Implement X component" --type=feature --priority=2
bd create --title="Add tests for X" --type=task --priority=2
bd create --title="Update documentation for X" --type=task --priority=3
Task creation guidelines:
- Each task should be independently completable
- Tasks touching different files are ideal for parallelization
- Use appropriate types:
feature, task, bug, refactor
- Priority: 0=critical, 1=high, 2=medium, 3=low, 4=backlog
Step 1.3: Set Dependencies (if any)
bd dep add <tests-id> <implementation-id>
Phase 2: Task Selection
Step 2.1: Show Available Tasks
bd ready
Step 2.2: Ask User for Selection
Use AskUserQuestion to present ready tasks:
Which tasks do you want to tackle in parallel? (Maximum 4)
Ready tasks:
1. [P2] beads-abc: Implement X component
2. [P2] beads-def: Add Y validation
3. [P2] beads-ghi: Refactor Z service
4. [P3] beads-jkl: Update docs
Enter task IDs (e.g., "abc def ghi"):
Selection criteria for parallelization:
- Tasks should touch different files (avoid merge conflicts)
- No dependencies between selected tasks
- Same priority level preferred
- Maximum 4 concurrent instances
Step 2.3: Validate Selection
Check for conflicts:
bd show abc | grep -A5 "Dependencies"
bd show def | grep -A5 "Dependencies"
Phase 3: Parallel Execution
Step 3.1: Claim Tasks
bd update abc --status in_progress
bd update def --status in_progress
Step 3.2: Launch Parallel Instances
.claude/skills/dev-workflow/scripts/dev-workflow.sh select abc def ghi
This will:
- Create git worktrees (
~/.claude-worktrees/<repo>/fix-<id>)
- Launch tmux session
claude-parallel
- Start Claude in each pane with task-specific prompts
The Prompt Each Instance Receives
Each Claude instance gets a detailed prompt:
You are working on issue <ID>: <TITLE>
## Task Details
<Full bd show output>
## Your Mission
1. Implement the fix/feature in this worktree
2. Run tests: npm test
3. Run lint: npm run lint
4. Run typecheck: npm run typecheck
5. Commit your changes with a descriptive message
6. Create a detailed PR with:
- Summary of what the issue was
- What changes were made and WHY
- Testing done
7. Close the issue: bd close <ID>
## PR Template
Use this format for your PR:
gh pr create --title "<type>(<scope>): <description>" --body "$(cat <<'EOF'
## Summary
- What problem this solves
- High-level approach taken
## Changes Made
- Specific code changes with reasoning
## Technical Details
- Architectural decisions
- Why this approach over alternatives
## Testing
- [ ] Unit tests pass
- [ ] Lint passes
- [ ] TypeScript checks pass
- [ ] Manual testing: <describe>
## Related
- Fixes issue <ID>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
## Important
- Work ONLY in this worktree
- Do NOT merge to main - create PR only
- Push your branch: git push -u origin fix-<ID>
Phase 4: Monitoring
tmux Navigation
Ctrl+B, arrow keys → Switch between panes
Ctrl+B, z → Zoom/unzoom current pane
Ctrl+B, [ → Enter scroll mode (q to exit)
Ctrl+B, d → Detach (instances keep running)
Check Status
tmux attach-session -t claude-parallel
.claude/skills/dev-workflow/scripts/dev-workflow.sh status
tmux capture-pane -t claude-parallel:0.0 -p | tail -20
Phase 5: Cleanup
After all PRs are created and merged:
.claude/skills/dev-workflow/scripts/dev-workflow.sh cleanup
This will:
- Kill the tmux session
- Remove all worktrees
- Prune git worktree references
- Sync beads:
bd sync && git push
Manual Cleanup
tmux kill-session -t claude-parallel
git worktree list
git worktree remove ~/.claude-worktrees/<repo>/fix-<id> --force
git worktree prune
AI Assistant Behavior
When /dev-workflow is invoked:
If user has an idea/plan to discuss:
- Help break it down into discrete tasks
- Create beads issues with appropriate types and priorities
- Set up any dependencies
- Proceed to selection phase
If user wants to start parallel work:
- Run
bd ready to show available tasks
- Ask which tasks to parallelize (max 4)
- Validate no conflicts
- Launch parallel instances
If user wants to cleanup:
- Run the cleanup script
- Confirm all worktrees removed
- Ensure beads synced
Error Recovery
If one instance fails:
- Other instances continue
- Fix manually in that worktree, or
- Kill pane and retry:
tmux kill-pane -t claude-parallel:0.1
If tmux session dies:
- Worktrees persist
- Relaunch:
.claude/skills/dev-workflow/scripts/dev-workflow.sh select <ids>
If merge conflicts occur:
- This shouldn't happen if tasks touch different files
- Resolve manually in the conflicting worktree
- Consider sequential execution for tightly coupled changes
Best Practices
- Plan before parallelizing - Clear task boundaries prevent conflicts
- Max 4 instances - More becomes hard to monitor and review
- Independent tasks only - No dependencies between parallel tasks
- Different files - Avoid parallel work on same files
- Review all PRs - Don't auto-merge, review each PR carefully
- Cleanup promptly - Don't leave worktrees lingering