Feature: Multi-Agent Execution of Refactoring Plans 🤖

:page_facing_up: Input

Imagine we have one or more .md files containing a clearly defined code refactoring plan.
These files describe specific actions to perform, so that agents don’t have to interpret anything — they just execute.

Examples of such actions include:

  • Renaming deprecated functions
  • Replacing outdated constructs
  • Updating syntax or libraries

The plan is typically organized into numbered items and sub-items, each marked with a status indicator (e.g., :white_circle:/:white_check_mark:/:cross_mark:/:hourglass_not_done:).

:file_folder: Scaling

When the plan becomes too large, the .md file is split into multiple parts.
Each file contains a section of the plan that can ideally be executed independently.

:gear: Problem

Executing tasks sequentially through a single agent can take several hours.

:light_bulb: Idea
Introduce a branching task model with multi-agent execution, similar to the system used by Anthropic.
This would allow:

  • Parallel execution of tasks
  • Assigning different agents to handle different sections of the plan
  • Reducing total execution time from hours to tens of minutes

:brain: Example
Let’s say the plan contains 40 items.
We launch 4 agents — each one is assigned its own group of tasks (e.g., 10 items per agent).
Each agent executes independently, speeding up the overall refactoring process.

After each agent completes its assigned task, we can review and apply changes per task independently,
without mixing diffs or highlights from other tasks.