"""
JARVIS Configuration — Reddit Growth Engine for AlignlyHQ
=========================================================
No API keys needed. Just set your Reddit username below.
"""

import os

# ============================================================
# YOUR REDDIT USERNAME (for karma tracking via public profile)
# ============================================================
REDDIT_USERNAME = os.getenv("REDDIT_USERNAME", "Well-Aligned-111")

# ============================================================
# BRAND
# ============================================================
BRAND_NAME = "Alignly"
BRAND_DISCLOSURE = "Disclosure: I work at Alignly, which also does this."

# ============================================================
# SUBREDDIT TARGETS
# ============================================================
TIER_1_SUBS = [
    {"name": "humanresources", "min_karma": 300, "tone": "professional", "brand_ok": True},
    {"name": "AskHR", "min_karma": 200, "tone": "helpful_expert", "brand_ok": True},
    {"name": "smallbusiness", "min_karma": 200, "tone": "peer_founder", "brand_ok": True},
    {"name": "Entrepreneur", "min_karma": 250, "tone": "peer_founder", "brand_ok": True},
    {"name": "startups", "min_karma": 400, "tone": "professional", "brand_ok": False},
    {"name": "SaaS", "min_karma": 250, "tone": "builder", "brand_ok": True},
]

TIER_2_SUBS = [
    {"name": "managers", "min_karma": 100, "tone": "peer_manager", "brand_ok": True},
    {"name": "Productivity", "min_karma": 100, "tone": "casual_expert", "brand_ok": False},
    {"name": "Leadership", "min_karma": 100, "tone": "professional", "brand_ok": False},
    {"name": "remotework", "min_karma": 100, "tone": "casual", "brand_ok": True},
    {"name": "growmybusiness", "min_karma": 50, "tone": "peer_founder", "brand_ok": True},
    {"name": "peopleops", "min_karma": 50, "tone": "professional", "brand_ok": True},
]

TIER_3_SUBS = [
    {"name": "AskReddit", "min_karma": 0, "tone": "casual_witty", "brand_ok": False},
    {"name": "NoStupidQuestions", "min_karma": 0, "tone": "helpful", "brand_ok": False},
    {"name": "todayilearned", "min_karma": 0, "tone": "casual", "brand_ok": False},
    {"name": "LifeProTips", "min_karma": 0, "tone": "helpful", "brand_ok": False},
    {"name": "Showerthoughts", "min_karma": 0, "tone": "witty", "brand_ok": False},
]

TIER_4_SUBS = [
    {"name": "talesfromHR", "min_karma": 200, "tone": "casual_storyteller", "brand_ok": False},
    {"name": "recruiting", "min_karma": 150, "tone": "professional", "brand_ok": True},
    {"name": "IndieHackers", "min_karma": 200, "tone": "builder", "brand_ok": True},
    {"name": "Bootstrapped", "min_karma": 150, "tone": "builder", "brand_ok": True},
    {"name": "sideproject", "min_karma": 200, "tone": "builder", "brand_ok": True},
    {"name": "nonprofit", "min_karma": 100, "tone": "helpful_expert", "brand_ok": True},
    {"name": "compliance", "min_karma": 100, "tone": "professional", "brand_ok": False},
]

ALL_SUBS = (
    [{"tier": 1, **s} for s in TIER_1_SUBS] +
    [{"tier": 2, **s} for s in TIER_2_SUBS] +
    [{"tier": 3, **s} for s in TIER_3_SUBS] +
    [{"tier": 4, **s} for s in TIER_4_SUBS]
)

# ============================================================
# PAIN-POINT KEYWORDS
# ============================================================
HIGH_INTENT_KEYWORDS = [
    "onboarding checklist", "onboarding process", "new hire onboarding",
    "employee handbook", "handbook template", "policy management",
    "PTO tracking", "vacation tracking", "time off spreadsheet", "leave management",
    "employee directory", "org chart tool", "staff directory", "people directory",
    "HR software recommendations", "HR tool", "HRIS", "HR platform",
    "BambooHR alternative", "Workday too expensive", "simple HR",
    "HR for small business", "first HR hire",
    "employee engagement", "pulse survey", "culture tools",
]

MEDIUM_INTENT_KEYWORDS = [
    "onboarding", "new hire", "first day",
    "employee handbook", "company policy", "leave policy",
    "PTO", "time off", "vacation days", "sick leave",
    "employee data", "spreadsheet HR", "Google Sheets HR",
    "managing employees", "team directory", "who reports to",
    "employee engagement", "team culture", "remote culture",
    "growing team", "scaling team", "hiring first employees",
]

LOW_INTENT_KEYWORDS = [
    "HR", "human resources", "people ops", "people operations",
    "startup operations", "small business tools", "team management",
    "employee", "workplace", "company culture",
    "productivity tools", "workflow", "operations",
]

# ============================================================
# SCORING WEIGHTS
# ============================================================
SCORING = {
    "high_intent_keyword": 30,
    "medium_intent_keyword": 15,
    "low_intent_keyword": 5,
    "is_question": 15,
    "low_comment_count": 10,
    "rising_post": 20,
    "new_post": 10,
    "tier_1_sub": 25,
    "tier_2_sub": 15,
    "tier_3_sub": 5,
    "tier_4_sub": 20,
    "already_commented": -100,
    "competitor_thread": 10,
    "high_comment_count": -10,
    "old_post": -15,
}

# ============================================================
# LIMITS & GUARDRAILS
# ============================================================
DAILY_LIMITS = {
    "max_comments_total": 20,
    "max_brand_mentions": 1,
    "max_comments_per_sub": 4,
    "min_helpful_ratio": 8,
}

COACH = {
    "diversification_warning": 0.4,
    "stale_sub_days": 4,
    "karma_target_day_1": 80,
    "karma_target_day_3": 280,
    "karma_target_day_5": 450,
    "karma_target_day_7": 650,
}

# ============================================================
# STORAGE
# ============================================================
DB_PATH = os.path.expanduser("~/.jarvis/jarvis.db")
