1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! kranz CLI — clap surface, command implementations, and terminal rendering.
//!
//! The binary (`src/main.rs`) is a thin shim over this library so the
//! integration tests can drive argument parsing, status rendering, control
//! enqueueing and mission selection directly, without spawning processes
//! (and without ever spawning a real `claude` binary).
//!
//! Module map:
//! - [`cli`] — the clap derive types (`kranz <subcommand>`)
//! - [`commands`] — one function per subcommand + shared helpers
//! - [`config_cmd`] — `kranz config show|set|unset|role` (layered files +
//! mid-mission role changes)
//! - [`exec`] — `kranz exec -f mission.md`, fully headless missions for CI
//! - [`hook_guard`] — `kranz hook-guard`, the Claude Code lifecycle-hook
//! command the engine installs into worker sessions (internal plumbing)
//! - [`hook_status`] — `kranz hook-status`, the cursor CLI lifecycle-hook
//! signal relay (internal plumbing, observational only)
//! - [`otel`] — event-log-to-span mapping for the `kranz otel` sidecar
//! - [`output`] — pure rendering (status tree, plan review, cost estimate)
//! - [`ready`] — repo-readiness scorecard for onboarding
//! - [`tail`] — the live event printer used by `kranz run`
//! - [`planning_tui`] — the full-screen interactive planning UI