Summary
Fast follow to #262 / PR #263. The pre-PR self-review (critic) step currently uses a hardcoded prompt constant (SELF_REVIEW_PROMPT in agent/src/prompts/self_review.py). Make the critic prompt configurable per-workflow instead of constant, so workflow authors can tune the review focus (e.g. security-heavy vs. style-heavy critique) without a code change.
Motivation
Raised during review of PR #263: the critic's behavior is entirely prompt-driven, but the prompt is baked into the agent image. Workflows already configure the step's max_turns in YAML — the prompt should be configurable the same way.
Acceptance Criteria
Task Type
new_task
Summary
Fast follow to #262 / PR #263. The pre-PR self-review (critic) step currently uses a hardcoded prompt constant (
SELF_REVIEW_PROMPTinagent/src/prompts/self_review.py). Make the critic prompt configurable per-workflow instead of constant, so workflow authors can tune the review focus (e.g. security-heavy vs. style-heavy critique) without a code change.Motivation
Raised during review of PR #263: the critic's behavior is entirely prompt-driven, but the prompt is baked into the agent image. Workflows already configure the step's
max_turnsin YAML — the prompt should be configurable the same way.Acceptance Criteria
self_reviewstep accepts an optionalpromptfield in workflow YAML (schema +Stepmodel)run_self_review()renders the custom template with{diff}/{task_description}placeholders; falls back to the built-in prompt on a malformed template (fail-open, logged)step.promptthrough torun_self_review()self_reviewstep with a custom promptTask Type
new_task