Slide 37 / 55
Slide 37

Transcript

The third brownfield trick is what I call "Claude Roulette" - running multiple parallel copies of Claude on the same task to explore different approaches simultaneously.

Here's the scenario: you need to refactor a complex piece of business logic, but you're not sure of the best approach. Maybe you could optimize the data structure, or parallelize the processing, or cache frequently-accessed data, or rewrite the core logic entirely. Each approach has trade-offs.

Instead of asking one Claude instance to explore all these options sequentially - which takes time and fills up the context window - spin up four separate Claude Code sessions in parallel. Give each one the same starting point but a slightly different directive.

Session one: "Focus on optimizing the current data structure without changing the algorithm." Session two: "Explore parallelization opportunities in the processing logic." Session three: "Investigate caching strategies for data access." Session four: "Consider a complete rewrite using a different algorithmic approach."

Let them all run simultaneously. You can do that with local worktrees, by using /branch to try a different path in the same conversation, by using /fork to send a side task into the background, or by using /background to detach a session and monitor it later. Each Claude instance explores its approach deeply, writes code, identifies issues, and produces a working solution. After they've all finished - maybe fifteen or twenty minutes later - you review all four approaches side by side.

Often you'll find one approach is clearly superior. Sometimes you'll find that different sessions discovered complementary insights you can combine. And occasionally you'll find that the best solution is a hybrid - taking the data structure optimization from session one, the caching strategy from session three, and some parallelization insights from session two.

This is incredibly powerful for complex refactoring decisions where the solution space is large and there's no obvious "right answer." You're essentially running parallel experiments to find the optimal path forward.