Skip to main content

Pipeline Mode

Pipeline mode is an interactive mode that runs work step by step. It is useful for infrastructure tasks that are longer or easier to get wrong than a normal chat request: understand the requirement, plan an approach, generate artifacts, ask the user to confirm, and then continue with the next actions.

Pipeline itself is a general capability. The built-in implementation available today is the selling pipeline. selling targets Alibaba Cloud infrastructure scenarios and can take a deployment request through candidate architectures, ROS templates, cost estimates, and deployment after confirmation.

Good requests for Pipeline mode include:

Select an existing VPC and create a VSwitch
Design a low-cost Alibaba Cloud web application deployment and generate a template

Start Pipeline Mode

Pipeline mode currently requires the interactive REPL. It cannot be combined with --prompt.

On macOS or Linux:

IAC_CODE_MODE=pipeline iac-code

On PowerShell:

$env:IAC_CODE_MODE = "pipeline"
iac-code

The default pipeline name is selling. To be explicit:

IAC_CODE_MODE=pipeline IAC_CODE_PIPELINE_NAME=selling iac-code

Pipeline and selling

NameMeaning
Pipeline modeIaC Code's general step-by-step execution mode for long flows, confirmation points, recovery, and progress display.
selling pipelineThe current built-in pipeline for Alibaba Cloud infrastructure design, template generation, cost estimation, and deployment.

If more pipelines are added later, select them with IAC_CODE_PIPELINE_NAME. The current release includes selling.

Environment Variables

VariablePurpose
IAC_CODE_MODE=pipelineEnables Pipeline mode. Any other value falls back to normal mode.
IAC_CODE_PIPELINE_NAMESelects the pipeline definition. The default is selling.
IAC_CODE_CWDOverrides the working directory used by the pipeline.
IAC_CODE_PIPELINE_SELLING_ENABLE_REVIEWINGEnables the optional template review step in the selling pipeline.

What happens in the selling pipeline

The selling pipeline breaks an infrastructure request into user-visible stages:

StageWhat you see
Understand the requirementIaC Code checks whether the request is an Alibaba Cloud infrastructure task. If important details are missing, it asks before generating a plan.
Plan architecturesIaC Code proposes one or more candidate architectures so you can compare tradeoffs.
Generate and evaluateIaC Code generates ROS templates for candidate plans and estimates resource costs.
Confirm a planIaC Code shows candidate details and waits for you to choose the plan to continue with.
DeployAfter a plan is selected, IaC Code enters the deployment stage and handles tools or higher-risk operations according to the permission policy.

If you mention constraints such as "use an existing VPC" or "do not create this resource type", the selling pipeline will try to respect them in later plans and templates. You do not need to know the internal fields; just write the constraints in the request.

Interaction and Recovery

Pipeline mode may pause and wait for user input, for example:

  • The requirement is unclear and IaC Code needs the target, scale, region, or budget.
  • There are multiple candidate plans and you need to choose one.
  • A tool or deployment action requires permission approval.
  • The run was interrupted and needs to be resumed or continued.

If the process exits or the session is interrupted, IaC Code saves the pipeline state. When you later return to the session with --resume, you can inspect the previous progress and continue from a recoverable point.

After the pipeline completes, fails, exits early, or is canceled, IaC Code switches back to normal chat. You can then ask follow-up questions, adjust the plan, or handle post-deployment issues.

Automation Integrations

Pipeline mode is currently primarily designed for the interactive REPL. A2A server mode can expose pipeline progress, artifacts, permission results, and recovery information, which is useful when connecting a pipeline to an external console or task system.

ACP does not currently support Pipeline mode. --prompt / Non-interactive Mode runs a normal one-shot request and does not execute Pipeline steps.

Current Limitations

  • The current release includes only the selling pipeline, mainly for Alibaba Cloud infrastructure workflows.
  • Pipeline mode requires the interactive REPL. --prompt is rejected when IAC_CODE_MODE=pipeline.
  • Pipeline mode supports text input. Images pasted into the REPL are ignored while the pipeline is active.
  • Mid-pipeline shell escapes, skill triggers, and most slash commands are restricted unless the pipeline definition explicitly allows them. Basic commands such as /help, /status, /resume, and /exit remain available.