5 ms·
EvanFlow – A TDD driven feedback loop for Claude Code
- evanklem2004 5mo agoBuilt this as an opinionated Claude Code development flow based on evidence based practices and what has been working for me while developing professional code. EvanFlow is a single TDD-driven loop. Say "let's evanflow this" and it walks brainstorm → plan → execute → tdd → iterate → STOP. Real checkpoints at design and plan approval. Never auto-commits, never auto-stages, never proposes integration - every git op is your call. The three things that actually changed how I work: 1. Vertical-slice TDD. One failing test → minimal impl → next test. Watch each test fail before writing the impl that passes it. (Sounds obvious. Almost no agent does it by default. ~62% of LLM-generated test assertions are wrong per HumanEval research, so testing TDD discipline matters more than the impl discipline.) 2. Embedded grilling at decision points. Before locking a plan: what breaks if a user does X? What's the rollback? What's explicitly out of scope? Catches design flaws while they're still cheap. 3. Iterate-until-clean (hard cap of 5 rounds). Re-read the diff against dead code, naming, the deletion test, assertion correctness, and a Five Failure Modes pass (hallucinated actions, scope creep, cascading errors, context loss, tool misuse). For UI: screenshot via headless Chromium. For bigger plans with 3+ independent units sharing types, it forks into a parallel coder/overseer orchestration. Integration tests at touchpoints ARE the cohesion contract. Three install paths: Claude Code plugin marketplace, npx skills add, manual copy. MIT.
- girvo 5mo agoPlease don’t post AI generated comments :( Just write it yourself. I promise it’s worth it
- deaux 5mo agoHe's even being cheeky by intentionally replacing the em-dash by a regular dash, haha
- girvo 5mo agoIt's quite well done really, but the cadence... No x. No y. No z. Just abc. Its like nails on a chalkboard...
- evanklem2004 5mo agosometimes you gotta hit em with the ol' linkedin one two hehe
- jtfrench 5mo agoHow does this handle “dumb zone” evasion while looping?
- s20n 5mo agoEvanFlow - thoughts arrive like butterflies?
- sbseitz 5mo agoOh, he don't know, so he chases them away
- jamesbfb 5mo agoOooohhhh
- deleted 5mo ago[deleted]
- __mharrison__ 5mo agoSomeday soon he'll begin his life again
- ge96 5mo agoSeeeethinnggg tests failing not complete... again
- shruubi 5mo agoTwo questions 1) Do you not feel self-conscious or weird about calling this "EvanFlow"? Seems like a lot of people these days are naming their AI tools/skills/whatever after themselves which seems self-absorbed. Either that or they hope that if their thing takes off like OpenClaw did then they'll grab the fame that comes along with it. 2) Why does your TDD flow miss the refactor step of TDD?
- wenc 5mo agoI feel like 1 is a self correcting problem. If this goes nowhere it will soon be forgotten. I can think of one example that did go somewhere: Linux.
- EvanKnowles 5mo agoFeels like a bonus to me.
- globular-toast 5mo agoLinus did not name it Linux himself: https://en.wikipedia.org/wiki/Linux#Naming https://en.wikipedia.org/wiki/Linux#Naming
- u_fucking_dork 5mo agoHe merely laundered it through a coworker.
- cindyllm 5mo ago[dead]
- stingraycharles 5mo agoReiserFS is another one that comes to mind. And djb (the djb) also wrote djbdns. There are plenty of examples, usually when it coincides with someone’s first project.
- 5mo ago
- cratermoon 5mo agohttps://www.evenflo.com/ https://www.evenflo.com/
- jonahs197 5mo ago[dead]
- marsven_422 5mo ago[dead]
- here2learnstuff 5mo ago[flagged]
- avyjit 5mo agoThis is such a BS take. If you feel the product is immature or not great - that's valid criticism. This is not
- fragmede 5mo agoLinus started Linux when he was 21, an undergrad at the University of Helsinki. You're entirely welcome to use whatever filtering function for products you use, but it doesn't seem like soley using this particular product's creator's age as a disqualifier comes from a place of sound reasoning, to me.
- xaxfixho 5mo agoi'm new around here, how do i *DOWN VOTE* stuff?
- dpark 5mo agoI’ve thought of going down the TDD model for LLMs as a way of providing constraints on their behavior. I would think that “vertical slice” TDD would encourage the LLM to start tailoring the tests to the implementation rather than establishing the invariants up front, though. I was considering “horizontal” TDD to force the agent to implement constraints before coding to them.
- alex1sa 5mo ago[dead]
- evanklem2004 5mo agoyeah went back and forth on exactly this trade-off, you're right that vertical can produce tests tailored to the impl. horizontal forces invariants up front but the failure mode flips: you're tailoring tests to the architecture you imagined before any feedback from working code. so it's invariants-vs-behaviors, both have a tailoring failure mode just on different axes. compromise i landed on: vertical + an explicit anti-tailoring grill check at each cycle. definitely gonna tweak with more as i keep refining.
- dpark 5mo agoWhat if you don’t ask for code yet. Prompt only for tests with maybe a minimal interface context that tests can code against?
- viktorianer 5mo ago[dead]
- lukewrites 5mo agoCurious, In the repo you mention > Several rules come from 2025-2026 industry research on agentic coding failure modes What are some of the papers you read?
- esperent 5mo agoWith no disrespect intended because this is also how I would do it (but I wouldn't publish and name it after myself!) - they didn't read the research. They had the AI that actually created this do that for them.
- evanklem2004 5mo agofair to call out but half true. i did send claude off to look up specific stats on failure modes (62% assertion correctness, etc), but the design decisions came from my own reading of anthropic's reports, the columbia daplab paper i cited, and a mix of matt pocock's lectures + my own anecdotal experience running this loop on real projects.
- Deeds67 5mo agoTo be honest, the official superpowers/brainstorming skill already does TDD so well, I don't see that much of a need for this. TDD is definitely the way to go with agentic development.
- synergy20 5mo agohow?i saw superpowers/brainstorming but never saw tdd code produced
- jghn 5mo agoIt’s supposed to do this, but I’ve found it doesn’t always do it
- Deeds67 5mo agoJust tell it to use TDD
- Atotalnoob 5mo agoThere is another skill for tdd. You can activate it manually or tell the harness to
- esperent 5mo ago> execute → tdd How are these separate steps? TDD is how you execute, not something you tack on afterwards.
- evanklem2004 5mo agoyeah that is a little confusing, tdd is actually a substep of execution. it was listed separately in the diagram because not every task uses TDD (config, generated types, etc. skip it), so the skill is invoked conditionally during execution rather than always. but the arrow notation made it look sequential when it's actually nested. updated the README diagram to show that. thanks for the nudge.
- tommy29tmar 5mo ago[dead]
- youwangd 5mo ago[dead]
- sdevonoes 5mo agoTDD in 2026? Besides, TDDs main benefit is to come up with a decent architecture for your system… LLMs can already do that if instructed. I don’t see the point of TDD
- myko 5mo agoI've always been hesitant to prescribe TDD to _everything_ until agentic coding agents came along. TDD is a great way to keep them on track.
- nghnam 5mo agosuperpowers/brainstorming is doing TDD as well.
- enesz 5mo ago[dead]
- dmitry_dv 5mo agoThe refactor step is the silent casualty in AI-assisted TDD. Once the test is green, Claude optimizes for moving to the next test, not for cleaning up the impl that just passed. An "iterate-until-clean" pass at the end is a different thing: you're refactoring cold code, not refactoring with a freshly-written test as the safety net.
- pydry 5mo agoWhen I first used agentic coding I was already doing strict TDD and I just tried using it for the refactor step. It sucked so hard I thought the idea of agentic coding was just a joke. Ive tried it periodically and it literally never stopped sucking. I figure if it cant do that part it isnt worth using it for any part. Ever since then whenever people tell me it's gotten better I've tried it out and nope, still sucks. I still get gaslit about how well it works by people who just discovered TDD though, and watch it power through CRUD boilerplate getting impressed, blissfully unaware that boilerplate spew is an antipattern.
- evanklem2004 5mo agommm good point! just shipped a fix that puts RED → GREEN → REFACTOR per cycle with the fresh test as safety net just like beck intended. macro/cross-cycle refactor lives in iterate now as its own separate thing so the two don't conflate. thanks for the catch : )
- deleted 5mo ago[deleted]
- conception 5mo agoIf you’re just looking for the TDD part - https://github.com/nizos/tdd-guard https://github.com/nizos/tdd-guard - is the only project I’ve come across that actually enforces it with hooks and blocks edits rather than relying on a prompt that gets context rotted away.
- Nizoss 5mo agoCreator of TDD Guard here, thanks for the mention! TDD Guard was built when Claude Code was the only one to offer hooks. Plugins didn't exist and the models were weaker, so the validation context and instructions took more work to get right. This is why it ended up requiring test reporters for different languages. I have started a new project that does the same TDD enforcement, also through hooks, but without reporters. It works with any test runner, and it is vendor-agnostic, it works with Claude Code, Codex, and GitHub Copilot. The validator also sees recent session history which helps it handle cases like refactoring better. The TDD instructions are still pretty basic compared to TDD Guard's, which have been dogfooded for a year. One thing I noticed while testing across agents is that some follow TDD a lot better than others, Codex struggled the most with the basic instructions. Feedback welcome: https://github.com/nizos/conduct https://github.com/nizos/conduct
- jimmypk 5mo ago[flagged]
- phibz 5mo ago... thoughts arrive like butterflies Oh he don't know, so he chases them away Oh someday yet, he'll begin his life again Life again, life again
- thisisfatih 5mo agoThe refactor-per-cycle fix lands in the right place. The harder problem shows up when EvanFlow forks into parallel coder/overseer mode: unit tests pass per agent, but the seams break at merge. Your note that "integration tests at touchpoints ARE the cohesion contract" is exactly right, but enforcement is what makes it stick. Each parallel branch needs its own failing test that can't be masked by another branch's green run. Worktree isolation handles this cleanly since each agent's environment is separate. Without that, vertical-slice TDD in parallel collapses to "tests pass somewhere." On jtfrench's unanswered question about dumb zone evasion: context length is what drives the drift. Agents go off-track when a loop runs long enough that early design context falls out. Resetting at each RED-GREEN-REFACTOR boundary keeps cycles short enough to avoid it. The hard cap of 5 iterate rounds is the same instinct applied at the macro level. We ran into the parallel integration seam problem building tonone, a 23-agent Claude Code plugin where each domain agent works in its own worktree and integration tests are the merge contract. https://github.com/tonone-ai/tonone https://github.com/tonone-ai/tonone if curious.
- kevinluddy39 5mo agoThe per-agent-green / merge-broken pattern is the diagonal failure mode of multi-agent systems. Unit testing each agent in isolation captures correctness within scope; what's invisible is the seam at handoff — argument schemas drifting between coder and overseer, response shapes that satisfy each agent's local validator but break the next's parser, error messages that get summarized into "no error" by the time they reach the orchestrator. Built tool-call-grader to instrument exactly this. Session-level statistics across the tool-call trace plus six pathology detectors (silent failure, tool fixation, response bloat, schema drift, irrelevant response, cascading failure). On a hand-designed multi-agent benchmark, 7/7 scenarios passed — including specifically the case you're describing: per-agent results look fine, schema-drift fires at the seam. The detector runs over the trace, not the output. Catches the failure several turns before it shows up as "weird merge bug" the human has to debug. MIT licensed, npx-installable. Methodology in profile.