Add a notification copy style guide - #1303
Merged
Merged
Conversation
The 23 specs in service/notification/registry.py disagree on title, capitalisation, tense, grammatical person and actor naming, with no written guidance, so each new spec re-decides. A player in five games receiving "Civil Disorder / France entered civil disorder" cannot tell which game it came from. Adds .claude/rules/backend/notification-copy.md, scoped to registry.py and referenced from the backend rules index. It states the rules a spec author follows — game name as the title, Title Case titles and sentence case bodies, calls to action as fields, present perfect, second person only for the recipient, one actor helper with one anonymity check, no placeholder strings, and link omission as a recorded exception — and points at the registry rather than inventorying the specs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FTSUJGBPgDacmsi1kyi1ze
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.
What this PR does
The 23 specs in
service/notification/registry.pydisagree on title, capitalisation, tense, grammatical person and actor naming. There is no written guidance, so each new spec re-decides — and a player in five games receiving "Civil Disorder / France entered civil disorder" cannot tell which game it came from.Adds
.claude/rules/backend/notification-copy.md, scoped by frontmatter toservice/notification/registry.pyso it loads when a spec is edited, and referenced from.claude/rules/backend/index.md. It states the rules a spec author follows:email_link_text), never prose in the body.link = Noneis a recorded exception with a stated reason, not a per-spec judgement call.Per the guidance rule in
CLAUDE.md, it states rules and points at the registry rather than inventorying the specs. References are by file and symbol rather than file:line, so they do not go stale as the registry moves.Two facts are asserted from the code rather than assumed.
get_email_body()defaults toget_body()andnotification_emailinterpolates that same string into both the hidden preview div and the visible paragraph, which is why the guide requires the body to stand alone. Both tap handlers return early without a link — thenotificationclickhandler inpackages/web/public/firebase-messaging-sw.jsand the message listener inpackages/web/src/messaging-native.ts— which is why a linkless push is a dead notification.The guide does not rule on the
channel_messagetruncation, since that interacts with the shared email preview text. It does state the email-subject convention, which all five specs declaringChannel.EMAILalready follow.Rewriting the existing specs to match is #1283, and the linkless-push fix is #1284; neither is in this PR.
Closes #1282
Checklist
/review-pragainst this PR in Claude Code and addressed (or responded to) its findingsDocumentation only — two markdown files under
.claude/rules/, no code changed, so there is nothing to test and no visual change to screenshot./review-prhas not been run against this branch.Generated by Claude Code