← Learn OKHAM

The three questions behind a workflow

A contract is a named, versioned definition that people and systems can refer to. Whether you are coordinating a delivery, running a service or guiding an agent, the work can be described by answering three questions.

What can be done?
An Open Function Registry (OFR) declares the available operations, what each one accepts and returns and what it can change. For example, saving a new delivery slot.
How does the work proceed?
An Open Business Contract (OBC) defines how steps fit together to produce an outcome. For example, check the new slot, save it and notify the delivery team once the save succeeds.
What rules apply?
An Open Policy Contract (OPC) defines the permissions, limits and conditions for the work. For example, a customer may reschedule only before the dispatch cutoff.

Open Type Contracts (OTCs) give those definitions a shared vocabulary for data such as an order, a delivery slot or a dispatch time.

Suppose a support agent needs to reschedule a delivery. It can follow the same workflow as the order application, find the operation that saves a slot and see which fields to send. The service handling the request checks the policy against the agent’s own permissions. Sharing the operation gives both callers one definition to work from.

The same type format can describe larger things. Two applications can share a package by referencing it as a member. If a project defines a more specific kind of package, its type can extend the common package type and add constraints of its own.

A project can register its own versioned domain types alongside the shared ones. Its existing application can use those definitions to document its interfaces and check compatibility. See how a delivery team extends its catalogue.

These four contracts describe much of what another team needs to use a system. Existing application code can enforce the cutoff and save the slot. A general-purpose state machine can also coordinate the work by following the workflow, evaluating the rules and calling the configured operations. Teams can reuse the same workflow wherever the engine and operations support it, including across independent workers.

Describe the system at its boundaries

Define types for the resources a project works with. A project can describe its components, dependencies and environments. A container workload can describe its image, command, resource limits and observed state. A service can describe the requests it accepts and the results it returns.

The local Core catalogue includes three shared definitions. An Application can expose several capabilities. A Capability describes what a consumer can discover and use. An Event records a fact with its source, time and typed payload. Each declaration identifies its type and the exact type version.

Use those types in operation and workflow contracts. The OBC coordinates the work and OPC policies control when it can proceed. The configured implementation connects each operation to its actual system, such as a container runtime, an application API or an agent tool. This lets projects share a definition where their resources and operations have compatible behavior.

See how OKHAM applies this to containers

Learn the contract language

Designing and maintaining an OKHAM system takes practice. Start by reading an existing workflow, tracing a decision from its policy and inputs to the operation it permits, and checking which evidence supports the result. The specifications explain how those declarations fit together and how to change them safely.

Agents equipped with the OKHAM specifications and project tools can read the same declarations and use them to recover context or continue a task within its permissions.

Start the workflow lessons

Follow the workflow in the state machine