{# One primary document, everything else behind a disclosure. Six generate buttons of equal weight is not six options, it is no recommendation: the decision brief is the smallest output that answers "what would I need to review before estimating this?", and it is the one the flow leads to. #}
{# What the generation that produced this region cost. Set only by the generate route; this partial is also rendered inside the ordinary session page, where there is nothing to report and the include is a no-op. #} {% include "_usage.html" %} {% macro artifact_row(a) %}
{{ a.label }} {% if a.stale %}Needs updating {% else %}Up to date{% endif %} View Download
{% endmacro %} {# The label of whichever document leads this page — the session's own primary artifact once generated, else its primary *generatable* type, else nothing (a perimeter with no primary leads with nothing rather than a guess, #609's follow-up review). Never a literal "brief": a go-to-market session's primary is `gtm_plan`, and this label is what keeps this whole card's prose honest about which one it is. #} {% set primary_label = s.primary_artifact.label if s.primary_artifact else (s.primary_generatable.label if s.primary_generatable else "") %}
{% if s.primary_artifact %} {{ artifact_row(s.primary_artifact) }} {% if s.primary_artifact.stale %}

The understanding moved after this {{ primary_label|lower }} was written. Regenerating rewrites it from the current understanding — nothing is regenerated on your behalf.

{% endif %} {% elif primary_label %}

{{ primary_label }} is what you take into a scope review: what is confirmed, what is being assumed, and what is still open.

{% if not s.readiness.ready and s.readiness.blocking_labels %}

Unresolved topics remain ({{ s.readiness.blocking_labels|join(', ') }}) — the {{ primary_label|lower }} will be marked Draft until they are answered.

{% endif %} {% endif %} {% if provider is defined and provider.available and s.primary_generatable %} {# `method`/`action` are the no-JS fallback (#428) — see the note beside the answers form in discovery/_questions.html for the failure this replaces. Guarded on `s.primary_generatable` (#609's follow-up review): this used to render unconditionally once a provider was available, bound to `s.primary_generatable.type` with no check that it existed — a go-to-market session, whose only artifact is not `s.primary_artifact`'s software-only default, posted this form to `/sessions//artifacts/` with no matching route. #}
{% include "_csrf.html" %}
{# The measured wait, as on the create form in `home.html` (#236). #} Usually under two minutes. Writing the {{ primary_label|lower }}…
{% elif provider is defined and not provider.available %}

{{ provider.reason }}

{% endif %}
More documents
{% if s.other_artifacts %}
    {% for a in s.other_artifacts %}
  • {{ artifact_row(a) }}
  • {% endfor %}
{% endif %} {% if provider is defined and provider.available %}

Each is generated from the current understanding and recorded against it. Generate the decision brief first — it settles the decisions the others are written from. Each one usually takes under two minutes.

{% for g in s.more_generatable %} {# The indicator is the toolbar, not the form: the "Generating…" text is a sibling of these forms, so the default (the requesting element carries `htmx-request`) never reaches it and the label was dead markup. #}
{% include "_csrf.html" %}
{% endfor %} Generating…
{% elif not s.other_artifacts %}

Nothing generated yet.

{% endif %}