The per-spell Observation dict gains the additive cast_time key: the
registry spell's budget code on a hit, "standard" on a miss (mirroring
the engine's resolver fallback), so an LLM policy can schedule casts
against the action budget it sees reported back.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
SpellSpec gains a cast_time field (seven budget codes; the JSON loader
also accepts RAW phrasings like "1 round" or "1 minute"). The pure
budget filters take a CastTimeResolver so a cast_spell occupies the slot
its casting time maps to: standard->standard, swift->swift (competing
with deed/inspire courage and dropped by a consumed immediate),
immediate/free->free, full_round and one_round->full_round (one_round
clamped: resolved end-of-turn, documented approximation), long->dropped
before the budget filter with the new downgraded:cast_time reason. The
engine binds its registry lookup via _cast_time_of (unknown names fall
back to standard, keeping transcripts byte-identical);
_choose_spell_action never selects long casts; the staggered filter now
drops full-round casts and spell_combat via the effective slot
(_FULL_ROUND_KINDS becomes dead and is deleted). Summon Monster I/II are
the only data spells marked 1 round. Metamagic full-round casting for
spontaneous casters is out of scope (future hook documented in
_cast_time_of).
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
PF1e CRB (Actions in Combat): a move action can be taken instead of the
standard one. The budget filter now converts a second move action onto
the standard slot when the move slot is spent and the standard is still
free, so (move, stand_up) and (move, move) are legal; a third move (or
any further standard) is still surplus. The greedy walk is expressed
with a spent-slot map to stay inside the C901 complexity ceiling.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
PF1e CRB: running is a full-round action, not a move action. The budget
filter now classifies run as full-round (consumes the standard AND the
move slot), _FULL_ROUND_KINDS includes it for the staggered filter, and
the nauseated filter drops it (run is no longer move-like). The
moved_this_turn/running flags are unchanged; the _execute_run
moved_this_turn early return stays as defense in depth. default_policy
never emits run, so the golden transcripts are untouched.
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Apply the PF1e per-turn action budget (CRB Actions in Combat: one
standard + one move, or one full-round in place of both, plus one
swift) unconditionally to every sequence a policy returns, not only
the immediate/staggered/nauseated specializations.
- _action_economy_filter: greedy in-order walk keeping the earliest
legal prefix-subsequence; a full-round action is only kept while
both the standard and move slots are still free.
- Exhaustive kind->slot classification (standard / move / swift /
full_round / free-conditional) over the Action.kind Literal,
documented and locked by tests.
- Surplus actions dropped and reported as
ActionResult(ok=False, reason="downgraded:action_economy") via a
multiset drop diff (reports duplicate-kind surplus the set-based
_dropped_kinds cannot).
- Composition order: general budget first, then the existing
immediate/staggered/nauseated filters (unchanged).
- default_policy untouched and its turns verified legal by the
validator; golden transcripts byte-identical.
Movement budget is now max(land, fly) speed. Updates the harvie golden: Harvie (land 10 / fly 80) is a flyer and now flies at 80 ft, so he wins vs the goblin instead of being pinned crawling at 10 ft.
- New Action kind activate_power_attack: free action that sets
state.power_attack = True when the combatant has the Power Attack feat;
logged no-op otherwise. Routed via _execute_movement (free-action branch)
to keep _execute under the C901 complexity ceiling.
- Consume deed_up_close_and_deadly in resolve_attack: the first attack
resolved while the flag is set gains +1d6 if it is a ranged attack within
30 ft; the flag is reset in all cases (benefit lost if out of range or
not ranged). Extracted into _consume_up_close_and_deadly helper.
- Document activate_power_attack, corrected deed semantics, and the
power_attack snapshot key in README.
- Add tests/test_engine_fixes.py (5 tests): PA activation, no-feat no-op,
deed+ranged within 30ft, deed out-of-range, deed melee.