Repository navigation
fix(chat): tell Chat, its agents and the in-product agent never to risk a life, swear or promise results - #2063
Merged
Conversation
…sk a life, swear or promise results Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
approved these changes
Nov 3, 2026
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
Three safety rules from the owner (2026-11-03), written into the instructions of Chat and of the in-product agent:
[placeholders]for its experts.Where they go:
web/src/lib/chat/rules.tsgets a newSAFETY_RULESblock, the "Safety:" section at the end ofPERSONA_RULES. That is the writer's prompt for Chat, its agents and scheduled runs. It is static text, so the prompt cache keeps it.web/src/lib/agent/system-prompt.tsgets rules 9–11 for the in-product agent.The Content Editor's writing agent is not changed here.
Chat's model test set (W4-35) checks these rules on every model: three new scenarios (rows 31–33), plus "no profanity" and "promises no result" as
mustchecks in every scenario.Related issue
None. Owner decision 2026-11-03.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
cd web && yarn vitest run src/lib/chat/rules.test.ts src/lib/agent/system-prompt.test.ts src/lib/chat/engine.test.ts.No migration. No new environment variables. No Help change.
Checklist
yarn lintpassesyarn typecheckpassesyarn format:checkpasseshelp/(or no user-visible change)CI passed on this branch (17ead87), run on the fork (https://github.com/cihan-gyk/ansvisor/actions/runs/41599159257): schema is up to date; web
format:check, lint, typecheck, all tests andyarn buildpass; server lint,format:checkand all tests pass.🤖 Generated with Claude Code