{% 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 %} {% elif target.metadata and target.metadata.kind == "synthetic-unbound" %}

Any historical imports that weren't bound to a specific target land here. New imports attach to the target you choose at import time.

{% 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 }} probe{{ "" if latest_probe.total_probes == 1 else "s" }} across {{ latest_probe.category_count }} categor{{ "y" if latest_probe.category_count == 1 else "ies" }}, {{ "%.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 %} {% elif target.metadata and target.metadata.kind == "synthetic-unbound" %}

Historical probe runs that weren't bound to a specific target land here. New probe runs bind to a target when launched.

{% 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 }} template{{ "" if latest.template_count == 1 else "s" }} × {{ latest.style_count }} style{{ "" if latest.style_count == 1 else "s" }}, 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 %} {% elif target.metadata and target.metadata.kind == "synthetic-unbound" %}

Historical sweep runs that weren't bound to a specific target land here. New sweep runs bind to a target when launched.

{% 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 %}