pub struct ReportFormatter { /* private fields */ }Expand description
Formats consensus results into ASCII banners and markdown reports.
Generates fixed-width ASCII banners (exactly 52 characters wide per line) and full markdown reports from agent outputs and consensus results. The reporting module is pure string formatting – no async, no I/O.
Implementations§
Source§impl ReportFormatter
impl ReportFormatter
Sourcepub fn with_config(config: ReportConfig) -> Self
pub fn with_config(config: ReportConfig) -> Self
Creates a new formatter with custom configuration.
Generates the fixed-width ASCII verdict banner.
Every line is exactly banner_width (52) characters. Structure:
+==================================================+
| MAGI SYSTEM -- VERDICT |
+==================================================+
| Melchior (Scientist): APPROVE (90%) |
+==================================================+
| CONSENSUS: GO WITH CAVEATS |
+==================================================+Generates the pre-analysis initialization banner.
Shows mode, model, and timeout in a fixed-width ASCII box.
Sourcepub fn format_report(
&self,
agents: &[AgentOutput],
consensus: &ConsensusResult,
) -> String
pub fn format_report( &self, agents: &[AgentOutput], consensus: &ConsensusResult, ) -> String
Generates the full markdown report (banner + all sections).
Concatenates sections in order: banner, consensus summary, key findings, dissenting opinion, conditions for approval, recommended actions. Optional sections are omitted entirely when their data is absent.