kloop — the optimizer
Turns text we wrote by guess into text that was measured. Repo: ~/Auto-Research-Loop. Channel: #kloop.
Quick start
~/.claude/skills/kloop/scripts/kloop-run.sh ~/Auto-Research-Loop/experiments/<name>
The script wires three different providers to the three roles and fails loudly if a key is missing. Add --dry-run to print the resolved config without spending anything.
A workspace needs three files
| File | What it is |
|---|---|
program.md |
The brief — what "better" means. The Generator reads this. |
<asset> |
The thing being optimized (candidate_prompt.txt, message.txt…). This file gets rewritten. |
eval.mjs |
Prints score: <number>. Default eval command; override with --eval. |
Optional: rubric.json (--rubric), scenarios.json (--scenarios). Backups land in .kloop-backup/.
Scaffold a new one from a sentence:
node ~/Auto-Research-Loop/cli/kloop.mjs --dir ./new-project --api-key <key> \
--scaffold "Optimize the first-touch message for a Thai network-marketing leader"
Workflow
- Write
program.mdfirst. If you cannot say what better means, the loop cannot find it. - Write the rubric to score Brent's standards — see
rubric-standards.md. Not generic quality. - Dry-run. Confirm three distinct providers before spending.
- Run. Start
--max-iter 5. Readresults.json. - Report the winner as a CANDIDATE. A judge score is not a customer. Brent decides what ships.
- Log it to
#kloopwith the score delta and what was NOT proven.
Rules
- Three different model families. Same family in all three seats inflates the score — the repo's README says so, and so does
kloop.env. The run script enforces it. - Never auto-deploy a winner. The loop optimizes against a judge, not against a customer.
--safety-marginexists because evals are noisy. Default0.06. Do not lower it to manufacture a win.- Commit the results. The 2026-04-27 voice-training run was never committed and its findings were lost in the working tree. Do not repeat that.
- Say what the run did not establish. A higher score on a rubric is not evidence of revenue.
What to run it on
Priority order lives in the #kloop channel canvas. Worst-guess first: agent system prompts, outreach first-touch, onboarding copy, Tiger follow-up sequences, episode hooks.
Reference
- Rubric that encodes Brent's standards: rubric-standards.md
- Full flag list:
node ~/Auto-Research-Loop/cli/kloop.mjs --help