# Provider Capability Matrix
#
# Single authoritative source of truth for what each provider supports
# natively vs. via AIWG emulation. Machine-readable; consumed by:
#   - src/providers/capability-matrix.ts  (TypeScript loader)
#   - aiwg runtime-info --capabilities    (CLI display)
#   - aiwg steward capabilities           (steward awareness)
#   - Scheduler (#597), Agent Teams (#598), Steward (#599) routing
#
# @issue #604
# @unblocks #597, #598, #599

version: "1.0"

providers:
  claude-code:
    display_name: Claude Code
    status: stable
    daemon_tier: native
    daemon_pty_adapter: true
    artifact_paths:
      agents: .claude/agents/
      commands: .claude/commands/
      skills: .claude/skills/
      rules: .claude/rules/
      behaviors: .claude/rules/behaviors/
    native_features:
      cron: true
      agent_teams: true
      tasks: true
      mcp: true
      behaviors: false
      mission_control: false
      daemon: true
    emulation:
      cron: native
      agent_teams: native
      tasks: native
      mcp: native
      behaviors: hooks
      mission_control: aiwg-mc
      daemon: native
    hook_wiring:
      at_link_support: true
      hook_file: AIWG.md
      hook_directive: "@AIWG.md"
      context_file: CLAUDE.md
    deploy_target: project
    aggregated_output: false
    agent_capabilities:
      default:
        context_window: 200000
        max_output_tokens: 12000
        max_tool_calls: 40
        max_concurrent_subagents: 4
        supports_streaming: true
        million_context_requires_extra_usage: true
        quota_available: false
        recovery:
          context_overflow: retry_with_prefiltered_context
          quota_exhausted: retry_with_standard_context
          timeout: retry_with_smaller_scope
      architecture-designer:
        context_window: 200000
      api-designer:
        context_window: 200000
        notes: Avoid 1M-context model unless extra usage is enabled.
      requirements-analyst:
        context_window: 200000
        notes: Avoid 1M-context model unless extra usage is enabled.

  codex:
    display_name: OpenAI Codex
    aliases:
      - openai
    status: stable
    daemon_tier: native
    daemon_pty_adapter: true
    artifact_paths:
      agents: .codex/agents/
      commands: "~/.codex/prompts/"
      skills: "~/.codex/skills/"
      skills_cross_agent: .agents/skills/
      rules: .codex/rules/
      behaviors: .codex/rules/behaviors/
    native_features:
      cron: false
      agent_teams: false
      tasks: false
      mcp: false
      behaviors: false
      mission_control: false
      daemon: true
    emulation:
      cron: aiwg-schedule
      agent_teams: aiwg-mc
      tasks: aiwg-mc
      mcp: null
      behaviors: aiwg-mc
      mission_control: aiwg-mc
      daemon: native
    hook_wiring:
      at_link_support: false
      hook_file: AIWG-codex.md
      fallback: full-inject
      context_file: CODEX.md
    deploy_target: mixed
    aggregated_output: true
    agent_capabilities:
      default:
        context_window: 200000
        max_output_tokens: 12000
        max_tool_calls: 40
        max_concurrent_subagents: 4
        supports_streaming: true
        million_context_requires_extra_usage: false
        quota_available: true
        recovery:
          context_overflow: retry_with_prefiltered_context
          quota_exhausted: retry_with_different_model
          timeout: retry_with_smaller_scope

  copilot:
    display_name: GitHub Copilot
    status: stable
    daemon_tier: unsupported
    daemon_pty_adapter: false
    artifact_paths:
      agents: .github/agents/
      commands: .github/agents/
      skills: .github/skills/
      rules: .github/copilot-rules/
      behaviors: .github/instructions/aiwg-behaviors/
    native_features:
      cron: false
      agent_teams: false
      tasks: false
      mcp: false
      behaviors: false
      mission_control: false
      daemon: false
    emulation:
      cron: aiwg-schedule
      agent_teams: aiwg-mc
      tasks: aiwg-mc
      mcp: null
      behaviors: aiwg-mc
      mission_control: aiwg-mc
      daemon: null
    hook_wiring:
      at_link_support: false
      hook_file: AIWG-copilot.md
      fallback: full-inject
      context_file: .github/copilot-instructions.md
    deploy_target: project
    aggregated_output: false

  factory:
    display_name: Factory AI
    status: stable
    # droid CLI runs headless via `droid exec`; AIWG daemon provides persistence layer
    daemon_tier: tier1
    daemon_pty_adapter: true
    artifact_paths:
      agents: .factory/droids/
      commands: .factory/commands/
      skills: .factory/skills/
      rules: .factory/rules/
      behaviors: .factory/rules/behaviors/
    native_features:
      cron: false
      agent_teams: true       # Missions (multi-agent orchestration)
      tasks: true             # Task tool for subagent delegation
      mcp: true               # Native MCP support (stdio + HTTP transports)
      behaviors: false
      mission_control: true   # Factory Missions maps to MC concept
      daemon: false           # No native persistent daemon; AIWG daemon wraps droid exec
    emulation:
      cron: aiwg-schedule
      agent_teams: null       # native Missions
      tasks: null             # native Task tool
      mcp: null               # native MCP
      behaviors: aiwg-mc
      mission_control: null   # native Missions
      daemon: aiwg-daemon     # AIWG daemon provides persistence for headless droid exec
    hook_wiring:
      at_link_support: false
      hook_file: AIWG-factory.md
      fallback: full-inject
      context_file: AGENTS.md
    deploy_target: project
    aggregated_output: false

  cursor:
    display_name: Cursor IDE
    status: stable
    # Cursor requires a display server (VS Code extension host) — daemon not supported
    daemon_tier: unsupported
    daemon_pty_adapter: false
    artifact_paths:
      agents: .cursor/agents/
      commands: .cursor/commands/
      skills: .cursor/skills/
      rules: .cursor/rules/
      behaviors: .cursor/rules/behaviors/
    native_features:
      cron: false
      agent_teams: false
      tasks: false
      mcp: false
      behaviors: false
      mission_control: false
      daemon: false
    emulation:
      cron: aiwg-schedule
      agent_teams: aiwg-mc
      tasks: aiwg-mc
      mcp: null
      behaviors: aiwg-mc
      mission_control: aiwg-mc
      daemon: null
    hook_wiring:
      at_link_support: true
      hook_file: AIWG-cursor.md
      hook_directive: "@AIWG-cursor.md"
      context_file: .cursorrules
    deploy_target: project
    aggregated_output: false

  opencode:
    display_name: OpenCode
    status: stable
    daemon_tier: native
    daemon_pty_adapter: false
    artifact_paths:
      agents: .opencode/agent/
      commands: .opencode/command/
      skills: .opencode/skill/
      rules: .opencode/rule/
      behaviors: .opencode/rule/behaviors/
    native_features:
      cron: false
      agent_teams: false
      tasks: false
      mcp: false
      behaviors: false
      mission_control: false
      daemon: true
    emulation:
      cron: aiwg-schedule
      agent_teams: aiwg-mc
      tasks: aiwg-mc
      mcp: null
      behaviors: aiwg-mc
      mission_control: aiwg-mc
      daemon: native
    hook_wiring:
      at_link_support: true
      hook_file: AIWG-opencode.md
      hook_directive: "@AIWG-opencode.md"
      context_file: .opencode/context.md
    deploy_target: project
    aggregated_output: false

  warp:
    display_name: Warp Terminal
    status: stable
    daemon_tier: native
    daemon_pty_adapter: false
    artifact_paths:
      agents: .warp/agents/
      commands: .warp/commands/
      skills: .warp/skills/
      skills_cross_agent: .agents/skills/
      rules: .warp/rules/
      behaviors: .warp/rules/behaviors/
    native_features:
      cron: false
      agent_teams: false
      tasks: false
      mcp: false
      behaviors: false
      mission_control: false
      daemon: true
    emulation:
      cron: aiwg-schedule
      agent_teams: aiwg-mc
      tasks: aiwg-mc
      mcp: null
      behaviors: aiwg-mc
      mission_control: aiwg-mc
      daemon: native
    hook_wiring:
      at_link_support: true
      hook_file: AIWG-warp.md
      hook_directive: "@AIWG-warp.md"
      context_file: WARP.md
    deploy_target: project
    aggregated_output: true

  windsurf:
    display_name: Windsurf
    status: experimental
    # Windsurf is an IDE extension requiring VS Code host — daemon not supported
    daemon_tier: unsupported
    daemon_pty_adapter: false
    artifact_paths:
      agents: .windsurf/agents/
      commands: .windsurf/workflows/
      skills: .windsurf/skills/
      skills_cross_agent: .agents/skills/
      rules: .windsurf/rules/
      behaviors: .windsurf/rules/behaviors/
    native_features:
      cron: false
      agent_teams: false
      tasks: false
      mcp: false
      behaviors: false
      mission_control: false
      daemon: false
    emulation:
      cron: aiwg-schedule
      agent_teams: aiwg-mc
      tasks: aiwg-mc
      mcp: null
      behaviors: aiwg-mc
      mission_control: aiwg-mc
      daemon: null
    hook_wiring:
      at_link_support: false
      hook_file: AIWG-windsurf.md
      fallback: full-inject
      context_file: AGENTS.md
    deploy_target: project
    aggregated_output: true

  hermes:
    display_name: Hermes
    status: experimental
    daemon_tier: native
    daemon_pty_adapter: false
    artifact_paths:
      agents: AGENTS.md
      commands: "MCP: command-run"
      skills: "~/.hermes/skills/"
      skills_cross_agent: "~/.hermes/skills/.aiwg/"
      rules: "MCP: rule-list/rule-show"
      behaviors: .hermes/behaviors/
    native_features:
      cron: false
      agent_teams: false
      tasks: false
      mcp: true
      behaviors: false
      mission_control: false
      daemon: true
    emulation:
      cron: aiwg-schedule
      agent_teams: aiwg-mc
      tasks: aiwg-mc
      mcp: native
      behaviors: aiwg-mc
      mission_control: aiwg-mc
      daemon: native
    hook_wiring:
      at_link_support: false
      hook_file: .hermes.md
      fallback: full-inject
      context_file: AGENTS.md
    deploy_target: mixed
    aggregated_output: true

  openclaw:
    display_name: OpenClaw
    status: stable
    daemon_tier: native
    daemon_pty_adapter: false
    artifact_paths:
      agents: "~/.openclaw/agents/"
      commands: "~/.openclaw/commands/"
      skills: "~/.openclaw/skills/"
      rules: "~/.openclaw/rules/"
      behaviors: "~/.openclaw/behaviors/"
    native_features:
      cron: false
      agent_teams: false
      tasks: false
      mcp: true
      behaviors: true
      mission_control: false
      daemon: true
    emulation:
      cron: aiwg-schedule
      agent_teams: aiwg-mc
      tasks: aiwg-mc
      mcp: native
      behaviors: native
      mission_control: aiwg-mc
      daemon: native
    hook_wiring:
      at_link_support: false
      context_file: "~/.openclaw/config.yaml"
    deploy_target: home
    aggregated_output: false

# Feature definitions — documents what each feature key means and
# what emulation strategies are available when native support is absent.
features:
  cron:
    description: Scheduled task execution (recurring triggers)
    native_example: Claude Code CronCreate/CronList/CronDelete tools
    emulation_strategies:
      aiwg-schedule: AIWG schedule CLI with remote triggers
  agent_teams:
    description: Multi-agent orchestration with team coordination
    native_example: Claude Code native agent teams
    emulation_strategies:
      aiwg-mc: AIWG Mission Control background orchestration
  tasks:
    description: Spawn focused sub-tasks or sub-agents
    native_example: Claude Code Task tool
    emulation_strategies:
      aiwg-mc: AIWG Mission Control dispatch
  mcp:
    description: Model Context Protocol server integration
    native_example: Claude Code MCP tool access
    emulation_strategies: {}
  behaviors:
    description: Reactive capabilities triggered by events (hooks/scripts)
    native_example: OpenClaw behavior directories with BEHAVIOR.md + scripts/
    emulation_strategies:
      hooks: Pre/post-tool hooks as behavior emulation
      aiwg-mc: Background monitoring via Mission Control
  mission_control:
    description: Background multi-task orchestration with monitoring
    native_example: null
    emulation_strategies:
      aiwg-mc: AIWG mc start/dispatch/status/watch CLI
  daemon:
    description: >
      Persistent background process for headless/unattended operation.
      Tier 1 (native): full daemon support via aiwg daemon start/stop/status.
      Tier 2 (pty-adapter): PTY bridge for platforms with a TUI but no headless mode.
      Tier 3 (unsupported): requires a display server or IDE host; daemon not applicable.
    native_example: aiwg daemon start (Claude Code, OpenCode, Warp, OpenClaw, Codex)
    emulation_strategies:
      pty-adapter: node-pty bridge for TUI platforms (Claude Code, Codex secondary mode)
