Dive

Guides

Compose plans

Call one plan from another as a step, and use its result.

release_summary finds the latest release, calls changes_since for the commits since it, and summarizes them.

version: 2
identifier: release_summary
name: Release summary
description: Summarizes the commits merged since the latest GitHub release.
steps:
- id: release
  tool_name: github__tool__gh_release
  input: {}
- id: changes
  tool_name: plan__changes_since
  input:
    base: '{{release.tag}}'
finish:
  solver:
    query_to_answer: Summarize the {{changes.count}} commits since {{release.tag}} in three one-line bullet points.
    data:
      commits: '{{changes.commits}}'

Call the plan from a step

The changes step calls changes_since as plan__changes_since. Its input matches changes_since's input_schema, and later steps read the result through changes, the same keys as changes_since's finish.output: {{changes.count}} and {{changes.commits}}.

Validate it

dive plan validate release_summary
ok: 'release_summary' — 2 steps

Run it

dive plan run release_summary

The called plan's steps show indented under its step:

→ github__tool__gh_release {}
✓ github__tool__gh_release 787.1ms
→ plan__changes_since {"base":"v0.21.0"}
  → github__tool__git_log {"base":"v0.21.0","head":"HEAD"}
  ✓ github__tool__git_log 31.6ms
✓ plan__changes_since 32.2ms
✎ synthesizing answer…
- **Plan drafting overhaul**: a new agent-driven workbench…
- **Decision/routing infrastructure added**: new decision-model plumbing…
- **Execution & storage hardening**: plans now require explicit finish keys…
  1 call · 5k in / 424 out · $0.02