A team of agents fits on one page: the decision from lesson 1 and, for each role, level, tools, what it writes, isolation, input, return, who verifies it, and cap. Written this way, a script checks whether a field is missing or whether two roles write to the same place without isolation. In this lesson you write your loop's time.md, check it, and run it.
3A checker that flags missing fields and collisions
4The course map and your plan with dates
Goal: write your loop's time.md (role, level, tools, file owner, isolation, return, verification, cap) and run it.
01 · From request to team
Each step uses a lesson from the course. Click to see which one.
Click each block in the diagram to see what it does.
Start with the smallest team that does the job. A new role only comes in when you can say what it returns and who checks it.
02 · The time.md and the checker
Copy the template, swap in your loop's roles, and run the checker. No model is called.
time.md · template with four roles
# Time do loop — [nome do loop]
Decisão (aula 1): híbrido — plan and review at the center; run in parallel only the independent items.
## papel: planejador
- nível: topo
- ferramentas: Read, Grep, Glob
- escreve em: nada
- isolamento: nenhum (read-only)
- entrada: goal.md
- retorno: plan in up to 5 steps + comando → saída criteria (the orchestrator is the one who writes to plans/)
- verificado por: you (human gate before running)
- teto: 1 round
## papel: executor
- nível: executor
- ferramentas: Read, Write, Edit, Bash, Grep, Glob
- escreve em: src/ tests/novos/
- isolamento: worktree
- entrada: approved plan
- retorno: list of changed files + test output
- verificado por: avaliador
- teto: 3 rounds, 600 s each
## papel: avaliador
- nível: menor
- ferramentas: Read, Bash, Grep, Glob
- escreve em: nada
- isolamento: sandbox read-only
- entrada: goal.md + diff + test output
- retorno: OK/FALHA per criterion + APROVADO or FALTA
- verificado por: script verificar.mjs
- teto: 1 round per delivery
## papel: revisor-codex
- nível: executor
- ferramentas: codex exec -s read-only
- escreve em: nada
- isolamento: sandbox read-only
- entrada: same briefing + real diff
- retorno: up to 6 lines, the last one APROVADO or FALTA
- verificado por: you reconcile (aceito, rejeitado with evidence, em aberto)
- teto: 2 rounds
confere-time.py · save next to time.md
# confere-time.py — checks time.md: every role has the 8 fields, and no
# file has two owners without isolation (the collision from lessons 5 and 6).
# Usage: python3 confere-time.py time.md
import re, sys
CAMPOS = ["nível", "ferramentas", "escreve em", "isolamento", "entrada",
"retorno", "verificado por", "teto"]
NIVEIS = {"menor", "executor", "topo", "super"}
texto = open(sys.argv[1], encoding="utf-8").read()
papeis = re.findall(r"^## papel: *(.+?)\n(.*?)(?=^## |\Z)", texto, re.M | re.S)
problemas = 0
donos = {}
for nome, corpo in papeis:
campos = dict(re.findall(r"^- ([^:]+): *(.+)$", corpo, re.M))
faltam = [c for c in CAMPOS if not campos.get(c, "").strip()]
if faltam:
print(f"{nome}: falta {', '.join(faltam)}"); problemas += 1
if campos.get("nível") and campos["nível"] not in NIVEIS:
print(f"{nome}: nível '{campos['nível']}' não é menor/executor/topo/super"); problemas += 1
escreve = campos.get("escreve em", "nada")
if escreve != "nada" and campos.get("isolamento", "nenhum").startswith("nenhum"):
for alvo in escreve.split():
donos.setdefault(alvo, []).append(nome)
if escreve != "nada" and "ferramentas" in campos and not re.search(r"Write|Edit|Bash|workspace-write", campos["ferramentas"]):
print(f"{nome}: escreve em {escreve}, mas as ferramentas só leem"); problemas += 1
for alvo, quem in donos.items():
if len(quem) > 1:
print(f"colisão: {alvo} tem {len(quem)} donos sem isolamento ({', '.join(quem)})"); problemas += 1
print(f"papéis: {len(papeis)} · problemas: {problemas}")
sys.exit(1 if problemas or not papeis else 0)
Terminal · check
cd ~/treino-multi
python3 confere-time.py time.md; echo "saída: $?"
Example from the repository
papéis: 4 · problemas: 0
saída: 0
The template passes. The planner writes "nada": the orchestrator is the one that saves the plan to disk. In the first version of the template, the planner said "escreve em: plans/" with read-only tools, and the checker flagged the contradiction.
The same team with the executor without a worktree and a second executor, with no cap, also writing to src/:
executor-2: falta teto
colisão: src/ tem 2 donos sem isolamento (executor, executor-2)
papéis: 5 · problemas: 2
saída: 1
Two ways out: give each executor a worktree (lesson 5) or split the folders by owner (what the agent teams doc asks for).
03 · Final practice
Your team on paper, checked, and one real round.
E17 · The time.md for your loop
30 min
Run the matrix (lesson 1) for the loop you want to build. Write the time.md with the roles the decision calls for, replace [nome do loop], and run the checker.
Done when:python3 confere-time.py time.md; echo "saída: $?" → papéis: N · problemas: 0 and saída: 0, with N equal to the number of roles you wrote.
E18 · One round of the team
45 min
Pick a small task from your project. Write the goal with 2 or 3 criteria and commit it. The executor runs through gera-avalia.sh in a worktree (git worktree add) and the Codex reviewer reads the diff through the bridge. Reconcile the findings in revisao.md.
Done when:./gera-avalia.sh goal.md "[request]" ends with → APROVADO and saída: 0; tail -1 revisao-codex.txt | grep -cE '^-? ?(APROVADO|FALTA:)' → 1; grep -cE "^(aceito|rejeitado|aberto):" revisao.md equals the number of findings.
04 · The course map
Four deliverables, in order. Click an exercise to see its "done when".
Lesson 804 · The course mapFour deliverables, in order. Click an exercise to see its "done when".
Day 1Decide
lesson 1
2 exercises
decisao.md with 3 tasks of your own and no warnings.
Why is the "verificado por" field required for every role?
Correct
Lesson 4: someone else decides, a different process looking at the artifact. Without this field, the team goes back to trusting the report.
Not this one
Lesson 4: someone else decides, a different process looking at the artifact. Without this field, the team goes back to trusting the report.Review: From request to team
Question 4 of 4
In the model, the planner writes "nada". Who writes the plan to disk?
Correct
The planner only has read tools. Saying it writes to plans/ was the contradiction the checker caught in the first version.
Not this one
The planner only has read tools. Saying it writes to plans/ was the contradiction the checker caught in the first version.Review: The time.md and the checker
Quiz completed
You got {a} of {n} right. Get them all right and the lesson is marked as completed.
Choose one option. The explanation appears after your attempt.
07 · In three sentences
One pageDecision and, per role: level, tools, where it writes, isolation, input, return, verification and cap.
Checked by scriptA missing field, a meaningless level and two owners without isolation show up before you run anything.
Run onceExecutor in a worktree, evaluator by code, cross-review reconciled.