Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/adr/0022-own-a-truthful-deep-harness-seam.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ interruption is unknown and the last authoritative observation. The Step kind, a
The event stream preserves every user-meaningful assistant, tool, command, file-edit, subagent, request, retry, failure, model, session, and recovery
fact; unknown but displayable work becomes generic activity. Context-window pressure is prominent when observed or honestly calculable, while usage,
cost, and rate facts are optional and estimates stay labelled. Raw protocol frames, private reasoning, telemetry, and ordinary stderr remain private.
(Edited 2026-09-29: [ADR 0036](./0036-the-run-workbench-mirrors-the-agent.md) settles that a provider-written reasoning summary is not private
reasoning and may cross the Seam; the raw chain of thought stays private.)
The Adapter drains the native transport independently of a slow TUI, coalesces only replaceable previews, closes the producer after all final facts
are queued, and only then settles the result; no event can follow it. The result alone carries terminal status, authoritative final assistant content
when available, the effective-model observation, post-Turn Session availability, and structured failure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ The family arithmetic is reconciled against what the closed `ProjectionSelector`
M3 adds **five Operations** to the closed set, as the `approve-workspace` (2026-09-09) and `cancel-run`/`delete-run` (2026-09-13) extensions each recorded theirs:
`answer-harness-request` (#117), `interrupt-turn` and `steer-turn` (#118), and `send-interactive-turn` and `end-interactive-step` (#122). This extends the #19
vocabulary; no other decision here changes.

## Amendment (2026-09-29): distinct as data, not as styling

[ADR 0036](./0036-the-run-workbench-mirrors-the-agent.md) narrows "durable state, ephemeral live Harness state, and replaceable previews remain
visibly distinct". The three stay distinct as data at the Projection Port, so a client always knows which kind of update it holds. A screen need not
style them differently: the Run Workbench grows streaming text in place and marks live work only with its working indicator and row spinners.
87 changes: 87 additions & 0 deletions docs/adr/0036-the-run-workbench-mirrors-the-agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# The Run Workbench Mirrors the Agent

The **Run Workbench** is an agent screen, not an event timeline. It shows a **Run** the way OpenCode's session screen shows a conversation: one
transcript that only appends, a single bottom region, and a working indicator, with Secant's Workflow progress beside it. The need came from report 5
of the pre-public-release reports ([#235](https://github.com/secantdev/secant/issues/235)): a UTC timestamp on every event, a truncated question, no
emphasis, one assistant preview line that was replaced instead of appended, "sending…" that lingered, and no cue that the agent was working. The layout
was chosen in a real terminal from three variants on
[Prototype the Run Workbench as an agent screen](https://github.com/secantdev/secant/issues/247), preserved on
`prototype/issue-247-run-workbench-agent-screen`. This supersedes the timeline-first Run view of
[Prototype Crucible's launch and Run information architecture](https://github.com/secantdev/secant/issues/23). It keeps that decision's rules that
Human Gates, Review checkpoints, Harness Requests, ordinary agent questions, and the human's Turns stay visibly distinct, that the current interaction
replaces the normal bottom input, and that colour is never the only signal. It amends [ADR 0024](./0024-use-one-deep-projection-port-for-tui-and-headless-clients.md)'s
visibly-distinct rule and settles [ADR 0022](./0022-own-a-truthful-deep-harness-seam.md)'s "private reasoning" for reasoning summaries.

**Layout.** There is no header. The transcript fills the screen and follows the live edge while the reader is there. Above 120 columns a 42-column
sidebar shows the Bundle name, the Steps (done, current with its Iteration, still to come), the Harness, model, and effort with any pending Model
choice, and the context used. Below 120 columns the current Step, Iteration, and Model choice move into the prompt's meta row. Earlier Steps stay in
full, separated by a thin rule naming the Step and its Harness Session; nothing folds. Ids, processes, and timestamps stay off the screen; the Run id
appears once the Run leaves an active state.

**What the transcript shows.** Each item appends in order and changes only in place.

- The human's messages sit in a panel with a bar in the agent colour. A **Steer** is the human's message inside its Turn, marked waiting, read by the
agent, or not delivered.
- An **Entry Turn**'s Bundle prompt is one muted line saying Secant started the Step with it, since the human did not write it.
- Assistant text streams as markdown and is never truncated, so an agent's question is always read in full.
- A reasoning summary is one collapsed `Thought: <title> · <duration>` row, with a spinner and `Thinking` while it streams.
- Each tool call is one row that changes in place: muted once settled, a spinner while running, the error colour when it fails. Shell output and
file diffs are panels.
- An **Agent call** shows its call, the agent's reason, and what Secant did with it. An answered Human Gate shows the answer.
- A settled Turn ends with one line: the Harness, the model, the duration, and `interrupted` when it was.
- Rate limits, token usage, account notices, and unknown Harness methods never reach the transcript.

**Truncation.** Only shell output collapses, at 10 lines, ending with how many lines are hidden. Reasoning bodies and the Entry Turn prompt collapse
to their line. `ctrl+o` or a click expands everything collapsed. Assistant text, questions, the human's messages, and diffs are never cut; they wrap.

**Colour.** Colour comes only from the vendored theme roles, and everforest is the default theme. The agent colour marks the human's messages, the
prompt bar, the Turn line, and the working indicator. Muted text marks settled work, `warning` marks reasoning rows and Harness Requests, `error`
marks failures, `success` marks Agent calls and a finished Run, and markdown carries bold.

**Bottom region.** Exactly one control holds it. A Harness Request is a panel headed "Permission required". A Human Gate is headed "Workflow
decision" and a Review checkpoint "Review checkpoint". A finished Run shows its outcome and Run id. Otherwise the prompt is there and always
editable. Its placeholder says whose move it is: while a Turn works, a message is a Steer the agent reads at its next step; otherwise it is the
human's next Turn. Sending clears the draft at once, with no sending state. Under the prompt, OpenCode's block scanner runs only while a Turn works,
beside `esc interrupt`. After an Interrupt, a note says the agent is waiting on the human, and any undelivered Steer is back in the draft. A Steer that
arrives after its Turn ended gets a notice, and its text stays in the draft.

**Keys and mouse.** Because the prompt always takes text, no bare letter is a Workbench command.

| Key | Does |
| ----------------------- | --------------------------------------------- |
| `esc esc` | Interrupt |
| `enter` | Send, or Steer while a Turn works |
| `shift+enter`, `ctrl+j` | Newline |
| `ctrl+e` | End Step |
| `ctrl+n` | Continue a human-controlled Repeat |
| `ctrl+o` | Expand |
| `ctrl+g` | Details panel |
| `ctrl+c` | Clear the draft; quit when the draft is empty |

The details panel takes focus from the prompt, so resume, cancel, and delete keep their letter keys and confirmations there. The mouse is on: the
wheel scrolls and a click expands. Every mouse action also has a key. The separate transcript overlay is retired: the conversation is on screen, and
captured command output and Run Artifacts are inspected from the details panel.

**ADR 0024 amended.** Durable, live, and preview updates stay distinct as data at the Projection Port, so a client always knows which kind of update
it holds. They are no longer required to look different on screen. Streaming text grows in place and settles without restyling. Only the working
indicator and the row spinners show that something is live.

**Reasoning summaries are not private reasoning.** A reasoning summary is text a provider writes for the user, such as Claude Code's summarized
thinking or Codex's reasoning summary. It may cross the Harness Seam, and the transcript shows it collapsed. The raw chain of thought, such as Codex's
raw reasoning text, stays private under ADR 0022.

**What this needs beneath the screen.** The Harness Seam and the Run Projection do not yet carry everything above. These gaps are decided separately:

- tool-call identity that pairs start and end, and running, failed, and declined states with error text;
- typed tool rows (a kind, the main input, and a result count), command output and exit code as fields, and file diffs as data;
- a reasoning-summary event;
- Turn history that grows during a Turn, with message identity so streaming text settles in place and durable rows arrive mid-Turn;
- noise kept out of `activity`, and `context` filled by both Adapters;
- Steer state, Turn duration, Entry Turn authorship, and Agent-call rows in the Projection;
- which of these facts headless `--json` gains.

Rejected: keeping the timeline-first view with better styling, which still reads as an event log rather than the agent; a pure OpenCode layout with
Workflow progress only in the prompt's meta row, which hides the Steps on wide terminals; a Step-sectioned layout with a breadcrumb that folds earlier
Steps, which hides the conversation the human scrolls back to; styling previews differently from final text, which native agent screens do not do
and which made the old view read as unfinished; keeping reasoning summaries off the screen, since the provider publishes them for the user; and
keeping the Workbench keyboard-only, since the mouse wheel is the first thing a reader reaches for in a transcript.
5 changes: 5 additions & 0 deletions docs/glossary/secant-run-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ This cluster defines the target Secant terms for a **Run** and everything that h
- **Interrupt** — asking the **Harness** to stop the current live **Turn** and its foreground tool work. It ends only the Turn: the **Step Attempt**
stays open and the **Run** waits `blocked` on the human, whose next message continues the same **Harness Session**. It does not close the
Harness, halt the Run, or cancel it.
- **Reasoning summary** — text a **Harness**'s provider writes for the user about the model's reasoning during a **Turn**, such as a
summarized thought. It may cross the Harness Seam and be shown. The raw chain of thought is private reasoning and never does. _Avoid_: thinking,
chain of thought.
- **Cancel** — explicitly ending a **Run**. The only route to the terminal `cancelled` state.
- **Preflight** — the precondition check performed before a **Run** exists: the **Composition check**, presence of required **Launch inputs**, the
union of authored **Workspace prerequisites**, intrinsic **Step kind** preconditions and Harness capability needs, and resolution of each selected
Expand Down Expand Up @@ -198,6 +201,8 @@ row and the `blocked` state are written in one transaction, and execution also s
attribution to a **Harness Session**'s live **Turn**, and its reply.
- [ADR 0035](../adr/0035-interrupt-ends-only-the-turn-and-a-mid-turn-message-is-a-native-steer.md) owns what an **Interrupt** leaves behind,
**Steer** delivery, and why a Turn lasts until every Steer is delivered.
- [ADR 0036](../adr/0036-the-run-workbench-mirrors-the-agent.md) owns how the Run Workbench shows a **Run** as an agent screen, and why a
**Reasoning summary** is not private reasoning.
- [ADR 0023](../adr/0023-own-durable-run-truth-in-isolated-run-stores.md) owns durable Run truth, Artifact publication, Workspace materialization,
retention, and recovery storage.
- [ADR 0031](../adr/0031-own-runs-per-run-not-per-workspace.md) owns Run ownership: many live Runs per Workspace, one owner per Run, and what a
Expand Down
Loading