pub struct CoreConfig {
pub scratchpad: String,
pub specs_dir: String,
pub guardrails: Vec<String>,
pub workspace_root: PathBuf,
}Expand description
Core paths and settings shared across all hats.
Per spec: “Core behaviors (always injected, can customize paths)”
Fields§
§scratchpad: StringPath to the scratchpad file (shared state between hats).
specs_dir: StringPath to the specs directory (source of truth for requirements).
guardrails: Vec<String>Guardrails injected into every prompt (core behaviors).
Per spec: These are always present regardless of hat.
workspace_root: PathBufRoot directory for workspace-relative paths (.ralph/, specs, etc.).
All relative paths (scratchpad, specs_dir, memories) are resolved relative to this directory. Defaults to the current working directory.
This is especially important for E2E tests that run in isolated workspaces.
Implementations§
Source§impl CoreConfig
impl CoreConfig
Sourcepub fn with_workspace_root(self, root: impl Into<PathBuf>) -> Self
pub fn with_workspace_root(self, root: impl Into<PathBuf>) -> Self
Sets the workspace root for resolving relative paths.
This is used by E2E tests to point to their isolated test workspace.
Sourcepub fn resolve_path(&self, relative: &str) -> PathBuf
pub fn resolve_path(&self, relative: &str) -> PathBuf
Resolves a relative path against the workspace root.
If the path is already absolute, it is returned as-is. Otherwise, it is joined with the workspace root.
Trait Implementations§
Source§impl Clone for CoreConfig
impl Clone for CoreConfig
Source§fn clone(&self) -> CoreConfig
fn clone(&self) -> CoreConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more