{% include "content-classification.jinja2" %}
<|SECTION:CONTEXT|>
{% set rendered_context_static_content %}
Scenario Premise:
{{ scene.description }}

{# GENERAL REINFORCEMENTS #}
{% set general_reinforcements = scene.world_state.filter_reinforcements(insert=['all-context']) %}
{%- for reinforce in general_reinforcements %}
{{ reinforce.as_context_line|condensed }}

{% endfor %}
{# END GENERAL REINFORCEMENTS #}
{# ACTIVE PINS #}
{%- for pin in scene.active_pins %}
{{ pin.time_aware_text|condensed }}

{% endfor %}
{# END ACTIVE PINS #}
{% endset %}
{{ rendered_context_static_content }}
{% set rendered_context_static_tokens = count_tokens(rendered_context_static_content) %}
{# MEMORY #}
{%- if memory_query %}
{%- for memory in query_memory(memory_query, as_question_answer=False, max_tokens=max_tokens-500-rendered_context_static_tokens, iterate=10) -%}
{{ memory|condensed }}

{% endfor -%}
{% endif -%}
{# END MEMORY #}
{# DYNAMIC INSTRUCTIONS #}
{% include "dynamic-instructions.jinja2" %}
{# END DYNAMIC INSTRUCTIONS #}
<|CLOSE_SECTION|>