feat(run): controlled scenario system_prompt (fixes uncontrolled-prompt A/B bias)#18
Merged
Merged
Conversation
…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>
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.
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_promptfield (documented).orchestration/run.py: threadscenario.system_prompt→run_single→build_command, with{cwd}→ per-run worktree substitution.tests: system prompt reachesbuild_commandon every arm;None⇒None(CLI default kept — fully back-compatible).Validity
Verified offline that
baselineand experimental arms build byte-identical commands except the experimental's--mcp-config. CI:ruff format --check+ruff check+ full pytest.🤖 Generated with Claude Code