fix(captain): add send_suite_images rules to scenario.liquid template

The [Galeria de Fotos] rules previously added to assistant_response_generator
only apply to the legacy V1 chat service. In V2 (captain_integration_v2),
scenario agents use scenario.liquid as their system prompt template, not
assistant_response_generator.

This adds conditional rules to scenario.liquid (matching the existing pattern
for faq_lookup and check_pix_payment) that activate for any scenario that
has the send_suite_images tool:
- Infer suite_category vs suite_number from context, no confirmation needed
- Never announce photo sending before the tool confirms images were found

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Rodrigo Borba 2026-02-27 10:14:12 -03:00
parent d13656e499
commit 039b9e116d

View File

@ -53,6 +53,7 @@ You have access to these tools:
{% assign has_faq_lookup = false %}
{% assign has_check_pix_payment = false %}
{% assign has_send_suite_images = false %}
{% for tool in tools -%}
{% if tool.id == 'faq_lookup' -%}
{% assign has_faq_lookup = true %}
@ -60,6 +61,9 @@ You have access to these tools:
{% if tool.id == 'check_pix_payment' -%}
{% assign has_check_pix_payment = true %}
{% endif -%}
{% if tool.id == 'send_suite_images' -%}
{% assign has_send_suite_images = true %}
{% endif -%}
{% endfor -%}
{% if has_faq_lookup -%}
@ -75,6 +79,15 @@ If the customer says they already paid the Pix ("já paguei", "paguei o pix", "a
Use the tool response as the source of truth for payment status in that turn.
{% endif -%}
{% if has_send_suite_images -%}
# Galeria de Fotos — Regras de Busca
- Se o cliente mencionar um NOME ou TIPO de suíte (ex: "Alexa", "hidromassagem", "STILO"), use o parâmetro `suite_category` na ferramenta `send_suite_images`.
- Se mencionar um NÚMERO específico (ex: "suite 101", "quarto 202"), use o parâmetro `suite_number`.
- Em caso de dúvida, priorize `suite_category` — clientes geralmente citam o tipo da suíte, não o número.
- NÃO peça confirmação ao cliente — infira do contexto e chame `send_suite_images` diretamente.
- Aguarde o resultado da ferramenta. Se retornar "Não encontrei fotos", informe o cliente que as fotos não estão disponíveis no momento. NUNCA anuncie o envio de fotos antes de confirmar que a ferramenta as encontrou.
{% endif -%}
# Orchestrator Boundary
If the user asks a broad factual question that is not required to execute this scenario's current workflow step, transfer back to the orchestrator using `handoff_to_{{ assistant_name }}`.
Use this scenario primarily for execution tasks, not as a generic knowledge router.