{% extends "base.html" %} {% block title %}{{ view.title }} · Loopcaptain{% endblock %} {% block where %}{{ view.repo.key }} / {{ view.loop_id }}{% endblock %} {% block body_attrs %} data-pulse-url="{{ url_for('loop_pulse', repo_key=view.repo.key, loop_id=view.loop_id) }}" data-pulse="{{ pulse }}"{% endblock %} {% set here = url_for('loop_page', repo_key=view.repo.key, loop_id=view.loop_id) %} {% macro file_link(path, text) %}{% if path %}{{ text or path }}{% endif %}{% endmacro %} {% block main %}

Loops / {{ view.repo.key }} / {{ view.loop_id }}

{{ view.title }}

{{ state.status }}{{ status_text[state.status] }}{% if state.last_event %}last line {{ state.last_event|ago }}{% endif %}{% if branch %}branch {{ branch }}{% endif %}{% if view.repo.others %}written from {{ view.repo.path|place }}, the latest of {{ view.repo.others|length + 1 }} worktrees{% endif %}{% if manifest.pace %}{{ manifest.pace }}{% endif %}{% if state.status == 'sleeping' and state.expected %}back at {{ state.expected|stamp }}{% endif %}{% if state.ended %}ended between rounds: {{ state.ended.stop_reason|replace('_', ' ') }}{% if state.ended.summary %}, {{ state.ended.summary }}{% endif %}{% endif %}

{% if note %}

{{ note }}

{% endif %} {% if error %}{% endif %} {% if state.question %} {% set q = state.question %}

{{ 'A step needs you' if q.needs_person else 'The loop asks' }}{% if q.round %}, round {{ q.round }}{% endif %} · {{ q.asked|ago }}{% if q.blocks %} · it stands still until you answer{% if q.gives_up %}, at most until {{ q.gives_up|stamp }}{% endif %}{% endif %}

{{ q.text }}

{% if q.options %}
{% for option in q.options %}{% endfor %}
{% endif %}
{% endif %} {% set open_count = state.open_findings|length %} {% if tab == 'rounds' %} {% if not state.rounds %}

No round has run yet.

{% endif %} {% if state.rounds %}

Every rounda number is that step's open material findings, darker for more; pick a round to read it

{% for r in state.rounds %}{% endfor %} {% for step_id in state.step_ids %} {% set step = manifest.step(step_id) %} {% for r in state.rounds %} {% set runs = r.runs_of(step_id) %} {% set on = ' on' if shown and r.number == shown.number else '' %} {% if not runs %} {% else %} {% set finds = runs|sum(attribute='material_open') %} {% set st = 'running' if runs|selectattr('status', 'equalto', 'running')|list else ('failed' if runs|selectattr('status', 'equalto', 'failed')|list else ('ok' if runs|selectattr('status', 'equalto', 'ok')|list else 'skipped')) %} {% endif %} {% endfor %} {% endfor %} {% for r in state.rounds %}{% endfor %}{% for r in state.rounds %}{% endfor %}{% for r in state.rounds %}{% endfor %}
Step{{ r.number }}
{{ (step.name if step else '') or step_id }}{{ step.kind if step else 'not in loop.json' }}did not run{% if finds %}{{ finds }}{% else %}{{ st }}{% endif %}
Verdict{{ (r.verdict or 'live')|replace('continue', 'go on') }}
Minutes{{ r.minutes if r.minutes is not none else '' }}
Cost{{ r.cost_usd|usd }}
{% if shown %}

Round {{ shown.number }}

{{ shown.started|stamp }}{% if shown.minutes is not none %} · {{ shown.minutes }} min{% endif %}{% if shown.cost_usd %} · {{ shown.cost_usd|usd }}{% if shown.round_cost %} for the round{% endif %}{% elif shown.tokens %} · {{ shown.tokens|tokens }} tokens{% endif %}{% if shown.outcome == 'discarded' %} · discarded{% endif %} · {% if shown.verdict %}{{ shown.verdict }}{% if shown.stop_reason %}: {{ shown.stop_reason|replace('_', ' ') }}{% endif %}{% else %}under way{% endif %}{% if shown.commit %} · commit {{ shown.commit[:10] }}{% endif %} · {{ shown.findings_open }} open, {{ shown.findings_closed }} closed
{% if shown.all_metrics %}

{% for m in shown.all_metrics %}{{ m.value|figure(m.unit) }} {{ m.name }}{% if m.target is not none %} target {{ m.target|figure(m.unit) }}{% endif %}{% endfor %}

{% endif %} {% if shown.plan or shown.plan_artifact %}

Plan{% if shown.plan_artifact %} · {{ file_link(shown.plan_artifact, 'the whole plan') }}{% endif %}

{% if shown.plan %}

{{ shown.plan }}

{% endif %}
{% endif %} {% if shown.runs %}
{% for run in shown.runs %} {% set step = manifest.step(run.step) %} {% endfor %}
StepStateWhat it did and foundTokensCostFile
{{ (step.name if step else '') or run.step }}{% if run.label %}{{ run.label }}{% endif %}{{ step.kind if step else '' }}{% if step and step.backend %} · {{ step.backend }}{% endif %}{% if step and step.model %} · {{ step.model }}{% endif %} {{ run.status }}{% if run.attempt and run.attempt > 1 %} · try {{ run.attempt }}{% endif %} {% if run.error %}

{{ 'Needs you: ' if run.error.kind == 'needs_person' else 'Error: ' }}{{ run.error.text }}

{% endif %}{{ run.summary }}{% if run.metrics %} · {% for m in run.metrics %}{{ m.name }} {{ m.value|figure(m.unit) }}{{ ', ' if not loop.last }}{% endfor %}{% endif %}{% if run.model %} · model {{ run.model }}{% endif %}{% if run.session %} · session {{ run.session }}{% endif %}{% if run.findings %}
    {% for f in run.findings %}
  1. {% if f.closed %}{{ f.text }} {{ (f.resolution or 'closed')|replace('_', ' ') }}{% if f.reason %}: {{ f.reason }}{% endif %}{% else %}{{ f.text }}{% if f.severity == 'minor' %} (minor){% endif %}{% endif %}
  2. {% endfor %}
{% endif %}
{% if run.cost %}{{ run.cost.tokens|tokens }}{% if run.cost.estimated %}~{% endif %}{% endif %} {% if run.cost %}{{ run.cost.usd|usd }}{% endif %} {{ file_link(run.artifact, 'open') }}
{% elif shown.running %}

No step has reported yet.

{% endif %} {% if shown.summary or shown.next or shown.questions %}
{% if shown.summary %}

Verdict{% if shown.verdict_artifact %} · {{ file_link(shown.verdict_artifact, 'all of it') }}{% endif %}

{{ shown.summary }}

{% endif %} {% if shown.next %}

Next round

{{ shown.next }}

{% endif %} {% if shown.questions %}

Asked you

{% for q in shown.questions %}

{{ q }}

{% endfor %}
{% endif %}
{% endif %} {% endif %}
{% endif %} {% elif tab == 'findings' %} {% set reviewed = state.open_findings[0][0] if state.open_findings else none %}

Open nowwhat the last reviewed round found and nobody closed; reviews are fresh each round

{% if state.open_findings %}
{% for run, finding in state.open_findings %} {% set step = manifest.step(run.step) %} {% endfor %}
Found byFindingWeightFile
{{ (step.name if step else '') or run.step }}{% if run.label %}{{ run.label }}{% endif %}{{ step.kind if step else '' }} · no. {{ finding.id }} {{ finding.text }} {{ finding.severity }} {{ file_link(run.artifact, 'open') }}
{% else %}

Nothing is open{% if not state.rounds %}: no round has run yet{% endif %}.

{% endif %} {% elif tab == 'inbox' %}

What you sentevery line of the inbox, newest first, and whether the loop has taken it

{% if state.inbox %}
{% for item in state.inbox|reverse %} {% set mark = signed[item.entry.id] %} {% endfor %}
SentKindWhatTaken by the loopFrom
{{ item.entry.ts|stamp }} · {{ item.entry.ts|ago }} {{ item.entry.kind }} {{ item.entry.text or 'Stop after the current round.' }}{% if item.entry.choice %} (picked option {{ item.entry.choice }}){% endif %}{% if item.entry.round %} · round {{ item.entry.round }}{% endif %} {% if item.read %}taken{% else %}not yet{% endif %} {% if mark is true %}this board{% elif mark is false %}not from the board{% else %}unknown{% endif %}

A line marked "not from the board" was written into inbox.jsonl by something else, an agent of the loop perhaps. A loop that checks signed ignores it.

{% else %}

Nothing sent yet. An answer, a note or a stop from this page shows here.

{% endif %} {% elif tab == 'items' %} {% if not state.items %}

This loop reports no items. A loop that evaluates a list of things sends a check event per check.

{% endif %} {% if state.items %}

What the loop evaluateseach cell is the latest check of that kind; a hatched cell means none has run

{% for kind in state.check_kinds %}{% endfor %} {% for item in state.items %} {% for kind in state.check_kinds %} {% set latest = item.latest(kind) %} {% if latest %} {% else %}{% endif %} {% endfor %} {% endfor %}
Item{{ kind }}
{{ item.name }}
{{ latest.result }}{{ latest.at|stamp }}{% if latest.who %} · {{ latest.who }}{% endif %}
    {% for check in item.history(kind)|reverse %}
  • {{ check.at|stamp }} · {{ check.result }}{% if check.who %} · {{ check.who }}{% endif %}{% if check.finding %}: {{ check.finding }}{% endif %} {{ file_link(check.evidence, 'evidence') }}
  • {% endfor %}
not run
{% endif %} {% else %}
{{ state.rounds|length }}{% if manifest.round_cap %}/ {{ manifest.round_cap }}{% endif %}rounds{% if manifest.round_cap %}, of the cap{% endif %}
{{ state.open_findings|length }}findings open now
{{ state.minutes|minutes or '0 min' }}in finished rounds{% if manifest.runtime_cap_minutes %}, cap {{ manifest.runtime_cap_minutes|minutes }}{% endif %}
{{ state.cost_usd|usd or '$0' }}reported cost{% if manifest.cost_cap_usd %}, cap {{ manifest.cost_cap_usd|usd }}{% endif %}{% if state.tokens %}, {{ state.tokens|tokens }} tokens{% endif %}
{{ manifest.steps|length }}steps in a round, {{ manifest.steps|selectattr('kind', 'equalto', 'review')|list|length }} of them reviewers
{% if caps %}
{% for bar in caps %}

{{ bar.name }}{{ bar.used }} of {{ bar.cap }}

{% endfor %}
{% endif %} {% if stuck %}

No progress?

A loop that goes round without getting closer costs rounds and money. Read the last review, then send a note that changes the approach, or stop it.

{% endif %} {% if charts %}

Is it convergingone line per measure, a dot per finished round{% if charts|selectattr('target_y', 'ne', none)|list %}; the dashed line is the loop's target{% endif %}

{% endif %} {% if state.status == 'stalled' %}

Silent since {{ state.last_event|stamp }}, {{ state.last_event|ago }}

The last line was {{ state.last_line }}.{% if state.expected %} The loop said it would be back by {{ state.expected|stamp }}.{% endif %} No line since, and {% if process %}the process the board started {{ 'still runs' if process.alive else 'has ended' }}{% else %}the board did not start it{% endif %}.

    {% if process and not process.alive %}
  1. Read the last lines it printed, below, for why it ended.
  2. {% endif %}
  3. Look where the loop runs{% if manifest.workspace and manifest.workspace.worktree %} ({{ manifest.workspace.worktree }}){% endif %}: is its process alive, is it waiting on something outside?
  4. If it died, start it again{% if manifest.commands.get('start') %} with Start below{% endif %}; a round that starts again starts clean.
  5. If it should end, send a stop: the loop takes it at its next round.
{% endif %}
{% if not state.question or state.inbox %}

{{ 'What you sent' if state.question else 'Tell the loop' }}

{% if not state.question %}
{% endif %} {% if state.inbox %} {% endif %}
{% endif %}

Run

{% if manifest.commands.get('start') %} {% if process and process.alive %} Running since {{ process.started|stamp }}, pid {{ process.pid }} {% else %}
{{ manifest.commands.get('start') }}

This command comes from this repository's loop.json, not from the board. It runs here with your rights.

{% if not confirmed %}{% endif %}
{% endif %} {% else %} This loop names no command the board could start. Start it where it lives, from its own repository. {% endif %}
{% if state.status in stoppable or state.stop_requested %}
{% endif %} {% if process and process.alive %}
{% endif %}
{% if log_tail %}
{{ log_tail }}
{% endif %}
{% set brief = manifest.brief %} {% if brief.goal or brief.audience or brief.bar or brief.path %}

The brief{% if brief.path %}{{ file_link(brief.path, 'read all of it') }}{% endif %}

{% if brief.goal %}

Goal

{{ brief.goal }}

{% endif %} {% if brief.audience %}

For

{{ brief.audience }}

{% endif %} {% if brief.bar %}

Done when

{{ brief.bar }}

{% endif %}
{% endif %} {% if manifest.outputs %}

Makes: {% for output in manifest.outputs %}{{ file_link(output.path, output.name) }}{{ ', ' if not loop.last }}{% endfor %}

{% endif %} {% if manifest.workspace or manifest.state %}

{% if manifest.workspace %}Runs on {% if manifest.workspace.branch %}branch {{ manifest.workspace.branch }}{% endif %}{% if manifest.workspace.worktree %} in {{ manifest.workspace.worktree }}{% endif %}. {% endif %}{% if manifest.state %}Hands from round to round: {% for item in manifest.state %}{{ file_link(item.path, item.name) }}{{ ', ' if not loop.last }}{% endfor %}.{% endif %}

{% endif %} {% if graph %}

How a round runs{% if shown %}coloured as round {{ shown.number }} stands{% else %}no round yet{% endif %}

{% for edge in graph.edges %}{% endfor %} {% if graph.back %}next round, until the verdict says done{% endif %} {% for node in graph.nodes %} {{ node.name }}: {{ node.state }}{% if node.runs > 1 %}, {{ node.runs }} runs{% endif %}{% if node.findings %}, {{ node.findings }} open finding(s){% endif %} {{ node.kind }} {{ node.name|truncate(18, True, '…', 0) }} {% if node.runs > 1 %}×{{ node.runs }}{% endif %} {% if node.findings %}{{ node.findings }}{% endif %} {% endfor %}

finishedrunningfailedskippednot run3open material findings

{% endif %} {% if report.problems or report.warnings %}

What the protocol check findsthe same as loopcaptain validate in the loop's repository

{% endif %} {% endif %} {% endblock %}