# Logline Workbench: Authoring, Evidence, and Contextual Assistance

This document describes user-visible Workbench capabilities. It is knowledge for user guidance, not an assistant API schema or permission to mutate a program.

## Interactive workflow

A user can create or open a plain-text `.lgl` program; work with the Text, Structure, and Visual representations; import one or more log sources; configure source interpretation and synchronization; include selected sources in execution; then run, debug, and inspect reports. The ordinary Run/Debug/Report workflow evaluates canonical Execution Records. An editor representation or AI explanation is not independent execution authority.

Log sources are retained independently. Raw records are source-local. Execution Records are the validated, included, deterministic merged canonical stream and are the basis of ordinary execution. Log Processing Configuration must be applied before its draft changes affect the executable record stream. Included relative sources without a defensible exact temporal mapping cannot be executed; do not suggest automatic event-matching or invented offsets.

## Semantic selection and the Inspector

Workbench selection is shared across authoring representations and Inspector context. The Text editor can resolve a cursor location within a validated source revision to a semantic scenario, segment, collector, or structured branch. Supported segment forms include transition, event, group, repeat, parallel, and crossroads, including nested constructs. The nearest supported semantic construct is selected; placing a cursor does not edit the source or recompile it. If the source changed after its validated outline, the old outline must not be treated as an authoritative selection for the new text.

## Contextual AI assistance

The dedicated `/logline/ai` page is for platform-wide questions such as Logline concepts, Enterprise setup, integrations, and Run Manifest concepts. The embedded Workbench AI panel is for authoring and investigating the current program, selection, diagnostics and logs. These experiences maintain separate conversations; their live AI answers depend on the external AI service and should not be described as locally verified when that service is unavailable.

The Workbench can prepare editable questions about a selected construct or selected diagnostic. Preparation is not automatic submission. The assistant must not infer selection from an unrelated cursor or stale validated source. It must not claim that a drafted question has been answered by the model.

## Compiler-authoritative authoring

AI-proposed Logline code is untrusted until the current compiler verifies it. The Workbench can review a suggested complete program, display real diagnostics, and prepare an editable repair question based on the proposed source and compiler feedback. Creating a reviewed program requires explicit user approval and an eligible empty Workbench draft; it must not overwrite an existing program or apply an answer directly.

The Workbench also supports explicit preview of a validated proposed program against the currently available canonical Execution Records using a separate Engine session. The current local preview guard is **10,000 records**; larger inputs are rejected for this preview rather than silently truncated. Previewing does not replace the active program, debugger, Run or authoritative report. Preview outcomes are evidence for review, not approval to mutate user source.

Some structured edit proposals may be previewed and applied through bounded, validated Workbench operations. Do not imply that arbitrary multi-operation plans, arbitrary DSL rewrites, or any text supplied by a model can be applied without supported operation checks and user approval.

## Diagnostics, execution, and reports

Compiler diagnostics address source validity. Execution failures or inconclusive results arise from evidence and candidate semantics even for valid source. The Inspector and Debugger reflect Workbench selection and engine-derived evidence. A user asking why a transition failed should be guided toward the selected condition, relevant record values, attempts, candidates, diagnostics, and report evidence, without inventing unobserved logs or claiming that a live AI reply was validated.

## Source authorities and verification boundary

The Logline grammar/compiler/Engine, canonical record composition, and actual Workbench controls are authoritative for behavior. The source corpus's example programs and fixture expectations are narrower than a universal guarantee about all customer logs. The Workbench feature source and regression tests were reviewed at repository commit `e2d3b2f1`; live AI service integration and broader cross-environment acceptance remain separate checks.
