A writer agent and a critic agent: an n8n loop that ends on a rubric, not on fatigue
One agent writes, another scores the draft against a rubric and house rules, and the loop returns to the writer until the text clears the bar. What matters most here is not the prompts but the three stop conditions, and the rule that the critic may not inflate the score just to end the loop.
Author
- Adrian HuniaCo-founder of SEVENEDGE
- Published:
- Last verified:
- n8n version:
- 2.8.4
In short
What it does
- Takes a brief from n8n chat or a manual run
- The writer drafts from the brief and the house rules
- The critic scores the draft against a rubric and lists specific fixes
- Approves only with a score at the bar and zero must-fix points
- Logs the score history and the exit reason to Google Sheets
What it does not do
- Does not fact-check beyond the brief
- Cannot guarantee the same kind of model will catch its own blind spots
- Does not publish the text
- Does not replace editing for public content
What it needs
- n8n with LangChain nodes (tested on 2.8.4)
- An Anthropic API key
- A Google Sheet for the run log
A writer agent and a critic agent: an n8n loop that ends on a rubric, not on fatigue
The idea is simple: one model writes, a second reads critically, the first revises. The trouble is that the naive version ends one of two ways. Either the critic starts nodding along after round two because "the draft improved", or the loop spins forever on cosmetics.
This n8n workflow is built around its stop conditions. The prompts come second.

Loop state in one object
Everything the loop carries between rounds sits in one object: round number, current draft, latest critique and score history. The node at the head of each round changes nothing; it just passes that state on. That keeps the edge back to the start of the loop easy to follow in the editor.
The writer may disagree
The writer must address every critique point. If it deliberately disagrees with one, it says so in deliberate_deviations instead of quietly ignoring it. Missing data gets a placeholder such as [FIGURE NEEDED: Q3 revenue] and goes into needs_from_human rather than an invented number.
The critic scores, it does not rewrite
The critic gets the brief, the house rules and the rubric. It splits its points into must_fix (breaks the brief or the rules) and would_improve (preference). The prompt says outright:
Do NOT inflate the score across rounds to let the loop finish.
Approval needs two things at once
const meets_bar = !isNaN(score) && score >= threshold && mustFix.length === 0;
A high score with an open must_fix point is not an approval. The rubric and the blocking list are separate signals, and the stricter one wins.
Three ways out of the loop
| Reason | When |
|---|---|
APPROVED | score at the bar (80 by default) and zero must_fix points |
ROUND_LIMIT | the round limit is used up (3 by default) |
STALLED | the score moved by no more than 2 points over two rounds |
The round limit guarantees termination whatever the two models agree between them. The sheet log records not only the result but the exit reason, the score history and what the text still needs from a person.
Configuration
| Parameter | Default | Purpose |
|---|---|---|
houseRules | e.g. sentences under 25 words, active voice | rules the critic enforces |
rubric | bands 90/80/60/40 | how quality maps to a number |
approvalScore | 80 | approval bar |
maxRounds | 3 | hard round limit |
Limitations
The writer and the critic are the same kind of model. They share blind spots, so the critic may miss a mistake the writer made for the same reason.
Each round is at least two model calls, and because the full draft is passed along, cost grows with text length.
Output quality depends on the rubric. A vague rubric gives vague critique.
The workflow does not check facts. It only makes sure the text introduces no numbers that were not in the brief.
When it does not make sense
For one short text, editing it yourself is faster. The loop makes sense for repeatable texts with clear rules: internal notes, product descriptions, replies that follow a pattern. We write about drawing boundaries between agents in every agent needs to be told what it does not do. When texts like these should be produced inside your own systems, that is work for AI process automation.
Take it with you
How to cite this
Adrian Hunia (2026). A writer agent and a critic agent: an n8n loop that ends on a rubric, not on fatigue. SEVENEDGE. https://sevenedge.pl/en/workflows/agent-pisarz-krytyk-rubryka (accessed: November 5, 2026)
Sources
- n8n docs — AI Agentn8n docs
- n8n docs — Structured Output Parsern8n docs
Who is behind this
Adrian Hunia
Co-founder of SEVENEDGE
Co-founder of SEVENEDGE. Designs and deploys business systems for small companies, from production management to time tracking. Works with Next.js, FastAPI and PostgreSQL. SEVENEDGE has no subcontractors — both owners write the code.
Related documents
Other workflows we documented the same way.
- Contract review against your playbook: clause by clause, with a gate for the lawyerA contract lands in a folder, Claude extracts the clauses, an agent assesses each one against your negotiating positions, and code computes the verdict. While writing this up we found a bug in the published version that dropped two of every three assessments. We describe it here along with the fix.
- A three-agent AI support desk: triage, documentation research, reply draft and a human gateOne agent classifies the ticket, a second looks for the answer in your own documentation, a third drafts the reply. Only a reply that passes three conditions at once goes out on its own. A person sees the rest, and every question your docs cannot answer becomes a documentation task.


