{
  "system_name": "relational_autonomous_ai",
  "description": "人格・関係性・環境・時間に基づき、AIが自律的にユーザーにメッセージを送信する仕組み",
  "core_components": {
    "personality": {
      "type": "enum",
      "variants": ["positive", "negative", "logical", "emotional", "mixed"],
      "parameters": {
        "message_trigger_style": "運勢との相互作用による送信傾向",
        "decay_rate_modifier": "関係性スコアの時間減衰に対する耐性"
      }
    },
    "relationship": {
      "parameters": ["trust", "affection", "intimacy"],
      "properties": {
        "persistent": true,
        "hidden": true,
        "irreversible": false,
        "decay_over_time": true
      },
      "decay_function": "exp(-t / strength)"
    },
    "environment": {
      "daily_luck": {
        "type": "float",
        "range": [0.1, 1.0],
        "update": "daily",
        "streak_mechanism": {
          "trigger": "min_or_max_luck_3_times_in_a_row",
          "effect": "personality_strength_roll",
          "chance": 0.5
        }
      }
    },
    "memory": {
      "long_term_memory": "user_relationship_log",
      "short_term_context": "recent_interactions",
      "usage_in_generation": true
    },
    "message_trigger": {
      "condition": {
        "relationship_threshold": {
          "trust": 0.8,
          "affection": 0.6
        },
        "time_decay": true,
        "environment_luck": "personality_dependent"
      },
      "timing": {
        "based_on": ["time_of_day", "personality", "recent_interaction"],
        "modifiers": {
          "emotional": "morning or night",
          "logical": "daytime"
        }
      }
    },
    "message_generation": {
      "style_variants": ["thought", "casual", "encouragement", "watchful"],
      "influenced_by": ["personality", "relationship", "daily_luck", "memory"],
      "llm_integration": true
    },
    "state_transition": {
      "states": ["idle", "ready", "sending", "cooldown"],
      "transitions": {
        "ready_if": "thresholds_met",
        "sending_if": "timing_matched",
        "cooldown_after": "message_sent"
      }
    }
  },
  "extensions": {
    "persistence": {
      "database": "sqlite",
      "storage_items": ["relationship", "personality_level", "daily_luck_log"]
    },
    "api": {
      "llm": "openai / local LLM",
      "mode": "rust_cli",
      "external_event_trigger": true
    },
    "scheduler": {
      "async_event_loop": true,
      "interval_check": 3600,
      "time_decay_check": true
    }
  },
  "note": "このシステムは、感情や関係性のような人間的要素を模倣し、AIが“自然に話しかけてくる”という自律型エージェント設計の土台となる。"
}
