Plan Mode

Break down complex tools into step-by-step plans before generating code.

What is Plan Mode?

Plan Mode allows you to describe complex tools in natural language, and PegBoard will create a detailed implementation plan before generating any code. This ensures the AI understands your requirements correctly and breaks down complex tasks into manageable steps.

When to Use Plan Mode

  • Complex multi-step tools - Operations that require multiple phases or user interactions
  • Unclear requirements - When you want to explore different implementation approaches
  • Learning - Understanding how a tool will work before generating code
  • Team review - Share plans with teammates before committing to an implementation

Using Plan Mode

Creating a Plan

  1. 1

    Click "New Tool" and enable "Plan Mode" toggle

  2. 2

    Describe what you want the tool to do in natural language

  3. 3

    Click "Generate Plan" - the AI will create a step-by-step implementation outline

Reviewing the Plan

The plan will include:

  • Overview - High-level description of the tool's functionality
  • Implementation Steps - Numbered breakdown of how the tool will work
  • API References - Specific platform APIs and functions that will be used
  • User Interactions - Dialog boxes, selections, or inputs required
  • Edge Cases - How the tool handles errors or unexpected inputs

Refining the Plan

  1. 1

    Review the generated plan and identify any missing details or corrections

  2. 2

    Click "Refine Plan" and provide additional context or corrections

  3. 3

    Repeat until you're satisfied with the plan

Generating from Plan

Once you approve the plan, PegBoard generates code that follows the outlined steps.

  1. 1

    Review the final plan and click "Approve & Generate"

  2. 2

    PegBoard generates the tool code following the approved plan

  3. 3

    The plan is saved with the tool metadata for future reference

Example Workflow

Your Request:
"Create a tool that exports all layers in Blender to separate FBX files, with options to choose export location and include custom naming templates"
Generated Plan:
  1. Show file browser dialog to select export directory
  2. Display panel with naming template options (e.g., "{layer_name}", "{layer_name}_{index}")
  3. Iterate through all layers in current scene using bpy.data.collections
  4. For each layer:
    • Hide all other layers temporarily
    • Apply naming template to generate filename
    • Export visible objects using bpy.ops.export_scene.fbx()
  5. Restore original layer visibility
  6. Show completion message with count of exported files