Repository navigation
fix(runtime): thread founder prompt to every specialist - #16
Merged
Merged
Conversation
The Conductor saw the founder's prompt and produced a DAG, but the
dispatcher dropped the prompt before invoking specialists. So a
prompt like "write an email to X — keep it 2 sentences and friendly"
reached the writer as just `{leadId, item}`, with no signal about
length, tone, or angle. The writer would produce its default
outreach instead of honoring the user's instruction.
Threads `founderObjective` (the run's prompt) through:
runWorkflow → runPersonaWithFallback → runPersona / runPersonaBatch
Both `buildUserPrompt` and `buildBatchUserPrompt` now prepend a
"Founder objective" section when present, with explicit guidance
that it MAY override default behavior (length/tone/channel/angle).
The persona's own system prompt still defines its job; the founder
prompt becomes a per-run constraint layer on top.
Backwards-compatible: `founderObjective` is optional; ad-hoc callers
(test harness, scripts) work unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Fixes a real architectural gap: the Conductor saw the founder's prompt and produced a DAG, but the dispatcher dropped the prompt before invoking specialists. So a prompt like "write an email to X — keep it 2 sentences and friendly" reached the writer as just
{leadId, item}, with no signal about length, tone, or angle. The writer would produce its default outreach instead of honoring the user's instruction.This change threads
founderObjective(the run's prompt) through:Both
buildUserPromptandbuildBatchUserPromptnow prepend a "Founder objective" section when present, with explicit guidance that it MAY override default behavior (length / tone / channel / angle). The persona's own system prompt still defines its job; the founder prompt becomes a per-run constraint layer on top.Backwards-compatible:
founderObjectiveis optional; ad-hoc callers (test harness, scripts) work unchanged.Test plan
Verified by re-running the same prompt before and after the fix:
"write an email to w.sunny0618@gmail.com — keep it 2 sentences and friendly"your demo request from the HN launchglad you reached out 👋pnpm typecheckcleanFounder objectivesection is generic across all 13🤖 Generated with Claude Code