Skip to content

feat: show each step's output contract in the workbench detail pane - #108

Merged
tylerdavis merged 1 commit into
mainfrom
feat/step-detail-output-shape
Aug 5, 2026
Merged

feat: show each step's output contract in the workbench detail pane#108
tylerdavis merged 1 commit into
mainfrom
feat/step-detail-output-shape

Conversation

@tylerdavis

Copy link
Copy Markdown
Owner

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:

  • the tool's declared output_schema, else
  • the observed output shape + example recorded from prior runs,
  • plus any declared output example (how control steps like map describe their output).

Once a step has run, the real result replaces 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::LoadContext now appends control_step_defs() exactly like graph tools list does, so:

  • the context tab truly shows "what the planner sees" (it was silently missing the control vocabulary), and
  • map/reduce/decide/agent/ask steps get their declared output examples in the step detail pane.

Verification

  • New render tests: shape shown until a result lands; declared schema wins over observed shape; map shows its output example.
  • mise run lint + full workspace tests green.
  • Docs screenshots regenerated through the shots harness (context-tab catalog count 22 → 29; the control steps sit below the visible window, overview unchanged).
  • docs/workbench/plan-workbench.mdx updated in the same PR.

🤖 Generated with Claude Code

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>
@mintlify

mintlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Graph 🟢 Ready View Preview Aug 5, 2026, 10:09 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@graph-graph

graph-graph Bot commented Aug 5, 2026

Copy link
Copy Markdown

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

Pass Area Status
1 Stated Intent ✅ Pass
2 Pipeline/Control-Step Invariants ⚪ N/A
3 Template/Shape Engine ⚪ N/A
4 Rust/Async/Storage Footguns ✅ Pass
5 Plan Composition/Model Routing ⚪ N/A
6 Test Coverage ✅ Pass
7 Repo Conventions/Docs Parity ✅ Pass
8 CLI Surface/Copy ✅ Pass

🧵 0 new · 0 open · 0 resolved this run · 0 declined

N/A · ✅ Pass

Stated 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.

@tylerdavis
tylerdavis merged commit a189404 into main Aug 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant