Context Library

Workflows

Definition

Governed procedural definitions for repeatable engineering operations — the approved sequence of steps, decision points, and authority boundaries for a specific engineering task.

Definition

A Workflow is a governed procedural definition for a repeatable engineering operation. It encodes the approved sequence of steps, the decision points that require human review, and the authority boundaries that apply — for a specific, named engineering task.

Workflows are not automation scripts. They do not execute operations. They define the governed procedure that an AI agent follows, under human oversight, when performing a known class of engineering work.

What Workflows Define

A Workflow definition includes:

  • The named operation and its scope
  • The ordered steps the agent should follow
  • The decision points where human review is required before proceeding
  • The Role authority that applies at each step
  • The conditions under which the workflow may be paused or escalated
  • The expected outputs at each step

This is similar in concept to a runbook or standard operating procedure in traditional operations engineering. The difference is that a Workflow is a governance artifact — it is an append-only record in the Yanzi corpus, with versioning and lineage tracking.

Workflows vs. Scripts

The distinction between a Workflow and a script is governance scope:

A script executes steps automatically, without human checkpoints. A Workflow defines steps that are executed with human-governed authority boundaries. The agent follows the Workflow — the human retains governance authority at defined checkpoints.

This makes Workflows appropriate for operations where human judgment is required — release procedures, incident response, architectural changes — but where the sequence of steps is well-understood and repeatable.

Operational Example

A PR review Workflow might define:

  1. Retrieve the PR diff and the relevant Seeds and Packs for the changed domain
  2. Identify any Rule violations in the changes
  3. [Human checkpoint] Present findings to the engineer for review
  4. Draft review comments within the bounded authority of the active Role
  5. [Human approval required] Engineer approves or revises the review comments
  6. Submit approved comments

Steps 4 and 5 are within the model’s authority scope. Steps 3 and 5 require human review before proceeding.

In Yanzi

Workflows are stored as context artifacts in the corpus and applied at session initialization with yanzi context workflow apply <name>. The active Workflow is part of the composed session context and is recorded in the operational lineage.