---name: compose-to-alzodescription: Convert Docker Compose files into a native alzo.config.ts as a one-way migration. Use when asked to migrate or translate compose.yaml or docker-compose.yml to Alzo. Do not use to wrap, invoke, or preserve Compose at Alzo runtime.---# Compose to AlzoProduce a native Alzo graph that replaces the selected Compose model. Composeis migration input only: never generate `provision.compose`, a wrapper command,or a runtime dependency on `docker compose`.## Inspect safely1. Identify every Compose file, override, profile, and explicit environment file the user actually invokes. Do not guess production overlays.2. Read the source files so comments, extensions, and interpolation spellings remain visible.3. Obtain a canonical model without resolving environment values: ```sh docker compose -f compose.yaml config \ --format json --no-interpolate --no-env-resolution ``` Preserve the user's `-f` order. Never use `docker compose config --environment`, and never write resolved environment or secret values into the generated config or migration report.4. Read [references/mapping.md](references/mapping.md) before translating. Also inspect the installed `alzo` declarations, current runtime build plan, and target checkout's Alzo documentation. A declared field can still be reported as unhonoured by the selected builder; runtime capability wins if the reference has drifted.`docker compose config` is read-only. Do not run `up`, `down`, `rm`, or anotherlifecycle command unless the user separately authorizes runtime comparison.## Translate the model- Create ordinary `defineService`, `defineTask`, `defineBuild`, and `defineIngress` declarations. Preserve service identity, dependency meaning, readiness, persistent data, and externally fixed addresses.- Keep actively edited applications containerized unless the repository or user clearly chooses an Alzo host-process loop. Migration is not permission to redesign execution.- Use lexical handles for every dependency and connection value. Replace Compose service-name strings in environment values with outputs or addresses from those handles.- Preserve sourced secrets as sourced secrets. Use `secret()` only when the value must be present and redacted; do not turn an unresolved variable into a committed literal.- Preserve Compose's retained-volume behavior with `onRemove: 'retain'` unless the user explicitly chooses disposable per-worktree data.- Never silently omit a source field. Classify each unsupported or ambiguous behavior as blocking, an explicit accepted difference, or a user decision. Do not emit a passing configuration that changes behavior without saying so.Prefer one readable `alzo.config.ts`. Introduce helpers only where the sourcehas genuine repetition or generated service families.## ValidateRun the target repository's normal checks plus:```shalzo check --jsonalzo plan --json```These commands must not start either environment. If runtime comparison wasexplicitly requested, start one orchestrator at a time, verify the same healthand dependency behavior, and remove only resources created during that check.Finish with a migration report containing:- files and Compose profiles translated;- generated or changed Alzo files;- mapped services, tasks, dependencies, volumes, and probes;- every accepted difference and unresolved blocker;- exact validation commands and results.
---name: compose-to-alzodescription: Convert Docker Compose files into a native alzo.config.ts as a one-way migration. Use when asked to migrate or translate compose.yaml or docker-compose.yml to Alzo. Do not use to wrap, invoke, or preserve Compose at Alzo runtime.---# Compose to AlzoProduce a native Alzo graph that replaces the selected Compose model. Composeis migration input only: never generate `provision.compose`, a wrapper command,or a runtime dependency on `docker compose`.## Inspect safely1. Identify every Compose file, override, profile, and explicit environment file the user actually invokes. Do not guess production overlays.2. Read the source files so comments, extensions, and interpolation spellings remain visible.3. Obtain a canonical model without resolving environment values: ```sh docker compose -f compose.yaml config \ --format json --no-interpolate --no-env-resolution ``` Preserve the user's `-f` order. Never use `docker compose config --environment`, and never write resolved environment or secret values into the generated config or migration report.4. Read [references/mapping.md](references/mapping.md) before translating. Also inspect the installed `alzo` declarations, current runtime build plan, and target checkout's Alzo documentation. A declared field can still be reported as unhonoured by the selected builder; runtime capability wins if the reference has drifted.`docker compose config` is read-only. Do not run `up`, `down`, `rm`, or anotherlifecycle command unless the user separately authorizes runtime comparison.## Translate the model- Create ordinary `defineService`, `defineTask`, `defineBuild`, and `defineIngress` declarations. Preserve service identity, dependency meaning, readiness, persistent data, and externally fixed addresses.- Keep actively edited applications containerized unless the repository or user clearly chooses an Alzo host-process loop. Migration is not permission to redesign execution.- Use lexical handles for every dependency and connection value. Replace Compose service-name strings in environment values with outputs or addresses from those handles.- Preserve sourced secrets as sourced secrets. Use `secret()` only when the value must be present and redacted; do not turn an unresolved variable into a committed literal.- Preserve Compose's retained-volume behavior with `onRemove: 'retain'` unless the user explicitly chooses disposable per-worktree data.- Never silently omit a source field. Classify each unsupported or ambiguous behavior as blocking, an explicit accepted difference, or a user decision. Do not emit a passing configuration that changes behavior without saying so.Prefer one readable `alzo.config.ts`. Introduce helpers only where the sourcehas genuine repetition or generated service families.## ValidateRun the target repository's normal checks plus:```shalzo check --jsonalzo plan --json```These commands must not start either environment. If runtime comparison wasexplicitly requested, start one orchestrator at a time, verify the same healthand dependency behavior, and remove only resources created during that check.Finish with a migration report containing:- files and Compose profiles translated;- generated or changed Alzo files;- mapped services, tasks, dependencies, volumes, and probes;- every accepted difference and unresolved blocker;- exact validation commands and results.