---
generator: contextjamming-llm-context
title: "MoEA Loop"
description: "A typed rewrite system that drives three ACRA skills into a self-extending, auditable research tree — research, dispatch, or developer docs."
url: https://www.contextjamming.com/moea-loop
markdown_url: https://www.contextjamming.com/moea-loop.md
section: "Research Builds & Explainers"
content_type: "Research Build"
author: "Bret Kerr"
publisher: "Context Jamming (ACRA Insight LLC)"
date_published: 2026-05-25
language: en-US
word_count: 743
image: https://www.contextjamming.com/og-card.png
---

> **MoEA Loop** — Research Builds & Explainers, Context Jamming. This is a plain-Markdown copy of https://www.contextjamming.com/moea-loop, prepared for LLM context windows, agents and retrieval.
>
> Cite as: Bret Kerr, "MoEA Loop," *Context Jamming*, May 25, 2026, https://www.contextjamming.com/moea-loop

ACRA Insight field unit / typed recursion issue

# MoEA Loop

A typed rewrite system that drives three research skills into a self-extending, auditable research tree.

**Static showcase only.** The Python CLI runs locally because the loop is stateful, resumable, and long-running. Manual mode is dependency-free; the Claude backend only needs the optional Anthropic package.
**System position:** the Loop is the orchestration layer of the MoEA stack — [MoEA Labeler](https://www.contextjamming.com/MoEA-labeler) is the preference-data layer, and [the skill arsenal](https://www.contextjamming.com/book/skills) is the distribution layer.

The loop / no mystery meat in the middle

## Brief → anchors → deliverables → typed forks.

The orchestrator does not reimplement the skills. It invokes the Stage 1 XML optimizer and Stage 2 Semantic Triple Transformation as the source of truth, then holds tree state between runs.

*One loop. The terminal deliverable is the only thing that changes.*

1. 01briefOne seed topic plus the tension worth researching.
2. 02Stage 1 XMLThe gemini-deep-research-xml skill turns the brief into an anchored research prompt.
3. 03anchored deep researchGemini, Grok, or ChatGPT Deep Research returns STT-ANCHOR blocks.
4. 04Stage 2 STTFour deliverables: longform, infographic JSON, social copy, and an artifact prompt.
5. 05typed forkOne deepen primitive plus one diverge primitive are selected from the anchor set.
6. 06recurseThe tree expands until the frontier saturates or the budget runs out.

The hard problem, solved

## Repeatable follow-ups without turning every topic into the same topic.

The fixed function is the selection logic. The adaptive part is the fork set it chooses from the anchor labels already present in the research.

01

### Forking is typed

Each primitive declares which STT-ANCHOR labels make it fire. The anchor taxonomy becomes the type system.

02

### Selection is paired

The loop returns one best DEEPEN plus one best DIVERGE, so the two children are complementary by construction.

03

### Novelty is gated

A ledger scores each projected brief against prior theses. Saturated branches terminate instead of restating the tree.

Every fork is a typed rewrite rule with a provenance ledger — the tree is auditable, not vibes.

The engine is skill-agnostic / three terminals, one loop

## Same typed forks. Different terminal deliverable.

The orchestrator now drives **three** skills, not two. Stage 3 swaps the terminal step without touching the fork logic: a research tree becomes a documentation tree. Same selection function, same novelty ledger, same provenance.

Stage 1

### gemini-deep-research-xml

Turns the brief into an anchored XML research prompt. Every structural thesis point carries an STT-ANCHOR the downstream stages parse.

[Download skill →](https://www.contextjamming.com/book/skill-gemini-deep-research-xml.md)

Stage 2

### semantic-triple-transformation

Normalizes anchored research into the editorial deliverables: longform, infographic JSON, social copy, artifact prompt.

[Download skill →](https://www.contextjamming.com/book/skill-semantic-triple-transformation.md)

Stage 3

### agentic-dev-docs

Swaps the terminal: anchored research becomes a publication-ready Mintlify MDX page that gates its own output against a Verification Gate.

[Download skill →](https://www.contextjamming.com/book/skill-agentic-dev-docs.md)

New in v0.3: **agentic-dev-docs** turns anchored research into Upsun-grade Mintlify MDX that gates its own output. See the full arsenal at [/book/skills](https://www.contextjamming.com/book/skills).

The primitive library / seven ways out

## Forks are not vibes. They are typed rewrite rules.

Each primitive is lifted from the README and classified as either convergent pressure or lateral reframing.

| id | role | lens |
| --- | --- | --- |
| ANTITHESIS | deepen | Feynman steelman-the-objection |
| DEBATE | deepen | AI-safety-via-debate / Oxford two-sided |
| DEPTH | deepen | drill one named open question to the studs |
| HOLOGRAPHIC | diverge | Maldacena boundary/bulk reframe |
| ANALOGICAL | diverge | cross-domain isomorphism transplant |
| VERTICAL | diverge | applied instantiation (sector / GTM / product) |
| POWER | diverge | coalition / incentive map |

Local loop / paste, ingest, branch, repeat

## Manual mode matches the Gemini-by-hand workflow.

It prints paste-ready skill blocks, ingests the research files you save back, and keeps the tree plus novelty ledger on disk.

```
python3 moea_loop.py init --brief "Your topic + tension" --domain neuro
python3 moea_loop.py prompt 0
python3 moea_loop.py ingest 0 deep-research-report.md
python3 moea_loop.py fork 0
```

The autonomy ladder / how far the human steps back

## In-loop → on-loop → out-of-loop.

The same gate runs at every rung. What changes is who has to say yes. The autonomous runner, `moea/moea_auto.py`, drives the CLI and only proceeds on a clean Verification Gate.

**in-loop**You approve at every gate. The runner prints the diff; nothing proceeds without a human yes.

**on-loop**Auto-proceed on a clean Verification Gate; a failed gate is queued for review instead of shipped.

**out-of-loop**PASS deploys, FAIL reflexes back into generation. The human sees exceptions only — the audit log holds the rest.

Start at `--autonomy gated`; promote to `on-loop`, then `auto --deploy`, only once the false-pass rate sits at zero. A failed gate is the corrective signal that re-enters generation.

Related field notes / the same thesis, three lenses

## Where the loop shows up next.

ACRA Insight LLCMoEA Loop v0.3 / Context Jamming
