EvanFlow – A TDD driven feedback loop for Claude Code
TL;DR Highlight
EvanFlow automates code brainstorming, TDD, and validation in Claude Code with 16 skills triggered by a single prompt.
Who Should Read
This tool suits Claude Code users wary of committing AI-generated code without thorough testing and review. It’s especially valuable for developers individually or in small teams who actively leverage AI agents while maintaining code discipline.
Core Mechanics
- EvanFlow installs with '/plugin marketplace add evanklem/evanflow' in the Claude Code marketplace and initiates a full loop with the command 'let's evanflow this'.
- The workflow proceeds in the order: brainstorming → plan → execution (vertical-slice TDD) → iteration → STOP, with human approval checkpoints between each stage. Git commits, staging, and integration are never automated.
- Vertical-slice TDD implements features from database to UI in isolated slices, and EvanFlow applies this at the test level, repeating a cycle of writing a failing test, minimal implementation, and the next test.
- Research indicates that approximately 62% of test assertions generated by LLMs are incorrect. Consequently, EvanFlow enforces TDD discipline more rigorously than implementation discipline.
- During brainstorming, it proposes 2-3 approaches while simultaneously performing 'Embedded Grilling' – asking questions like 'What breaks if the user does X?', 'How do we rollback?', and 'What are the explicit exclusions?' to cheaply identify design flaws.
- Iteration is hard-capped at 5 rounds, each including checks for dead code, naming, Deletion Tests, assertion accuracy, and 5 failure modes (hallucinations, scope creep, cascading errors, context loss, tool misuse). It also captures screenshots with headless Chromium if a UI exists.
- Plans with three or more independent units sharing types switch to a parallel coder/overseer orchestration mode. In this case, integration tests of touchpoints serve as a cohesion contract.
- It comprises 16 skills and 2 custom sub-agents, registered under the evanflow: namespace (e.g., /evanflow:evanflow-go). A git guardrail hook is also automatically activated upon plugin installation.
Evidence
- "Some commenters questioned the need for a separate tool given Claude Code’s existing TDD support, but the author clarified that the base agent doesn’t perform TDD ‘by default’. A commenter noted that the REFACTOR stage is missing from the core RED-GREEN-REFACTOR TDD cycle, arguing that Claude prioritizes moving to the next test rather than refactoring the recently passed one. Alternatives like tdd-guard, which uses hooks to block edits rather than prompting for TDD, were suggested to avoid context rot. A commenter reported interface breakage during merge in the parallel coder/overseer mode, suggesting failing tests in each branch and worktree isolation as solutions. Concerns about 'dumb zone' – where initial design context is lost during long agent loops – were raised, with suggestions that resetting at RED-GREEN-REFACTOR boundaries could mitigate this."
How to Apply
- "If Claude Code frequently outputs untested code or generates flawed assertions, try installing with '/plugin marketplace add evanklem/evanflow' and starting with 'let's evanflow this — I want to add X feature' to receive guidance through the brainstorming and TDD loop. For large features, leverage EvanFlow’s design approval, plan approval, and iterate checkpoints to maintain control. If prompt-based TDD suffers from context loss, consider EvanFlow alongside tdd-guard. For parallel development of three or more independent modules, use EvanFlow’s parallel coder/overseer mode, but prioritize touchpoint integration tests and git worktree isolation to prevent interface conflicts."
Code Example
snippet
# Install via Claude Code plugin marketplace (recommended)
/plugin marketplace add evanklem/evanflow
/plugin install evanflow@evanflow
# Use after restart
"Let's evanflow this — I want to add a small feature that does X."
# Or install with npx
npx skills add evanflow
# Skills are registered under the evanflow: namespace
/evanflow:evanflow-goTerminology
Vertical-slice TDDA development approach where a feature is implemented vertically from the database to the UI, which EvanFlow breaks down into testable units and cycles through the RED-GREEN cycle.
Context rotThe phenomenon where an AI agent forgets initial instructions or design intent as the conversation lengthens. This is why prompting for TDD can become ineffective with long contexts.
AssertionA line of code in a test that verifies an expected outcome, such as 'this function should return 5'. Approximately 62% of LLM-generated tests have errors in this part.
Worktree isolationA method using git worktree to allow each agent to work in a completely separate directory. This prevents parallel agents from interfering with each other’s test results.
Cohesion contractAn agreement ensuring interface compatibility when multiple modules are combined. In EvanFlow, integration tests of touchpoints fulfill this role.
Deletion testA method to verify if a test fails when specific code is deleted. If the test doesn’t fail, the code is likely dead code and wasn’t actually validated.