Fix: support expandable agent prompts (#16) - #17
Merged
Conversation
added 2 commits
May 31, 2026 11:43
Agent prompts were always rendered with quoted heredocs, preventing workflows from opting into runtime expansion of values captured by earlier vars steps. Changes: - Add strict expandPrompt boolean field for agent steps - Render unquoted prompt heredocs only when expandPrompt is true - Add schema, render, and runtime harness tests - Document the security-sensitive opt-in Fixes #16
Add the artifact-specified parse and render regression tests for expandPrompt, including strict boolean rejection and default quoted heredoc behavior.
Owner
Author
Automated Code ReviewSummaryReviewed only FindingsNone. Strengths
SecurityDefault behavior remains safe/literal. Expansion is explicit and documented as security-sensitive. No new unguarded shell execution path is introduced unless Checklist
Self-reviewed by OpenCode. Ready for human review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Agent prompts were always rendered through quoted Bash heredocs, preventing workflows from opting into runtime expansion of values captured by earlier
varssteps.Root Cause
AgentStephad no optionalexpandPromptfield, andrender_step()always generatedprompt=$(cat <<'PROMPT_EOF', which disables Bash parameter expansion for prompt content.Changes
src/flowsh_cli/models.pyexpandPrompt: bool = FalsetoAgentStep.src/flowsh_cli/render.pyexpandPromptis true.tests/test_workflow_to_harness.pyREADME.mdTesting
opencodecovers expanded and literal promptsValidation
uv run pytest tests/test_workflow_to_harness.py uv run ruff check . uv run python -m compileall src scripts tests make qaIssue
Fixes #16
Implementation Details
Implementation followed artifact:
.claude/PRPs/issues/issue-16.mdDeviations from plan:
None
Automated implementation from investigation artifact