The loop that learns|INEMA.CLUB-PRO

Lesson 1 · 15 min

A hypothesis with a number

A loop that learns starts with a sentence that can turn out wrong. "Improve the triage" is never wrong, so it teaches nothing. In this lesson you write the hypothesis with process, metric, current, target, measurement command, and what must not get worse, and you work out how long the test takes before you run it.

Start the lesson
A lab notebook open next to a caliper and a dial with a yellow mark on the target.

In this lesson you will

  1. 1The seven fields of a testable hypothesis
  2. 2Three metric speeds: money, signal, and artifact
  3. 3Minimum sample: how many weeks the test takes
  4. 4Why 3% → 5% is almost never testable directly

Goal: write a hypothesis with a metric, current value, target, measurement command, and do-not-worsen, and work out how long the test takes before you run it.

01From a wish to a testable hypothesis

This is the first question of /loop-r iniciar: which process, and which number you want to move from what to what. Click each block.

The hypothesis is written before the experiment, in a file. After the result, nobody rewrites the target.

Fields and math come from loop-r/.claude/skills/loop-r/SKILL.md (start) and loop-r/docs/05 (measurement).

02Three metric speeds

LOOP-R proposes one of each and tests on the fastest one that still has a plausible link to the money one (loop-r/docs/05 §1).

1. Money

Conversion, ticket, margin. It's what matters, but the one who answers is the customer, weeks later.

While there's no volume, it becomes a watched "do not worsen", not the test target.

03The model and the rehearsal

The hypothesis is a text file with seven fields. hipotese.py checks it and, for an A/B test, does the sample math (two-proportion z-test, 95% confidence, 80% power).

File · kit/hipoteses/triagem.md
hipótese: incluir sinônimos de reembolso (estorno, devolução) nas regras leva o acerto de 0.70 a 0.80
métrica: acerto da triagem nos 40 casos de casos.jsonl
atual: 0.70
alvo: 0.80
direção: maximizar
medida por: python3 kit/medir.py <repo>
sem piorar: acerto nos casos escondidos (fora do repo)
Terminal · cost-free rehearsal
K=~/projetos/loop-r-eng-aprende-v72/kit   # git clone https://github.com/inematds/loop-r-eng-aprende-v72 ~/projetos/loop-r-eng-aprende-v72
for h in vaga triagem; do
  echo "## $h"; python3 $K/hipotese.py $K/hipoteses/$h.md; echo "saída: $?"
done
echo "## vendas: conversão 3% → 5%, 50 propostas por semana"
python3 $K/hipotese.py $K/hipoteses/vendas-conversao.md --por-semana 50; echo "saída: $?"
echo "## vendas: resposta em 48h 20% → 30% (métrica de sinal)"
python3 $K/hipotese.py $K/hipoteses/vendas-resposta.md --por-semana 50 | tail -2
Example from the repository
## vaga
HIPÓTESE: REPROVADA
  falta: atual, alvo, medida por, sem piorar
  hipótese vaga sem número
saída: 1
## triagem
HIPÓTESE: OK — acerto da triagem nos 40 casos de casos.jsonl: 0.7 → 0.8 (maximizar)
  medida por: python3 kit/medir.py <repo>
  sem piorar: acerto nos casos escondidos (fora do repo)
saída: 0
## vendas: conversão 3% → 5%, 50 propostas por semana
HIPÓTESE: OK — conversão (proposta que virou pacote pago em até 15 dias): 0.03 → 0.05 (maximizar)
  medida por: coluna resultado de dados/execucoes.csv, A contra B
  sem piorar: margem média, reclamações, opt-out
  amostra mínima: 1506 por variante (95%, poder 80%) — 3012 no total
  com 50 por semana: 61 semanas
  AVISO: mais de 12 semanas — teste uma métrica de sinal mais rápida e vigie esta
saída: 0
## vendas: resposta em 48h 20% → 30% (métrica de sinal)
  amostra mínima: 294 por variante (95%, poder 80%) — 588 no total
  com 50 por semana: 12 semanas

The loop-r/docs/05 rounds the same math to "~1,500 per variant, 60 weeks" (3% → 5%) and "~300, 12 weeks" (20% → 30%). With 50 proposals a week, conversion takes over a year; the response, three months.

04Practice

Rehearsal first, then your own hypothesis.

E1 · Fail and pass

5 min

Clone the course repository and run the rehearsal above.

Done when: the gate ends with HIPÓTESE: REPROVADA and saída: 1; the triage with HIPÓTESE: OK and saída: 0; the conversion shows 61 semanas and the AVISO.

E2 · Your hypothesis

20 min

Pick one of your own processes that already has a number (an agent's hit rate, build time, tests that pass, replies). Write hipotese.md with the seven fields, with the measure as a command you can run today. If it's an A/B with people, run it with --por-semana and your real volume.

Done when: python3 $K/hipotese.py hipotese.md; echo "saída: $?" → HIPÓTESE: OK and saída: 0; and the "measured by" command, run now, prints the "current" value.

E3 · Signal instead of money

10 min

If your test went past 12 weeks, swap the target metric for a signal or artifact one, and move the money metric to "do not worsen".

Done when: python3 $K/hipotese.py hipotese.md --por-semana [your volume] → without the AVISO line.

05Lesson quiz

Question 1 of 4

"Improve the triage rules so support gets faster." What's missing to make it a testable hypothesis?skill

06In three sentences

NumberA hypothesis has a metric, current, target, direction, measure command, and do-not-worsen; without that, it teaches nothing.
SpeedTest on the fastest metric that still links to the money one; watch the slow one.
Do the math firstThe minimum sample tells you whether the test fits your volume before you spend weeks.

Going further

Next lesson