Execute one SKILL.state step
execute_stepAdvance a skill session by one step: validate and apply a sparse state update, execute the action, and return the next state and observation.
Instructions
Advance a skill session by exactly one step t → t+1. INPUT: reasoning_trace R_t (Chain-of-Thought — discarded by the runtime and never stored), state_update ΔΣ_t (sparse JSON patch; null deletes a key), action a_t, and the environment_observation O_t you consumed this turn. LOGIC: validate ΔΣ_t → apply Σ_{t+1} = Σ_t ⊕ ΔΣ_t (null-deletion semantics) → execute a_t → obtain observation O_{t+1}. OUTPUT: the strict next-turn tuple {skill_spec: P, current_state: Σ_{t+1}, latest_observation: O_{t+1}}. Nothing else is retained — no history, no reasoning, no old observations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | a_t — the action to execute. A free-text command or a structured JSON action, e.g. {'type':'echo','message':'...'}, {'type':'fail','reason':'...'}, {'type':'complete','summary':'...'}. The mock executor produces O_{t+1}. | |
| session_id | Yes | Identifier of the active skill session to advance by one step. | |
| state_update | Yes | ΔΣ_t — sparse JSON patch to apply as Σ_{t+1} = Σ_t ⊕ ΔΣ_t. NULL-DELETION SEMANTICS: {'key': null} deletes 'key' from Σ; a value inserts/updates the key; nested objects merge recursively; arrays replace wholesale. Keys absent from ΔΣ_t are left untouched. | |
| reasoning_trace | Yes | R_t — your free-form Chain-of-Thought for this step. WARNING: the runtime DISCARDS this field entirely. It is never stored, logged, hashed or replayed. Write reasoning here instead of polluting Σ. | |
| environment_observation | Yes | O_t — the latest observation you (the model) consumed this turn, i.e. the 'latest_observation' from the previous tool response. The runtime uses it for context-drift detection, then discards it. |