Module 02

Contract Authoring

Learn how to write and evolve ota.yaml contracts — tasks, workflows, dependencies, modes, requirements, agent-safe lanes, effects, identities, services, environments, and detection candidates.

Module curriculum

Lessons in Contract Authoring

Follow the sequence to build the model, then use the exercises to test the boundary.

Lesson 0110 min read

Tasks, workflows, and dependencies

Define tasks with explicit commands, declare dependencies between them, and understand how Ota resolves the execution order.

  • Write a minimal valid task definition
  • Declare a task dependency chain
Lesson 028 min read

Agent-safe lanes

Declare which tasks agents may run, which paths they may write, and which steps must run after changes.

  • Add safe_tasks and protected_paths to an agent block
  • Explain why verify_after_changes matters for agent safety
Lesson 039 min read

Effects, identities, services, and environments

Declare what a task writes, reads from the network, or depends on externally so Ota can reason about its safety and reproducibility.

  • Add an effects block to a task
  • Declare an external service dependency
Lesson 047 min read

Detection candidates and reviewable application

Publish source-bound detection evidence for review, then apply only a current, complete candidate through an explicit mutation carrier.

  • Run ota detect --dry-run and read its output
  • Identify which inferences are high-confidence vs speculative