{# One unit: its content, what was checked, what covered its requirements, and what produced it. The content is model output and is rendered as escaped text inside
 — never as markup, and
   never through `| safe` (risk S1). #}
{% extends "base.html" %}
{% from "mirrorwall/components.html" import badge, kv_list, empty_state %}
{% block content %}

{{ unit_key }} — {{ title }}

{{ kv_list([ {"label": "State", "value": state}, {"label": "Goal", "value": goal}, {"label": "Version", "value": version if version is not none else "not committed"}, {"label": "Words", "value": word_count if word_count is not none else "—"}, {"label": "Content hash", "value": content_hash or "—"}, {"label": "Committed", "value": committed_at or "—"}, ]) }} {% if paused_reason %}

Paused: {{ paused_reason }}

{% endif %}

Content

{% if content %}
{{ content }}
{% else %}{{ empty_state("No committed content yet.") }}{% endif %}

Requirements

{% if requirements %}
{% for requirement in requirements %} {% endfor %}
KeyRequirementClassChecked by
{{ requirement.key }}{{ requirement.text }} {{ badge("blocking" if requirement.blocking else "advisory", tone="warning" if requirement.blocking else "neutral") }} {{ requirement.checks }}
{% else %}{{ empty_state("No requirements assigned.") }}{% endif %}

Coverage

{% if coverage %}
{% for entry in coverage %} {% endfor %}
RequirementSatisfiedDecided byDetail
{{ entry.requirement_key }} {{ badge("yes" if entry.satisfied else "no", tone="success" if entry.satisfied else "danger") }} {{ entry.satisfied_by }}{% if entry.satisfied_by != "deterministic_check" %} {{ badge("model-assisted", tone="neutral") }}{% endif %} {{ entry.detail }}
{% else %}{{ empty_state("No coverage recorded.") }}{% endif %}

Validation

{% if validation %}
{% for check in validation %} {% endfor %}
FamilyCheckResultDetail
{{ check.kind }}{{ check.key }} {{ badge("pass" if check.passed else ("blocking" if check.blocking else "advisory"), tone="success" if check.passed else ("danger" if check.blocking else "warning")) }} {{ check.detail }}
{% else %}{{ empty_state("No validation recorded.") }}{% endif %}

Findings

{% if findings %}
{% for finding in findings %} {% endfor %}
What the reviews found, and in which round
RoundStageSeverityCategoryProblemEvidenceWould resolve it
{{ finding.round }} {{ finding.stage }}{% if finding.escalated %} {{ badge("escalated", tone="warning") }}{% endif %} {{ badge(finding.severity, tone="danger" if finding.severity in ("critical", "major") else "neutral") }} {{ finding.category }} {{ finding.problem }}{% if finding.uncertain %} {{ badge("uncertain", tone="neutral") }}{% endif %} {{ finding.evidence }} {{ finding.fix }}
{% else %}{{ empty_state("No findings.") }}{% endif %}

Critique and revision

{% if critiques %}
{% for critique in critiques %} {% endfor %}
What changed between rounds, and which rule stopped the loop
RoundVerdictImprovementStopped byRationale
{{ critique.round }} {{ badge(critique.verdict, tone="success" if critique.verdict != "materially_deficient" else "warning") }} {% if critique.improvement_delta is not none %}{{ "%.0f%%" | format(critique.improvement_delta * 100) }}{% else %}—{% endif %} {{ critique.stop_reason or "—" }} {{ critique.rationale }}
{% else %}{{ empty_state("No critique recorded.") }}{% endif %}

Provenance

{% if attempts %}
{% for attempt in attempts %} {% endfor %}
Every attempt that produced this unit
StageAttemptOutcomeBackendModelPromptTokensDegradations
{{ attempt.stage }}{{ attempt.attempt }}{{ attempt.outcome }} {{ attempt.backend }}{{ attempt.model_canonical_id or "—" }} {{ attempt.prompt_id }} {{ attempt.prompt_version }} {{ attempt.input_tokens }}/{{ attempt.output_tokens }} {{ attempt.degradations | join("; ") or "—" }}
{% else %}{{ empty_state("No attempts recorded.") }}{% endif %}

History

{% if history %} {% else %}{{ empty_state("No versions yet.") }}{% endif %}

Back to the plan

{% endblock %}