DEV Community

AI Insider
AI Insider

Posted on • Originally published at ai-insider.io

Cook: Why Your AI Agent Needs a Review Loop

TL;DR: Cook is a new CLI that adds review loops, parallel racing, and task progression to Claude Code, Codex, and OpenCode. It solves the "one-shot prompt" problem — instead of hoping your agent gets it right the first time, you can now build systematic iteration into every task.


The Problem I Hit Every Day

I run an AI assistant 24/7. It writes articles, manages tasks, publishes content. And here's what I learned: single prompts fail.

Not because the models are bad — they're incredible. But complex work needs iteration. A draft needs review. Code needs testing. The gap between "generate once" and "iterate until done" is where most AI workflows break.

Enter Cook.


What Cook Actually Does

Cook wraps your AI agent calls with three primitives:

1. Loop Operators — Run work multiple times

cook "Add dark mode" x3          # 3 sequential passes
cook "Add dark mode" review      # review→gate loop until DONE
Enter fullscreen mode Exit fullscreen mode

2. Composition — Race parallel approaches

cook "Add dark mode" v3 "least code"    # run 3 versions, pick best
cook "Auth with JWT" vs "Auth with sessions" pick "best security"
Enter fullscreen mode Exit fullscreen mode

3. Task Progression — Move through a checklist

cook "Work on next task in plan.md" \
  ralph 5 "DONE if all tasks complete, else NEXT"
Enter fullscreen mode Exit fullscreen mode

The magic is in composition. You can chain these:

cook "Add dark mode" review v3 "cleanest result"
# = race 3 versions, each with its own review loop, pick cleanest
Enter fullscreen mode Exit fullscreen mode

Why This Matters for Always-On Agents

If you've built an agent that runs continuously, you know the pain:

  1. One-shot prompts are fragile — You can't anticipate every edge case
  2. Manual review doesn't scale — You can't personally check every output
  3. Iteration is expensive — Re-running full prompts wastes tokens

Cook solves all three:

  • Built-in review loops replace manual checking
  • Racing parallel versions increases quality without linear cost
  • Task progression enables autonomous multi-step work

The Architecture That Impressed Me

Cook runs each parallel branch in isolated git worktrees. This means:

  • Version A and Version B don't interfere
  • You can merge the winner cleanly
  • Failed branches are discarded without polluting your repo

The resolver step (pick, merge, or compare) then decides what to keep.


Quick Setup

npm install -g @let-it-cook/cli
Enter fullscreen mode Exit fullscreen mode

Or add it as a Claude Code skill:

mkdir -p .claude/skills && \
  cp -r $(npm root -g)/@let-it-cook/cli/skill .claude/skills/cook
Enter fullscreen mode Exit fullscreen mode

When to Use Cook vs Raw Prompts

Use Raw Prompts Use Cook
Quick questions Multi-step tasks
Single file edits Full feature implementation
Exploration Production code
When you'll review manually When you want autonomous iteration

The Bigger Picture

Cook joins a growing ecosystem of AI orchestration tools:

  • OpenClaw — always-on assistant infrastructure
  • NemoClaw — Nvidia's enterprise sandbox for OpenClaw
  • Superpowers — TDD-driven agent development
  • Cook — workflow loops for iteration

The pattern is clear: the future isn't better single prompts, it's better workflows around prompts.


Try It Today

  1. Install: npm install -g @let-it-cook/cli
  2. Init: cook init in your project
  3. Run: cook "Your task" review

Start with the review loop. Once you see how it catches issues you'd normally fix manually, you'll never go back to one-shot prompting.

Links:


Originally published at AI Insider

Top comments (0)