AgentSkillsCN

bonfire

从计划文件中生成协调器提示词,并自动承担协调员角色。创建包含状态与事件日志文件的计划目录。

SKILL.md
--- frontmatter
name: bonfire
description: Generate an orchestrator prompt from a plan file and assume the coordinator role. Creates plan directory with state and event log files.

Bonfire - Parallel Implementation Coordinator

Generate an orchestrator prompt from the template and base variables, then assume the coordinator role to execute the plan.

Parameters

ParameterRequiredDescription
plan_fileYesPath 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:

  1. Derives the plan slug from the plan file name
  2. Reads .claude/base_variables.md for configuration
  3. Reads .claude/prompts/master_prompt_template.md template
  4. Replaces all variable tables with values from base_variables.md
  5. Sets derived variables:
    • PLAN_FILE = $plan_file
    • STATE_FILE = .claude/bonfire/<slug>/state.json
    • EVENT_LOG_FILE = .claude/bonfire/<slug>/event-log.jsonl
  6. Creates .claude/bonfire/<slug>/ directory
  7. 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:

  1. Validate all agent definitions exist (create missing ones using Creation Prompts)
  2. Load plan file and discover tasks
  3. Build dependency graph
  4. Initialize state file
  5. 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

ErrorAction
Script execution failsOutput error message and stop
base_variables.md missingOutput: "Create .claude/base_variables.md first"
Template missingOutput: "Template not found at .claude/prompts/master_prompt_template.md"
Plan file missingWarn but continue. Orchestrator fails on start if file missing at runtime.

Files Created

PathDescription
.claude/bonfire/<slug>-orchestrator.mdProcessed orchestrator prompt
.claude/bonfire/<slug>/Directory for state and event files
.claude/bonfire/<slug>/state.jsonCreated by orchestrator during execution
.claude/bonfire/<slug>/event-log.jsonlCreated by orchestrator during execution

Prerequisites

RequirementLocation
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