Context
generate-batch currently parses every matching scene YAML up to three times:
_discover_scene_configs() — parses all YAMLs to filter by project/tier
_select_configs_by_typology() — parses the selected paths again to read violence_typology
_print_selection_summary() — parses again to build the typology count table
Proposed fix
Return SceneConfig objects (or a (Path, SceneConfig) tuple) from _discover_scene_configs and thread them through _select_configs_by_typology and _print_selection_summary, so each YAML is parsed exactly once.
Impact
Low priority: Phase 1 config libraries are small (<50 configs) so the overhead is negligible today. Worth addressing before Phase 3 scale-up (~hundreds of templates).
Flagged from PR #7 review (COPILOT-4).
Context
generate-batchcurrently parses every matching scene YAML up to three times:_discover_scene_configs()— parses all YAMLs to filter by project/tier_select_configs_by_typology()— parses the selected paths again to readviolence_typology_print_selection_summary()— parses again to build the typology count tableProposed fix
Return
SceneConfigobjects (or a(Path, SceneConfig)tuple) from_discover_scene_configsand thread them through_select_configs_by_typologyand_print_selection_summary, so each YAML is parsed exactly once.Impact
Low priority: Phase 1 config libraries are small (<50 configs) so the overhead is negligible today. Worth addressing before Phase 3 scale-up (~hundreds of templates).
Flagged from PR #7 review (COPILOT-4).