{# _kpi_band.html — Executive KPI band (Task F2). Expected context: kpis (dict), since_days (int), since_label (str). Arrow polarity: - throughput: up = good (green), down = bad (red) - cycle p50/p95: down = good (green), up = bad (red) - stale count: no delta shown (count only, yellow) - flow efficiency: higher = better (shown as ratio) - forecast: informational only #} {%- set k = kpis -%}
{# ── Throughput (label driven by since_label) ── #}
Throughput · {{ since_label }}
{{ k.throughput_30d_count }}
{%- if k.throughput_30d_delta_pct is not none %} {%- set arrow = k.throughput_30d_arrow %} {%- if arrow == "up" %}↑{%- elif arrow == "down" %}↓{%- else %}→{%- endif %} {{ k.throughput_30d_delta_pct | abs | round(1) }}% vs prev {{ since_days }}d {%- else %} completed tickets {%- endif %}
{# ── Cycle time p50 ── #}
Cycle p50
{%- if k.cycle_p50 is not none %}{{ k.cycle_p50 }}d{%- else %}—{%- endif %}
median cycle time
{# ── Cycle time p95 ── #}
Cycle p95
{%- if k.cycle_p95 is not none %}{{ k.cycle_p95 }}d{%- else %}—{%- endif %}
95th-pct cycle time
{# ── WIP + stale ── #}
WIP
{{ k.wip_count }}
{%- if k.stale_count > 0 %} {{ k.stale_count }} stale {%- else %} in-progress tickets {%- endif %}
{# ── Flow efficiency ── #}
Flow efficiency
{%- if k.has_flow_data and k.flow_efficiency_pct is not none %} {{ k.flow_efficiency_pct }}% {%- else %}—{%- endif %}
{%- if k.has_flow_data and k.bottleneck %} bottleneck: {{ k.bottleneck }} {%- elif not k.has_flow_data %} no transition data yet {%- else %} active÷total non-terminal {%- endif %}
{# ── Forecast ── #}
Forecast
{%- if k.forecast_weeks_to_clear is not none %} {{ k.forecast_weeks_to_clear }}w {%- else %}—{%- endif %}
{%- if k.forecast_weeks_to_clear is not none %} clears ~{{ k.forecast_eta }} · {{ k.forecast_weekly_rate }}/wk {%- else %} insufficient throughput data {%- endif %}