# reponova.yml
# Configuration for reponova
# All paths are relative to this file's location.
# When placed in an editor directory (e.g. .opencode/), use ../ to reference project root.

# Where to write build output
output: ../reponova-out

# Repositories to include in the build
repos:
  - name: my-project
    path: ..

# ── Providers (optional — AI backends for embeddings, summaries, descriptions) ─
# Define named providers here, then reference them from features below.
# Default (no provider) = algorithmic mode (TF-IDF embeddings, rule-based summaries).
# providers:
#   my-openai:
#     type: openai                  # "openai" (remote), "llama-cpp" (local LLM), "onnx" (local embeddings)
#     base_url: https://api.openai.com/v1
#     model: text-embedding-3-small
#     api_key: ${OPENAI_API_KEY}    # env var reference (resolved at runtime)
#     timeout: 30                   # seconds
#   local-llm:
#     type: llama-cpp
#     model: "hf:Qwen/Qwen2.5-0.5B-Instruct-GGUF:Q4_K_M"
#     context_size: 512
#   local-embeddings:
#     type: onnx
#     model: all-MiniLM-L6-v2
#   ollama:
#     type: openai                  # Ollama is OpenAI-compatible
#     base_url: http://localhost:11434/v1
#     model: nomic-embed-text

# ── Centralized model management ─────────────────────────────────────────────
models:
  cache_dir: ~/.cache/reponova/models
  gpu: auto                       # "auto", "cpu", "cuda", "metal", or "vulkan"
  threads: 0                      # 0 = auto-detect
  download_on_first_use: true

# ── Global File Filters (apply to all file types unless overridden per-plugin) ─
patterns: []                      # glob patterns for file inclusion (empty = auto-detect by extension)
exclude: []                       # glob patterns to exclude (e.g. ["**/generated/**", "**/*.test.ts"])
exclude_common: true              # skip node_modules, __pycache__, .git, venv, dist, build, ...
incremental: true                 # incremental builds using file hash cache

# ── HTML Visualizations ──────────────────────────────────────────────────────
html: true                        # generate graph.html and graph_communities.html visualizations
# html_min_degree: 3              # if set, only include nodes with degree >= this value in HTML

# ── Documentation ────────────────────────────────────────────────────────────
docs:
  enabled: true                   # extract documentation files (.md, .txt, .rst)
  patterns: []                    # empty = auto-detect (.md, .txt, .rst)
  exclude: []                     # e.g. ["**/CHANGELOG.md"]
  max_file_size_kb: 500

# ── Language Plugins ─────────────────────────────────────────────────────────
# Declare plugins here. Installed via `reponova lang add <package>`.
# If `package` is omitted, resolved as @reponova/lang-<key>.
# Each plugin inherits global patterns/exclude unless overridden here.
# plugins:
#   python:                          # shorthand → @reponova/lang-python
#     enabled: true
#   rust:                            # community plugin → explicit package
#     package: "@exampleorg/lang-rust"
#     enabled: true
#   plantuml:
#     enabled: true
#     parse: true                    # plugin-specific option

# ── Embeddings ───────────────────────────────────────────────────────────────
# Default (no provider): TF-IDF (384-dim, fast, no download required)
# With provider: uses the named provider for embedding generation
embeddings:
  enabled: true
  # provider: my-openai           # reference a provider defined above
  # batch_size: 128               # batch size for embedding generation

# ── Enrich ───────────────────────────────────────────────────────────────────
# Unified algorithmic/LLM enrichment for community summaries + node descriptions
enrich:
  enabled: true
  threshold: 0.8                  # top 20% of nodes by degree
  max_communities: 0              # 0 = no limit; N = only top N largest communities
  candidate_threshold: 0.3
  description_batch_tokens: 40000
  routing_batch_size: 30
  concurrency: 4
  max_retry_depth: 3
  # provider: local-llm           # reference a provider defined above
  # max_tokens:                   # per-step LLM output token limits
  #   descriptions: 32768
  #   profiles: 2048
  #   routing: 8192
  #   restructure: 4096
  # profile:                      # community profile prompt limits
  #   max_nodes: 80
  #   max_edges: 50
  # restructure_max_pairs: 20     # max cross-community pairs for merge/split analysis

# ── Outlines ─────────────────────────────────────────────────────────────────
outlines:
  enabled: true
  # File selection comes from top-level patterns / exclude / exclude_common.

# ── MCP Server ───────────────────────────────────────────────────────────────
server: {}
