fn create_for_step(
    config: &Config,
    task: &TaskIdentifier,
    steps: &mut Vec<Step>,
    task_names: &mut HashSet<String>,
    root: bool,
    allow_private: bool,
    skip_tasks_pattern: Option<&Regex>,
) -> Result<(), CargoMakeError> {
    if let Some(skip_tasks_pattern_regex) = skip_tasks_pattern {
        if skip_tasks_pattern_regex.is_match(&task.name) {
            debug!("Skipping task: {} due to skip pattern.", &task.name);
            return Ok(());
        }
    }

    if let Some(path) = &task.path {
        // this is referring to a task in another file
        // so we create a proxy task to invoke it
        let proxy_name = format!("{}_proxy", task.name);

        let path_obj = Path::new(path);
        let (working_directory, makefile) = if path_obj.is_file() {
            let filename = get_basename(&path_obj);
            let working_directory = get_parent_directory(&path_obj);
            (working_directory, filename)
        } else {
            (Some(path.to_string()), Some("Makefile.toml".to_string()))
        };

        let mut proxy_task = create_proxy_task(&task.name, true, false, makefile, None);
        proxy_task.cwd = working_directory;

        let step = Step {
            name: proxy_name,
            config: proxy_task,
        };

        debug!("Created external dependency step: {:#?}", &step);

        steps.push(step);
        task_names.insert(task.to_string());
        return Ok(());
    }

    let task_config = get_normalized_task(config, &task.name, true)?;

    debug!("Normalized Task: {} config: {:#?}", &task, &task_config);

    let is_private = match task_config.private {
        Some(value) => value,
        None => false,
    };

    if allow_private || !is_private {
        let add = !task_config.disabled.unwrap_or(false);

        if add {
            match task_config.dependencies {
                Some(ref dependencies) => {
                    for dependency in dependencies {
                        create_for_step(
                            &config,
                            &dependency.to_owned().into(),
                            steps,
                            task_names,
                            false,
                            true,
                            skip_tasks_pattern,
                        )?;
                    }
                }
                _ => debug!("No dependencies found for task: {}", &task),
            };

            if !task_names.contains(&task.name) {
                steps.push(Step {
                    name: task.to_string(),
                    config: task_config,
                });
                task_names.insert(task.to_string());
            } else if root {
                return Err(CargoMakeError::CircularReference(format!("{}", task)));
            }
        }
        Ok(())
    } else {
        error!("Task {} is private", &task);
        return Err(CargoMakeError::TaskIs(format!("{}", task), "private"));
    }
}
Creates an execution plan for the given step based on existing execution plan data
src/lib/execution_plan.rs