feat(state): scope card evidence and policy memory by reported run identity

This commit is contained in:
0xrsydn 2026-09-22 12:45:46 +07:00
commit ba519a850e
9 changed files with 343 additions and 82 deletions

View file

@ -4,6 +4,7 @@
```text
run.py observe, execute, report results, record the session
run_state.py reported run identity and scoped combat-pile evidence
brain.py entry point, dispatch, navigation, shops, minigames
policy/
__init__.py package marker; no registration or initialization
@ -13,8 +14,9 @@ policy/
facts.py observation parsing and combat calculations
```
`brain.decide()` remains the policy entry point. The runner owns one
`PolicyContext` per session and reports action results to it.
`brain.decide()` remains the policy entry point. The runner owns a `RunContext`,
which holds policy memory and replaces it on reported run changes. The runner
reports action results through that context.
`brain.Decision` and `brain.PolicyContext` remain available as direct imports
of the shared types, so the runner interface does not change.
@ -47,8 +49,8 @@ These are plain modules, not a plugin framework or class hierarchy. Navigation,
shops, and minigames stay together until a further split helps development.
The extraction does not change game decisions, confidence gates, fallbacks,
state reconciliation, or recording. Run identity and persistent-deck provenance
remain separate work.
state reconciliation, or recording. The subsequent
[run-state pass](RUN_STATE.md) adds reported identity and card-evidence provenance.
## Extraction verification