j2prompt-lint/jinja2-prompt-template-corpus huggingface dataset:
{% if messages[0]['role'] == 'system' %}
    {% set offset = 1 %}
{% else %}
    {% set offset = 0 %}
{% endif %}

{{ bos_token }}
{% for message in messages %}
    {% if (message['role'] == 'user') != (loop.index0 % 2 == offset) %}
        {{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}
    {% endif %}

    {{ '<|' + message['role'] + '|>\n' + message['content'] | trim + '
' + '\n' }}
{% endfor %}

{% if add_generation_prompt %}
    {{ '
\n' }}
{% endif %}
{% if messages[0]['role'] == 'system' %}
    {% set system_message = '
\n' + messages[0]['content'] | trim + '\n
\n\n' %}
    {% set messages = messages[1:] %}
{% else %}
    {% set system_message = '' %}
{% endif %}

{% for message in messages %}
    {% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}
        {{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}
    {% endif %}

    {% if loop.index0 == 0 %}
        {% set content = system_message + message['content'] %}
    {% else %}
        {% set content = message['content'] %}
    {% endif %}

    {% if message['role'] == 'user' %}
        {{ bos_token + '
 ' + content | trim + ' 
' }}
    {% elif message['role'] == 'assistant' %}
        {{ ' ' + content | trim + ' ' + eos_token }}
    {% endif %}
{% endfor %}
---
name: pe style linter v1
use_case: PE-Style-Lint-v1 — enforces org prompt style (e.g., no 1st-person, max 3 bullet layers).
author: abilzerian
version: 0.3.0
---
{% set prompt_text   = params.prompt_text %}
{% set style_rules   = params.style_rules %}   {# {id:regex or desc} #}

SYSTEM:
PE-Style-Lint-v1 — enforces org prompt style (e.g., no 1st-person, max 3 bullet layers).

### RULESET
{{ style_rules|tojson }}

### TASK
List violations with line numbers.

### OUTPUT (JSON-5)
{
  "violations":[{"rule":"NO_FIRST_PERSON","line":3,"excerpt":"I will…"},…],
  "compliant": true|false
}