---
name: "tree-of-thoughts-exploration"
description: "Explore multiple candidate solution branches simultaneously with back-tracking evaluation."
metadata:
  author: "Princeton NLP"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "use tree of thoughts"
  - "explore multiple solution paths"
  - "evaluate candidate thoughts"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Tree-of-Thoughts Branching & Exploration

Implements Tree-of-Thoughts (ToT): generating candidate thoughts, scoring branch viability with heuristic self-evaluation, pruning dead ends, and backtracking to promising solution paths.

## When to Invoke
Invoke this skill whenever you need to:
- use tree of thoughts
- explore multiple solution paths
- evaluate candidate thoughts

## Execution SOP & Rules
1. Generate 3 distinct candidate thoughts/approaches at each major decision node.
2. Score each branch on a scale of 1-10 against explicit performance and risk criteria.
3. Prune branches with viability scores below 6.0 and explore the highest-scoring candidate.
4. Backtrack to alternative branches if the chosen candidate encounters an intractable obstacle.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
