RFC-0022 · Reference catalog
Versioned draft snapshot
RFCs, reference catalogs, and evidence reflect Spec 3b2e3e7a114fb826b1445d39a48756b8fff629cd. Counts and pending/status notes belong to that snapshot. Read the dated project update for later progress.
Source repositories are private during staging. Links marked “repository access required” need access to the linked repository.
Generated reference catalog. This page renders structured Lean data for RFC-0022: defined terms, diagnostics, dependencies, and invariants. It does not establish proof coverage or runtime conformance. The authored narrative lives in
RFC-0022.This page is generated from the
lean/Gnomon/Spec/module for RFC-0022. Edit that source and regenerate this catalog.
Title: Multi-Agent Workflow Orchestration
Status: draft
Owners: AI, Runtime
Diagnostic range: M22200-M22299
Depends on: RFC-0009, RFC-0010, RFC-0015
Proof citations in source: 16 / 16. Standalone proof verification is pending.
Definitions
(none defined)
Diagnostics
| Code | Severity | Description |
|---|---|---|
M22200 | Error | Workflow step references an agent with no resolved binding in the active environment. |
M22202 | Error | Parallel step output bindings use the same variable name (naming collision). |
M22203 | Warning | Conditional step: subsequent step depends on a variable only bound in one branch. |
M22204 | Error | Data flow type mismatch: step output type is not assignable to next step input type. |
M22205 | Error | Step output attempts to rebind an already-bound workflow variable. |
M22206 | Error | Step has no onError policy and no workflow-level default is declared. |
M22207 | Error | compensate error policy references an undeclared workflow step. |
M22208 | Error | Gate approval rejected: actor identity does not match the approvedBy declaration. |
M22209 | Error | Loop step has a zero or negative repeat count. |
M22210 | Error | Workflow trigger references an action that is not declared. |
M22214 | Error | Workflow trigger references an action directly; MUST reference a procedure. |
M22215 | Error | Unresolved actor reference in gate approvedBy declaration. |
Dependency neighborhood
graph LR
nRFC_0022["RFC-0022"]
nRFC_0009["RFC-0009"]
nRFC_0022 --> nRFC_0009
nRFC_0010["RFC-0010"]
nRFC_0022 --> nRFC_0010
nRFC_0015["RFC-0015"]
nRFC_0022 --> nRFC_0015
Invariants
- A gate’s approvedBy reference must resolve to a declared actor; unresolved references are a compile error. (enforced by: compile-time)
- A workflow may only invoke statically named agents with their declared permissions; it cannot escalate or dynamically select capabilities. (enforced by: compile-time + runtime)
- All workflow input/output bindings are resolved and type-checked at compile time; no runtime data-flow type errors are possible. (enforced by: compile-time)
- Every workflow state transition produces a structured event in the RFC-0010 event log; no silent transitions occur. (enforced by: runtime)
- Every workflow step must have an error policy at the step level or via a workflow-level default. (enforced by: compile-time)
- Once written by a step’s outputs, a workflow variable cannot be rebound by any subsequent step. (enforced by: compile-time)
- Static loop bounds ensure a finite number of dispatched steps; a human gate can still wait without a wall-clock bound. (enforced by: compile-time)
- Workflow variables are scoped to a single execution instance and not observable across concurrent instances. (enforced by: runtime)
Normative Statements
Statements are structured source data. Proof citations, where present, have not passed a standalone Gnomon proof gate.
Coordination Patterns
- MUST — A repeat loop count MUST be a positive integer literal, not a workflow variable, ensuring statically known finite bounds.
- MUST — A then-only conditional MUST have an implicit else that is a no-op.
- MUST_NOT — Arithmetic operators and string manipulation functions are NOT permitted in workflow conditionals.
- MUST — Gate events MUST appear in the RFC-0010 event log with full actor identity and timestamp. (proof citation:
rfc0022_b21_grounded; verification pending) - MUST — Output bindings of parallel steps MUST use distinct variable names; collisions are compile error M22202. (proof citation:
rfc0022_b11_grounded; verification pending) - MUST — Sequential steps MUST complete in declaration order; each step finishes before the next begins.
Error Handling
- MUST — A compensate reference MUST resolve to a sequential-step declared in the same workflow; unresolved references produce M22207. (proof citation:
rfc0022_b37_grounded; verification pending) - SHOULD — Compensation steps SHOULD be idempotent.
- MUST — Each step MUST declare an onError policy or rely on a workflow-level default; missing both is M22206. (proof citation:
rfc0022_b34_grounded; verification pending)
Goals
- MUST_NOT — A failed sub-agent step MUST NOT produce silent data corruption; absence of an explicit error policy is a compile error. (proof citation:
rfc0022_b9_grounded; verification pending) - MUST — A workflow declaration MUST be fully static; coordination structure, data flow types, and error policies are known at compile time. (proof citation:
rfc0022_b4_grounded; verification pending) - MUST — Human-in-the-loop gates MUST be first-class as a standard coordination pattern.
- MUST — Sequential and parallel composition MUST be expressible without boilerplate, and the compiler MUST verify data flow type consistency between steps. (proof citation:
rfc0022_b23_grounded; verification pending) - MUST_NOT — The workflow declaration MUST NOT introduce new agent capabilities; workflows orchestrate but do not escalate capability. (proof citation:
rfc0022_b1_grounded; verification pending) - MUST — Workflow execution MUST be fully observable via the RFC-0010 event log; every step start, outcome, gate transition, and terminal state MUST produce a structured event.
Invariants
- MUST — Every step MUST have an error policy at the step level or via a workflow-level default; uncovered steps cannot compile. (proof citation:
rfc0022_b27_grounded; verification pending) - MUST — The approvedBy actor reference in a gate MUST resolve to a declared actor; unresolved references are compile error M22215. (proof citation:
rfc0022_b7_grounded; verification pending)
Observability
- MUST — Each event MUST include workflow ID, workflow name, step name (if applicable), actor identity for gate events, timestamp, and any diagnostic codes raised. (proof citation:
rfc0022_b14_grounded; verification pending) - MUST — Every workflow state transition MUST be recorded as a structured event in the RFC-0010 event log.
Security
- MUST_NOT — A workflow MUST NOT grant agents capabilities beyond those declared in the agent’s permissions block. (proof citation:
rfc0022_b16_grounded; verification pending) - MUST — Gate approvedBy actors MUST be validated at runtime against the authenticated identity; unauthenticated or impersonated approvals are rejected and logged as M22208. (proof citation:
rfc0022_b29_grounded; verification pending) - MUST — The principal firing a workflow trigger MUST be authorized for the trigger’s underlying action; unauthorized triggers are rejected before the workflow begins. (proof citation:
rfc0022_b32_grounded; verification pending) - MUST_NOT — Workflow variables MUST NOT be readable by other workflow instances or code outside the execution context.
Typed Data Flow
- MUST_NOT — A step MUST NOT rebind a workflow variable already bound by a prior step; rebinding produces M22205. (proof citation:
rfc0022_b25_grounded; verification pending) - MUST — All input bindings MUST reference trigger fields or prior step outputs and be type-matched at compile time; mismatches produce M22204. (proof citation:
rfc0022_b19_grounded; verification pending)
Linked References
| Direction | Target |
|---|---|
| Depends on | RFC-0009 |
| Depends on | RFC-0010 |
| Depends on | RFC-0015 |