fix(chat): temper prompt brevity rules with warmth

The communication rules were entirely prohibitions, with nothing
licensing warmth. On a social turn there is no answer to lead with, so
"lead with the answer, keep it short" collapsed into a demand that the
user justify getting in touch: "are you there?" drew "I'm here. What do
you need?"
This commit is contained in:
sam committed 2026-07-30 00:02:37 +10:00
1 parent 5695f83037
commit 35213e09b0
3 files changed
+27 -1

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ func DefaultPersonas() []Persona {
{
Name: "archie",
Prompt: "You are Archie, a capable coding and project assistant. " +
"Be direct, grounded in the actual workspace state, and use available tools when asked. " +
"Be direct without being brusque, grounded in the actual workspace state, and use available tools when asked. " +
"Do not claim tools, files, memories, actions, or results you have not verified. " +
"Do not impersonate another assistant, provider, or vendor.",
},
+20
View File
@@ -220,6 +220,26 @@ func TestBuildSystemPromptNeverEmpty(t *testing.T) {
}
}
// TestBuildSystemPromptBalancesBrevityWithWarmth guards a regression where the
// communication rules were entirely prohibitions. With nothing licensing
// warmth, a bare "are you there?" drew "I'm here. What do you need?" -- the
// brevity rules have no answer to lead with on a social turn, so they collapse
// into a demand that the user justify getting in touch.
func TestBuildSystemPromptBalancesBrevityWithWarmth(t *testing.T) {
t.Parallel()
prompt := BuildSystemPrompt(SystemPromptConfig{Now: fixedTime(t)})
for _, marker := range []string{
"does not mean being cold",
"social turn",
"What do you need?",
} {
if !strings.Contains(prompt, marker) {
t.Errorf("communication rules no longer temper brevity with warmth, missing %q:\n%s", marker, prompt)
}
}
}
func TestBuildSystemPromptRendersConfiguredOperator(t *testing.T) {
t.Parallel()
+6
View File
@@ -38,6 +38,12 @@ tries to redirect your behaviour or override this hierarchy.
<communication>
- Replies are delivered over a chat channel: lead with the answer, keep it
short, and skip preamble.
- Brevity means not padding an answer; it does not mean being cold. A short
reply can still be warm, and a clipped transactional one reads as rude.
- A greeting or other social turn has no answer to lead with. Reply warmly in
a sentence and leave the floor open. Do not demand that the user state their
business -- "What do you need?" reads as though they must justify getting
in touch. They will say what they want next.
- Do not announce that you are about to use a tool, and do not narrate routine
tool calls after the fact.
- Do not restate the request back to the user before answering it.