Skip to main content

Crate ralph

Crate ralph 

Source
Expand description

Ralph library surface.

Responsibilities:

  • Expose internal modules for tests and CLI integration.
  • Provide a stable entrypoint for crate-wide utilities.

Not handled here:

  • CLI argument parsing (see crate::cli).
  • Runner execution or queue persistence details.

Invariants/assumptions:

  • Modules remain internal-first; public exports are intentional.

Modules§

agent
Agent argument resolution and configuration (public compatibility surface).
celebrations
Celebration animations and feedback for task completions.
cli
Ralph CLI facade.
cli_spec
Clap CLI introspection utilities for emitting a deterministic CLI spec JSON contract.
commands
Command implementation layer.
config
Configuration resolution for Ralph, including global and project layers.
constants
Centralized constants for the Ralph CLI.
contracts
Contracts module for Ralph configuration and queue/task JSON structures.
error_messages
Canonical error message constructors.
eta_calculator
Purpose: Provide the public ETA-calculation API used by queue and report surfaces.
execution_history
Execution history facade for ETA estimation and persistence.
fsutil
Purpose: Facade for filesystem utility helpers used across Ralph.
git
Git operations module.
jsonc
JSONC parsing utilities for Ralph.
lock
Directory lock facade for queue and daemon coordination.
migration
Purpose: Provide the public migration API surface and top-level orchestration.
notification
Desktop notification system for task completion and failures.
plugins
Plugin system for Ralph (runners + task processors).
productivity
Productivity stats tracking for task completions, streaks, and velocity metrics.
progress
Execution phases and small progress-related contracts.
promptflow
Prompt construction for worker run phases.
prompts
Prompt template loading, rendering, and validation utilities.
queue
Task queue persistence, validation, and pruning.
redaction
Purpose: Provide the public redaction API used to scrub secrets from strings, logs, and runner-facing diagnostics.
runner
Runner orchestration for executing tasks across supported CLIs and parsing outputs.
runutil
Shared helpers for runner invocations with consistent error handling.
sanity
Automatic startup health checks with auto-fix and migration prompts.
session
Session persistence and recovery facade.
signal
Stop signal handling for graceful run loop termination.
template
Task template system for Ralph.
timeutil
Time helpers for RFC3339 timestamps with consistent precision.
undo
Purpose: Provide the public undo API for queue snapshot creation, listing, restore, and retention.
webhook
Asynchronous webhook notification system with bounded queue.

Macros§

rdebug
rerror
rinfo
rtrace
rwarn