{% extends "base.html" %}
{% set page = 'loop' %}
{% block title %}{{ view.title }}{% 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 }}"{% if turn_at %} data-turn-at="{{ turn_at }}"{% endif %}{% 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 %}
{% macro kind_icon(kind) %}{% set paths = {
'plan': '
Loops / {{ view.repo.key }} / {{ view.loop_id }}
{{ note }}
{% endif %} {% if error %}{{ 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 state.questions|length > 1 %}{{ state.questions|length - 1 }} more question{{ '' if state.questions|length == 2 else 's' }} from this loop follow{{ 's' if state.questions|length == 2 else '' }} once this one is answered.
{% endif %} {% if q.default %}{% if q.gives_up %}Without an answer by {{ q.gives_up|stamp }} it goes on with{% elif q.blocks %}If it goes on without an answer, it goes on with{% else %}Until you answer, it goes on with{% endif %}: {{ q.default_text }}
{% endif %} {% if q.options %} {% endif %}No round has run yet.
{% endif %} {% if state.rounds %}Rounds {{ grid.rounds[0].number }} to {{ grid.rounds[-1].number }} of {{ state.rounds|length }}.{% if grid.earlier %} Earlier rounds{% endif %}{% if grid.later %} Later rounds{% endif %}
{% endif %}| Step | {% for r in grid.rounds %}{{ r.number }} | {% endfor %}|
|---|---|---|
| {{ (step.name if step else '') or step_id }}{{ step.kind if step else 'not in loop.json' }} | {% for r in grid.rounds %} {% set runs = r.runs_of(step_id) %} {% set on = ' on' if shown and r.number == shown.number else '' %} {% set not_run = 'not in a ' ~ r.mode ~ ' round' if r.mode else 'did not run' %} {% if not runs %}{{ not_run }} | {% 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 ('no' if runs|selectattr('passed', 'false')|list else ('ok' if runs|selectattr('status', 'equalto', 'ok')|list else 'skipped'))) %}{% if finds %}{{ finds }}{% else %}{{ 'said no' if st == 'no' else st }}{% endif %} | {% endif %} {% endfor %}
| Verdict | {% for r in grid.rounds %}{{ (r.verdict or 'live')|replace('continue', 'go on') }} | {% endfor %}|
| Minutes | {% for r in grid.rounds %}{{ r.minutes if r.minutes is not none else '' }} | {% endfor %}|
| Cost | {% for r in grid.rounds %}{{ r.cost_usd|usd }} | {% endfor %}
{{ shown.commit[:10] }}{% endif %} · {{ shown.findings_open }} open, {{ shown.findings_closed }} closed
{% for m in shown.all_metrics %}{{ m.value|figure(m.unit) }} {{ m.name|replace('_', ' ') }}{% 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 %}| Step | State | What it did and found | Tokens | Cost | File |
|---|---|---|---|---|---|
{{ (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 run.model or (step and step.model) %}model {{ run.model or step.model }}{% endif %}{% if run.session %}session {{ run.session|truncate(12, True, '…', 0) }}{% endif %} |
{% if run.status == 'ok' and run.passed is false %}said no{% elif run.status == 'ok' and run.passed %}passed{% else %}{{ run.status }}{% if run.status == 'skipped' and shown.mode %} · as a {{ shown.mode }} round does{% endif %}{% endif %}{% 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 %}{% set head, rest = run.summary|lead %}{{ head }} {% if rest %}The rest{{ rest }} {% for m in run.metrics %}{{ m.name|replace('_', ' ') }} {{ m.value|figure(m.unit) }}{{ ', ' if not loop.last }}{% endfor %} {% endif %}{% if run.findings %}
|
{% 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, 'file') }} |
No step has reported yet.
{% endif %} {% if shown.summary or shown.next or shown.questions %}Verdict{% if shown.verdict_artifact %} · {{ file_link(shown.verdict_artifact, 'all of it') }}{% endif %}
{{ shown.summary }}
Next round
{{ shown.next }}
Asked you
{% for q in shown.questions %}{{ q }}
{% endfor %}| Found by | Finding | Weight | File | Your call |
|---|---|---|---|---|
| {{ (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, 'file') }} | {% set sent = state.settling(run, finding) %}{% if sent %} {{ settle_words.get(sent.entry.finding.resolution, sent.entry.finding.resolution) }} sent {{ sent.entry.ts|ago }}{% if sent.entry.finding.reason %}: {{ sent.entry.finding.reason }}{% endif %}. |
The first {{ rows_shown }} of {{ state.open_findings|length }} open findings are listed; the rest are in the rounds that found them.
{% endif %}A finding stays open until the loop closes it. "Accept as is" keeps it on purpose, "Won't fix" leaves it, "Not a problem" says the reviewer was wrong. The board sends your call to the loop; the loop closes the finding and the next review does not raise it again.
{% else %}Nothing is open{% if not state.rounds %}: no round has run yet{% endif %}.
{% endif %} {% elif tab == 'inbox' %}| Sent | Kind | What | Taken by the loop | From |
|---|---|---|---|---|
| {{ 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 %} |
The newest {{ rows_shown }} of {{ state.inbox|length }} messages are listed; all of them are in inbox.jsonl.
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.
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.
| Item | {% for kind in state.check_kinds %}{{ kind }} | {% endfor %}|
|---|---|---|
| {{ item.name }} | {% for kind in state.check_kinds %} {% set latest = item.latest(kind) %} {% if latest %}{{ latest.result }}{{ latest.at|stamp }}{% if latest.who %} · {{ latest.who }}{% endif %}
|
{% else %}not run | {% endif %} {% endfor %}
No progress
Each such round costs time and money without getting closer.
{% if last_done %}Read round {{ last_done.number }}{% endif %}{% if state.open_findings %}{{ 'The open finding' if state.open_findings|length == 1 else 'The ' ~ state.open_findings|length ~ ' open findings' }}{% endif %}{% if not state.question %}Send a note that changes the approach{% endif %}
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 %}.
{{ manifest.workspace.worktree }}){% endif %}: is its process alive, is it waiting on something outside?{{ 'Your messages' if state.question else 'Tell the loop' }}
{% if not state.question %} {% endif %} {% if state.inbox %}Run
{% set start = manifest.commands.get('start') %} {% set alive = process and process.alive %} {% if start and alive %}Running since {{ process.started|stamp }}, pid {{ process.pid }}
{% elif start %} {% else %}This loop names no command the board could start. Start it where it lives, from its own repository.
{% endif %} {% set startable = start and not alive and not command.problem %} {% if startable or state.status in stoppable or state.stop_requested or alive %}{{ log_tail }}{% endif %}
{{ c.series.about }}{% if c.series.file %} {{ file_link(c.series.file, 'the list') }}{% endif %}
{% endif %} {% if c.series.values|length > 1 %}round {{ c.series.values[0][0] }}: {{ c.first|figure(c.series.unit) }}round {{ c.series.values[-1][0] }}
{% endif %}Kind{% for kind in kinds %}{{ kind }}{% endfor %}
Statefinishedrunninga gate said nofailedstopped by a limitskippednot run3open material findings
Goal
{{ brief.goal }}
For
{{ brief.audience }}
Done when
{{ brief.bar }}
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 %}
loopcaptain validate in the loop's repository