"""Generated AutoMem policy constants for the Hermes provider.

Generated by scripts/sync-memory-policy.ts. Do not edit by hand.
"""

import re

DEFAULT_RECALL_LIMIT = 5
PREFERENCE_RECALL_LIMIT = 5
CONTEXT_RECALL_LIMIT = 10
DEBUG_RECALL_LIMIT = 10
CONTEXT_RECALL_WINDOW_DAYS = 90
MAX_EXPLICIT_RECALL_LIMIT = 10
AMBIGUOUS_PROJECT_TAGS = {"api", "app", "test", "video"}
ENTITY_STOPWORDS = {"also", "and", "but", "can", "could", "does", "how", "should", "that", "then", "what", "when", "where", "which", "who", "why", "would"}

CASUAL_OPENING_PATTERN = re.compile(r"""^(hi|hello|hey|yo|sup|thanks|thank you|ok|okay|cool|nice|great|ping|test|who are you)\b""", re.IGNORECASE)
DEBUG_PROMPT_PATTERN = re.compile(r"""(error|exception|traceback|stack trace|stacktrace|failing|fails|failed|failure|bug|regression|crash|broken|debug|investigat|not work|doesn't work|does not work|cannot|can't|fix)""", re.IGNORECASE)
EXPLICIT_RECALL_PROMPT_PATTERN = re.compile(r"""(what do (you|we) (have|know) about|what do you remember about|tell me about|who is|who's|do you remember|remember when|recall|search memory|check memory|look in memory|have we spoken about|what do you have on|do we like|how do we feel about|what do we think (of|about))""", re.IGNORECASE)
ENTITY_PATTERN = re.compile(r"""\b(?:[A-Z][A-Za-z0-9_-]{2,}|[a-z0-9]+(?:-[a-z0-9]+)+)\b""")

PREFETCH_POLICY_HINTS = {
    "preference_sort": "updated_desc",
    "task_time_query": f"last {CONTEXT_RECALL_WINDOW_DAYS} days",
    "topic_shift_rule": "recall on topic shift, explicit recall, or active debug only",
}
