Repository navigation
feat(loop): add an opt-out prompt cue for stepwise output - #323
Open
raymondginger2018-sudo wants to merge 1 commit into
Open
raymondginger2018-sudo wants to merge 1 commit into
raymondginger2018-sudo wants to merge 1 commit into
Conversation
Tells the model to work stepwise, verify claims with tools before asserting them, and keep the final answer tight. The cue rides the existing transient_context_messages channel, so it lands immediately before the user request and never inside system-level instructions or the compaction summarizer prefix. On by default; DEEPCODE_PROMPT_CUE=0 turns it off. - core/loop/cue.py: prompt_cue_enabled + build_cue_context - core/compat/agent.py: pass the cue as transient context on routed runs - tests/test_prompt_cue.py: 6 cases (env spellings, injected shape)
This branch has not been deployed
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 a thin, model-facing prompt cue: work stepwise, verify claims with tools before
asserting them, keep the final answer tight, and reference retrieved memory or tool
results by their label.
The cue rides the existing
transient_context_messageschannel, so the runner places itimmediately before the user request — never inside system-level instructions, and never in
the compaction summarizer prefix (that would perturb the prefix / KV-cache alignment).
Changes
core/loop/cue.py(new):prompt_cue_enabled()+build_cue_context()core/compat/agent.py: pass the cue as transient context on routed runs (11 lines)tests/test_prompt_cue.py(new): 6 cases — every env spelling, injected shapeSwitch
On by default;
DEEPCODE_PROMPT_CUE=0(alsofalse/off/no) turns it off andinjects nothing.
Tests
Scope note
The full local CI replay was not run. Verification is targeted (the new module's own
suite plus lint). Upstream CI is the authoritative gate.