Feat/response prompt rewrite - #263
Open
NathanTarbert wants to merge 2 commits into
Open
Conversation
Formatting only, no behaviour change, split out so the prompt rewrite that follows reads as the change it is. Both files predate the format check added in #250, which runs on the files a PR touches — so editing them at all means formatting them.
The reply rules landed as code in #241; the prompt still required the shape they fail a draft for — "Always include code examples", "Structure responses with **bold headers**", a closing "Was this helpful?". So the model was being asked for the reply the linter in #256 would collapse, and enforcing that linter first would have withheld answers the agent had been instructed to write. The personality and formatting blocks now carry the rules from the Agent's Output Doc: verdict in the first sentence, one approach rather than a menu, length follows the evidence, markdown only where there is content to organise, at most one code sample and only when retrieval supplied it, one API version per reply, a docs page or repo file behind every substantive claim, no hedged names, no praise openers, no self-commentary, and two sentences under 60 words when nothing settles the question. GROUNDING_RULES is untouched — #242 already corrected it — and both section headers keep their names so its override clause still resolves. The zero-retrieval fallback no longer invites an answer "from general CopilotKit knowledge if possible". With nothing retrieved there is nothing to be right from and nothing to cite, so the only correct reply there is the handoff. 16 tests, red first. Five pair the prompt against eval/rules.ts: each asserts checkReply fails a reply for the phrase, then asserts the prompt bans that same phrase, so a rule that stops firing cannot leave a prompt line silently unenforced. The handoff cap reads HANDOFF_WORD_CAP rather than restating 60. 1214 tests pass, tsc clean, no new lint. Four mutations, each killing its tests: restored "Was this helpful?"; dropped the word cap; restored the general-knowledge fallback; softened "never a menu of three".
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.
No description provided.