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 surface (Clap types) and shared CLI helpers.
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
ETA calculation for task execution based on historical data.
execution_history
Historical execution duration tracking for ETA estimation.
fsutil
Filesystem helpers for temp directories, atomic writes, path normalization, and safeguard dumps.
git
Git operations module.
jsonc
JSONC parsing utilities for Ralph.
lock
Directory lock helpers for queue/task coordination.
migration
Migration system for config and project file changes.
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
Redaction logic for sensitive data in strings, errors, and logs.
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 for crash recovery.
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
Undo system for queue mutations.
webhook
Asynchronous webhook notification system with bounded queue.

Macros§

rdebug
rerror
rinfo
Macros for logging with immediate redaction. Note: These are mostly redundant if RedactedLogger is used, but provide explicit intent and can be used when the global logger is not wrapped.
rtrace
rwarn