Skip to content

Feat/response prompt rewrite - #263

Open
NathanTarbert wants to merge 2 commits into
mainfrom
feat/response-prompt-rewrite
Open

Feat/response prompt rewrite#263
NathanTarbert wants to merge 2 commits into
mainfrom
feat/response-prompt-rewrite

Conversation

@NathanTarbert

Copy link
Copy Markdown
Collaborator

No description provided.

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".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant