knitbrain_run_loop
Runs one cycle of an autonomous goal loop driven by a verify command, returning a directive for the next fix until the goal is met or iteration cap reached.
Instructions
Autonomous goal loop (ONE cycle per call). Runs your verify_cmd as the REAL hard gate, tracks iteration across calls, and drives until the goal is met or max_iters. HONEST: the HOST AGENT does the actual work BETWEEN cycles — this tool does NOT edit code. Each call runs the verify gate; if not met it returns a per-cycle directive telling you to make the smallest fix and call again. Stops at grade-pass (met=true) or max_iters (met=false).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | Yes | What 'done' means — an actionable brief, not a vague wish. | |
| rubric | No | Advisory checklist you self-verify each cycle; the verify_cmd is the hard gate. | |
| max_iters | No | Cap on cycles across calls (default 6). | |
| verify_cmd | Yes | Shell command that is the hard gate — exit 0 = pass (e.g. 'npm test'). | |
| deadline_ms | No | Optional wall-clock budget in ms. Loop stops with met=false, stopped='deadline' once elapsed since the first cycle exceeds it. Either cap (deadline or max_iters) ends the loop; a real met=true ends it early. |