Skip to main content

ralph_workflow/phases/
commit.rs

1//! Commit message generation phase.
2//!
3//! This module generates commit messages using a single agent attempt per
4//! reducer effect. All validation and retry decisions are handled by the
5//! reducer via events; this code does not implement fallback chains or
6//! in-session XSD retries.
7
8use super::commit_logging::{AttemptOutcome, CommitLogSession, ExtractionAttempt};
9use super::context::PhaseContext;
10use crate::agents::AgentRegistry;
11use crate::files::llm_output_extraction::{
12    archive_xml_file_with_workspace, try_extract_from_file_with_workspace,
13    try_extract_xml_commit_with_trace, xml_paths, CommitExtractionResult,
14};
15use crate::pipeline::{run_with_prompt, PipelineRuntime, PromptCommand};
16use crate::prompts::{
17    get_stored_or_generate_prompt, prompt_generate_commit_message_with_diff_with_context,
18    TemplateContext,
19};
20use crate::workspace::Workspace;
21use std::collections::HashMap;
22use std::path::Path;
23
24include!("commit/diff_truncation.rs");
25include!("commit/prompt.rs");
26include!("commit/extraction.rs");
27include!("commit/runner.rs");
28
29#[cfg(test)]
30include!("commit/tests.rs");