Skip to main content

cmd_decompose

Function cmd_decompose 

Source
pub async fn cmd_decompose(
    repo: PathBuf,
    goal: &str,
    yes: bool,
    dangerously_allow_all: bool,
) -> Result<i32>
Expand description

kranz decompose <goal> [--yes]: one planner turn decomposes a complex goal into a blocked-by ticket DAG (design: .kranz/tickets/ ticket-dag-decomposition.md). The proposed DAG is always printed; tickets are written only with --yes (dry-run preview otherwise), all-or-none — any validation refusal (slug rules, unknown blocker, missing root, cycle) writes nothing.

The sequencing core (planner turn, validation, staged write) lives in kranz_engine::decompose; this wrapper keeps the CLI-only concerns — config/backend resolution (the same call path as cmd_draft) and printing. Emitted tickets flow through the normal draft/queue pipeline.