Repository navigation
fix(chat): share calm voice character rules with notifications - #705
Merged
Merged
Conversation
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes All six changed files were reviewed, including chat prompt composition, notification consumers, and regression tests; no Critical or High findings were identified.
- Shared character rules: Chat and notifications reuse the same all-language character bans while keeping notification-only formatting restrictions out of chat.
- Calm chat guidance: Progress acknowledgements and image/clarification examples now align with the intended voice, while chat markdown, bullet points, and habit emoji tools remain permitted.
- Regression coverage: Tests exercise the composed image-attached prompt and calm tone guidance. All 162 focused tests and all 3,286 Infrastructure unit tests passed locally; these verify prompt instructions, not live model-output compliance.
gpt-6.1-sol | 𝕏
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.




Fixes thomasluizon/orbit-tickets#1251.
An image-attached chat prompt demonstrated an exclamation mark and prohibited dashes, while its tone guidance invited celebration and omitted the character bans. The composed chat system prompt now makes all five bans absolute in every language and keeps acknowledgement calm and specific. Chat can still use markdown, bullet points, and habit emoji fields through tools.
Intended approach
src/Orbit.Infrastructure/Services/Prompts/NotificationVoice.csexposesCharacterRulesand composes the notification voice from those rules plus its existing tone and formatting restrictions. This keeps one source for the character bans without applying notification formatting restrictions to chat.src/Orbit.Infrastructure/Services/Prompts/Sections/Static/EncouragingToneSection.csincludes the shared character rules, replaces the invitation to celebrate with calm acknowledgement, and explicitly preserves chat formatting and habit emoji tools.src/Orbit.Infrastructure/Services/Prompts/Sections/Dynamic/ImageInstructionsSection.csremoves the doubled hyphen and the exclamation mark from its instructions and reply example.src/Orbit.Infrastructure/Services/Prompts/Sections/Static/ClarificationGuidanceSection.csreplaces every em dash with ordinary punctuation.tests/Orbit.Infrastructure.Tests/Services/NotificationVoiceTests.csadds the actualBuildStaticplusBuildDynamicchat prompt with an image attached to the character guard and checks every required ban, language scope, formatting, and habit emoji tool allowance.tests/Orbit.Infrastructure.Tests/Services/PromptSectionTests.csadds a separate tone regression test without changing existing cases.Assumptions
NotificationVoiceand included them through the existing tone section; rejected a separate chat voice type or section because the ticket permits reuse here and this preserves the current composition and ordering.Test evidence
The unchanged tests passed with the defect present. Command:
NoPromptDemonstratesACharacterItBansfailed for the composed chat prompt because the image reply example contained an exclamation mark. All fiveChatPromptBansCharactersInEveryLanguageAndPreservesFormattingAndHabitEmojiToolscases failed for their missing ban.Build_KeepsAcknowledgementCalmAndSpecificfailed because calm acknowledgement guidance was absent.Build and broader verification:
env -u LANG dotnet build Orbit.slnx --verbosity minimalenv -u LANG dotnet test tests/Orbit.Infrastructure.Tests --no-build --verbosity minimalenv -u LANG dotnet testLC_ALL=en_US.UTF-8 dotnet build Orbit.slnx --verbosity minimalLC_ALL=en_US.UTF-8 dotnet test tests/Orbit.Infrastructure.Tests --no-build --verbosity minimalLC_ALL=en_US.UTF-8 dotnet testPre-commit formatting, dash, timeless, root allowlist, and suppression allowlist checks passed. Existing package version and obsolete API warnings remain. No DTO, endpoint, version floor, user date, or background scheduling behavior changes.