{{ t.get(prompt.prompt_key,prompt.prompt_key) }}{{ t[prompt.prompt_key ~ '_purpose'] }}{{ t.prompt_revision_unavailable if failed else (t.prompt_custom if mode == 'custom' else t.prompt_builtin_default) }}
{{ t.prompt_status }}: {{ t.get('prompt_state_' ~ prompt.status,t.get('prompt_' ~ prompt.status,prompt.status)) }}{% if prompt.reason %} — {{ t['prompt_reason_' ~ prompt.reason] }}{% endif %}
{% if not failed %}{{ t.prompt_mode }}: {{ t.prompt_custom if mode == 'custom' else t.prompt_auto }}
{{ t.prompt_instructions if opened or prompt.effective else t.prompt_builtin_template }}
{{ opened.content.instructions if opened else (prompt.effective.instructions if prompt.effective else (prompt.builtin.instructions if prompt.builtin else '')) }}
{% if prompt.artifact %}{{ t.revision_history }} →{% endif %}
{% set demonstrations = opened.content.demonstrations if opened else (prompt.effective.demonstrations if prompt.effective else []) %}
{% if demonstrations %}{{ t.prompt_demonstrations }}
{{ demonstrations|tojson(indent=2) }}{% endif %}
{% else %}{{ prompt.prompt_key }}{{ read_error(errors.prompt_selected,t.prompt_revision) }}{% endif %}