ota-run/examples

July 29, 2026 · View on GitHub

Collections of solid, real-world examples you can copy, adapt, and use to see how ota removes hidden setup, repeated explanations, and brittle workflow glue.

If you are introducing ota to a team, start with the adoption flows first. They show how ota earns trust before you move into CI, execution boundaries, or adapter patterns.

The shortest public first-run lane is now:

  1. ota doctor
  2. ota detect --dry-run . or ota init --dry-run .
  3. ota validate
  4. ota up --dry-run
  5. ota up
  6. ota run <task> or ota proof runtime --workflow <name>

Use these as starting points when you want:

  • a repo contract you can adapt quickly
  • a first-week adoption flow for an existing repo
  • a workspace contract for multi-repo setup
  • a CI or release pattern built around ota
  • an execution boundary when host drift or remote execution is the problem
  • an extensions boundary when the repo needs custom check, export, or backend adapters

Layout

  • templates/ - starter contracts you can copy into a new repo
  • ci/ - provider-specific CI patterns
  • execution/ - container and remote execution patterns
  • execution/local-topology/ - task target-binding patterns for helper apps and probes
  • execution/os-aware/ - OS-specific launcher examples
  • extensions/ - check, export, and backend adapter patterns
  • workspace/ - multi-repo workspace patterns
  • workspace/adoption-flow/ - workspace onboarding and first-week adoption pattern
  • reference/ - canonical, production-adjacent repo examples

Choose by problem

Start with the smallest example that names your problem. Each example README explains the underlying contract shape; this page is a map, not a second contract reference.

If you need to...Start hereWhy
Write a first contracttemplates/node-service or templates/python-serviceCopyable workflow-first setup, toolchain ownership, hydration, and finite tasks.
Prove a local service runtimetemplates/node-serviceAdds .env.local bootstrap and a declared URL for ota proof runtime.
Adopt Ota in an existing reporeference/adoption-flowFlagship Java/Maven adoption with services, task prerequisites, docs, and release companions.
Model a production-shaped team reporeference/canonical-team-repoEnv policy, reusable surfaces, probe-backed readiness, and release-only requirements.
Add CI, container, or remote executionci or executionProvider patterns and execution-boundary examples.
Bootstrap several repositories togetherworkspace/adoption-flowFirst-week workspace adoption and multi-repo readiness.

Setup, toolchains, and hydration

ProblemExampleUse it when
Focused tool acquisitionreference/tool-acquisition-flowYou need workflow-scoped Corepack or command acquisition without a full repo shape.
Managed Rustreference/rust-toolchain-flowtoolchains.rust should own Rust rather than setup shell glue.
Managed Node and Corepackreference/node-corepack-toolchain-flowOne declaration should own Node, node, and Corepack activation.
Managed Java and SDKMANreference/java-sdkman-toolchain-flowJava is contract-owned while Maven remains an explicit standalone tool.
Generic dependency or image hydrationreference/task-prepare-dependency-hydrationA finite setup phase belongs in tasks.<name>.prepare.
Lockfile-backed Node package hydrationreference/task-prepare-package-hydrationOta should own pnpm, Yarn, or npm installation rather than a shell body.
Python .venv plus uv requirementsreference/task-prepare-uv-requirementsSetup owns deterministic virtualenv creation and requirements hydration.
Editable local Python project with uvreference/task-prepare-uv-local-projectOne checked-out package needs explicit extras, groups, source identity, and lockfile-aware replay truth.
Mixed ordered setupreference/task-prepare-sequenceOne setup lane needs several structural finite steps.
Orchestrator-owned hydrationreference/task-prepare-orchestrated-hydrationHydration is mediated by a declared orchestrator such as Devbox.
Compose-owned hydrationreference/task-prepare-compose-hydrationA declared Compose service owns typed package hydration.
Go module hydrationreference/task-prepare-go-module-hydrationSetup is go mod download, not shell glue.
Bundler hydrationreference/task-prepare-bundler-hydrationRepo-local gems and their Ruby toolchain need first-class ownership.

Runtime, environment, and proof

ProblemExampleUse it when
Runtime-owned bind projectionreference/launch-runtime-projectionA supported launch adapter should project host and port from runtime.listeners.
Service-derived environmentreference/service-env-bindingsTasks need endpoint-derived values such as DATABASE_URL rather than handwritten DSNs.
Deterministic .env creationreference/action-ensure-env-fileOta should own key replacement, generation, and stale-key removal.
Workflow-rendered dotenv artifactreference/workflow-rendered-envA workflow renders an environment file and projects it into Compose startup.
Live or staging verification effectsreference/task-effect-integration-testVerification uses real services or credentials and needs effects.network_kind: integration_test.
Runtime seam evidencereference/runtime-proof-evidenceReadiness is insufficient; distinguish reachable, exercised, and fault-controlled dependencies.
Human-only OAuth or terminal promptreference/command-interactionA finite structured command requires a real native terminal and refuses for agents or CI.
Workflow-scoped receipt historyreference/receipt-workflow-historyArchive, baseline, and snapshot history must stay in the selected workflow lane.
Fixed public URL overridereference/adoption-flowOperators need a one-run --host-port without changing the internal bind.
Internal graph plumbinginternal: trueSetup-only nodes should remain runnable through dependencies but stay out of normal ota tasks discovery.

Compose, containers, and adapters

ProblemExampleUse it when
Docker Compose inputs and publicationreference/compose-adapter-inputsCompose owns adapter root, env/file/profile/project inputs, typed hydration, and a service publication remap.
Podman Compose inputsreference/podman-compose-adapter-inputsThe same adapter-owned truth belongs to podman compose.
Bake file-stack inputsreference/bake-adapter-inputsdocker buildx bake owns its adapter root and file stack.
Build a Dockerfile imagereference/action-build-container-imageA task owns a local image required by a declared container or Compose lane.
Reset a Compose service volumereference/action-reset-compose-service-volumeA destructive local recovery lane owns stop, reset, and restart.
Ensure a shared container networkreference/action-ensure-container-networkSetup owns external Docker network readiness.
Container URL projectionexecution/container/node-serviceNative and container modes share an app contract while Ota resolves public URLs.
Typed systemd ownershipreference/systemd-host-serviceThe real service owner is systemd, not a shell wrapper.

Generated artifacts and deterministic bootstrap

ProblemExampleUse it when
Generated artifact lineagereference/task-generated-artifact-lineageA generator produces named source files consumed by downstream tasks.
Policy-governed replay inputsreference/policy-replay-input-identitySelected replay-sensitive closures must declare and match immutable input identities.
Bundled deterministic setupreference/action-ensure-bundleSetup owns several ordered deterministic actions.
Clone a required sibling checkoutreference/action-ensure-git-checkoutA setup lane owns clone-if-missing checkout materialization.
Materialize a Git templatereference/action-ensure-git-templateA scaffold or factory comes from a Git-backed template.

Local and remote topology

ProblemExampleUse it when
Run one task remotelyexecution/remote/templateYou need off-host execution without a shared backend boundary.
Share a remote backendexecution/remote/shared-remote-backend-minimalTwo remote tasks intentionally reuse one managed backend.
Activate a remote producerexecution/remote/shared-remote-backend-activationA helper targets a managed remote producer and asks Ota to prepare it.
Target a local producerexecution/local-topology/task-target-bindingA helper app or probe should use service identity instead of hardcoded host addresses.
Share a local container backendexecution/local-topology/shared-local-backend-minimalTwo long-running container tasks intentionally reuse one backend.
Share a local native backendexecution/local-topology/shared-local-backend-native-minimalTwo long-running native tasks intentionally reuse one host backend.
Co-locate a helper and producerexecution/local-topology/shared-local-backendContainer workloads share one backend and topology address view.
Fulfil a shared backendexecution/local-topology/shared-local-backend-fulfillmentOta must prepare the effective runtime/tool union before a bound task runs.
Policy-resolved backend imageexecution/local-topology/shared-local-backend-environmentPolicy resolves an approved shared-backend image.

Platform and workspace patterns

ProblemExampleUse it when
Windows-first adoptionreference/windows-adoption-flow.NET, PowerShell, and Windows-native tools need explicit cross-platform variants.
Serious Swift servicereference/swift-serviceYou need a production-adjacent non-Java reference shape.
CI and release flowciYou need provider-specific verification and release patterns.
OS-specific launchersexecution/os-awareLaunch commands branch by platform.
Custom adapters or providersextensionsThe repo needs staged check, export, or backend adapters.
Multi-repo bootstrapworkspace/monorepoOne workspace contract provisions several repositories.

Example types

  • Starter contract: minimal copyable ota.yaml with a short README
  • Flagship adoption starter: contract plus repo signals, docs, and companion files that show obvious doctor -> explain -> detect -> up -> agents value
  • Windows-first flagship starter: a reference example that keeps .NET, PowerShell, and cross-platform variants explicit
  • Canonical advanced reference: production-adjacent repo shape that teaches a full operating model
  • Workspace reference: multi-repo bootstrap and adoption ordering.

How to use

  1. Pick the folder that matches the problem you are solving.
  2. Read that folder's README.md first to understand why the pattern exists.
  3. Open its ota.yaml for the exact contract and task notes.
  4. Copy only the files you need.
  5. Run ota validate . or ota workspace validate . before you ship the pattern.

Validate this repo

Run ota run validate before opening a pull request.

Dogfood this repo

Run ota run dogfood when Ota UX changes and you want to re-check the flagship examples against the current local CLI behavior.

What these examples are teaching

  • the repo shape and use-case for each example
  • when to use the example
  • what problem the example solves
  • where to open the example's ota.yaml for task-level instructions

Contributing