Skip to content

feat(pipeline): add multi-step agent pipeline execution#101

Open
garethpaul wants to merge 2 commits intomainfrom
poe-code-features
Open

feat(pipeline): add multi-step agent pipeline execution#101
garethpaul wants to merge 2 commits intomainfrom
poe-code-features

Conversation

@garethpaul
Copy link
Contributor

Chains agent spawns where output flows between steps automatically. You write a YAML file, each step spawns an agent, and later steps can reference earlier step output via
{{steps..output}}.

Example yaml

name: research-fix-review
 description: Research codebase, fix issues, then review changes

 defaults:
   agent: claude-code
   mode: read

 steps:
   # Step 1: Research — runs first, uses defaults (claude-code, read mode)
   - name: research
     prompt: |
       Analyze this codebase and identify:
       1. Security vulnerabilities
       2. Performance bottlenecks

   # Step 2: Two fixes run concurrently after research completes
   - parallel:
       - name: fix-security
         agent: codex
         mode: edit
         model: o3-pro
         prompt: |
           Fix the security issues found below. Only fix security, nothing else.

           {{steps.research.output}}

       - name: fix-performance
         mode: edit
         prompt: |
           Fix the performance issues found below. Only fix performance, nothing else.

           {{steps.research.output}}

   # Step 3: Final review — runs after both parallel steps complete
   - name: final-review
     prompt: |
       Review the changes that were just made:

       Security fixes:
       {{steps.fix-security.output}}

       Performance fixes:
       {{steps.fix-performance.output}}

       Did the fixes introduce any new issues?
  • Add pipeline feature for chaining agent calls where output flows between steps automatically via `{{steps..output}}` interpolation
  • YAML schema supports sequential steps, parallel groups, defaults inheritance, and per-step overrides (agent, mode, model, cwd, args)
  • CLI: `poe-code pipeline run `, `poe-code pipeline validate `, `--dry-run` support
  • SDK: `runPipeline()` and `parsePipeline()` exported for programmatic use
  • unit tests across parse, validate, interpolate, run, and CLI command modules

Test plan

  • 15 parse tests (valid YAML, defaults, parallel groups, all error cases)
  • 13 validate tests (agent resolution, forward refs, parallel sibling refs, unknown refs)
  • 9 interpolate tests (step output/exitCode, pipeline vars, multiline, unresolved refs)
  • 10 run tests (sequential, parallel, interpolation, abort on failure, defaults, args, cwd)
  • 5 CLI command tests (validate valid/invalid, run spawns, dry-run, failure exit code)
  • All 2502 repo tests passing
  • Lint clean"

Add pipeline feature for chaining agent calls where output flows between
steps automatically via {{steps.<name>.output}} interpolation.

- YAML schema with sequential and parallel step execution
- Parse, validate, interpolate, and run modules with full test coverage
- CLI: `poe-code pipeline run <file>` and `poe-code pipeline validate`
- SDK: `pipeline.run()` for programmatic use
- 46 unit tests covering parsing, validation, interpolation, and execution
- Fix validate subcommand parameter binding (was broken)
- Use container.fs.readFile instead of node:fs/promises import
- Add CLI command tests (validate, run, dry-run, failure exit code)
- Add pipeline commands to help text
- Use design system for CLI output instead of console.log
- Remove proxy function, make cwd optional in RunPipelineOptions
- Remove double validation (CLI + runPipeline)
- Add interpolate edge case test for unresolved references
- Export runPipeline/parsePipeline directly from SDK
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