An agent that evaluates its own work tends to approve itself. LOOP-R, the open INEMA framework that gives this track its name, solves this by separating roles: nine agents, each with what it reads, what it writes, what it decides and what it never does. The five letters give the order of the method. Here you see the design; promoting and rolling back versions belongs to course 5.
3Why the separation keeps the loop from convincing itself
4A real cycle from the example, read in the ledger
Goal: explain the letters L-O-O-P-R and the contract of the nine agents (reads, writes, decides, never does) and say why the one who does doesn't evaluate.
01 · The five letters, in cycle order
Click each letter: what it asks for and which agents come into it.
Lesson 401 · The five letters, in cycle orderClick each letter: what it asks for and which agents come into it.
Promoted or discarded, the decision goes to memory and the next cycle starts from the new evidence.
1/6
L · Locate
Pick a process that repeats a lot and write the goal with a number: take X to Y without worsening Z. The loop sheet has five answers that no system can safely infer: a goal with a number, where the evidence comes from, what never changes on its own, a cap on cost and time, and who approves. It is the goal from lesson 1, with a guardrail.
Scroll the page: each step below lights up its part of the diagram.
1/6
L · Locate
Pick a process that repeats a lot and write the goal with a number: take X to Y without worsening Z. The loop sheet has five answers that no system can safely infer: a goal with a number, where the evidence comes from, what never changes on its own, a cap on cost and time, and who approves. It is the goal from lesson 1, with a guardrail.
2/6
O · Operate
The process gets a current version, a short script followed in every run, so that two runs can be compared. The Executor produces the artifact and logs one line. It doesn't opine, doesn't suggest, doesn't change its own prompt.
3/6
O · Observe
One line per run, always the same columns, result as yes or no. The Observer turns the lines into evidence: counts by version and variant, no adjectives. If the data doesn't match the schema, it stops the cycle.
4/6
P · Propose
The Critic says what worked and what failed, with the strength of the evidence, without proposing a fix. The Optimizer writes hypotheses in the format SE, ENTÃO, PORQUE and MUDANÇA, without repeating discarded ones. The Guardian vetoes anything that touches what never changes or the cap; the veto is final and it doesn't negotiate.
5/6
R · Reinforce
The Experimenter designs the A versus B test, with the minimum sample calculated beforehand. The Evaluator answers one of three: B_GANHOU, A_SEGUE or AMOSTRA_INSUFICIENTE. There is no "it's winning". The Memory records everything without erasing, and the Meta-agent looks at the system (cost, vetoes) and only reports.
6/6
Whoever builds is not whoever inspects
Nine separate roles, each reading only what its contract says. It's the separation, not a cleverer prompt, that keeps the loop from convincing itself it improved.
Letters as presented in track 2 of the LOOP-R video; agent contracts in loop-r/docs/04-agentes.md and .claude/agents/.
02 · The contract of the nine, in a table
Summary of loop-r/docs/02-arquitetura.md, §4. Each agent is a markdown file in .claude/agents/.
Contracts (docs/02 §4)
| Agente | Lê | Escreve | Decide | Nunca faz |
|----------------|-------------------------------------|----------------------------|-------------------------|---------------------------------|
| Executor | versoes/atual, entrada da tarefa | artefato + linha no CSV | nada | mudar o próprio prompt |
| Observador | CSV, esquema | evidencia.md | nada | interpretar causa |
| Crítico | evidência, versão atual, memória | critica.md | se há padrão com N | propor solução |
| Otimizador | crítica, memória (descartados!) | hipoteses.md | nada | repetir hipótese descartada |
| Guardião | hipóteses, yaml (guarda-corpos, teto)| veto/aprovação por hipótese| veto é final | ser convencido |
| Experimentador | hipóteses aprovadas, amostra mínima | experimento.md | desenho do teste | rodar sem N calculado |
| Avaliador | resultados A/B, rubrica, calibração | veredito.md | uma das 3 respostas | "parece melhor" |
| Memória | tudo do ciclo | ledger + 3 arquivos | nada | apagar registro |
| Meta-agente | manifestos de todos os ciclos | relatorio-meta.md | nada (v0.1/v1) | alterar agentes |
Terminal · clone and check the agents
git clone https://github.com/inematds/loop-r ~/projetos/loop-r
cd ~/projetos/loop-r
ls .claude/agents/*.md | wc -l
grep -h '^description:' .claude/agents/*.md | cut -c1-110
Four cycles, eight decision lines: two hypotheses vetoed by the Guardian before any test, one discarded by the Evaluator, one promoted to v2.
In the vendas-whatsapp example, the agents really ran; the data is synthetic (1,500 generated rows) and the human decisions are simulated. The example's README separates what is real from what is simulated. Use it to read the mechanism, not as proof of gain.
03 · A discard that teaches
Cycle 0002 of the example: the metric went up and the new version still didn't make it in.
1. The hypothesis
Proposals of at most 80 words. It passed the Guardian and went to testing, A against B, 300 runs on each side.
2. The result
Response rate 19.3% in A against 29.7% in B: significant difference on the target.
But complaints: 6 in 300 against 1 in 300, with zero tolerance on the loop sheet.
3. The verdict
A_SEGUE: B only wins if the target goes up and no guardrail drops beyond the tolerance. Both together.
Without this rule, the loop learns to cheat the number.
4. The recorded lesson
The hypothesis went to discarded, with the numbers, so it won't be tested again. And the tolerance for rare events was corrected for the next tests, because zero doesn't separate effect from chance.
Promoting and rolling back a version is the subject of course 5.
04 · Video: the five letters of the method
LOOP-R track 2 on video. Made for managers, with business examples; the method is the same one an engineering loop uses.
On your machine. Read-only on the LOOP-R repository.
E1 · The nine contracts
15 min
Clone loop-r and open three agents: executor.md, guardiao.md and avaliador.md. For each one, note in agentes.md the "nunca" line from the file.
Done when:ls ~/projetos/loop-r/.claude/agents/*.md | wc -l → 9, and grep -ci nunca agentes.md → 3 or more.
E2 · Reading a cycle through the ledger
15 min
In the vendas-whatsapp example, read the ledger and the verdict of cycle 0002. Write in one sentence why the hypothesis was discarded even though the response rate went up.
Done when:grep -c '^| 2026' memoria/ledger.md → 8, and your sentence cites the guardrail (complaints) and the tolerance.
E3 · Separating who does from who evaluates
10 min
Think of a loop of your own (code, content, support). In agentes.md, write two lines, one starting with executa: and the other with avalia:, and say what the evaluator reads that the executor doesn't write.
Done when:grep -cE '^(executa|avalia):' agentes.md → 2, and the "avalia:" line points to a source the executor doesn't control (test, spreadsheet, rubric).
06 · Lesson quiz
Question 1 of 4
Why does LOOP-R use nine agents instead of one agent that does and checks?competency
Correct
Doc 04 says: each one reads only what the contract lists and refuses what is under "nunca". An agent that evaluates its own work tends to approve it; separating roles is the verification built into the design.
Not that one
Doc 04 says: each one reads only what the contract lists and refuses what is under "nunca". An agent that evaluates its own work tends to approve it; separating roles is the verification built into the design.Review: The five letters, in cycle order
Question 2 of 4
B raised the target metric by a significant margin, but worsened a guardrail beyond the tolerance. What is the Evaluator's verdict?
Correct
B only wins with the target going up AND no guardrail dropping beyond the tolerance. That was the case in cycle 0002 of the example.
Not that one
B only wins with the target going up AND no guardrail dropping beyond the tolerance. That was the case in cycle 0002 of the example.Review: A discard that teaches
Question 3 of 4
Which agent has a decision that nobody reviews within the cycle?
Correct
The Guardian's veto is final, it doesn't negotiate and vetoes when in doubt. The Meta-agent, by contrast, decides nothing in the current versions: it only reports.
Not that one
The Guardian's veto is final, it doesn't negotiate and vetoes when in doubt. The Meta-agent, by contrast, decides nothing in the current versions: it only reports.Review: The contract of the nine, in a table
Question 4 of 4
What does the vendas-whatsapp example prove?competency
Correct
The agents really ran; the data was generated and the approvals were simulated. Use it to read the mechanism, not as proof of real gain.
Not that one
The agents really ran; the data was generated and the approvals were simulated. Use it to read the mechanism, not as proof of real gain.Review: The contract of the nine, in a table
Quiz complete
You got {a} of {n} right. Get them all right and the lesson is marked as complete.
Choose one answer. The explanation appears after you try.
07 · In three sentences
Five lettersLocate the process and the number, Operate the same way every time, Observe in lines, Propose with critique and veto, Reinforce only with a test.
Nine contractsEach agent reads, writes, and decides only what its contract says, and has a list of what it never does.
Non-regressionLOOP-R does not guarantee the number goes up; it guarantees that a worse version does not replace the current one by the system's decision.