The loop that sharpens it: misses become checks.
A significant miss, one an automated step should have caught, becomes a check (M8). The team classifies the miss, rebuilds it as a test case that replays it, and answers it with an added check. The check gates only once it catches its test cases. Its recall, precision and cost then decide whether it is kept, promoted or removed. So the line gets sharper without anyone watching harder.
Review outcomes are the measure’s raw data. Each reply that settles a thread opens with its recorded outcome, so a reviewer’s hits, false positives and declined findings can be counted. Deferred findings return to the line as work items. Session reflections and promoted memories feed the same scaffolding, through reflect, review-reflections and promote-memory.
The audit inspects the factory itself. It scores the repository against every module and, run again, reports what drifted (principle 6).
An oracle (an external reviewer or a human) catches what the automated system missed. Then:
- 0An oracle catches a missan external reviewer or a human
- 1Classify
- 2File with a durable id
- 3Reconstruct as a pre-fix fixture
- 4Answer with an additive lens
- 5Validate, then gatethen required: true
- 6Measureblocking · advisory · killed
↺ The next miss runs the cycle again. The lens list only grows, so today's fix never deletes yesterday's coverage.
- 1
Classify — bucket the miss against a fixed miss taxonomy (a closed vocabulary, so patterns are countable — “we miss error-path bugs a lot” becomes visible).
- 2
File with a durable id — record it with a stable lever number (
L-NNNN) in a tracker, so it can be referenced forever. Lever numbers are unique — the same collision problem as ADRs (parallel authors pick the same next number), solved the same way. - 3
Reconstruct as a pre-fix fixture — capture the miss as a replayable eval fixture pinning the commit before the fix, with the finding it should have produced. Pre-fix, because a fixture pinned after the fix proves nothing.
- 4
Answer with an additive lens — add one numbered review lens (or checklist bullet, or gate) that would have caught it. Additive: the lens list only grows, so a fix for today’s miss never silently deletes yesterday’s coverage. The lens links back to its lever.
- 5
Validate, then gate — run the reviewer against the new fixture live. Only once it demonstrably catches the miss does the fixture flip to
required: trueand join the regression corpus — the set that must keep passing forever. An unvalidated fixture in the blocking gate is theater. - 6
Measure — track recall / precision / cost of the lens marginally against oracles (the parity report), including a
missed_blockerscount. Measurement decides whether a lens is promoted to blocking (feeds M7’s precision bar), kept advisory, or killed.
- 1observe
- 2durable record
- 3validate
- 4adopt
Both cycles are the same shape as the flywheel — observe → durable record → validate → adopt — applied to process feedback and to memory instead of to review misses.
Session reflection — a
/reflect-style step accumulates end-of-session feedback into a shared store; a separate step processes it into proposed scaffolding changes with mandatory human approval before anything is edited. Changing the rules the agents follow is self-modifying, so it is HITL by construction (seeHITL-REGISTRY). The records are an append-only log of events (a finding, a decision about it), each with an id fixed before it is first written, so a retried or concurrent write never counts a finding twice; a finding’s status, and how often its class recurred, are computed from the log when it is read. That is what lets every repository and worktree write to one store, a plain folder included, without locks or conflicts. Jig’s plugin runs this cycle asreflectandreview-reflections.Memory promotion — an agent’s private, per-session memory is periodically promoted (via a
/promote-memory-style step) into git-tracked, shared team memory, so a lesson one agent learned survives the session and reaches the others. Promotion is a review point, not an automatic dump. Jig’s plugin runs this step aspromote-memory.
Triggering reflection on evidence, not goodwillWhy reflection fires on the review-round count, at convergence.Open
Session reflection only compounds if it actually happens, and “reflect when it felt hard” reliably under-fires: the sessions with the most to say are the ones that end tired and late.
So trigger it on an observable instead. The strongest one available is the number of review rounds a change took to converge (M7 core piece 7). A change that needed many rounds is rarely evidence of a noisy reviewer; it usually means the scaffolding under-served it — an instruction that did not land, a rule the reviewer had to teach repeatedly, a convention that should have been mechanised, or a reviewer config that let a known class through. Each of those is a lever, which is exactly what this module’s flywheel consumes.
Two properties make the trigger work:
- Emit at convergence, not afterwards. The detail is richest at the moment the loop ends and decays quickly once the session closes. A prompt that arrives the next day gets a summary; one that arrives at convergence gets the specifics.
- Carry the round count and the change identifier into the record. A reflection entry that cannot be aggregated is an anecdote. With the count attached, the inbox answers “which changes fought the scaffolding hardest”, which is the question that ranks the levers.
The threshold is a local calibration — set it where it fires on the genuinely hard reviews and not on ordinary ones, and keep it adjustable. “The reviewer was wrong repeatedly” is itself a finding, and routes to the reviewer’s config or its eval corpus rather than to the instruction files.
Both properties are mechanical in the
reflection trigger: it fires only on M7’s
CONVERGED decision, and it writes the change id and round count into the
inbox record itself rather than trusting anyone
to remember them. What it deliberately leaves to a person is the judgement —
which lever, or whether the reviewer was the thing that was wrong. Jig’s
plugin applies the same trigger in its own review loop, recording the round
count as a finding in the reflection journal at convergence. Its
dispatcher treats a class of outcome
that keeps recurring the same way: it records the class once a week as a
finding, with the days, the row count and the reasons attached, and leaves
the judgement to the person who reviews it.
Source: FACTORY.mdSource: modules/M8-learning-loop/README.md