//! Command Router Module - clap-noun-verb v3.4.0 Auto-Discovery
//!
//! This module provides the entry point for clap-noun-verb auto-discovery.
//! All noun modules with #[verb] functions are automatically discovered and registered.
//!
//! ## Architecture
//! ```
//! cmds (router) → auto-discovery → #[verb] functions → domain (async logic)
//! ```

// Command modules - clap-noun-verb auto-discovery
pub mod ai;
pub mod graph;
pub mod hook;
pub mod marketplace;
pub mod project;
pub mod template;
pub mod utils;

use ggen_utils::error::Result;

/// Setup and run the command router using clap-noun-verb v3.4.0 auto-discovery
pub fn run_cli() -> Result<()> {
    // Use clap-noun-verb's auto-discovery to find all #[verb] functions
    clap_noun_verb::run()
        .map_err(|e| anyhow::anyhow!("CLI execution failed: {}", e))?;
    Ok(())
}
