Execution · Lesson 01 of 03

The core loop: doctor, detect, init, up, run

The five commands form an ordered adoption and execution loop. Each command has a specific responsibility and a specific moment to use it.

LearnExecutionFoundation10 min read1.6.26+2026-08-24

Learning objectives

  • State the purpose of each command in one sentence
  • Describe the correct ordering for a new repo
  • Explain why doctor must come before run

Prerequisites

Ota's core loop separates diagnosis, authoring, preparation, and execution. Using the commands in the right order prevents a missing contract, blocked requirement, or weak inference from being hidden behind a task failure.

Doctor first, contract second

Start with doctor to understand current readiness. Use detect to inspect evidence and init to create a conservative first contract. Use up to prepare the selected readiness path, then run one declared task through Ota.

Adoption and execution loop
ota doctorota detect --dry-run .ota init --dry-run .ota validateota up --dry-runota run --dry-run test

Each preview has a boundary

validate checks contract structure and semantics. doctor evaluates readiness. dry-run resolves admission and planned work without executing it. None of those previews proves a real task completed; use real execution and the appropriate receipt or proof surface for that claim.

Canonical terminology

doctordetectinituprun

Commands and expected output

Diagnose readiness
ota doctor --json
Inspect detection evidence
ota detect --dry-run .
Preview a starter
ota init --dry-run --json .
Preview preparation
ota up --dry-run --json
Preview one task
ota run --dry-run --json test

Evidence boundary for this lesson

Establishes

  • The worked examples establish the lesson's canonical Ota distinctions for its stated scope.

Does not establish

  • Reading the lesson does not validate a repository, execute its tasks, or establish organizational acceptance.

Knowledge check

Which command should you use first when a repository is not ready, and why?

Use ota doctor first. It prioritizes the readiness blocker before authoring, preparation, or task execution obscures the failed layer.

Relevant specifications