{% extends "base.html" %} {% block title %}{{ mission.id if mission else mission_id }} - {{ t('missions.title') }}{% endblock %} {% block content %}
{{ t('accessibility.skip_mission_detail') }} {% if error %} {% else %}
{{ label(mission.kind) }} r{{ mission.revision }} {{ easy(mission.status) }}

{{ mission.id }}

{{ mission.summary.objective or t('missions.objective_unavailable') }}

{% if mission.control and not mission.control.degraded %}

{{ t('missions.command_state') }}

{{ t('missions.next_task') }}

{{ t('missions.pinned_revision') }}
{{ mission.control.pinned_plan_id }} · r{{ mission.control.pinned_plan_revision }}
{{ t('missions.status') }}
{{ easy(mission.control.run_status) }}
{{ t('missions.approval') }}
{{ easy(mission.control.approval_status) }}
{% if mission.control.next_task %}

{{ mission.control.next_task.id }} · {{ mission.control.next_task.title }}{{ mission.control.next_task.instruction }}

{% else %}

{{ t('missions.no_active_run') }}

{% endif %}
{% endif %} {% if mission.degraded %}

{{ t('mission_detail.degraded_title') }}

{% for item in mission.degraded %}
{{ item.code }}

{{ item.message }}

{% if item.recovery %}

{{ item.recovery }}

{% endif %}
{% endfor %}
{% endif %}

{{ t('mission_detail.decision_context') }}

{{ t('mission_detail.overview') }}

{{ t('missions.status') }}
{{ easy(mission.status) }}
{{ t('missions.owner') }}
{{ mission.metadata.created_by }}
{{ t('missions.updated') }}
{{ mission.metadata.modified_at }}
{{ t('mission_detail.created') }}
{{ mission.metadata.created_at }}
{% if mission.summary.approval %}
{{ t('missions.approval') }}
{{ easy(mission.summary.approval.status) }}
{% endif %}
{{ t('mission_detail.visibility') }}
{{ mission.policy.visibility }}{% if mission.policy.redacted_fields %} · {{ mission.policy.redacted_fields|length }} {{ t('mission_detail.redacted') }}{% endif %}
{% if mission.kind == 'research_report' and mission.research %}

{{ t('mission_report.eyebrow') }}

{{ t('mission_report.title') }}

{{ t('mission_report.sufficient') }} {{ t('mission_report.sufficient_yes') if mission.research.sufficient else t('mission_report.sufficient_no') }} {{ mission.research.findings|length }} {{ t('mission_report.finding_count') }}

{{ t('mission_report.scope') }}

    {% for item in mission.research.scope %}
  • {{ item }}
  • {% else %}
  • {{ t('mission_report.none') }}
  • {% endfor %}

{{ t('mission_report.excluded_scope') }}

    {% for item in mission.research.excluded_scope %}
  • {{ item }}
  • {% else %}
  • {{ t('mission_report.none') }}
  • {% endfor %}

{{ t('mission_report.findings') }}

    {% for finding in mission.research.findings %}
  1. {{ finding.id }}

    {{ finding.title }}

    {{ finding.detail }}

    {{ t('mission_report.finding_evidence') }} {% for ref in finding.evidence_refs %} {% if ref.href %}{{ ref.value }}{% else %}{{ ref.value }}{{ t('mission_report.evidence_unavailable') }}{% endif %} {% else %}{{ t('mission_report.no_evidence') }}{% endfor %}
  2. {% else %}
  3. {{ t('mission_report.no_findings') }}
  4. {% endfor %}

{{ t('mission_report.recommendations') }}

    {% for item in mission.research.recommendations %}
  1. {{ item }}
  2. {% else %}
  3. {{ t('mission_report.none') }}
  4. {% endfor %}

{{ t('mission_report.uncertainties') }}

    {% for item in mission.research.uncertainties %}
  • {{ item }}
  • {% else %}
  • {{ t('mission_report.none') }}
  • {% endfor %}
{% endif %} {% if mission.kind in ['work_plan', 'work_run'] %}

{{ t('mission_detail.review_state') }}

{{ t('mission_detail.progress') }}

{{ t('missions.progress') }}
{{ mission.task_counts.completed or 0 }} / {{ mission.task_counts.total or 0 }}
{{ t('missions.in_review') }}
{{ mission.task_counts.in_review or 0 }}
{{ t('missions.blocked') }}
{{ mission.task_counts.blocked or 0 }}
{{ t('missions.criteria') }}
{{ mission.criterion_counts.covered or 0 }} / {{ mission.criterion_counts.total or 0 }}
{{ t('missions.evidence') }}
{{ mission.evidence_count or 0 }}
{{ t('missions.handoff') }}
{{ t('missions.recorded') if mission.handoff_count else t('missions.not_recorded') }}
{% if (mission.task_counts.blocked or 0) > 0 %}

{{ mission.task_counts.blocked }} {{ t('mission_detail.blocked_tasks') }}

{% endif %}
{% endif %} {% if mission.kind == 'work_run' and mission.run %} {% elif mission.kind == 'work_plan' and mission.plan %}

{{ t('mission_detail.execution_context') }}

{{ t('missions.linked_runs') }}

{% if mission.plan.linked_runs %} {% else %}

{{ t('mission_detail.no_runs') }}

{% endif %}
{% endif %} {% if mission.summary.scope or mission.summary.constraints %}

{{ t('mission_detail.boundaries') }}

{{ t('mission_detail.scope_constraints') }}

{{ t('mission_detail.scope') }}

    {% for item in mission.summary.scope %}
  • {{ item }}
  • {% else %}
  • {{ t('mission_detail.not_recorded') }}
  • {% endfor %}

{{ t('mission_detail.constraints') }}

    {% for item in mission.summary.constraints %}
  • {{ item }}
  • {% else %}
  • {{ t('mission_detail.not_recorded') }}
  • {% endfor %}
{% endif %} {% if mission.kind in ['work_plan', 'work_run'] and mission.plan and mission.plan.global_criteria %}

{{ t('mission_detail.completion_standard') }}

{{ t('mission_detail.global_criteria') }}

    {% for criterion in mission.plan.global_criteria %}
  1. {{ criterion.id }}{{ t('criterion_state.' ~ criterion.coverage_status) }}

    {{ criterion.text }}

  2. {% endfor %}
{% endif %} {% if mission.kind in ['work_plan', 'work_run'] and mission.tasks %}

{{ t('mission_tasks.work_breakdown') }}

{{ t('mission_tasks.title') }}

{% for task in mission.tasks %}

{{ task.id }}

{{ task.title }}

{{ easy(task.status) }}
{{ t('accessibility.task_disclosure') }}
{{ t('mission_tasks.assignee') }}
{{ task.assigned_to or t('mission_tasks.not_recorded') }}
{{ t('mission_tasks.attempt') }}
{{ task.attempt }}
{{ t('mission_tasks.started') }}
{{ task.started_at or t('mission_tasks.not_recorded') }}
{{ t('mission_tasks.completed') }}
{{ task.completed_at or t('mission_tasks.not_recorded') }}
{{ t('mission_tasks.readiness') }}
{% if task.ready %}{{ t('mission_tasks.ready') }}{% elif task.status == 'blocked' %}{{ t('mission_tasks.blocked') }}{% else %}{{ easy(task.status) }}{% endif %}

{{ t('mission_tasks.instructions') }}

{{ task.instructions or t('mission_tasks.not_recorded') }}

{{ t('mission_tasks.dependencies') }}

{% if task.dependencies %}{% else %}

{{ t('mission_tasks.none') }}

{% endif %}

{{ t('mission_tasks.verification') }}

    {% for item in task.verification %}
  • {{ item }}
  • {% else %}
  • {{ t('mission_tasks.not_recorded') }}
  • {% endfor %}

{{ t('mission_tasks.authorization') }}

    {% for item in task.authorization %}
  • {{ item }}
  • {% else %}
  • {{ t('mission_tasks.not_recorded') }}
  • {% endfor %}

{{ t('mission_tasks.resources') }}

    {% for item in task.resources %}
  • {{ item }}
  • {% else %}
  • {{ t('mission_tasks.not_recorded') }}
  • {% endfor %}

{{ t('mission_tasks.result') }}

{{ task.result or t('mission_tasks.not_recorded') }}

{{ t('mission_tasks.criteria') }}

{{ task.criteria|length }}
    {% for criterion in task.criteria %}
  1. {{ criterion.id }}{{ t('criterion_state.' ~ criterion.coverage_status) }}

    {{ criterion.text }}

  2. {% else %}
  3. {{ t('mission_tasks.no_criteria') }}
  4. {% endfor %}
↑ {{ t('mission_tasks.back_to_navigator') }}
{% endfor %}
{% endif %} {% if mission.kind == 'work_run' or (mission.kind == 'work_plan' and mission.handoff_count) %}

{{ t('mission_handoff.resume_context') }}

{{ t('mission_handoff.title') }}

{{ t('handoff_state.' ~ mission.handoff.completeness.state) }} {% if mission.handoff.mode == 'legacy' %}{{ t('mission_handoff.legacy') }}{% elif mission.handoff.mode == 'typed' %}{{ t('mission_handoff.typed') }}{% else %}{{ t('mission_handoff.empty') }}{% endif %} {% if mission.handoff.completeness.missing_fields %}

{{ t('mission_handoff.missing_fields') }}: {{ mission.handoff.completeness.missing_fields|join(', ') }}

{% endif %}

{{ t('mission_handoff.current_state') }}

{{ mission.handoff.current_state or t('mission_handoff.not_recorded') }}

{{ t('mission_handoff.changed_files') }}

    {% for item in mission.handoff.changed_files %}
  • {% if item == '[redacted]' %}{{ t('mission_evidence.redacted') }}{% else %}{{ item }}{% endif %}
  • {% else %}
  • {{ t('mission_handoff.none') }}
  • {% endfor %}

{{ t('mission_handoff.remaining_work') }}

    {% for item in mission.handoff.remaining_work %}
  1. {{ item }}
  2. {% else %}
  3. {{ t('mission_handoff.none') }}
  4. {% endfor %}

{{ t('mission_handoff.blockers') }}

    {% for item in mission.handoff.blockers %}
  • {{ item }}
  • {% else %}
  • {{ t('mission_handoff.none') }}
  • {% endfor %}
{% if mission.handoff.mode == 'legacy' and mission.handoff.legacy_fields %}

{{ t('mission_handoff.legacy_fields') }}

{% for key, value in mission.handoff.legacy_fields.items() %}
{{ key }}
{{ value|string|truncate(500, True) }}
{% endfor %}
{% endif %}
{{ t('mission_handoff.recorded_by') }}
{{ mission.handoff.recorded_by or t('mission_handoff.not_recorded') }}
{{ t('mission_handoff.recorded_at') }}
{{ mission.handoff.recorded_at or t('mission_handoff.not_recorded') }}
{{ t('mission_handoff.next_owner') }}
{{ mission.handoff.next_owner or t('mission_handoff.unassigned') }}

{{ t('mission_handoff.no_transfer') }} {{ t('mission_handoff.no_transfer_help') }}

{% endif %}

{{ t('mission_evidence.proof_record') }}

{{ t('mission_evidence.title') }}

{% if mission.evidence %}
{% for item in mission.evidence %}
{{ label(item.type) }}

{{ item.evidence_id }}

{{ item.criterion_links|length }} {{ t('mission_evidence.linked_criteria') }}
{% if item.result == '[redacted]' or item.locator == '[redacted]' or item.content_hash == '[redacted]' %}

{{ t('mission_evidence.redacted_help') }}

{% endif %} {% if item.result == '[unavailable]' or item.locator == '[unavailable]' %}

{{ t('mission_evidence.unavailable_help') }}

{% endif %}
{{ t('mission_evidence.result') }}
{% if item.result == '[redacted]' %}{{ t('mission_evidence.redacted') }}{% elif item.result == '[unavailable]' %}{{ t('mission_evidence.unavailable') }}{% elif item.result %}
{{ item.result }}
{% else %}{{ t('mission_evidence.absent') }}{% endif %}
{{ t('mission_evidence.locator') }}
{% if item.locator == '[redacted]' %}{{ t('mission_evidence.redacted') }}{% elif item.locator == '[unavailable]' %}{{ t('mission_evidence.unavailable') }}{% elif item.locator %}{{ item.locator }}{% else %}{{ t('mission_evidence.absent') }}{% endif %}
{{ t('mission_evidence.hash') }}
{% if item.content_hash == '[redacted]' %}{{ t('mission_evidence.redacted') }}{% elif item.content_hash %}{{ item.content_hash }}{% else %}{{ t('mission_evidence.absent') }}{% endif %}
{{ t('mission_evidence.actor') }}
{{ item.captured_by or t('mission_evidence.absent') }}
{{ t('mission_evidence.time') }}
{{ item.captured_at or t('mission_evidence.absent') }}
{{ t('mission_evidence.sources') }}
{% if item.source_ids %}{% for source_id in item.source_ids %}{{ source_id }}{% endfor %}{% else %}{{ t('mission_evidence.absent') }}{% endif %}
{{ t('mission_evidence.criterion_ids') }}
{% if item.criterion_ids %}{% for criterion_id in item.criterion_ids %}{{ criterion_id }}{% endfor %}{% else %}{{ t('mission_evidence.absent') }}{% endif %}
{% endfor %}
{% else %}

{{ t('mission_evidence.empty') }}

{% endif %}

{{ t('mission_trace.audit_record') }}

{{ t('mission_trace.title') }}

{{ t('missions.audit_ledger') }}

{{ t('mission_trace.mission_history') }}

    {% for event in mission.history %}
  1. {{ easy(event.new_status) }}{{ event.actor }}

    {{ event.reason or t('mission_trace.no_reason') }}

  2. {% else %}
  3. {{ t('mission_trace.empty') }}
  4. {% endfor %}

{{ t('mission_trace.execution_events') }}

    {% for event in mission.execution_events %}
  1. {{ easy(event.new_status) }}{{ event.actor }}

    {{ event.reason or t('mission_trace.no_reason') }}

  2. {% else %}
  3. {{ t('mission_trace.empty') }}
  4. {% endfor %}

{{ t('mission_trace.review_decisions') }}

    {% for event in mission.review_decisions %}
  1. {{ easy(event.new_status) }}{{ event.actor }}

    {{ event.reason or t('mission_trace.no_reason') }}

  2. {% else %}
  3. {{ t('mission_trace.empty') }}
  4. {% endfor %}
{% endif %}
{% endblock %}