diff --git a/src/talemate/prompts/templates/world_state/examine-entity.jinja2 b/src/talemate/prompts/templates/world_state/examine-entity.jinja2 index a5a967a3..7ab2f668 100644 --- a/src/talemate/prompts/templates/world_state/examine-entity.jinja2 +++ b/src/talemate/prompts/templates/world_state/examine-entity.jinja2 @@ -21,13 +21,20 @@ Snapshot: {% endset %} {# END SEED MATERIAL #} +{# WRITING STYLE (scene-level style guide, if set) #} +{% set writing_style_text %} +{% include "writing-style-instructions.jinja2" %} +{% endset %} +{# END WRITING STYLE #} + {# BROAD HISTORY (budget-aware, includes archive summaries; prior context_investigation results for this or related entities naturally surface here, so the player gets accumulating depth across repeated examines without an explicit reveals buffer.) #} {% set rendered_context_tokens = count_tokens(rendered_context) %} {% set volatile_context_tokens = count_tokens(volatile_context_text) %} {% set seed_text_tokens = count_tokens(seed_text) %} -{% set background_budget = max_tokens - 1500 - rendered_context_tokens - volatile_context_tokens - seed_text_tokens %} +{% set writing_style_tokens = count_tokens(writing_style_text) %} +{% set background_budget = max_tokens - 1500 - rendered_context_tokens - volatile_context_tokens - seed_text_tokens - writing_style_tokens %} {% set background_history = scene.context_history(budget=background_budget) %} {% set background_text %} {% for line in background_history -%} @@ -50,6 +57,7 @@ Snapshot: <|SECTION:SEED MATERIAL|> {{ seed_text }} <|CLOSE_SECTION|> +{{ writing_style_text }} {% if volatile_placement == "after_history" %} {{ volatile_context_text }} {% endif %} diff --git a/src/talemate/prompts/templates/world_state/request-world-state-v2.jinja2 b/src/talemate/prompts/templates/world_state/request-world-state-v2.jinja2 index 0c04fbc7..af904192 100644 --- a/src/talemate/prompts/templates/world_state/request-world-state-v2.jinja2 +++ b/src/talemate/prompts/templates/world_state/request-world-state-v2.jinja2 @@ -215,6 +215,12 @@ The number of entries per bucket in the example is NOT a target — it only demo {% endset %} {# END CUSTOM INSTRUCTIONS #} +{# WRITING STYLE (scene-level style guide, if set) #} +{% set writing_style_text %} +{% include "writing-style-instructions.jinja2" %} +{% endset %} +{# END WRITING STYLE #} + {# BROAD HISTORY (budget-aware, includes archive summaries) #} {% set rendered_context_tokens = count_tokens(rendered_context) %} {% set volatile_context_tokens = count_tokens(volatile_context_text) %} @@ -222,7 +228,8 @@ The number of entries per bucket in the example is NOT a target — it only demo {% set example_text_tokens = count_tokens(example_text) %} {% set current_state_text_tokens = count_tokens(current_state_text) %} {% set custom_instructions_text_tokens = count_tokens(custom_instructions_text) %} -{% set background_budget = max_tokens - 2500 - rendered_context_tokens - volatile_context_tokens - focus_text_tokens - example_text_tokens - current_state_text_tokens - custom_instructions_text_tokens %} +{% set writing_style_text_tokens = count_tokens(writing_style_text) %} +{% set background_budget = max_tokens - 2500 - rendered_context_tokens - volatile_context_tokens - focus_text_tokens - example_text_tokens - current_state_text_tokens - custom_instructions_text_tokens - writing_style_text_tokens %} {% set background_history = scene.context_history(budget=background_budget) %} {% set background_text %} {% if background_history -%} @@ -251,6 +258,7 @@ The number of entries per bucket in the example is NOT a target — it only demo {% endif %} {{ example_text }} {{ custom_instructions_text }} +{{ writing_style_text }} <|SECTION:TASK|> Produce the "examine" data for the CURRENT FOCUS — the kind of short factual flavor a reader gets when they click on a notable thing in the scene to look closer at it. Treat the CURRENT FOCUS as one continuous moment; line {{ final_line_number }} is the most recent beat, the rest is its immediate run-up.