docs(rules): strengthen NO_REPLY communication rule#110
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates repository guidance and configuration templates to reduce accidental message delivery and clarify model configuration defaults.
Changes:
- Strengthens the
NO_REPLYrule documentation with explicit “must be first” guidance and wrong/right examples. - Updates
config.yaml/config.local.yaml.exampleto document model alias usage and switches default models toopus/sonnet.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
config.yaml |
Switches fleet-wide default models to aliases and adds explanatory comments about aliasing/pinning and context window syntax. |
config.local.yaml.example |
Updates commented examples to match alias-based defaults and adds an opus[1m] example. |
.claude/rules/platform/communication.md |
Clarifies NO_REPLY suppression behavior and adds explicit wrong/right examples tied to the actual suppression regex. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Make explicit that NO_REPLY must be the FIRST text in the response, not appended after a summary. Adds the actual bot regex (/^NO_REPLY\b/) and wrong/right examples so agents can self-check before sending. Motivated by repeated workspace-health cron deliveries that ended with NO_REPLY but led with a clean-status summary — the regex didn't match, so the summary was delivered as a real message. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Address Copilot review on PR #110: the original wording said the entire response must be exactly NO_REPLY, then later allowed `NO_REPLY: reason` as a valid suppressed example. Resolved by changing the lead from "ENTIRE response must be exactly NO_REPLY" to "must start with NO_REPLY, optionally followed by punctuation and a brief reason." Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4c7b4a4 to
141a729
Compare
This was referenced Apr 27, 2026
fitz123
added a commit
that referenced
this pull request
Apr 28, 2026
Closes #111. ## Summary - Pipeline-style cron prompts (workspace-health, memory-consolidation, backup-git) reliably produce `<recap>\n\nNO_REPLY` and the recap was being delivered as a real message - Extends suppression to also accept `NO_REPLY` alone on the last non-empty line of the trimmed output (in addition to the existing start-of-message rule from #80) - Extracts the suppression check into `bot/src/no-reply.ts` so `stream-relay.ts` and `cron-runner.ts` agree on exactly which patterns suppress - Same-line patterns (`Done. NO_REPLY`) and substring prefixes (`NO_REPLY_EXTRA`) are intentionally NOT matched ## Evidence 9 leaked messages across 4 distinct crons in a 2-day window, all the same `<summary>\n\nNO_REPLY` shape — full samples in #111. Two prompt-side mitigations (per-cron strengthening + platform rule strengthening in #110) failed to change agent behavior; the model's RLHF "report what you did" instinct overrides explicit instructions to emit a bare token. ## Test plan - [x] Unit tests in `bot/src/__tests__/stream-relay.test.ts` cover end-of-message NO_REPLY (alone on last line, with whitespace, multi-line content above, single-newline, trailing-newline) and reproduce one of the verbatim leaked samples - [x] Unit tests in `bot/src/__tests__/cron-runner.test.ts` cover the same pattern set for the cron path - [x] Same-line `Done. NO_REPLY` and `NO_REPLY_EXTRA` substring prefix are NOT suppressed (negative cases pinned) - [x] All existing NO_REPLY tests still pass (issue #80 backward compatibility preserved) - [x] `npx tsc --noEmit` clean - [x] `npm test`: 1016/1017 pass (1 pre-existing env-specific voice.ts failure unrelated to this change) - [x] Manual verification: trigger a workspace-health cron after merge — verify suppression Co-authored-by: fitz123 <fitz123@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
NO_REPLYmust be the first text in the response, not appended after a summary/^NO_REPLY\b/frombot/src/stream-relay.ts:274)Why
Repeated workspace-health cron deliveries ended with
NO_REPLYbut led with a one-line clean-status summary. The regex requiresNO_REPLYat the start of the trimmed output, so the summary was delivered as a real message. The previous wording — "respond with exactly NO_REPLY" — was being interpreted liberally (agents added context first).Test plan
NO_REPLYwhen nothing is actionable (no leading summary)🤖 Generated with Claude Code