Fan-Out, Fold-In, Refine
This is the loop our primary agent runs inside our agent setup.
Slices
- A slice is a small one. Broad strokes, breadth first, depth later. Thin slices until refined.
Fan-out, fold-in
- Fan-out. The primary agent splits the work by outcome or by question, not by file count, not by files touched, we accept conflicts.
- Each piece gets a bounded scope, an output and a check.
- Sometimes we fan-out and allow competing ideas as well, then fold-in and see the winner, arena style.
- Fold-in. An agent reads the returns and reconciles what they assumed.
- It runs the combined thing itself.
- A sub-agent saying done is input, not acceptance.
- Tiny work skips all of this. The primary agent just does it.
Progressive refinement
- Breadth first. The first pass is a thin slice across the whole path, from the input to a result I can actually look at and use. Not one area done deep.
- Depth comes from refining. Each round looks at the real result, closes the biggest gap, then runs the whole path again.
- We allow discovery from each slice. What one slice turns up can reshape the next.
- No working path yet? Connect the missing pieces before polishing any of them.
- Outline the whole, detail only the current round.
- Stop when it's good enough for what I asked, not when it's perfect.
- The same idea could apply to studying other things, broad strokes before details.
The loop
Put together, the primary agent runs the same loop every time.
- Orient. What was asked, how we'll know it's done, what we're allowed to do.
- Thin slice, then fan-out, then fold-in.
- Reassess. One of four:
- complete, the outcome is shown working
- next, there's a gap and we're allowed to close it, so loop again
- blocked, there's no allowed way forward, so say what's needed
- paused, I stopped it or we're waiting, so leave a pickup note
The task list stopgap
- Sometimes they forget. Long loops slip: compaction drops things, the agent loses which round it's on, drops a piece, redoes finished work, or stops at the first thin slice.
- So we make the primary agent keep the loop in the harness's own todo or task list. No new tool.
- The shape, roughly:
- the root is the intent
- under it, the thin slice for this pass, across the whole path
- the refinement number
- the pieces out, and the returns in
- the assessment, loop again or end
- It gets updated before each fan-out and after each fold-in.
- Same gap keeps coming back? Change the approach, don't just retry.
- It's a shim. We could drop it when models stop forgetting.
intent: what was asked, and how we'll know it's done
refinement 2
[x] thin slice, input to result
[ ] biggest gap from the last look
[ ] fold-in, run the whole path again
[ ] assess: loop again, or end
raw · typed
we need a link (our next article) about our fan-out fold-in + progressive refinement + the loop combo, and mention a guardrail/shim/stopgap for sometimes they forget so we do native harness TODO/TASK list like where root is intent, the thin slice of the pass where its not a speicif area by breadth first, depth is achieved by refining, the refinement #, the assessment if go loop again and or end.