#[doc(inline)]
pub use self::prelude::*;
pub mod claude_hook;
pub mod codex_hook;
pub mod compile;
pub mod dispatch;
pub mod guard;
pub mod wave_a_models;
pub mod wave_b1_mem;
pub mod wave_b1_status_handoff;
pub mod wave_b2_run;
pub mod wave_b2_seed;
pub mod wave_c_bootstrap;
pub mod wave_d_planning;
pub mod wave_e_coordination;
pub mod wave_f_knowledge;
pub mod wave_g_coordination;
pub mod wave_h_execution;
mod native_hook;
pub(crate) mod prelude {
pub use super::ShepherdCommand;
pub use super::claude_hook::ClaudeHookCmd;
pub use super::codex_hook::CodexHookCmd;
pub use super::compile::CompileCmd;
pub use super::dispatch::DispatchCmd;
pub use super::guard::GuardCmd;
pub use super::wave_a_models::WaveAModelsCmd;
pub use super::wave_b1_mem::WaveB1MemCmd;
pub use super::wave_b1_status_handoff::{WaveB1HandoffCmd, WaveB1StatusCmd};
pub use super::wave_b2_run::WaveB2RunCmd;
pub use super::wave_b2_seed::WaveB2SeedCmd;
pub use super::wave_c_bootstrap::{WaveCConfigCmd, WaveCDoctorCmd, WaveCHomeCmd, WaveCInitCmd};
pub use super::wave_d_planning::{
WaveDAuditCmd, WaveDCloseLaneCmd, WaveDDiscoveryCmd, WaveDGraphCmd, WaveDPlanCmd,
WaveDRenderCmd, WaveDReportCmd,
};
pub use super::wave_e_coordination::WaveECoordinationCmd;
pub use super::wave_f_knowledge::{
WaveFDupsCmd, WaveFEvalCmd, WaveFExportCmd, WaveFInsightsCmd, WaveFQueryCmd, WaveFSearchCmd,
};
pub use super::wave_g_coordination::{
WaveGSignalCmd, WaveGSyncCmd, WaveGTeammateCmd, WaveGWorktreeCmd,
};
pub use super::wave_h_execution::{
WaveHDeliverableCmd, WaveHIssuesCmd, WaveHLintCmd, WaveHReadyCmd, WaveHSprintCmd,
};
pub use crate::migrate::MigrateCmd;
}
#[derive(
Clone,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
clap::Subcommand,
serde::Deserialize,
serde::Serialize,
)]
pub enum ShepherdCommand {
Audit(WaveDAuditCmd),
Compile(CompileCmd),
ClaudeHook(ClaudeHookCmd),
CodexHook(CodexHookCmd),
CloseLane(WaveDCloseLaneCmd),
Config(WaveCConfigCmd),
Dispatch(DispatchCmd),
Discovery(WaveDDiscoveryCmd),
Doctor(WaveCDoctorCmd),
Deliverable(WaveHDeliverableCmd),
Dups(WaveFDupsCmd),
Eval(WaveFEvalCmd),
Export(WaveFExportCmd),
Guard(GuardCmd),
Graph(WaveDGraphCmd),
Handoff(WaveB1HandoffCmd),
Init(WaveCInitCmd),
Insights(WaveFInsightsCmd),
Issues(WaveHIssuesCmd),
Lint(WaveHLintCmd),
Lock(WaveECoordinationCmd),
Home(WaveCHomeCmd),
Migrate(MigrateCmd),
Mem(WaveB1MemCmd),
Models(WaveAModelsCmd),
Plan(WaveDPlanCmd),
Query(WaveFQueryCmd),
Render(WaveDRenderCmd),
Ready(WaveHReadyCmd),
Report(WaveDReportCmd),
Status(WaveB1StatusCmd),
Search(WaveFSearchCmd),
Seed(WaveB2SeedCmd),
Signal(WaveGSignalCmd),
Sprint(WaveHSprintCmd),
Sync(WaveGSyncCmd),
Teammate(WaveGTeammateCmd),
Run(WaveB2RunCmd),
Worktree(WaveGWorktreeCmd),
#[command(external_subcommand)]
Unsupported(Vec<String>),
}
impl ShepherdCommand {
pub(crate) fn run(
self,
globals: crate::interface::CliGlobals,
) -> Result<(), crate::interface::CliError> {
match self {
Self::Audit(command) => command.run(globals),
Self::Compile(command) => command.run(),
Self::ClaudeHook(command) => command.run(globals),
Self::CodexHook(command) => command.run(globals),
Self::CloseLane(command) => command.run(globals),
Self::Config(command) => command.run(globals),
Self::Dispatch(command) => command.run(globals),
Self::Discovery(command) => command.run(globals),
Self::Deliverable(command) => command.run(globals),
Self::Doctor(command) => command.run(globals),
Self::Dups(command) => command.run(globals),
Self::Eval(command) => command.run(globals),
Self::Export(command) => command.run(globals),
Self::Guard(command) => command.run(),
Self::Graph(command) => command.run(globals),
Self::Handoff(command) => command.run(globals),
Self::Init(command) => command.run(globals),
Self::Insights(command) => command.run(globals),
Self::Issues(command) => command.run(globals),
Self::Lint(command) => command.run(globals),
Self::Home(command) => command.run(globals),
Self::Lock(command) => command.run(globals),
Self::Migrate(command) => command.run(globals),
Self::Mem(command) => command.run(globals),
Self::Models(command) => command.run(globals),
Self::Plan(command) => command.run(globals),
Self::Query(command) => command.run(globals),
Self::Render(command) => command.run(globals),
Self::Ready(command) => command.run(globals),
Self::Report(command) => command.run(globals),
Self::Status(command) => command.run(globals),
Self::Search(command) => command.run(globals),
Self::Seed(command) => command.run(),
Self::Signal(command) => command.run(globals),
Self::Sprint(command) => command.run(globals),
Self::Sync(command) => command.run(globals),
Self::Teammate(command) => command.run(globals),
Self::Run(command) => command.run(globals),
Self::Worktree(command) => command.run(globals),
Self::Unsupported(arguments) => {
let command = arguments.first().map(String::as_str).unwrap_or("<empty>");
Err(crate::interface::CliError::message(format!(
"command `{command}` is unavailable in the canonical Rust CLI; legacy Python, Bash, and Node command authorities are retired"
)))
}
}
}
}