Skip to content

feat(steps): add reflection ensemble step#133

Open
tzerweck wants to merge 3 commits into
mainfrom
codex/reflection-ensemble-step
Open

feat(steps): add reflection ensemble step#133
tzerweck wants to merge 3 commits into
mainfrom
codex/reflection-ensemble-step

Conversation

@tzerweck

@tzerweck tzerweck commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add ReflectionEnsembleStep for running multiple independent reflections over the same trace
  • wire learning_tail(..., reflection_ensemble_size=...) so SkillManager receives all reflections in one update
  • export the step and document the API in the ACE architecture/reference docs
  • clarify that this is a specialized map-reduce learning step, not a replacement for generic Branch or runner epochs

Relation to Branch and epochs

ACE already has generic Branch for peer child pipelines with general context merge strategies. ReflectionEnsembleStep handles the narrower learning-tail case where the same reflector runs N times over one trace, repeated reflections are concatenated into ctx.reflections, and one downstream UpdateStep/SkillManager consumes the full ensemble. This avoids treating repeated writes to reflections as a generic merge conflict.

This is also distinct from runner epochs. Epochs replay samples or traces as later passes after earlier updates have changed the skillbook. A reflection ensemble does not advance the runner loop; it repeats only reflection on the current trace before one SkillManager update.

Verification

  • UV_CACHE_DIR=/tmp/uv-cache uv run pytest tests/test_ace_steps.py tests/test_pipeline_exports.py
  • timeout 15s .venv/bin/black --check --diff ace/steps/reflection_ensemble.py

Downstream smoke

Verified from CL Bench against this branch with rr_batch_size=2, rr_reflection_ensemble_size=2, and low rr_max_llm_calls=12.

  • terminal artifacts: two updates, both reflection_ensemble_size_completed: 2, zero soft-fails
  • Logfire: 4 kayba-rr-main agent runs and 2 kayba-skill-manager runs for the 5-hand quick smoke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant