Harvest PR #3010: lock slim default prompt with calm-overlay regression test
The release branch already ships the slim-prompt intent in a stronger form than #3010 — compose_default_static_layers appends no personality overlay at all (voice/tone guidance is folded into the constitution preamble), where the PR only emptied the Calm arm. Carry over the PR's regression test, which derives its assertion from calm.md itself so a future re-inclusion of the overlay text fails loudly. Harvested from PR #3010 by @894876246 Co-authored-by: Hanmiao Li <894876246@qq.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3182,4 +3182,18 @@ mod tests {
|
||||
"Concise Output Discipline should be appended"
|
||||
);
|
||||
}
|
||||
|
||||
/// #2953 — the Calm overlay (calm.md) stays out of the default
|
||||
/// model-prompt path to keep the static prefix slim. Voice and tone
|
||||
/// guidance travels via the constitution preamble instead.
|
||||
#[test]
|
||||
fn default_prompt_does_not_include_calm_personality_overlay() {
|
||||
let prompt = compose_prompt(Personality::Calm);
|
||||
let calm_text = include_str!("prompts/personalities/calm.md");
|
||||
let first_calm_line = calm_text.lines().find(|l| !l.is_empty()).unwrap_or("");
|
||||
assert!(
|
||||
!prompt.contains(first_calm_line),
|
||||
"default agent prompt must not include calm.md overlay"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user