{% extends "base.html" %} {% block title %}Protocol Explainability{% endblock %} {% block page_title %}Protocol Explainability{% endblock %} {% block page_subtitle %} Why the runtime acted, blocked, drifted, or asked for evidence {% endblock %} {% block header_actions %} /api/protocol {% endblock %} {% block content %} {% set compliance = snapshot.protocol_summary or {} %} {% set overall = compliance.overall_compliance_pct or 0 %} {% set debt = snapshot.debt_summary or {} %} {% set workflow = snapshot.workflow_summary or {} %} {% set goals = snapshot.goal_summary or {} %} {% set conditioned = snapshot.conditioned_learnings or [] %}

Compliance 7d

{{ "%.1f"|format(overall) }}%

Open Debt

{{ debt.open_total or 0 }}

Open Runs

{{ workflow.open_runs or 0 }}

Blocked Goals

{{ goals.blocked or 0 }}

Conditioned Files

{{ conditioned|length }}

Protocol Requirements

{% for key, label in [('guard_check', 'Guard before action'), ('heartbeat', 'Heartbeat with context'), ('change_log', 'Change log after edits'), ('learning_capture', 'Learning capture after correction'), ('done_evidence', 'Evidence before done')] %} {% set item = compliance.get(key, {}) %}

{{ label }}

{% if item.required is defined %}required {{ item.required }}{% endif %} {% if item.total is defined %}total {{ item.total }}{% endif %} {% if item.executed is defined %} • executed {{ item.executed }}{% endif %} {% if item.logged is defined %} • logged {{ item.logged }}{% endif %} {% if item.captured is defined %} • captured {{ item.captured }}{% endif %} {% if item.done_tasks is defined %} • done {{ item.done_tasks }}{% endif %}

{{ "%.1f"|format(item.compliance_pct or 0) }}%
{% endfor %}

Debt Pressure

{% for severity in ['error', 'warn', 'info'] %}

{{ severity }}

{{ debt.by_severity.get(severity, 0) }}

{% endfor %}
{% for item in snapshot.recent_debts[:10] %}
{{ item.debt_type }} {{ item.status }}

{{ item.evidence or 'No evidence summary recorded.' }}

{% else %}

No protocol debt recorded.

{% endfor %}

Recent Protocol Tasks

{% for item in snapshot.recent_tasks[:12] %}

{{ item.goal }}

{{ item.status }}

{{ item.task_type }} • cortex={{ item.cortex_mode or 'n/a' }} • response={{ item.response_mode or 'n/a' }}

{% if item.guarded_open %}guarded open{% endif %} {% if item.must_verify %}must verify{% endif %} {% if item.must_change_log %}must change-log{% endif %} {% if item.has_evidence %}evidence attached{% endif %} {% if item.guard_has_blocking %}blocking risk{% endif %}
{% else %}

No protocol tasks yet.

{% endfor %}

Durable Workflow State

Open Runs

{{ workflow.open_runs or 0 }}

Blocked Runs

{{ workflow.blocked_runs or 0 }}

Waiting Approval

{{ workflow.waiting_approval or 0 }}

{% for item in snapshot.recent_runs[:10] %}

{{ item.goal }}

{{ item.status }}

{{ item.workflow_kind }}{% if item.current_step_key %} • step={{ item.current_step_key }}{% endif %}{% if item.next_action %} • next={{ item.next_action }}{% endif %}

{% else %}

No workflow runs recorded.

{% endfor %}

Conditioned Learnings

{% for item in conditioned[:12] %}

{{ item.title }}

{{ item.priority or 'normal' }}

{{ item.applies_to }}

guard_hits={{ item.guard_hits or 0 }} • weight={{ "%.2f"|format(item.weight or 0) }}

{% else %}

No conditioned learnings active.

{% endfor %}

Guard Pressure

Recent Checks

{{ snapshot.guard_summary.recent_checks or 0 }}

Blocking Hits

{{ snapshot.guard_summary.blocking_hits or 0 }}

{% for area, count in snapshot.guard_summary.areas.items() %}
{{ area }} {{ count }} checks
{% else %}

No guard pressure recorded.

{% endfor %}
{% endblock %}