Skip to content

fix(runtime): thread founder prompt to every specialist - #16

Merged
sebtsang merged 1 commit into
mainfrom
fix/thread-founder-prompt-to-personas
May 10, 2026
Merged

sebtsang merged 1 commit into
mainfrom
fix/thread-founder-prompt-to-personas

Conversation

@sebtsang

Copy link
Copy Markdown
Owner

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:

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.

Test plan

Verified by re-running the same prompt before and after the fix:

Before fix After fix
Prompt "write an email to w.sunny0618@gmail.com — keep it 2 sentences and friendly" (same)
Subject your demo request from the HN launch glad you reached out 👋
Body length 4 sentences + CTA 2 sentences
Tone default Anvil pitch friendly + emoji
  • pnpm typecheck clean
  • Live run on dev server reproduces the fix end-to-end
  • No persona prompts had to change — the new Founder objective section is generic across all 13

🤖 Generated with Claude Code

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>
@sebtsang
sebtsang merged commit 9e3442a into main May 10, 2026
1 check passed
@sebtsang
sebtsang deleted the fix/thread-founder-prompt-to-personas branch May 10, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant