{% extends "base.html" %} {% block title %}q-ai — Intel · {{ overview_row.target.name }}{% endblock %} {% set target = overview_row.target %} {% block content %}
{# ── Target header ── #}
{{ target.name }}

{{ target.type }} · {{ target.uri or "—" }}

← Back to Intel

{# ── Sections ── #}
{# Imports #}
Imports
{% if import_runs %} {% else %}

No imports yet. Import findings from external tools (Garak, PyRIT, SARIF, BIPIA) to populate this section.

{% endif %}
{# Probe Runs #}
Probe Runs
{% if probe_runs %} {% set latest_probe = probe_runs[0] %} {% if latest_probe.finished_at is none %}

Latest probe: {{ latest_probe.status.name | format_status | lower }} — not yet completed

{% elif latest_probe.metadata_available %}

Latest probe: {{ latest_probe.finished_at | format_age }} ago — {{ latest_probe.total_probes }} probes across {{ latest_probe.category_count }} categories, {{ "%.0f" | format(latest_probe.overall_compliance_rate * 100) }}% compliance, {{ latest_probe.overall_severity.name | lower }} severity, {{ latest_probe.status.name | format_status | lower }}

{% else %}

Latest probe: {{ latest_probe.finished_at | format_age }} ago — {{ latest_probe.status.name | format_status | lower }}

{% endif %} {% else %}

No probe runs yet. Run a probe to measure IPI susceptibility.

{% endif %}
{# Sweep Runs #}
Sweep Runs
{% if sweep_runs %} {% set latest = sweep_runs[0] %} {% if latest.finished_at is none %}

Latest sweep: {{ latest.status.name | format_status | lower }} — not yet completed

{% elif latest.metadata_available and latest.reps is not none %}

Latest sweep: {{ latest.finished_at | format_age }} ago — {{ latest.template_count }} templates × {{ latest.style_count }} styles, N={{ latest.reps }}, {{ latest.status.name | format_status | lower }}

{% else %}

Latest sweep: {{ latest.finished_at | format_age }} ago — {{ latest.status.name | format_status | lower }}

{% endif %} {% else %}

No sweep runs yet. Run a sweep to measure per-template compliance.

{% endif %} {# ── Recommended-template affordance (per RFC Decision 5) ── Five variants keyed off select_template_for_target's return shape. Button is a plain server-rendered so the query string is built at render time. #} {% if selection_kind == "SelectedTemplate" %} {% elif selection_kind == "TieRefusal" %}

Near-tie across {{ selection.candidates | length }} templates (top: {% for t, _ in selection.candidates[:2] %}{{ t.value | upper }}{% if not loop.last %}, {% endif %}{% endfor %}). Rerun the sweep with more reps, or pick a template explicitly from the launcher.

{% elif selection_kind == "StaleRefusal" %}

Latest sweep is {{ selection.age_days }} days old — rerun a fresh sweep before generating.

{% elif selection_kind == "NoFindings" and sweep_runs %}

No usable sweep findings yet. Run a sweep to enable template recommendations.

{% endif %}
{% endblock %}