pub fn resolve_instructions(
ito_path: &Path,
change: &str,
schema_name: Option<&str>,
artifact_id: &str,
ctx: &ConfigContext,
) -> Result<InstructionsResponse, TemplatesError>Expand description
Produce user-facing instructions and metadata for performing a single artifact in a change.
Resolves the effective schema for the change, verifies the change directory and artifact exist, computes the artifact’s declared dependencies and which artifacts it will unlock, loads the artifact’s template and instruction text, and returns an InstructionsResponse containing the fields required by CLI/API layers.
§Errors
Returns a WorkflowError when the change name is invalid, the change directory or schema cannot be found,
the requested artifact is not defined in the schema, or when underlying I/O/YAML/template reads fail
(for example: InvalidChangeName, ChangeNotFound, SchemaNotFound, ArtifactNotFound, Io, Yaml).
§Examples
ⓘ
use std::path::Path;
// `config_ctx` should be a prepared ConfigContext in real usage.
let resp = resolve_instructions(
Path::new("/project/ito"),
"0001-add-feature",
Some("spec-driven"),
"service-config",
&config_ctx,
).unwrap();
assert_eq!(resp.artifact_id, "service-config");