Repository navigation
feat(workflow): append_system_prompt per prompt step - #6
Merged
Merged
Conversation
A quality-critical rule (e.g. "never narrate before the deliverable")
placed in a prompt step's `prompt:` text competes with everything else
in a long user turn and is unreliable in practice — even a sharply
worded rule can keep failing an llm_as_judge check on leaked preamble,
because wording strength doesn't fix where the instruction lives.
buildClaudeArgs already supports --append-system-prompt via
ClaudeTask.appendSystemPrompt, but only internal planning/refine/eval
invocations ever set it — no YAML-authored prompt step could reach it.
Adds append_system_prompt as a per-step field, threaded through
RawStepSchema -> convertInnerStep -> ClaudeTask, with {{var}}
substitution like prompt: already has.
coston
force-pushed
the
feat/append-system-prompt-per-step
branch
from
September 8, 2026 15:36
3b99ace to
8aaebe0
Compare
|
🎉 This PR is included in version 2.16.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
append_system_promptas a per-step YAML field fortype: promptsteps, threaded throughRawStepSchema→convertInnerStep→ClaudeTask.appendSystemPrompt(with{{var}}substitution, same asprompt:).buildClaudeArgs→--append-system-prompt) but was only ever set by internal planning/refine/eval invocations — no YAML-authored step could reach it.Why
A rule embedded in a prompt step's
prompt:text has to compete with everything else in a long user turn for the model's compliance. In practice, even a short, sharply-worded rule (e.g. "never narrate before the deliverable") can keep failing anllm_as_judgecheck on leaked preamble no matter how forcefully it's worded, because wording strength doesn't fix where the instruction lives. System-level instructions get materially stronger adherence than the same words placed in the user turn; executant already has that lever (--append-system-prompt), it just wasn't exposed to ordinary workflow steps.Testing
npm run lint— cleannpx tsc --noEmit— cleannpm test— full suite green (1043 pass, 3 pre-existing skips, 0 fail), including 3 new tests covering: field passthrough, omission when unset, and{{var}}substitution.Not merging this myself — it's a published, auto-updating package every sandbox pulls before each run, so this is for your review before it ships.