# 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: unsupported
    daemon_pty_adapter: false
    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: false
    emulation:
      cron: native
      agent_teams: native
      tasks: native
      mcp: native
      behaviors: hooks
      mission_control: aiwg-mc
      daemon: null
    hook_wiring:
      at_link_support: true
      hook_file: AIWG.md
      hook_directive: "@AIWG.md"
      context_file: CLAUDE.md
    # Interactive-question (native UX) capability — consumed by the native-ux-tools
    # rule and steward routing (#1668). `native` => agent may call the tool directly.
    interaction:
      structured_questions: native
      tool: AskUserQuestion
      notes: Always available in the agent tool surface.
    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: unsupported
    daemon_pty_adapter: false
    artifact_paths:
      agents: .codex/agents/
      commands: "~/.codex/prompts/"
      # Project-local .agents/skills/ is the cross-provider canonical path
      # codex-rs scans (codex-rs/core-skills/src/loader.rs). The legacy
      # ~/.codex/skills/ home dir is deprecated and pruned on deploy — writing
      # both made codex list every kernel skill twice (#766 regression fix).
      skills: .agents/skills/
      skills_legacy_deprecated: "~/.codex/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: false
    emulation:
      cron: external-trigger
      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-codex.md
      fallback: full-inject
      context_file: CODEX.md
    # Interactive-question (native UX) capability — see native-ux-tools rule (#1668).
    # Agent-initiated `request_user_input` is mode-gated and OFF by default
    # (feature `default_mode_request_user_input`, "under development"); MCP elicitation
    # (`tool_call_mcp_elicitation`, stable) is the server-initiated structured path.
    interaction:
      structured_questions: mode_gated
      tool: request_user_input
      feature_flag: default_mode_request_user_input
      default_available: false
      mcp_elicitation: stable
      fallback: markdown
      notes: >-
        In Default mode the agent has no interactive-question tool; falls back to
        formatted markdown. Structured forms reach the user via MCP elicitation.
    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: null
      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: unsupported
    daemon_pty_adapter: false
    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
    emulation:
      cron: null
      agent_teams: null       # native Missions
      tasks: null             # native Task tool
      mcp: null               # native MCP
      behaviors: aiwg-mc
      mission_control: null   # native Missions
      daemon: null
    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: null
      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: unsupported
    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: false
    emulation:
      cron: null
      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-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: unsupported
    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: false
    emulation:
      cron: null
      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-warp.md
      hook_directive: "@AIWG-warp.md"
      context_file: WARP.md
    deploy_target: project
    aggregated_output: true

  windsurf:
    display_name: Devin Desktop
    status: stable
    # Devin Desktop uses the Windsurf compatibility surface and requires a 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: null
      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

  grokbot:
    display_name: Grok Bot
    status: stable
    # Multi-agent desktop assistant runtime. Distinct from Cursor IDE and from
    # xAI Grok Build / API. Native skill root is operator-configured via
    # AIWG_GROKBOT_SKILLS_DIR (fail-closed; no invented ~/.grokbot).
    # ADR: docs/architecture/adr-grokbot-provider-target.md · epic #196.
    # Optional natives (routines/CreateAgent/connectors) deferred #209 — does not block stable.
    # #210: stable via Linux PUW + security + migration + maintainer waiver (no macOS/Windows gate).
    daemon_tier: unsupported
    daemon_pty_adapter: false
    artifact_paths:
      agents: "Indexed: aiwg discover / aiwg show agent"   # native CreateAgent teammates are Grok-owned (#209)
      commands: "Indexed: aiwg discover / aiwg show command"
      skills: "AIWG_GROKBOT_SKILLS_DIR when configured (fail-closed)"
      skills_cross_agent: "AIWG_GROKBOT_SKILLS_DIR/.aiwg/skills with --copy-all"
      rules: "Indexed: aiwg show rule + AGENTS.md discover-first bridge"
      behaviors: "Unsupported as automatic AIWG artifact; map manually to Grok routines (#209)"
    native_features:
      cron: true            # Grok routines — capability present; AIWG does not own the clock
      agent_teams: true     # CreateAgent/teammates — Grok-owned orchestration
      tasks: false          # no verified separate task contract
      mcp: true             # connectors/dynamic tools — capability; AIWG MCP install deferred #209
      behaviors: false
      mission_control: false
      daemon: false
    emulation:
      cron: null
      agent_teams: null
      tasks: aiwg-mc
      mcp: null
      behaviors: aiwg-mc
      mission_control: aiwg-mc
      daemon: null
    hook_wiring:
      at_link_support: false
      hook_file: null
      fallback: full-inject
      context_file: AGENTS.md
    deploy_target: mixed
    aggregated_output: false

  grok-build:
    display_name: Grok Build
    status: experimental
    # xAI Grok Build CLI/TUI. Distinct from Grok Bot (`grokbot`).
    # Wave 1 (#2575): native kernel skills + AGENTS.md. Agents/rules writers deferred #2577.
    daemon_tier: unsupported
    daemon_pty_adapter: false
    artifact_paths:
      agents: "Indexed: aiwg discover / aiwg show agent (native .grok/agents writer deferred #2577)"
      commands: null
      skills: .grok/skills/
      skills_cross_agent: .grok/.aiwg/skills/  # --copy-all opt-in mirror
      rules: "Indexed: aiwg show rule + AGENTS.md / host .grok/rules (AIWG writer deferred #2577)"
      behaviors: null
    native_features:
      cron: false
      agent_teams: false
      tasks: false
      mcp: true
      behaviors: false
      mission_control: false
      daemon: false
    emulation:
      cron: null
      agent_teams: null
      tasks: aiwg-mc
      mcp: null
      behaviors: aiwg-mc
      mission_control: aiwg-mc
      daemon: null
    hook_wiring:
      at_link_support: false
      hook_file: null
      fallback: full-inject
      context_file: AGENTS.md
    deploy_target: mixed
    aggregated_output: false

  hermes:
    display_name: Hermes
    status: stable
    daemon_tier: unsupported
    daemon_pty_adapter: false
    artifact_paths:
      # MCP is OPTIONAL for Hermes (validated v2026.5.13, #1527): it integrates
      # like Claude Code / Codex via file deploy + aiwg discover/show + AGENTS.md
      # bridge. The "MCP:" entries below are the optional enrichment path, not a
      # requirement. Broader MCP modernization: #1533.
      agents: AGENTS.md
      commands: "Indexed: aiwg discover / aiwg show command (MCP command-run optional)"
      skills: "~/.hermes/skills/"
      skills_cross_agent: "~/.hermes/skills/.aiwg/"
      rules: "AGENTS.md ### Rule sections + aiwg show rule (MCP rule-list/rule-show optional)"
      behaviors: .hermes/behaviors/
    native_features:
      cron: false
      agent_teams: false
      tasks: false
      mcp: true
      behaviors: false
      mission_control: false
      daemon: false
    emulation:
      cron: null
      agent_teams: aiwg-mc
      tasks: aiwg-mc
      mcp: native
      behaviors: aiwg-mc
      mission_control: aiwg-mc
      daemon: null
    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: unsupported
    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: false
    emulation:
      cron: null
      agent_teams: aiwg-mc
      tasks: aiwg-mc
      mcp: native
      behaviors: native
      mission_control: aiwg-mc
      daemon: null
    hook_wiring:
      at_link_support: false
      context_file: "~/.openclaw/config.yaml"
    deploy_target: home
    aggregated_output: false

  openhuman:
    display_name: OpenHuman
    status: experimental
    # tinyhumansai/openhuman — OSS personal-AI runtime (Rust core + Tauri shell).
    # AIWG-convention-aware out of the box (.agents/, AGENTS.md, .claude/, .codex/).
    # Bidirectional: OpenHuman can also DRIVE claude_code/factory as inference
    # backends. Induction epic #1552; agent decision adr-openhuman-agent-target.
    daemon_tier: unsupported
    daemon_pty_adapter: false
    artifact_paths:
      agents: "Indexed: aiwg discover / aiwg show agent"   # native TOML harness agents are opt-in (#1559)
      commands: "Indexed: aiwg discover / aiwg show command"
      skills: "~/.openhuman/skills/"                      # global/home-dir like OpenClaw — ungated user-scope native scan (ops_discover.rs); same root OpenHuman's own installer writes to (#1553)
      skills_cross_agent: "~/.openhuman/.aiwg/skills/"
      rules: "AGENTS.md ### Rule sections + aiwg show rule"
      behaviors: "(not supported)"
    native_features:
      cron: false
      agent_teams: false
      tasks: false
      mcp: false
      behaviors: false
      mission_control: false
      daemon: false
    emulation:
      cron: null
      agent_teams: aiwg-mc
      tasks: aiwg-mc
      mcp: null
      behaviors: aiwg-mc
      mission_control: aiwg-mc
      daemon: null
    hook_wiring:
      at_link_support: false
      context_file: AGENTS.md
    deploy_target: mixed
    aggregated_output: true

  antigravity:
    display_name: Google Antigravity CLI
    aliases:
      - agy
    status: experimental
    executable: agy
    qualified_version: 1.1.26
    qualification_evidence: agentic/code/providers/antigravity/provider-contract.v1.json
    daemon_tier: unsupported
    daemon_pty_adapter: false
    artifact_paths:
      agents: .agents/agents/
      commands: "(not deployed; no qualified native command surface)"
      skills: .agents/skills/
      rules: AGENTS.md
      behaviors: "(not supported)"
      mcp_project: .agents/mcp_config.json
      mcp_user: "~/.gemini/config/mcp_config.json"
    native_features:
      cron: false
      agent_teams: false
      tasks: false
      mcp: true
      behaviors: false
      mission_control: false
      daemon: false
    emulation:
      cron: external-trigger
      agent_teams: aiwg-mc
      tasks: aiwg-mc
      mcp: native
      behaviors: null
      mission_control: aiwg-mc
      daemon: null
    hook_wiring:
      at_link_support: false
      fallback: full-inject
      context_file: AGENTS.md
    interaction:
      structured_questions: none
      fallback: markdown
      notes: No stable structured-question tool contract was qualified for CLI 1.1.26.
    deploy_target: project
    aggregated_output: false

  deepseek-harness:
    display_name: DeepSeek Harness
    aliases:
      - dsh
    status: experimental
    daemon_tier: unsupported
    daemon_pty_adapter: false
    artifact_paths:
      agents: .agents/skills/
      commands: null
      skills: .agents/skills/
      rules: AGENTS.md
      behaviors: null
      cordis_patch: .dsh/aiwg.cordis.patch.yml
    native_features:
      cron: false
      agent_teams: true
      tasks: true
      mcp: true
      behaviors: true
      mission_control: false
      daemon: false
    emulation:
      cron: external-trigger
      agent_teams: native
      tasks: native
      mcp: native
      behaviors: null
      mission_control: aiwg-mc
      daemon: null
    hook_wiring:
      at_link_support: false
      fallback: full-inject
      context_file: AGENTS.md
      max_bytes: 65536
    interaction:
      structured_questions: none
      fallback: markdown
      notes: Headless and SDK profiles do not expose an interactive question UI.
    deploy_target: project
    aggregated_output: false

  pi:
    display_name: Pi Coding Agent
    aliases:
      - pi-coding-agent
    status: experimental
    daemon_tier: unsupported
    daemon_pty_adapter: false
    artifact_paths:
      agents: .agents/skills/
      commands: .pi/prompts/
      skills: .pi/skills/
      skills_cross_agent: .agents/skills/
      rules: AGENTS.md
      behaviors: .pi/extensions/
    native_features:
      cron: false
      agent_teams: false
      tasks: false
      mcp: false
      behaviors: true
      mission_control: false
      daemon: false
    emulation:
      cron: external-trigger
      agent_teams: aiwg-mc
      tasks: aiwg-mc
      mcp: null
      behaviors: null
      mission_control: aiwg-mc
      daemon: null
    hook_wiring:
      at_link_support: false
      fallback: full-inject
      context_file: AGENTS.md
    interaction:
      structured_questions: none
      fallback: markdown
      notes: Pi does not expose a built-in structured question tool.
    deploy_target: project
    aggregated_output: false

  omp:
    display_name: Oh My Pi
    aliases:
      - oh-my-pi
    status: experimental
    daemon_tier: unsupported
    daemon_pty_adapter: false
    artifact_paths:
      agents: .omp/agents/
      commands: .omp/prompts/
      skills: .agents/skills/
      skills_cross_agent: .agents/skills/
      rules: .omp/rules/
      behaviors: .omp/extensions/
    native_features:
      cron: false
      agent_teams: true
      tasks: true
      mcp: true
      behaviors: true
      mission_control: false
      daemon: false
    emulation:
      cron: external-trigger
      agent_teams: null
      tasks: null
      mcp: null
      behaviors: null
      mission_control: aiwg-mc
      daemon: null
    hook_wiring:
      at_link_support: true
      fallback: full-inject
      context_file: .omp/AGENTS.md
    interaction:
      structured_questions: none
      fallback: markdown
      notes: OMP integration uses Markdown questions; native UI questions require an interactive runtime.
    deploy_target: project
    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:
      external-trigger: System cron, systemd timers, or CI own time and launch a reviewed provider command
  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: >
      Resident AIWG daemon lifecycle. The current production CLI does not expose
      a daemon command; bundled daemon sources are non-routable development artifacts.
    native_example: null
    emulation_strategies: {}
