feat(prompt): add GPT narrate-before-tools family residual - #1135
Merged
TheGreatAxios merged 17 commits intoSep 21, 2026
Merged
TheGreatAxios merged 17 commits into
TheGreatAxios merged 17 commits into
Conversation
Claude-family leaf workers get one <task_guidance> XML block appended once at the tail of the system prompt via the ModelFamilyPolicy promptResidual seam. A prose residual did nothing; one XML block cut Sonnet tokens. Balanced tags, leaf-only, never applied to grok/gpt — and never a full-prompt XML renderer.
Rebuild the Claude XML residual end to end from Anthropic's prompting docs while keeping CL-7775's measured shape: rationale first, numbered approach, named output contract, one wrapper, leaf-only tail placement. Every line is positively framed and scope-explicit for Sonnet's literal instruction-following; per-line provenance in the PR body.
TheGreatAxios
force-pushed
the
cl-8310-0330-promptresidual-gpt-narrate-before-tools-after-grok-row
branch
from
September 21, 2026 03:21
5f90153 to
044c60d
Compare
The anthropic/claude-sonnet-4 fixture now resolves to the claude family, so the default column silently measured the task_guidance block. Probe openai/gpt-4.1 instead (default family until the CL-8310 gpt row lands) and assert the default column carries no family residual.
Primary and leaf prompts carry a 3-line narrate-before-tools residual when the active session resolves to the gpt family (codex, gpt-*); grok and claude prompts are untouched and the residual appears exactly once. Fixes CL-8310
openai/gpt-4.1 now resolves to the gpt family, so the default column measured the narrate-before-tools nudge. Probe an unrecognized provider instead — default family regardless of shipped rows — and assert the default column carries neither the claude block nor the gpt nudge.
TheGreatAxios
force-pushed
the
cl-8310-0330-promptresidual-gpt-narrate-before-tools-after-grok-row
branch
from
September 21, 2026 03:45
044c60d to
2880019
Compare
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:
gptfamily to detectModelFamily (codex + gpt-* providers/models).Verification:
bun run typecheckclean (tsc --noEmit, exit 0).bun install— without local node_modules the parent checkout's untyped semver copy breaks typecheck on vendor/intx-types (environment artifact, unrelated to this change).Overlap: CL-8297 (parallel, unmerged lane) adds the promptResidual hook this branch consumes; this branch carries a minimal compatible hook locally so it is self-contained and green.
Fixes CL-8310