{# Recursive section renderer. `children_map` maps parent_section_id -> [section,...]. Roots are passed in by the blueprint; each section embeds its own `checkpoints` (from get_plan). Recursion is explicit-argument (no include/context gotcha). #} {% from "partials/_checkpoint_steps.html" import checkpoint_steps %} {% macro render_section(section, children_map) %}
  • {{ section.section_type }} {{ section.heading }} {% set done = section.checkpoints | selectattr('status', 'equalto', 'done') | list | length %} {% set total = section.checkpoints | length %} {% if total %}{{ done }}/{{ total }}{% endif %} {% if section.needs_llm_review %}needs review{% endif %} {% if section.section_type == 'uncertain' %}uncertain{% endif %}
    {{ checkpoint_steps(section.checkpoints) }} {% set kids = children_map.get(section.id, []) %} {% if kids %} {% endif %}
  • {% endmacro %}