{% set tag_name = set_tag_name("COMPLETION") %}
{% set rendered_context_content -%}
<|SECTION:CONTEXT|>
{%- with memory_query=scene.snapshot() -%}
    {% include "extra-context.jinja2" %}
{% endwith %}
<|CLOSE_SECTION|>
{% endset %}
{{ rendered_context_content }}
{% set rendered_context_tokens = count_tokens(rendered_context_content) %}
{% if not can_coerce %}
<|SECTION:EXAMPLE|>
<DRAFT>The old man walked slowly down the dusty</DRAFT>
<{{ tag_name }}> road, his cane tapping a steady rhythm against the cobblestones.</{{ tag_name }}>
<|CLOSE_SECTION|>
{% endif %}
<|SECTION:SCENE|>
{% for scene_context in scene.context_history(budget=min(2048, max_tokens-300-rendered_context_tokens), min_dialogue=20, sections=False) -%}
{{ scene_context }}
{% endfor %}
<|CLOSE_SECTION|>

{% include "dynamic-instructions.jinja2" %}
<|SECTION:TASK|>
You are assisting a script editor in writing the next part of the narrative in the current scene.

The editor is writing this narrative right now and has tasked you to provide a suggestion for the continuation.

Rules:
{{ li() }}. Your suggestion should continue naturally from the current narrative.
{{ li() }}. Maintain the established tone and style of the narrative.
{{ li() }}. Focus on descriptive prose, actions, or scene-setting.
{{ li() }}. Spoken word MUST be contained within " markers. If the draft has just completed a section of spoken word, the continuation MUST start with action.
{{ li() }}. Assume correct grammar and punctuation. If there is no sentence terminator, either have it be the first thing in your continuation or continue the sentence.
{%- if not can_coerce %}
{{ li() }}. Only return the continuation of the <DRAFT>. Place your continuation inside a <{{ tag_name }}>...</{{ tag_name }}> block. Refer to the example for a better understanding.
{% endif %}
{% if can_coerce %}
DRAFT: {{ non_anchor }}{{ bot_token }}{{ anchor }}
{% else %}
<DRAFT>{{ non_anchor }} {{ anchor }}</DRAFT>
{% endif %}