Module state

Module state 

Source
Expand description

On-disk state for the Ralph loop. Persistent Ralph loop state.

The Ralph loop stores a small amount of JSON state on disk so users can:

  • inspect iteration history (duration, whether completion was detected)
  • add or clear additional context that is appended to future prompts

State is stored under .ito/.state/ralph/<change-id>/.

Structs§

RalphHistoryEntry
One historical record for a Ralph iteration.
RalphState
Saved state for a Ralph loop scoped to a specific change.

Functions§

append_context
Append text to the saved context for change_id.
clear_context
Clear the saved context for change_id.
load_context
Load the saved context markdown for change_id.
load_state
Load saved state for change_id.
ralph_context_path
Return the path to context.md for change_id.
ralph_state_dir
Return the on-disk directory for Ralph state for change_id.
ralph_state_json_path
Return the path to state.json for change_id.
save_state
Persist state for change_id.