🤖 fix: add completion discipline to system prompt#2273
Merged
ibetitsmike merged 1 commit intomainfrom Feb 8, 2026
Merged
Conversation
ammario
pushed a commit
that referenced
this pull request
Feb 9, 2026
## Summary Removes 4 tautological tests across 3 files that only asserted hardcoded strings appear in output where those strings are static constants — providing zero behavioral coverage and adding maintenance burden (any prompt wording change requires updating tests that test nothing). ## Background PR #2273 highlighted the pattern: when the system prompt `PRELUDE` gains a new section, tests get added that assert the exact static text appears in the output of `buildSystemMessage()`. Since `PRELUDE` is unconditionally included via `PRELUDE.trim()`, these tests are tautological — they verify a template literal contains its own content. A broader scan found the same anti-pattern in two other test files. ## Implementation **Removed tests (4 tests, 15 tautological assertions):** | File | Test | Assertions | Mirrors | |------|------|-----------|---------| | `systemMessage.test.ts` | "includes mux_subagent_report guidance in the system prompt" | 6 | `PRELUDE` constant (`<completion-discipline>`, `<subagent-reports>`) | | `modeUtils.test.ts` | "includes instructions to use ask_user_question..." | 4 | Static return text of `getPlanModeInstruction()` | | `modeUtils.test.ts` | "includes sub-agent delegation guidance" | 3 | Static return text of `getPlanModeInstruction()` | | `agentDefinitionsService.test.ts` | "Ask agent instructs to trust Explore sub-agent reports" | 2 | Static content from `ask.md` built-in agent | **Kept tests** — all remaining tests in these files exercise real conditional logic: file reading, model-section regex matching, precedence/fallback behavior, instruction scoping, `planExists` branching, etc. ## Risks Low. Only removes tests that provided no behavioral signal. All remaining tests pass. --- _Generated with `mux` • Model: `anthropic:claude-opus-4-6` • Thinking: `xhigh` • Cost: `$0.00`_ <!-- mux-attribution: model=anthropic:claude-opus-4-6 thinking=xhigh costs=0.00 -->
ammar-agent
added a commit
that referenced
this pull request
Feb 9, 2026
Move benchmark-validated instructions from bench-specific AGENTS.md into the system prompt PRELUDE as <task-execution> section. Extract Mike's <completion-discipline> (PR #2273) into its own guarded function with the same BENCHMARK-VALIDATED comment treatment. Both sections are clearly marked so they aren't flippantly modified: - buildCompletionDiscipline() — origin PR #2273 - buildTaskExecutionGuidelines() — origin PR #2269 Removed the bench-specific AGENTS.md file + upload/deploy plumbing since instructions now ship in the system prompt for all users.
ammar-agent
added a commit
that referenced
this pull request
Feb 9, 2026
Move benchmark-validated instructions from bench-specific AGENTS.md into the system prompt PRELUDE as <task-execution> section. Extract Mike's <completion-discipline> (PR #2273) into its own guarded function with the same BENCHMARK-VALIDATED comment treatment. Both sections are clearly marked so they aren't flippantly modified: - buildCompletionDiscipline() — origin PR #2273 - buildTaskExecutionGuidelines() — origin PR #2269 Removed the bench-specific AGENTS.md file + upload/deploy plumbing since instructions now ship in the system prompt for all users.
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.
Summary
Adds an explicit
<completion-discipline>block to Mux’s generated system prompt prelude to reduce premature “done” responses and encourage running relevant validation before claiming success.Implementation
<completion-discipline>section into the system prompt prelude.docs/agents/system-prompt.mdx).Validation
bun test src/node/services/systemMessage.test.tsmake static-checkRisks
Low. This only changes the instruction text used for agent runs; behavior impact is limited to improved completion/validation habits.
Generated with
mux• Model:openai:gpt-5.2• Thinking:xhigh• Cost:$0.12