#compdef nerf
# NERF shell completions for zsh
# Install: cp completions/nerf.zsh ~/.zsh/completions/_nerf
#   or: fpath=(path/to/completions $fpath) && compinit

_nerf() {
    local -a commands modes

    commands=(
        'analyze:Cross-artifact consistency analysis'
        'api:Start REST API server'
        'benchmark:Run CTF benchmark suite'
        'bot:Start Signal bot'
        'chain:Run multi-mode agent chain'
        'compliance:Compliance framework assessment'
        'council:Multi-model consensus analysis'
        'diff:Analyze git diff for security issues'
        'doctor:System health check'
        'domains:List skill domains and technique counts'
        'feedback:Analyze response quality'
        'guardrail:Safety guardrail check'
        'ingest:Ingest documents into memory'
        'leaderboard:Show benchmark leaderboard'
        'marketplace:Plugin marketplace'
        'mcp:Start MCP server (stdio)'
        'memory-export:Export memory database'
        'memory-import:Import memory database'
        'osint:OSINT investigation'
        'panel:Expert panel assessment'
        'plugin:Manage plugins'
        'query:Security query'
        'resume:Resume interrupted session'
        'review:Code security review'
        'sarif:Generate SARIF report'
        'scan:Run security scan'
        'score:Security posture score'
        'search:Search skills and techniques'
        'setup:Run setup wizard'
        'setup-signal:Configure Signal bot'
        'shard:Shard analysis across models'
        'skills:List available skills'
        'stats:Platform statistics'
        'status:Show current status'
        'store:Store memory entry'
        'update:Check for updates'
        'version:Show version'
        'workflow:Generate security workflow'
    )

    modes=(
        'red:RED mode (offensive security)'
        'blue:BLUE mode (defensive security)'
        'incident:INCIDENT mode (IR/forensics)'
        'purple:PURPLE mode (detection engineering)'
        'recon:RECON mode (OSINT)'
        'privacy:PRIVACY mode (GDPR/CCPA/HIPAA)'
        'architect:ARCHITECT mode (threat modeling)'
        'researcher:RESEARCHER mode (vuln research)'
        'build:BUILD mode (security tooling)'
    )

    _arguments \
        '--auto[Run in auto execution mode]' \
        '--backend[LLM backend override]:backend:(claude ollama openai openrouter openai-compat pi-ai)' \
        '--no-stream[Disable streaming output]' \
        '1:command:->cmd'

    case $state in
        cmd)
            _describe 'nerf commands' commands
            _describe 'auto mode' modes
            ;;
    esac
}

_nerf
