Problem
Workflow states can only run a prompt and optionally transition to another state. There's no mechanism to pipe the LLM's output into a follow-up shell script. This rules out useful patterns like using a prompt to generate a commit message and automatically passing the result to git commit, or using a prompt to produce a changelog entry and appending it to a file.
Solution
- Add an optional
after_script field to the workflow state config, accepting a shell command or script path.
- After the prompt completes successfully, execute the after-script with the prompt output available (e.g. via stdin or a
$AUTOPR_OUTPUT env variable).
- The after-script's exit code determines whether the state is marked as succeeded or failed.
- Add an example to
workflow.example.yaml showing the commit-message use case.
Problem
Workflow states can only run a prompt and optionally transition to another state. There's no mechanism to pipe the LLM's output into a follow-up shell script. This rules out useful patterns like using a prompt to generate a commit message and automatically passing the result to
git commit, or using a prompt to produce a changelog entry and appending it to a file.Solution
after_scriptfield to the workflow state config, accepting a shell command or script path.$AUTOPR_OUTPUTenv variable).workflow.example.yamlshowing the commit-message use case.