Bonfire - Parallel Implementation Coordinator
Generate an orchestrator prompt from the template and base variables, then assume the coordinator role to execute the plan.
Parameters
| Parameter | Required | Description |
|---|---|---|
plan_file | Yes | Path to the implementation plan file |
The plan slug is automatically derived from the plan file name:
- •
COMPREHENSIVE_IMPLEMENTATION_PLAN.md->comprehensive-implementation-plan - •
AuthFeaturePlan.md->auth-feature-plan - •
my-feature-plan.md->my-feature-plan
Invocation
code
/bonfire COMPREHENSIVE_IMPLEMENTATION_PLAN.md
Workflow
Step 1: Generate Orchestrator Prompt
Run the generation script:
bash
python .claude/scripts/generate-orchestrator.py "$plan_file"
This script:
- •Derives the plan slug from the plan file name
- •Reads
.claude/base_variables.mdfor configuration - •Reads
.claude/prompts/master_prompt_template.mdtemplate - •Replaces all variable tables with values from base_variables.md
- •Sets derived variables:
- •
PLAN_FILE=$plan_file - •
STATE_FILE=.claude/bonfire/<slug>/state.json - •
EVENT_LOG_FILE=.claude/bonfire/<slug>/event-log.jsonl
- •
- •Creates
.claude/bonfire/<slug>/directory - •Writes processed template to
.claude/bonfire/<slug>-orchestrator.md
Step 2: Read Generated Orchestrator
Read the generated file at .claude/bonfire/<slug>-orchestrator.md.
Step 3: Assume Orchestrator Role
Output:
code
ORCHESTRATOR GENERATED Plan: $plan_file Slug: <derived-slug> State: .claude/bonfire/<slug>/state.json Events: .claude/bonfire/<slug>/event-log.jsonl Prompt: .claude/bonfire/<slug>-orchestrator.md ASSUMING ORCHESTRATOR ROLE...
The generated prompt becomes your operating instructions. Execute the "On Session Start" procedure from the orchestrator prompt:
- •Validate all agent definitions exist (create missing ones using Creation Prompts)
- •Load plan file and discover tasks
- •Build dependency graph
- •Initialize state file
- •Dispatch developers to fill all actor slots
Continue as orchestrator until:
- •Plan completion (all tasks complete)
- •Context exhaustion (trigger compaction)
- •Session limit (trigger pause)
Error Handling
| Error | Action |
|---|---|
| Script execution fails | Output error message and stop |
| base_variables.md missing | Output: "Create .claude/base_variables.md first" |
| Template missing | Output: "Template not found at .claude/prompts/master_prompt_template.md" |
| Plan file missing | Warn but continue. Orchestrator fails on start if file missing at runtime. |
Files Created
| Path | Description |
|---|---|
.claude/bonfire/<slug>-orchestrator.md | Processed orchestrator prompt |
.claude/bonfire/<slug>/ | Directory for state and event files |
.claude/bonfire/<slug>/state.json | Created by orchestrator during execution |
.claude/bonfire/<slug>/event-log.jsonl | Created by orchestrator during execution |
Prerequisites
| Requirement | Location |
|---|---|
| Base variables | .claude/base_variables.md |
| Prompt template | .claude/prompts/master_prompt_template.md |
| Generation script | .claude/scripts/generate-orchestrator.py |
| Plan file | $plan_file |