feat: show each step's output contract in the workbench detail pane - #108
Conversation
Selecting a step showed its input template but nothing about what the tool would return. The detail pane now shows the tool's output contract — the declared output schema, else the observed output shape, plus control steps' declared examples — until a run replaces the prediction with the real result. The workbench context catalog now includes the control-step vocabulary (decide, map, ...), the same append the tools command surface does, so those steps' contracts resolve too. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Note graph_review_9000 · A focused, well-tested UI-only enhancement to the workbench's plan/context tabs that surfaces a step's output contract and appends control-step defs to the loaded catalog, with matching docs updates. At a glance
🧵 0 new · 0 open · 0 resolved this run · 0 declined ⚪ N/A · ✅ PassStated Intent — Diff matches the stated intent: output-contract precedence added to step detail, control_step_defs appended to LoadContext, docs/screenshots updated. Pipeline/Control-Step Invariants — Diff is UI-only (workbench rendering + context loading); no changes to gate, error policy, or control-step evaluation semantics. Template/Shape Engine — No changes to template/, shapes.rs, or store.rs shape cache — this pass doesn't apply. Rust/Async/Storage Footguns — No new unwrap/panic on reachable paths, no Store bypass, no MCP lifecycle touch; changes are pure data assembly/rendering. Plan Composition/Model Routing — No touch to plan__* composition, ModelRouter, or provider/failover code. Test Coverage — New tests cover the precedence order (declared schema > observed shape > example), the result-replaces-prediction transition, and control-step output examples via a workspace mirroring LoadContext's tool mix. Repo Conventions/Docs Parity — docs/workbench/plan-workbench.mdx and the context-tab screenshot were updated in the same PR to reflect both the new step detail contract and the control-step catalog count. CLI Surface/Copy — New TUI copy ('output schema', 'observed output shape', 'observed example', 'output example') is consistent with existing section-label conventions in the same file; no stdout/stderr/exit-code paths touched. |
What
Selecting a step in the plan workbench showed its input template but nothing about what the tool returns. Now the detail pane shows the tool's output contract under the input template, using the same precedence the context tab already had:
output_schema, elsemapdescribe their output).Once a step has run, the real
resultreplaces the prediction.Why control steps needed one more change
The workbench loaded its tool context from the registry alone, which deliberately excludes control steps (
decide,map,reduce, …) — they're executor-evaluated, never registered.Effect::LoadContextnow appendscontrol_step_defs()exactly likegraph tools listdoes, so:map/reduce/decide/agent/asksteps get their declared output examples in the step detail pane.Verification
mapshows its output example.mise run lint+ full workspace tests green.docs/workbench/plan-workbench.mdxupdated in the same PR.🤖 Generated with Claude Code