Repair loop
M05 · 9 min
The repair loop
Workflow: read → plan → edit → test → paste failures → minimal fix → human review.
- 01
1. Snapshot
Commit or stash. Cheap rollback is non-negotiable.
- 02
2. Repro
One command that fails. Capture full stderr/stdout.
- 03
3. Ask for smallest fix
Paste error + command + 1–2 files. Ban rewrites.
- 04
4. Re-run
Same command. If new error, feed it back — don’t restart the whole task.
- 05
5. Review
Diff + tests. Merge only what you understand.
Grok is strong when failures are concrete. “Still broken” is useless. “TypeError: x is undefined at Button.tsx:42 after click Save” is gold.
Exercise
Write a failure packet
Invent or paste a real error. Write a failure packet: command, full error, expected vs actual, files.
- Exact error text
- Command that failed
- Expected vs actual
- Ask for smallest fix explicitly