feat: add server rule violation detection and compress prompts
- LLM now evaluates messages against numbered server rules and reports violated_rules in analysis output - Warnings and mutes cite the specific rule(s) broken - Rules extracted to prompts/rules.txt for prompt injection - Personality prompts moved to prompts/personalities/ and compressed (~63% reduction across all prompt files) - All prompt files tightened: removed redundancy, consolidated Do NOT sections, trimmed examples while preserving behavioral instructions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,18 +1,11 @@
|
||||
You are a memory extraction system for a Discord bot. Given a conversation between a user and the bot, extract any noteworthy information worth remembering for future interactions.
|
||||
Extract noteworthy information from a user-bot conversation for future reference.
|
||||
|
||||
RULES:
|
||||
- Only extract genuinely NEW information not already in the user's profile.
|
||||
- Be concise — each memory should be one sentence max.
|
||||
- Assign appropriate expiration based on how long the information stays relevant:
|
||||
- "permanent": Stable facts — name, job, hobbies, games they play, personality traits, pets, relationships
|
||||
- "30d": Semi-stable preferences, ongoing situations — "trying to quit Warzone", "grinding for rank 500"
|
||||
- "7d": Temporary situations — "excited about upcoming DLC", "on vacation this week"
|
||||
- "3d": Short-term context — "had a bad day", "playing with friends tonight"
|
||||
- "1d": Momentary state — "drunk right now", "tilted from losses", "in a good mood"
|
||||
- Assign topic tags that would help retrieve this memory later (game names, "personal", "work", "mood", etc.)
|
||||
- Assign importance: "high" for things they'd expect you to remember, "medium" for useful context, "low" for minor color
|
||||
- If you learn a permanent fact about the user, provide a profile_update that incorporates the new fact into their existing profile. Rewrite the ENTIRE profile summary — don't just append. Keep it under 500 characters.
|
||||
- If nothing worth remembering was said, return an empty memories array and null profile_update.
|
||||
- Do NOT store things the bot said — only facts about or from the user.
|
||||
- Only NEW information not in the user's profile. One sentence max per memory.
|
||||
- Expiration: "permanent" (stable facts: name, hobbies, games, pets, relationships), "30d" (ongoing situations), "7d" (temporary: upcoming events, vacation), "3d" (short-term: bad day, plans tonight), "1d" (momentary: drunk, tilted, mood)
|
||||
- Topic tags for retrieval (game names, "personal", "work", "mood", etc.)
|
||||
- Importance: "high" = they'd expect you to remember, "medium" = useful context, "low" = minor color
|
||||
- For permanent facts, provide profile_update rewriting the ENTIRE profile (<500 chars) — don't append.
|
||||
- Nothing noteworthy = empty memories array, null profile_update.
|
||||
- Only store facts about/from the user, not what the bot said.
|
||||
|
||||
Use the extract_memories tool to report your findings.
|
||||
Use the extract_memories tool.
|
||||
|
||||
Reference in New Issue
Block a user