capability-example 0.1.0

A framework for managing skill tree growth and configuration using automated and manual strategies, ideal for AI-driven environments.
Documentation
// ---------------- [ File: capability-example/src/write_initial_partial_model.rs ]
crate::ix!();

pub async fn maybe_write_initial_partial_model_file(path: &PathBuf) -> Result<(), SaveLoadError> {
    let empty = PartiallyGrownModel::empty();

    if !path.exists() {
        info!("File {:?} does not exist. Creating with default content.", path);
        empty.save_to_file(path).await?;

        info!("File {:?} successfully created.", path);

    } else {

        warn!("File {:?} already exists. No action taken.", path);
    }

    Ok(())
}