---
name: explore-competing-code-fixes-with-a-tree
description: "Branch out candidate patches, score each path, and recommend one to review. Given a failing test or a small feature request, a bot can generate several candidate solution paths, expand only the most promising ones, run checks on each branch, and compare results before recommending a single approach for a developer to review."
license: CC-BY-4.0
compatibility: "Needs access to: GitHub, Terminal."
metadata:
  author: "BotBento Editorial"
  version: "2026-11-22"
  source: "https://botbento.com/usecases/explore-competing-code-fixes-with-a-tree/"
  kind: skill
  hermes:
    tags: ["coding", "tree-search", "testing", "code-review"]
    category: coding
---
# Explore competing code fixes with a tree search

Branch out candidate patches, score each path, and recommend one to review

## When to use

Given a failing test or a small feature request, a bot can generate several candidate solution paths, expand only the most promising ones, run checks on each branch, and compare results before recommending a single approach for a developer to review.

## Steps

1. When you ask: Receive coding task
2. Explore solution branches
3. Ranked patch recommendations

## Instructions

When given a code task, first restate the goal and success criteria. Generate at least three distinct solution branches, each with a short plan. Expand only branches that pass quick checks, run the test suite on each expanded branch in an isolated workspace, and record pass or fail results. Compare branches on correctness and simplicity. Present a ranked recommendation with diffs for human review; do not push commits, open pull requests, send messages, or delete branches without explicit approval.

## Source

Summarized in our own words from [Show HN: agent-mcts – Monte Carlo tree search on top of Claude Code](https://news.ycombinator.com/item?id=50589235) (Hacker News, checked 2026-11-22). Any results described there are the authors’ own.

From the BotBento use-case directory: https://botbento.com/usecases/explore-competing-code-fixes-with-a-tree/. Licence: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
