LOGIC.md

The audit layer
for AI reasoning

A portable, framework-agnostic file format for declaring agent reasoning as structured contracts: step DAGs, output schemas, tool permissions, and quality gates.

LOGIC.md Layer Architecture

Pipeline Contracts

Deterministic execution plans.

DAGs & Agent Handoffs

A LOGIC.md spec compiles into a deterministic execution plan. When one agent's output becomes another agent's input, LOGIC.md defines exactly what that handoff looks like and enforces it.

Parallel agents converge cleanly with defined merge behaviour, ensuring outputs are auditable and strictly structured.

Pipeline Contracts
Quality Gate Loop

Adaptive Computation

Self-Verification & Retry Loops

Quality gates implement pipeline-level adaptive computation: "compute more when the output is not yet good enough."

A step evaluates its own output and branches to pass, retry, or escalate: declaratively allocating extra reasoning effort where it is needed, without modifying the underlying model.

Modifiability

Describing vs Doing

Structure vs Prose

Changing a workflow is a YAML edit, validated against the spec. Adding a new rule, tool restriction, or quality gate produces a reviewable diff with type-checked semantics. Adding the equivalent to a prose prompt produces an English edit with no enforcement.