Expand description
App-level effects for pre-pipeline operations.
This module defines effects that represent side effects in the CLI layer before the pipeline reducer takes over. Effects are data describing what should happen, not the execution itself.
§Architecture
Effects follow the functional core / imperative shell pattern:
- Pure functions produce
AppEffectvalues describing desired operations - An
AppEffectHandlerexecutes the effects, performing actual I/O - This separation enables testing without real filesystem or git operations
§Example
ⓘ
// Pure function returns effects (testable)
fn setup_workspace() -> Vec<AppEffect> {
vec![
AppEffect::CreateDir { path: PathBuf::from(".agent") },
AppEffect::WriteFile {
path: PathBuf::from(".agent/config.toml"),
content: "key = value".to_string(),
},
]
}
// Handler executes effects (I/O boundary)
for effect in setup_workspace() {
handler.execute(effect);
}Enums§
- AppEffect
- App-level effects for CLI operations.
- AppEffect
Result - Result of executing an
AppEffect. - Commit
Result - Result of a git commit operation.
- Rebase
Result - Result of a rebase operation.
Traits§
- AppEffect
Handler - Trait for executing app-level effects.