# TAKT global configuration sample
# Location: ~/.takt/config.yaml

# =====================================
# General settings (piece-independent)
# =====================================
language: en        # UI language: en | ja
log_level: info     # Log level: debug | info | warn | error
provider: claude    # Default provider: claude | codex | opencode | mock
# model: sonnet     # Optional model name passed to provider

# Execution control
# worktree_dir: ~/takt-worktrees   # Base directory for shared clone execution
# auto_pr: false                   # Auto-create PR after worktree execution
branch_name_strategy: ai      # Branch strategy: romaji | ai
concurrency: 2                  # Concurrent task execution for takt run (1-10)
# task_poll_interval_ms: 500       # Polling interval in ms during takt run (100-5000)
# prevent_sleep: false             # Prevent macOS idle sleep while running

# Output / notifications
# minimal_output: false            # Minimized output for CI logs
# verbose: false                   # Verbose output mode
# notification_sound: true         # Master switch for sounds
# notification_sound_events:       # Per-event sound toggle (unset means true)
#   iteration_limit: true
#   piece_complete: true
#   piece_abort: true
#   run_complete: true
#   run_abort: true
# observability:
#   provider_events: false         # Persist provider stream events
# analytics:
#   enabled: true                  # Enable analytics metrics collection
#   events_path: ~/.takt/analytics/events  # Analytics event directory
#   retention_days: 30             # Analytics event retention (days)

# Credentials (environment variables take priority)
# anthropic_api_key: "sk-ant-..." # Claude API key
# openai_api_key: "sk-..."         # Codex/OpenAI API key
# opencode_api_key: "..."          # OpenCode API key
# codex_cli_path: "/absolute/path/to/codex"  # Absolute path to Codex CLI

# Pipeline
# pipeline:
#   default_branch_prefix: "takt/"             # Prefix for pipeline-created branches
#   commit_message_template: "feat: {title} (#{issue})"  # Commit template
#   pr_body_template: |                          # PR body template
#     ## Summary
#     {issue_body}
#     Closes #{issue}

# Misc
# bookmarks_file: ~/.takt/preferences/bookmarks.yaml  # Bookmark file location

# =====================================
# Piece-related settings (global defaults)
# =====================================
# 1) Route provider/model per persona
# persona_providers:
#   coder:
#     provider: codex    # Run coder persona on Codex
#     model: o3-mini     # Use o3-mini model (optional)
#   reviewer:
#     provider: claude   # Run reviewer persona on Claude

# 2) Provider options
#    Priority (for piece-capable keys such as provider/model/provider_options):
#    global < piece < project < env
# provider_options:
#   codex:
#     network_access: true      # Allow network access for Codex
#   opencode:
#     network_access: true      # Allow network access for OpenCode
#   claude:
#     sandbox:
#       allow_unsandboxed_commands: false   # true allows unsandboxed execution for listed commands
#       excluded_commands:
#         - "npm publish"                  # Commands excluded from sandbox

# 3) Movement permission policy
# provider_profiles:
#   codex:
#     default_permission_mode: full         # Base permission: readonly | edit | full
#     movement_permission_overrides:
#       ai_review: readonly                 # Per-movement override
#   claude:
#     default_permission_mode: edit

# 4) Runtime preparation before execution (recommended: enabled)
runtime:
  prepare:
    - gradle      # Prepare Gradle cache/env under .runtime
    - node        # Prepare npm cache/env under .runtime

# 5) Piece list / categories
# enable_builtin_pieces: true                             # Enable built-in pieces from builtins/{lang}/pieces
# disabled_builtins:
#   - magi                                                # Built-in piece names to disable
# piece_categories_file: ~/.takt/preferences/piece-categories.yaml  # Category definition file
# interactive_preview_movements: 3                        # Preview movement count in interactive mode (0-10)
