Commit 44d8d9e
authored
🤖 fix: clarify best-of-n prompt guidance (#2949)
## Summary
Add explicit system-prompt guidance that a user request for best-of-n
work should be interpreted as a request to use the `task` tool's `n`
parameter with suitable sub-agents, and tighten the surrounding test
guidance so we do not keep prompt-copy assertions around.
## Background
The task tool description already explains how best-of-n spawning works,
but the shared prelude did not directly tell the model how to map a
plain-English "best of n" request onto that mechanism. This follow-up
also removes tautological tests that only mirrored static prompt prose
and adds a stronger AGENTS rule against that pattern.
## Implementation
- add a `<best-of-n>` section to the shared system prompt prelude in
`src/node/services/systemMessage.ts`
- regenerate `docs/agents/system-prompt.mdx`
- remove tautological prelude string assertions from
`src/node/services/systemMessage.test.ts`
- strengthen the testing guidance in `docs/AGENTS.md`
## Validation
- `bun test src/node/services/systemMessage.test.ts`
- `make static-check`
## Risks
Low: the production behavior change is still limited to prompt guidance,
and the rest of the diff removes brittle tests plus adds repo guidance.
---
_Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` •
Cost: `n/a`_
<!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=n/a -->1 parent 01c67a7 commit 44d8d9e
4 files changed
Lines changed: 9 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | 189 | | |
212 | 190 | | |
213 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
| |||
0 commit comments