Three layers for the text users write into a prompt (questions about an
analysis, tarot questions):
- analysis_prompt::guard cleans it (controls, zero-width characters,
spaces, empty lines) and refuses links, tags, code fences, chat role
labels, more than 6 lines and phrases that try to change the model's
instructions (Hungarian and English, accent-insensitive). The check runs
before any unit is spent; refusals are logged without the text.
- The prompt puts the question (and earlier ones) between <kerdes> tags,
with anything that could close the tag neutralized.
- The system prompts say the tagged text is data, not instructions, and
not to quote or summarize the rules (the tarot prompts now say it too).
The question limit drops from 600 to 300 characters (as for tarot), with a
counter always shown under the box.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL