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

# =====================================
# General settings
# =====================================
language: en        # UI language: en | ja

# Default provider and model
# provider: claude                    # Default provider: claude | claude-sdk | claude-terminal | codex | opencode | deepseek-harness | pi | cursor | copilot | kiro | mock
# model: sonnet                       # Default model (passed directly to provider)

# Execution control
# worktree_dir: ~/takt-worktrees   # Base directory for shared clone execution
# prevent_sleep: false             # Prevent macOS idle sleep while running
# auto_fetch: false                # Fetch before clone to keep shared clones up-to-date
# base_branch: main                # Base branch to clone from (default: current branch)
# concurrency: 1                   # Number of tasks to run concurrently in takt run (1-10)
# task_poll_interval_ms: 500       # Polling interval in ms for picking up new tasks (100-5000)
# auto_requeue_max_attempts: 0     # Auto-requeue failed workflow tasks during takt run (non-negative integer; 0 disables)
# ignore_exceed: false             # Applies to takt run and takt watch like --ignore-exceed
# sync_project_local_takt_on_retry: true # Sync root project-local .takt before retry / re-execution. Set false to keep the worktree copy
# PR / branch
# auto_pr: false                   # Auto-create PR after worktree execution
# draft_pr: false                  # Create PR as draft
# branch_name_strategy: romaji     # Branch name generation: romaji | ai

# Pipeline execution
# pipeline:
#   default_branch_prefix: "takt/"         # Branch prefix for pipeline-created branches
#   commit_message_template: "{title}"     # Commit message template. Variables: {title}, {issue}
#   pr_body_template: "{report}"           # PR body template. Variables: {issue_body}, {report}, {issue}

# Output / notifications
# minimal_output: false            # Suppress detailed agent output
# notification_sound: true         # Master switch for sounds
# notification_sound_events:       # Per-event sound toggle (unset means true)
#   iteration_limit: true
#   workflow_complete: true
#   workflow_abort: true
#   run_complete: true
#   run_abort: true
# logging:
#   level: info                    # Log level for console and file output
#   trace: true                    # Generate human-readable execution trace report (trace.md)
#   debug: false                   # Enable debug.log + prompts.jsonl
#   provider_events: false         # Persist provider stream events
#   usage_events: false            # Persist usage event logs

# OpenTelemetry observability
# observability:
#   enabled: true                  # Initialize the OpenTelemetry SDK
#   monitor: true                  # Write .takt/runs/<run>/monitor.json
#   session_log_exporter: true     # Write a shadow session log from spans
#   usage_events_phase: true       # Write phase-level usage event logs
# Set OTEL_EXPORTER_OTLP_ENDPOINT to also export spans and metrics through OTLP HTTP.
# Optional OTLP overrides: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.

# Analytics
# analytics:
#   enabled: true                  # Enable local analytics collection
#   events_path: ~/.takt/analytics/events  # Custom events directory
#   retention_days: 30             # Retention period for event files

# Interactive mode
# interactive_preview_steps: 3 # Number of step previews in interactive mode (0-10)
# assistant:
#   formal_spec:
#     mode: 'y/N'              # true/false never asks; Y/n or y/N asks on TTY (unset: y/N)
#     comments: true            # Require natural-language meaning comments for formal constructs (default: true)
# Gherkin guidance applies only to development and implementation tasks. Deprecated assistant.gherkin is warned about and ignored without migration.

# Provider routing for workflow steps (recommended)
# provider_routing:
#   personas:
#     coder:
#       provider: codex
#       model: gpt-5
#       provider_options:
#         codex:
#           reasoning_effort: high
#   tags:
#     implementation:
#       provider: codex
#       model: gpt-5
#     review:
#       provider: opencode
#       model: ollama-cloud/qwen3.5:397b
#     final-gate:
#       provider: codex
#       model: gpt-5
#       provider_options:
#         codex:
#           reasoning_effort: high
#     edit:
#       provider_options:
#         codex:
#           network_access: true
#   steps:
#     ai-antipattern-review-2nd:
#       provider: opencode
#       model: ollama-cloud/qwen3.5:397b

# Legacy display-name based provider overrides (deprecated; prefer provider_routing)
# persona_providers:
#   coder:
#     provider: codex
#     model: gpt-5

# Provider-specific options (config defaults; env-resolved leaf overrides win, otherwise step > provider_routing > deprecated persona_providers > workflow > project > global)
# provider_options:
#   codex:
#     network_access: true
#     skills:
#       repo: false
#       user: false
#   opencode:
#     variant: high
#   claude:
#     skills:
#       enabled: false
#     sandbox:
#       allow_unsandboxed_commands: true

# Provider permission profiles
# provider_profiles:
#   claude:
#     default_permission_mode: edit
#   codex:
#     default_permission_mode: edit

# Runtime environment preparation
# runtime:
#   prepare: [node, gradle, ./custom-script.sh]

# Workflow YAML command gate policy
# workflow_command_gates:
#   custom_scripts: false

# Workflow-level overrides
# workflow_overrides:
#   quality_gates:
#     - "All tests pass" # AI completion directive
#     - type: command    # Machine-executed gate after step completion
#       name: quality-check
#       command: "./.takt/quality-gates/check.sh"
#       timeout_ms: 300000
#   quality_gates_edit_only: true
#   steps:
#     review:
#       quality_gates:
#         - "No security vulnerabilities"
#   personas:
#     coder:
#       quality_gates:
#         - "Code follows conventions"

# Credentials (environment variables take priority)
# anthropic_api_key: "sk-ant-..." # Claude API key
# openai_api_key: "sk-..."         # Codex/OpenAI API key
# gemini_api_key: "..."            # Gemini API key
# google_api_key: "..."            # Google API key
# groq_api_key: "..."              # Groq API key
# openrouter_api_key: "..."        # OpenRouter API key
# opencode_api_key: "..."          # OpenCode API key
# cursor_api_key: "..."            # Cursor API key
# kiro_api_key: "..."              # Kiro API key

# CLI paths
# codex_cli_path: "/absolute/path/to/codex"    # Absolute path to Codex CLI
# claude_cli_path: "/absolute/path/to/claude"  # Absolute path to Claude Code CLI
# cursor_cli_path: "/absolute/path/to/cursor"  # Absolute path to cursor-agent CLI
# copilot_cli_path: "/absolute/path/to/copilot" # Absolute path to Copilot CLI
# kiro_cli_path: "/absolute/path/to/kiro-cli"   # Absolute path to Kiro CLI
# copilot_github_token: "ghp_..."              # Copilot GitHub token

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

# Workflow list / categories
# enable_builtin_workflows: true                          # Enable built-in workflows from builtins/{lang}/workflows
# disabled_builtins:
#   - magi                                                # Built-in workflow names to disable
# workflow_categories_file: ~/.takt/preferences/workflow-categories.yaml  # Category definition file
