← ClaudeAtlas

sfh-loop-engineeringlisted

Design stable, bounded SimpleFlowHarness loops: review/fix cycles, planner-builder-evaluator systems, long-running chunked work, multi-agent councils, and iterative improvement. Use when a route revisits a step, an AI must improve work over several laps, a run may last hours, or an existing sfh loop oscillates, repeats work, loses context, or never converges.
Aero123421/SimpleFlowHarness · ★ 0 · AI & Automation · score 73
Install: claude install-skill Aero123421/SimpleFlowHarness
# Engineer loops that make progress or stop honestly A loop is not “call the model again.” It is a state machine with a progress contract. ## Required loop contract Before YAML, name: - invariant that must remain true every lap - evidence that changes when progress occurs - evaluator and its independence from the writer - deterministic checks between write and evaluation - maximum visits and total work - budget landing and durable handoff - behavior when the same blocker persists - behavior after a crash mid-step Read [references/stable-loop-patterns.md](references/stable-loop-patterns.md) for patterns and [references/convergence.md](references/convergence.md) for failure modes. ## Canonical improvement loop ```text fixed task contract → writer changes current workspace → deterministic checks → independent evaluator → PASS: end → REVISE: smallest correction → repeat under explicit bound → bound/budget exhausted: durable handoff → stuck ``` Use the same workspace for one change series. Do not create a new worktree per visit. Give the reviewer current files and evidence, not only the writer's story. ## Distinguish four repetitions - **retry:** same invocation after transient transport/infra failure - **fallback:** different profile/tool after retries - **revisit:** domain loop because work is not accepted yet - **resume replay:** crash recovery for work without a durable end Never use retry to “roll the dice again” on a logical rejection. ## Prevent oscillation - K