Skip to content

Implement M7.2 Explanations - queryable timelines and causal summaries#2

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/adjacent-bison
Closed

Implement M7.2 Explanations - queryable timelines and causal summaries#2
Copilot wants to merge 4 commits intomainfrom
copilot/adjacent-bison

Conversation

Copy link
Copy Markdown

Copilot AI commented Nov 29, 2025

Adds "why did this happen?" tooling per M7.2: event timelines with causal chains, actor reasoning capture, and CLI queries.

New Module: sim/explanations.py

  • ExplanationTracker - records events with causal parent links, metrics snapshots, and actor reasoning
  • CausalEvent - tick, message, scope, actor, causality chain
  • ActorReasoning - decision context with options considered, scores, and chosen action

CLI Commands

(echoes) timeline 10         # Recent events with causal context
(echoes) explain evt-123     # Event details + causal chain trace
(echoes) why aria-volt       # Actor's recent decision reasoning

Integration

  • Agent system captures utility scores and option rankings during decisions
  • Faction system captures strategic action reasoning (invest/lobby/sabotage)
  • SimEngine exposes get_timeline(), explain_event(), explain_actor()
  • Backend interface extended for local/service mode parity

Tests

27 new test cases covering tracker, causal chains, reasoning capture, and CLI commands.

Original prompt

"Implement M7.2 using the gamedev-agent"

Created from Copilot CLI via the copilot delegate command.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 29, 2025 09:48
…maries

- Add ExplanationTracker for tracking causal chains between events
- Add CausalEvent and ActorReasoning dataclasses for structured data
- Extend AgentIntent/FactionAction with reasoning, options_considered, chosen_score
- Add CLI commands: timeline, explain, why for querying explanations
- Update ShellBackend interface with explanation methods
- Implement methods in LocalBackend and ServiceBackend
- Add SimEngine methods for explanation queries
- Create 27 tests covering tracker, CLI commands, and agent/faction reasoning
- Update README.md and how_to_play_echoes.md with new commands

Tests: 239 passed, Coverage: 92%
Co-authored-by: rgardler-msft <108765066+rgardler-msft@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement M7.2 using gamedev-agent Implement M7.2 Explanations - queryable timelines and causal summaries Nov 29, 2025
Copilot AI requested a review from rgardler-msft November 29, 2025 09:56
@SorraTheOrc
Copy link
Copy Markdown
Member

@copilot there are many merge conflicts here, rework this patch

Copy link
Copy Markdown
Author

Copilot AI commented Nov 29, 2025

@copilot there are many merge conflicts here, rework this patch

I cannot resolve merge conflicts in this environment - I don't have the ability to pull from the remote, perform rebases, or force push. Since PR #4 (which implemented a different version of M7.2) was merged to main after my branch was created, there are now conflicting changes.

Please resolve the conflicts manually, or close this PR in favor of PR #4 which has already been merged with similar M7.2 functionality.

Copilot AI requested a review from SorraTheOrc November 29, 2025 20:23
@SorraTheOrc SorraTheOrc deleted the copilot/adjacent-bison branch December 1, 2025 03:01
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.

3 participants