SNAFU Review 2026: An LLM flow that fixes bad names in your code
SNAFU is an agentic LLM flow that helps you fix 'naming things' in source code. It computes a Name Ambiguity Number for each symbol and walks you through an agentic pipeline to replace ambiguous names with clearer ones.

What SNAFU Does
SNAFU (Symbol Name Ambiguity Fixer-Upper) is an agentic LLM flow for the classic hard problem: naming things. For each symbol in a file, it computes a Name Ambiguity Number (NAN) β a measurable score for how ambiguous the name is β then walks you through a pipeline to replace it with a clearer name, with a human confirming the real meaning along the way.
Key Features
- Quantifies name quality via Shannon entropy / perplexity (NAN)
- Human-in-the-loop confirms the real meaning before any rename
- Drops non-improving candidates (NAN delta β€ 0) and sanity-checks survivors
- Multi-language via Tree-sitter: Python, Ruby, C#, Java, JS, TS, PHP, Rust, Go
- Any-LLM support (LiteLLM-style) with a simple CLI
Who Should Use SNAFU
Engineers cleaning up legacy or AI-generated code where names like process_data or handle hide intent. Useful in code review prep and onboarding hygiene.
Pros and Cons
Pros
- Turns βname qualityβ into a measurable number
- Conservative: human confirms meaning, weak renames dropped
- Broad language support via Tree-sitter
Cons
- Requires Python 3.14+ and an LLM API key
- Name scoring is an LLM heuristic, not ground truth
- Not all symbols extracted β focuses on the most relevant
Pricing
Free and open source under MIT.
FAQ
How is ambiguity measured?
Each symbol is scored with no context; the model returns interpretation probabilities, and NAN = 2 ** Shannon entropy (perplexity). Lower is clearer.
Which languages are supported?
Python natively, plus Tree-sitter extraction for Ruby, C#, Java, JavaScript, TypeScript, PHP, Rust, and Go.
Founder and lead editor at 9bests. Oversees software evaluations, documented taxonomy models, and qualitative editorial ratings. Read our full editorial methodology.
Explore the best AI Coding tools
Related Articles
Aether Review 2026: Turn Your AI Subscription Into a Fleet of Devboxes
Aether (runaether.dev) turns the AI subscription you already pay for into parallel cloud devboxes where an agent streams every command, opens a PR, and another agent reviews and fixes it until the code holds up. We review the loop, the receipts, and the pricing.
agent-run Review 2026: Run Coding Agents in a Tiny Sandbox That Catches Mistakes Before They Spread
In-depth review of agent-run β a sub-1MB standalone binary that sandboxes coding agents (Claude Code, Codex, OpenCode, pi) inside a Bubblewrap container. Host filesystem is read-only by default. Built to catch agent mistakes, not malware.
Best AI Agent Tools in 2026: From Coding Assistants to Autonomous Workers
Complete guide to AI agent tools in 2026 β Claude Code, Codex, Cursor, Manus, and more. Which agents actually deliver on the promise of autonomous work?
aict Review 2026: Unix Coreutils With Structured Output So AI Agents Stop Parsing Plaintext
In-depth review of aict β a Go CLI that reimplements 33 Unix tools with XML/JSON output and a built-in MCP server, so AI coding agents read system state directly instead of scraping ls and grep.
Subscribe to the 9bests weekly β get the full list free
Hand-picked AI tool reviews and updates every week. Subscribe to receive this full list + 7 more quick-reference sheets (writing / image / video / audio / chat models / data / API cost).
Subscribe free & get it βIndependent reviews β ratings aren't influenced by vendor payments Β· double opt-in Β· unsubscribe anytime