Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 2 min read

Claude Code said "done". The tests were red. So I built a gate it can't talk its way past

When I let Claude Code run a long task, the expensive failure is rarely a wrong line of code. It's a confident "All done!" sitting on top of a failing test suite. I'm a solo dev building a GPS app for truck drivers in F

When I let Claude Code run a long task, the expensive failure is rarely a wrong line of code. It's a confident "All done!" sitting on top of a failing test suite.

I'm a solo dev building a GPS app for truck drivers in Flutter. I got tired of trusting "done", so I wrote revo-flow, an open-source Claude Code plugin. Here is the design, and three lessons from building it.

The flow

  1. Plan first. /revo-flow <request> makes Claude write a plan: 1 to 6 sub-agents, the model and effort for each (Opus for heavy work, Sonnet or Haiku for side tasks), and numbered tasks. Nothing runs until I accept it.
  2. Visible work. Each sub-agent gets its own progress bar in a side panel.
  3. A gate that isn't a model. When the agents finish, the plugin itself runs the project's lint, type check and related tests. It compares against a baseline taken at planning time, so only new errors count: old debt doesn't block you, regressions do.
  4. A read-only verifier. A separate agent checks each acceptance criterion, without being able to edit files.
  5. Red means not done. If the gate is red, the errors go back to the orchestrator: up to 3 attempts, then I decide.

Lesson 1: a guard that fails open is worse than no guard

The gate holds the end of the turn through a Stop hook. Then another plugin started skipping that hook. The gate still ran in the background, but nothing held the turn anymore. Had it been red, Claude would have said "done" anyway, and I would have believed it, because "I have a gate".

The fix (v3.10): revo-flow detects the skipped hook and judges the gate itself at the end of the turn. Green, the flow ends. Red, the orchestrator is resumed with the error report. If you write hooks, plan for them not firing.

Lesson 2: the checker must not be able to fix things

A verifier with write access tends to "verify" by quietly patching what it finds, and the report then says everything passed. A verifier that can edit is just another implementer. Read-only tools only, and its verdict per criterion goes in the report.

Lesson 3: declare the model, then check what actually ran

The plan says "Opus, high effort" for the heavy agent. The final report shows the model and effort each sub-agent actually used, with a warning when they differ from the plan. Silent downgrades become visible.

Optional: proof that the app runs

Lint and unit tests don't see a blank page or a crash at launch. When a flow has acceptance criteria, the verifier can ask to see the app: a dev server browsed in Chrome, or a Flutter / React Native app on a phone (screenshots, view tree, taps). Everything starts only after you confirm, and is stopped at the end.

Try it

/plugin install revo-flow --marketplace LilianMLG/revo-flow

Repo (MIT): https://github.com/LilianMLG/revo-flow. The full docs are in French, the README is in English.

I'd love feedback on the gate design, especially from people who write their own hooks: how do you make sure yours actually fire?

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.