{% extends "base.html" %} {% from "_macros.html" import icon, ref, decision_status_badge, kind_badge, linear_badge, folder_select, due_badge %} {% block title %}{{ decision.title }} — apo{% endblock %} {% block body_class %}page-decision{% endblock %} {% block content %} {% set is_action = decision.kind == 'action' %} {% set is_task = decision.kind == 'task' %} {% set is_wait = decision.kind == 'wait' %}
{{ decision_status_badge("ready" if is_task and decision.status == "open" else ("waiting" if is_wait and decision.status == "open" else decision.status)) }} {{ kind_badge(decision.kind) }} {{ linear_badge(decision) }}

{{ decision.title }}

{% set has_question_block = decision.summary and decision.summary != decision.question %} {% if has_question_block %}

{{ decision.summary }}

{% elif decision.question != decision.title %}

{{ decision.question }}

{% endif %} {% if is_task and attachments %} {% set composer_decision_id = decision.id %} {% set composer_attachments = attachments %} {% set composer_editable = false %} {% set composer_thumb_compact = false %} {% include "_attachment_composer.html" %} {% endif %} {% if decision.recommendation and (not decision.options or decision.recommended_option is none) %}

{{ icon("bulb") }}Suggested: {{ decision.recommendation }}{% if decision.confidence %} · {{ decision.confidence }}% sure{% endif %}

{% endif %} {% if is_task or is_wait %} {% include "_work_status.html" %} {% elif decision.answer_text %} {% if decision.options and decision.answer_text %}

Options

    {% for o in decision.options %}
  1. {{ o.label }}{% if decision.answer_option == loop.index0 %} Chosen{% endif %}{% if decision.recommended_option == loop.index0 %} Suggested{% if decision.confidence %} · {{ decision.confidence }}%{% endif %}{% endif %} {% if o.consequence %}Agent will: {{ o.consequence }}{% endif %} {% if o.detail %}{{ o.detail }}{% endif %}
  2. {% endfor %}
{% endif %}

{{ icon("check-circle") }}Answer

{{ decision.answer_text }}
{% if attachments %}
{% set composer_decision_id = decision.id %} {% set composer_attachments = attachments %} {% set composer_editable = false %} {% set composer_show_headings = false %} {% set composer_thumb_compact = false %} {% set composer_id_suffix = '' %} {% include "_attachment_composer.html" %}
{% endif %}

{{ icon("info") }} {% if repository %} {% if decision.status == 'resolved' %} Done — the work was picked up and closed out. {% elif decision.delivery == 'delivered' %} Delivered to the session that asked{% if decision.delivered_at %}, {{ decision.delivered_at | ago }}{% endif %}. It applies the answer when you carry on in that session. {% elif transit and transit.live_session %} Written to {{ repository.local_path }}/.claude/decisions/. A session is open in that repo — the one that asked hears about it on its next prompt; any other can run /decisions. {% else %} Written to {{ repository.local_path }}/.claude/decisions/. Nothing is running in that repo to pick it up{% if transit and not transit.stuck %} yet{% endif %} — apply it in the background, or start a session there yourself: {% endif %} {% elif folders %} This item has no folder, so the answer wasn't written to disk. Pick one under Folder. {% else %} No repository is registered for this project, so the answer wasn't written to disk. Register one with cli.py repo-add. {% endif %}

{% if decision.status == 'resolved' %}{% include "_work_location.html" %}{% endif %} {% if launch_error %} {% endif %} {% if decision.status == 'answered' and decision.dispatched_at %}

{{ icon("terminal") }} Applying in background since {{ decision.dispatched_at | ago }}{% if decision.dispatch_agent_id %} — claude attach {{ decision.dispatch_agent_id }} to watch it{% endif %}.

{% endif %} {% if apply and not apply.error and transit and not transit.live_session %}
{% if apply.needs_approval %}{% endif %} {{ "Resumes the session that asked" if apply.resume else "Starts a new background session in the repo" }} with {{ apply.prompt }}. Any permission prompt shows up in claude agents.
{% endif %} {% if transit and transit.resume_command and not transit.live_session and decision.delivery != 'delivered' %}
{{ transit.resume_command }}
{% endif %}
{% else %}

{{ "Confirm it's done" if is_action else "Your answer" }}

{% if unverified %} {% endif %} {% set composer_decision_id = decision.id %} {% set composer_attachments = attachments %} {% set composer_editable = true %} {% set composer_show_headings = false %} {% set composer_thumb_compact = false %} {% set composer_id_suffix = '' %} {% set composer_placeholder = "Add a note for the session (optional context, what you changed)…" if is_action else "Pick a quick answer above (anything typed here goes with it as a note), or write your own answer." %} {% set composer_submit_label = "Send note" if is_action else "Send answer" %} {% set composer_note_submit = is_action %} {% set composer_decision = decision %} {% set composer_show_keys = true %} {% include "_attachment_composer.html" %}
{% endif %} {% set plan = decision.resume_plan %} {% if has_question_block or decision.context or decision.why_it_matters or decision.blocked_work or decision.safe_work or plan %}
{{ icon("chevron-right", cls="chev") }} {{ "The ask" if is_action else ("The brief" if is_task else "The question") }}{{ " and its context" if decision.context or decision.why_it_matters or plan else "" }} The agent's own words and its handoff, also in the repo
{% if has_question_block %}

{{ decision.question }}

{% endif %} {% if decision.context %}

Context

{{ decision.context }}

{% endif %} {% if decision.why_it_matters %}

Why it matters

{{ decision.why_it_matters }}

{% endif %} {% if decision.blocked_work %}

Blocked work

    {% for f in decision.blocked_work %}
  • {{ f }}
  • {% endfor %}
{% endif %} {% if decision.safe_work %}

Safe remaining work

    {% for f in decision.safe_work %}
  • {{ f }}
  • {% endfor %}
{% endif %} {% if plan %}

Resume plan

{% if plan.objective %}

Objective: {{ plan.objective }}

{% endif %} {% if plan.remaining_steps %}
    {% for s in plan.remaining_steps %}
  1. {{ s }}
  2. {% endfor %}
{% endif %} {% if plan.expected_outcome %}

Expected outcome: {{ plan.expected_outcome }}

{% endif %}
{% endif %}
{% endif %} {% set composer_shown = not (is_task or is_wait) and not decision.answer_text %}
{{ icon("chevron-right", cls="chev") }}

Notes{% if notes %} {{ notes | length }}{% endif %}

{% if note_error %}{% endif %} {% if notes %}
    {% for n in notes %}
  • {{ "You" if n.author == "human" else (n.author if n.author == "agent" else "Agent " ~ n.author[:8]) }}
    {{ n.body }}
  • {% endfor %}
{% else %}

No notes yet. Whatever you add here goes into this item's file, so the next session working it reads it.

{% endif %} {% if not (is_action and composer_shown) %}
{% endif %}
{% endblock %}