m decompose run CLI command.
Accepts a task prompt (from a text file or interactive input), calls the multi-step
LLM decomposition pipeline to produce a structured list of subtasks each with
constraints and inter-subtask dependencies, then validates and topologically reorders
the subtasks before writing a JSON result file and a rendered Python script to the
specified output directory.
Functions
FUNC reorder_subtasks
depends_on relationships.
Args:
subtasks: List of subtask dicts, each with a"tag"and optional"depends_on"field.
- list[DecompSubtasksResult]: The subtasks reordered so that dependencies
- come before dependents, with numbering prefixes updated.
ValueError: If a circular dependency is detected.
FUNC verify_user_variables
decomp_data: The decomposition pipeline result containing subtasks.input_var: User-provided input variable names, orNonefor none.
- The (possibly reordered) decomposition data.
ValueError: If a subtask requires an input variable that was not provided, or depends on a subtask tag that does not exist.
FUNC run
m decompose CLI workflow and writes generated outputs.
Reads user queries from a file or interactive input, runs the decomposition
pipeline for each task job, and writes one JSON file, one rendered Python
program, and any generated validation modules under a per-job output
directory.
Args:
out_dir: Existing directory under which per-job output directories are created.out_name: Base name used for the per-job output directory and generated files.input_file: Optional path to a text file containing one or more task prompts. Each non-empty line is processed as a separate task job. When omitted, the command prompts interactively for one task.model_id: Model identifier used for all decomposition pipeline stages.backend: Inference backend used to execute model calls.backend_req_timeout: Request timeout in seconds for backend inference calls.backend_endpoint: Endpoint URL or base URL required by remote backends.backend_api_key: API key required by remote backends.version: Template version used to render the generated Python program.latestresolves to the most recently declared concrete version.input_var: Optional user input variable names to expose in generated prompts and programs. Each name must be a valid non-keyword Python identifier.log_mode: Logging verbosity for CLI and pipeline execution.
AssertionError: Ifout_nameis invalid,out_dirdoes not name an existing directory,input_filedoes not name an existing file, or any declaredinput_varis not a valid Python identifier.ValueError: Ifinput_fileexists but contains no non-empty task lines.Exception: Propagates pipeline, rendering, parsing, or file-writing failures. Any output directories created earlier in the run are removed before the exception is re-raised.
Classes
CLASS DecompVersion
Available template versions for generated decomposition programs.
Newer concrete versions must be declared after older ones so that
latest can resolve to the most recently declared template version.
Attributes:
latest: Sentinel value that resolves to the last declared concrete template version.v1: Version 1 of the decomposition program template.v2: Version 2 of the decomposition program template.