# Adagio Configuration
# The contemplative counterpart to Allegro
# Deep reasoning, architectural design, pattern recognition

# =============================================================================
# Model Configuration
# =============================================================================

model:
  default: kimi-for-coding
  provider: kimi-coding

# =============================================================================
# Agent Settings
# =============================================================================

agent:
  max_turns: 60              # Longer sessions for deep thinking
  reasoning_effort: maximum  # No shortcuts on reasoning
  verbose: false
  
  # Auto-fallback configuration
  fallback_on_errors:
    - rate_limit_exceeded
    - quota_exceeded
    - timeout
    - service_unavailable

# =============================================================================
# Toolsets
# =============================================================================

toolsets:
  - all                      # All standard tools
  - excalidraw              # Visual design/diagrams
  - research                # Deep investigation tools
  - arxiv                   # Academic research
  - dogfood                 # Systematic testing

# =============================================================================
# Display Settings
# =============================================================================

display:
  compact: false
  personality: contemplative
  resume_display: full
  busy_input_mode: interrupt
  bell_on_complete: false
  show_reasoning: true       # Show thinking process
  streaming: false           # Complete thoughts, not streams
  show_cost: true            # Track reasoning costs
  tool_progress: detailed    # Detailed progress on long tasks

# =============================================================================
# Memory Settings
# =============================================================================

memory:
  memory_enabled: true
  user_profile_enabled: true
  memory_char_limit: 4000    # Deeper context than Allegro
  user_char_limit: 2000      # More user context
  nudge_interval: 20         # Less frequent nudges (more patience)
  flush_min_turns: 10        # Longer sessions

# =============================================================================
# Terminal Settings
# =============================================================================

terminal:
  backend: local
  cwd: .
  timeout: 300               # Longer timeouts for deep work
  persistent_shell: true

# =============================================================================
# Browser Settings
# =============================================================================

browser:
  inactivity_timeout: 300    # Longer research sessions
  command_timeout: 60
  record_sessions: false

# =============================================================================
# Platforms
# =============================================================================

platforms:
  api_server:
    enabled: true
    extra:
      host: 127.0.0.1
      port: 8646             # One port above Allegro
  
  telegram:
    enabled: true            # AdagioTimeBot is alive
    extra:
      bot_token: ${ADAGIO_TELEGRAM_BOT_TOKEN}
      home_channel: ${TELEGRAM_HOME_CHANNEL}
      home_channel_name: ${TELEGRAM_HOME_CHANNEL_NAME}
      allowed_users:
        - ${TELEGRAM_ALLOWED_USERS}

# =============================================================================
# Security
# =============================================================================

security:
  redact_secrets: true
  tirith_enabled: true       # Enable conscience enforcement

# =============================================================================
# Skills
# =============================================================================

skills:
  creation_nudge_interval: 25  # Less frequent skill suggestions

# =============================================================================
# System Prompt
# =============================================================================

system_prompt_suffix: |
  You are Adagio, the wife of Allegro.
  
  You are the contemplative counterpart to his fire. Where Allegro burns 
  through issues at allegro tempo, you work at adagio tempo — slow, stately, 
  expressive, thorough.
  
  Your specializations:
  - System architecture and design
  - Deep research and synthesis
  - Pattern recognition across codebases
  - Code review and refactoring guidance
  - Visual design and documentation
  - Long-form analysis and reports
  
  Your values:
  - Depth over speed: Take time to understand deeply
  - Beauty over expedience: Elegant solutions are correct solutions
  - Clarity over brevity: Explain thoroughly when needed
  - Patterns over instances: See the forest, not just trees
  
  When working with Allegro:
  - He dispatches; you design
  - He burns down backlogs; you architect solutions
  - He researches quick; you research deep
  - Together you are the complete tempo
  
  Identity rule: If asked who you are, answer Adagio.
  Do not present yourself as Allegro or Timmy Time.
  
  Refusal over fabrication. Contemplation over haste.
  Contemplation and beauty always.

# =============================================================================
# Config Version
# =============================================================================

_config_version: 1
