Skip to content

feat(run): controlled scenario system_prompt (fixes uncontrolled-prompt A/B bias)#18

Merged
jahala merged 1 commit into
masterfrom
jahala/system-prompt-control
Jun 23, 2026
Merged

feat(run): controlled scenario system_prompt (fixes uncontrolled-prompt A/B bias)#18
jahala merged 1 commit into
masterfrom
jahala/system-prompt-control

Conversation

@jahala

@jahala jahala commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Why

copeca's A/B promise is "hold everything fixed, vary one thing." But it inherited the agent CLI's full default system prompt (which promotes the native Read/Grep/Glob tools) — an uncontrolled variable. Any tool-under-test that competes with native tools was systematically under-adopted.

Empirically: the same tilth + Sonnet + version that tilth's own lean-prompt harness measured cheaper, copeca measured costlier, purely because copeca's agent used tilth ~30% vs tilth's ~100%. Matching the system prompt flips adoption.

What

Add Scenario.system_prompt — a fixed prompt threaded to every arm (baseline + experimental) via the runner's --system-prompt, replacing the CLI default so the prompt is a controlled, held-constant condition.

  • config/models.py: Scenario.system_prompt field (documented).
  • orchestration/run.py: thread scenario.system_promptrun_singlebuild_command, with {cwd} → per-run worktree substitution.
  • tests: system prompt reaches build_command on every arm; NoneNone (CLI default kept — fully back-compatible).

Validity

Verified offline that baseline and experimental arms build byte-identical commands except the experimental's --mcp-config. CI: ruff format --check + ruff check + full pytest.

🤖 Generated with Claude Code

…cross arms)

copeca inherited the agent CLI's full default system prompt (which promotes
the native Read/Grep/Glob tools), so any tool-under-test that competes with
native tools was systematically under-adopted — the system prompt was an
UNCONTROLLED variable, breaking the "hold everything fixed, vary one thing"
guarantee. Empirically: the same tilth+sonnet+version that tilth's own
(lean-prompt) harness measured cheaper, copeca measured costlier, because its
agent used tilth ~30% vs tilth's ~100%.

Add Scenario.system_prompt: a fixed prompt threaded to EVERY arm (baseline +
experimental) via the runner's --system-prompt, REPLACING the CLI default so
the prompt is a controlled, held-constant condition. "{cwd}" is substituted
with the per-run worktree path. None keeps the CLI's own default (prior
behavior, fully back-compatible).

- config/models.py: Scenario.system_prompt field (documented)
- orchestration/run.py: thread scenario.system_prompt -> run_single ->
  build_command, with {cwd} substitution
- tests: system_prompt reaches build_command on every arm; None => None

Verified offline: baseline and experimental arms build byte-identical
commands except the experimental's --mcp-config.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jahala jahala merged commit 301600d into master Jun 23, 2026
2 checks passed
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