Skip to content

Fix #88: inject timestep macro summaries into next-turn prompts#95

Merged
DeveshParagiri merged 1 commit intomainfrom
codex/issue-88-macro-feedback
Feb 17, 2026
Merged

Fix #88: inject timestep macro summaries into next-turn prompts#95
DeveshParagiri merged 1 commit intomainfrom
codex/issue-88-macro-feedback

Conversation

@RandomOscillations
Copy link
Collaborator

@RandomOscillations RandomOscillations commented Feb 17, 2026

Summary

  • pass previous timestep summary into macro rendering so trend/momentum can be computed
  • strengthen macro summary text for leader/minority framing, sentiment trend, exposure saturation, and action momentum
  • render macro context under an explicit The Broader Climate heading in pass-1 prompts
  • add targeted tests for macro rendering outputs and prompt inclusion

Testing

  • pytest -q tests/test_engine.py::TestTokenAccumulation::test_macro_summary_renders_trend_and_saturation tests/test_engine.py::TestTokenAccumulation::test_macro_summary_renders_waiting_momentum tests/test_reasoning_prompts.py::TestPhaseAPromptFeatures::test_macro_summary_included
  • ruff check extropy/simulation/engine.py extropy/simulation/reasoning.py tests/test_engine.py tests/test_reasoning_prompts.py

Closes #88

Copy link
Collaborator

@DeveshParagiri DeveshParagiri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

Verdict: ✅ Ready to merge

Summary

Implements macro state feedback per architecture doc §Fix 4 and Tenets 11-12. Previous timestep summary is now rendered into prompts under "## The Broader Climate".

Features Implemented

Feature Rendering
Position distribution Leader with majority/minority framing
Minority framing "A sizable minority..." when runner-up ≥20% and leader ≥45%
Sentiment trend Compares vs previous with ±0.08 threshold
Exposure saturation Tiered: 95%+ "Almost everyone", 75%+ "Most people"
Action momentum "More people taking action" when shares increased
Waiting momentum "Still watching and waiting" when stalled

Edge Cases Handled

Case Behavior
First timestep prev_summary=None, trends default to 0 delta
Equal positions Falls through to "People are still quite divided"
No position data Skips position block
No sentiment data Skips sentiment block

No changes required.

@DeveshParagiri DeveshParagiri merged commit 86a6a27 into main Feb 17, 2026
5 checks passed
@DeveshParagiri DeveshParagiri deleted the codex/issue-88-macro-feedback branch February 17, 2026 18:56
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.

Timestep summaries not injected as macro context into agent prompts (Tenet 12)

2 participants