Overview
Implement the foundation for location-specific mutable state, enabling scenarios to track per-location flags and properties.
Deliverables
State Model
Location Consequences
Location Preconditions
Save System
Schema Definition
Validation
Files to Modify
kleene/skills/kleene-play/SKILL.md (state model, consequence/precondition logic)
kleene/lib/framework/scenario-format.md (consequence/precondition docs)
kleene/lib/framework/saves.md (save format v4 spec)
kleene/lib/schema/scenario-schema.json (NEW)
Acceptance Criteria
- All existing scenarios work without modification (100% backwards compatible)
- Location state operations function correctly
- Save/load preserves location state
- Schema validation catches invalid scenarios
Overview
Implement the foundation for location-specific mutable state, enabling scenarios to track per-location flags and properties.
Deliverables
State Model
world.location_state{}dict to game state model inkleene-play/SKILL.mdinitial_world.locations[], mutable state in separate dictLocation Consequences
set_location_flag- Set boolean flag on specific locationclear_location_flag- Clear boolean flag on locationmodify_location_property- Modify numeric property (delta)set_location_property- Set property to absolute valueLocation Preconditions
location_flag_set- Check if location flag is truelocation_flag_not_set- Check if location flag is false/missinglocation_property_minimum- Check location property >= valuelocation_property_maximum- Check location property <= valueSave System
saves.mdlocation_stateto{})Schema Definition
lib/schema/scenario-schema.jsonValidation
Files to Modify
kleene/skills/kleene-play/SKILL.md(state model, consequence/precondition logic)kleene/lib/framework/scenario-format.md(consequence/precondition docs)kleene/lib/framework/saves.md(save format v4 spec)kleene/lib/schema/scenario-schema.json(NEW)Acceptance Criteria