Skip to main content

structural_source_for_goal

Function structural_source_for_goal 

Source
pub fn structural_source_for_goal(
    root: &Path,
    goal: &str,
    budget_tokens: usize,
) -> Result<String, String>
Expand description

Build the structural-source section for a goal with NO ground truth: file selection comes from the task-personalized surface (task PPR + lexical), and per-file structural units are rendered while the token estimate fits budget_tokens. When the running binary supports it, the production scc context structural --task "<goal>" --budget N CLI performs the same selection and render in one shot. task.files NEVER enters context construction — ground truth is scoring-only.