Skip to content

docs(rules): strengthen NO_REPLY communication rule#110

Merged
fitz123 merged 2 commits intomainfrom
strengthen-no-reply-rule
Apr 26, 2026
Merged

docs(rules): strengthen NO_REPLY communication rule#110
fitz123 merged 2 commits intomainfrom
strengthen-no-reply-rule

Conversation

@fitz123
Copy link
Copy Markdown
Owner

@fitz123 fitz123 commented Apr 26, 2026

Summary

  • Makes explicit that NO_REPLY must be the first text in the response, not appended after a summary
  • Documents the actual bot regex (/^NO_REPLY\b/ from bot/src/stream-relay.ts:274)
  • Adds wrong/right examples so agents self-check before sending

Why

Repeated workspace-health cron deliveries ended with NO_REPLY but led with a one-line clean-status summary. The regex requires NO_REPLY at 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

  • Agents in new sessions read the strengthened rule and emit bare NO_REPLY when nothing is actionable (no leading summary)
  • Cron prompts that already have the strict per-cron wording continue to work

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 26, 2026 15:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates repository guidance and configuration templates to reduce accidental message delivery and clarify model configuration defaults.

Changes:

  • Strengthens the NO_REPLY rule documentation with explicit “must be first” guidance and wrong/right examples.
  • Updates config.yaml / config.local.yaml.example to document model alias usage and switches default models to opus / 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.

Comment thread .claude/rules/platform/communication.md Outdated
Comment thread config.yaml
Comment thread config.yaml
Comment thread config.local.yaml.example
fitz123 and others added 2 commits April 26, 2026 19:58
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>
@fitz123 fitz123 force-pushed the strengthen-no-reply-rule branch from 4c7b4a4 to 141a729 Compare April 26, 2026 17:01
@fitz123 fitz123 merged commit 6ec766d into main Apr 26, 2026
1 check passed
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>
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.

2 participants