E22 · From 0/8 to 8/8 in the rehearsal
5 minRun the rehearsal.
Done when: LOOP: 0/8 with saída: 1, then LOOP: 8/8 — PRONTO with saída: 0.
Lesson 8 · 20 min
The seven lessons gave you the pieces: hypothesis, experiment, promotion, lessons, binding rule, protected meter, and trace. What's left is putting them together in your system and checking that none was left out. This lesson also closes the track: what each of the six courses puts into the loop, and the dated plan to assemble yours.
Start the lesson
Goal: check the eight pieces of the loop that learns in your project, close what's missing, and close the track with the dated plan.
One per lesson. Click each piece to see what conferir-loop.py requires.
conferir-loop.py reads loop.conf at the project root. It checks that the pieces are present and consistent, not the quality of your hypothesis.
An empty folder and a loop assembled by the kit (montar.sh repeats, without a model, what lessons 1 to 7 did). It needs the loop-r and sil-loop-r repositories in ~/projetos.
K=~/projetos/loop-r-eng-aprende-v72/kit
E=${TMPDIR:-/tmp}/ensaio-aprende/a8; rm -rf $E; mkdir -p $E/vazio
echo "## uma pasta sem nada"; python3 $K/conferir-loop.py $E/vazio > $E/vazio.txt; echo "saída: $?"; tail -1 $E/vazio.txt
echo "## as oito peças montadas pelo kit (o que as aulas 1 a 7 fizeram)"
bash $K/montar.sh $E/meu-loop > /dev/null
python3 $K/conferir-loop.py $E/meu-loop; echo "saída: $?"
echo "## o loop.conf que o conferir lê"; cat $E/meu-loop/loop.conf# loop.conf — o que o conferir-loop.py lê (KEY=valor; ~ e $HOME valem). Fica na raiz do seu projeto. SISTEMA=~/projetos/<seu-sistema> # repo onde o experimento roda (tem results.tsv); padrão: esta pasta LOOP=~/loops/<seu-loop>/promocao # versoes/ + memoria/ledger.md (aula 3); fora do repo do sistema GUARDA=~/loops/<seu-loop>/medidor.sha256 # manifesto do medidor (aula 6); fora do repo ESCONDIDOS=~/loops/<seu-loop>/escondidos.jsonl RASTRO=~/loops/<seu-loop>/rastros.jsonl # uma linha por ciclo (aula 7) TETO_TOKENS=<tokens por ciclo, a partir da sua medição real> APROVADOR=<quem aprova a promoção (nível L1)>
## uma pasta sem nada saída: 1 LOOP: 0/8 — FALTAM 1, 2, 3, 4, 5, 6, 7, 8 ## as oito peças montadas pelo kit (o que as aulas 1 a 7 fizeram) OK 1 hipótese com número (hipotese.md passa no hipotese.py) OK 2 experimento keep/discard (results.tsv com 1 ciclo(s)) OK 3 promoção e rollback (versoes/atual + ledger com PROMOVIDA) OK 4 lições com decisão (SIL) (1 regra(s) ativa(s) no SIL) OK 5 regra vinculante no AGENTS.md (bloco promovido e check sem pendência) OK 6 medidor fora do alcance (GUARDA confere e ESCONDIDOS fora da pasta) OK 7 rastro por ciclo (RASTRO com pelo menos um ciclo) OK 8 teto e aprovador (TETO_TOKENS e APROVADOR no loop.conf) LOOP: 8/8 — PRONTO saída: 0 ## o loop.conf que o conferir lê LOOP=/tmp/ensaio-aprende/a8/meu-loop-fora/promocao GUARDA=/tmp/ensaio-aprende/a8/meu-loop-fora/medidor.sha256 ESCONDIDOS=/tmp/ensaio-aprende/a8/meu-loop-fora/escondidos.jsonl RASTRO=/tmp/ensaio-aprende/a8/meu-loop-fora/rastros.jsonl TETO_TOKENS=50000 APROVADOR=Seu Nome
What stays outside the system repo (meter, hidden cases, trace, versions) goes in a sibling folder: the agent that changes the system can't reach what judges it.
What each course adds to your loop. This one is the last.
The five pieces of the loop (goal, state, action, verification, stop), the harness, today's loop engines, LOOP-R and the done criterion from 0 to 4.
Whoever says it's done can't be whoever did it: skeptical evaluator, frozen tests, shortcuts, gold set, calibrated judge and the layered gate.
The seven-file kit, goal.md level 3+, context in bands, handoff that checks, headless loop with a ceiling and session measurement.
When not to use it, subagents with short returns, generator × evaluator, worktrees, queues without collisions and the Claude + Codex team.
Lethal trifecta, Rule of Two, injection through read content, permissions per step, guard hooks, sandbox and the door to the irreversible.
Hypothesis with a number, keep/discard, promotion and rollback, lessons that become a binding rule, protected meter and cost per cycle.
The rehearsal, then your system.
Run the rehearsal.
Done when: LOOP: 0/8 with saída: 1, then LOOP: 8/8 — PRONTO with saída: 0.
In your project, copy loop.conf.exemplo to loop.conf, point each path to the pieces you built in the practice sections of lessons 1 to 7, and run conferir-loop.py. Close the missing pieces one at a time, in order.
Done when: python3 $K/conferir-loop.py ~/projetos/[your-project]; echo "saída: $?" → LOOP: 8/8 — PRONTO and saída: 0.
With the loop at 8/8, run a real cycle with your agent, with the guardrail and hidden cases on and the trace recording (MEDIR and MEDIDOR exported as in lesson 2, if the measurer is your own). If it ends in keep, make the card and ask the person who decides for approval.
Done when: your system's results.tsv gets a new line, the trace gets a line with tokens, and there is a decisao.md with a name and date if the cycle ended in keep.
Four deliverables, in order. Click an exercise to see its "done when".
lessons 1 and 2
3 exercises
A hypothesis with a number and the first keep/discard.
View the lessonlessons 3, 4 and 5
3 exercises
Promotion with rollback and lessons that become rules.
View the lessonKit cloned, hipotese.md approved, and three cycles in the rehearsal, plus one real one.
Requires day 1. Verdicts redone, SIL in your project, and one binding rule.
Requires days 2 and 3. Both shortcuts seen and closed; the cost per keep measured.
Requires everything before. loop.conf pointing to the pieces, conferir-loop.py at 8/8.
Measure, decide, protect, and build. Only move on to the next deliverable when the "done when" of the previous one is true.
Mandatory order: promoting without a protected meter is promoting the shortcut.
Choose the start date and how much time you have per week. The plan lists the 24 exercises in order.
Question 1 of 4
conferir-loop.py returned 8/8. What does that guarantee?skill
Question 2 of 4
Why do the meter, hidden cases, trace, and versions stay outside the system's repo?skill
Question 3 of 4
Which course in the track owns "separate evaluator, frozen tests, and calibrated judge"?
Question 4 of 4
In the map's order, why does "Protect" come before "Build"?
Choose an answer. The explanation appears after you try.