#compdef airos

# AI Research OS — Zsh completions
# Install: cp completions/zsh _airos ~/.zsh/completion/_airos

_airos() {
  local -a commands
  commands=(
    'search:Search indexed papers'
    'research:Autonomous research loop'
    'list:List indexed papers'
    'import:Add papers to database by ID'
    'export:Export DB to CSV or JSON'
    'stats:Database statistics'
    'status:Processing status and queue'
    'queue:Manage pending paper queue'
    'cache:Manage paper cache'
    'dedup:Find exact duplicates'
    'dedup-semantic:Semantic deduplication'
    'similar:Find semantically similar papers'
    'citations:Show citation relationships'
    'cite-graph:Citation graph analysis'
    'cite-import:Bulk import citations'
    'cite-fetch:Fetch citations from OpenAlex'
    'cite-stats:Citation graph statistics'
    'kg:Knowledge graph query and rebuild'
    'merge:Merge duplicate papers'
    'paper2code:Generate code from paper'
    'evoskill:EvoSkill benchmark'
    'rag:RAG pipeline'
    'visual:Extract figures/formulas from PDF'
    'watch:Watch papers.json and auto-rebuild KG'
  )

  _arguments -C \
    '1: :->command' \
    '*:: :->args' && ret=0

  case $state in
    command)
      _describe 'command' commands && ret=0
      ;;
  esac
}

_airos "$@"
