unreleased_changes writes a note for every commit since the latest release, four commits at a time, and joins the notes into one changelog.
Run steps for each commit with map
Thenotes step is a map:
overis the list, here the commits fromgit_log.doholds the steps that run once per item.{{item}}is the current commit.concurrency: 4runs four commits at a time.
{{notes.results}} lists them in the same order as the commits.
Join the notes with reduce
Thechangelog step is a reduce. It runs do once per note, in order:
{{accumulator}}starts asinitial, and each run’s result becomes the next{{accumulator}}.- Here each run adds the note
{{item.text}}as a new line under the text so far.
{{changelog.result}}.
Run it
map starting four commits at once, then the reduce working through the notes:
Related guides
Select items with filter
Keep only the items that matter before working on them.
Compose plans
Call a plan from a body for nested iteration.
Delegate a step to an agent
Give a step that needs judgment to an agent.