Show the derived stage verdict atop the stage view in the run detail

Move a completed stage visit's derived verdict out of the Progress summary
and into the top of the selected stage's Result section, so the chosen
option, its concise reason and the referenced artifacts are visible where
the stage is inspected.

- Add stageVerdictLines, which renders one line "Verdict: <option> · <reason>"
  (still stating the option when the reason is absent) plus a following
  "Referenced artifacts:" line only when artifacts exist, and returns nil
  for a nil verdict so nothing extra is shown.
- Prepend those lines in runSectionLines after the stage state and before
  the stage output and evidence, without adding a section or changing the
  panel layout.
- Update the TUI test to render through the run-detail view, asserting the
  option, reason and artifact names appear, and that a nil verdict adds
  nothing; document the TUI placement in the debugging skill reference.

Omni-search work already present in the working tree (including the
runDuration→protocol.Duration refactor in run_detail.go) is unrelated to
this change and is left uncommitted.
This commit is contained in:
2026-10-16 15:12:23 +01:00
parent c13dca0f42
commit 1b4674d22c
3 changed files with 64 additions and 27 deletions
@@ -5,11 +5,12 @@ Debug from **retained evidence**, never from an agent's summary. Open the run wi
diagnostics, file changes and artifacts. Each completed step also carries a
`verdict`: the chosen option (`outcome → target`), a one-line reason with its
provenance (`model`, `fallback` or `absent`), and the recorded artifacts the reason
refers to. Treat the reason as a claim to check against the step's output, never as
evidence in itself. Identify evidence-supported causes and say what remains
unknown. Never fix a run's symptom by editing the project by hand: fix
the pipeline definition or the Pipelines/harness service, or record the failure and
continue.
refers to. In the TUI, selecting a stage shows that verdict at the top of the
stage's result, above its output and evidence. Treat the reason as a claim to check
against the step's output, never as evidence in itself. Identify evidence-supported
causes and say what remains unknown. Never fix a run's symptom by editing the
project by hand: fix the pipeline definition or the Pipelines/harness service, or
record the failure and continue.
Each playbook is *symptom → how to confirm → what to do*.