pub struct ProgressJournal {Show 14 fields
pub run_id: String,
pub workflow_name: String,
pub start_time: DateTime<Utc>,
pub last_update: DateTime<Utc>,
pub task: String,
pub repo: Option<String>,
pub branch: Option<String>,
pub entries: Vec<ProgressEntry>,
pub patterns: Vec<CodebasePattern>,
pub decisions: Vec<Decision>,
pub risks: Vec<Risk>,
pub test_snapshots: Vec<TestSnapshot>,
pub build_snapshots: Vec<BuildSnapshot>,
pub sections: HashMap<String, String>,
}Expand description
Progress journal for a workflow run
Fields§
§run_id: StringWorkflow run ID
workflow_name: StringWorkflow name
start_time: DateTime<Utc>Start time
last_update: DateTime<Utc>Last update time
task: StringTask description
repo: Option<String>Repository path
branch: Option<String>Branch name
entries: Vec<ProgressEntry>All progress entries
patterns: Vec<CodebasePattern>Discovered codebase patterns
decisions: Vec<Decision>Key decisions
risks: Vec<Risk>Identified risks
test_snapshots: Vec<TestSnapshot>Test snapshots
build_snapshots: Vec<BuildSnapshot>Build snapshots
sections: HashMap<String, String>Custom sections
Implementations§
Source§impl ProgressJournal
impl ProgressJournal
Sourcepub fn new(run_id: String, workflow_name: String, task: String) -> Self
pub fn new(run_id: String, workflow_name: String, task: String) -> Self
Create a new progress journal
Sourcepub fn add_entry(
&mut self,
entry_type: EntryType,
step_id: &str,
title: &str,
details: &str,
)
pub fn add_entry( &mut self, entry_type: EntryType, step_id: &str, title: &str, details: &str, )
Add a progress entry
Sourcepub fn add_pattern(
&mut self,
category: &str,
description: &str,
example: Option<&str>,
reusable: bool,
)
pub fn add_pattern( &mut self, category: &str, description: &str, example: Option<&str>, reusable: bool, )
Add a codebase pattern
Sourcepub fn add_decision(
&mut self,
title: &str,
context: &str,
decision: &str,
consequences: Vec<String>,
reversible: bool,
)
pub fn add_decision( &mut self, title: &str, context: &str, decision: &str, consequences: Vec<String>, reversible: bool, )
Add a decision
Sourcepub fn add_risk(
&mut self,
description: &str,
level: RiskLevel,
mitigation: Option<&str>,
)
pub fn add_risk( &mut self, description: &str, level: RiskLevel, mitigation: Option<&str>, )
Add a risk
Sourcepub fn resolve_risk(&mut self, description: &str, notes: &str)
pub fn resolve_risk(&mut self, description: &str, notes: &str)
Mark a risk as resolved
Sourcepub fn add_test_snapshot(
&mut self,
command: &str,
output: &str,
passed: bool,
duration_secs: f64,
)
pub fn add_test_snapshot( &mut self, command: &str, output: &str, passed: bool, duration_secs: f64, )
Add a test snapshot
Sourcepub fn add_build_snapshot(
&mut self,
command: &str,
output: &str,
succeeded: bool,
duration_secs: f64,
)
pub fn add_build_snapshot( &mut self, command: &str, output: &str, succeeded: bool, duration_secs: f64, )
Add a build snapshot
Sourcepub fn set_section(&mut self, name: &str, content: &str)
pub fn set_section(&mut self, name: &str, content: &str)
Set a custom section
Sourcepub fn entries_by_type(&self, entry_type: EntryType) -> Vec<&ProgressEntry>
pub fn entries_by_type(&self, entry_type: EntryType) -> Vec<&ProgressEntry>
Get entries by type
Sourcepub fn to_markdown(&self) -> String
pub fn to_markdown(&self) -> String
Serialize to markdown (human-readable)
Sourcepub async fn save_to_file(&self, path: &Path) -> Result<()>
pub async fn save_to_file(&self, path: &Path) -> Result<()>
Save to file
Sourcepub async fn load_from_file(path: &Path) -> Result<Self>
pub async fn load_from_file(path: &Path) -> Result<Self>
Load from JSON file
Trait Implementations§
Source§impl Clone for ProgressJournal
impl Clone for ProgressJournal
Source§fn clone(&self) -> ProgressJournal
fn clone(&self) -> ProgressJournal
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProgressJournal
impl Debug for ProgressJournal
Source§impl<'de> Deserialize<'de> for ProgressJournal
impl<'de> Deserialize<'de> for ProgressJournal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProgressJournal
impl RefUnwindSafe for ProgressJournal
impl Send for ProgressJournal
impl Sync for ProgressJournal
impl Unpin for ProgressJournal
impl UnsafeUnpin for ProgressJournal
impl UnwindSafe for ProgressJournal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more