# agent-workflow

> Every algorithm contract in this domain is listed with its position on the derivation loop, its intent and invariant, the flow it walks, its productions as a…

Page: Ontology · Algorithms
Canonical: https://banes-lab.com/ontology/algorithms#algo-domain-agent-workflow

Every algorithm contract in this domain is listed with its position on the derivation loop, its intent and invariant, the flow it walks, its productions as a grammar, what it composes and is composed by, which forces and principles it answers to, what grounds it and what it grounds, and an exemplar where the record carries one. The diagram shows what composes what inside the domain.

Relations diagram

What composes what inside this domain.

```mermaid
flowchart LR
n_hybrid_workflow_orchestration["Hybrid Workflow Orchestration"]
n_dsl_compliance_loading["DSL Compliance Loading"]
n_agent_workflow_file_modification_recovery["File Modification Recovery"]
n_context_forking_configuration["Context Forking Configuration"]
n_verb_based_execution_classification["Verb-Based Execution Classification"]
n_workspace_configuration_discovery["Workspace Configuration Discovery"]
n_shared_document_workspace["Shared Document Workspace"]
n_workflow_type_document_selection["Workflow Type Document Selection"]
n_agent_sequence_definition["Agent Sequence Definition"]
n_agent_document_responsibility["Agent Document Responsibility"]
n_agent_activation_invocation["Agent Activation Invocation"]
n_parallel_batch_execution["Parallel Batch Execution"]
n_sequential_agent_execution["Sequential Agent Execution"]
n_four_dimensional_agent_graph["Four-Dimensional Agent Graph"]
n_handoff_signal["Handoff Signal"]
n_orchestrator_action["Orchestrator Action"]
n_workflow_coordination_sequence["Workflow Coordination Sequence"]
n_workflow_recovery_loop["Workflow Recovery Loop"]
n_checklist_integration["Checklist Integration"]
n_phase_documentation_template["Phase Documentation Template"]
n_workflow_principles_mapping["Workflow Principles Mapping"]
n_capability_invocation_protocol["Capability Invocation Protocol"]
n_template_assembly["Template Assembly"]
n_first_time_initiation["First-Time Initiation"]
n_workflow_validation_gate["Workflow Validation Gate"]
n_workflow_creation_kernel["Workflow Creation Kernel"]
n_workflow_orchestration_concern["<Workflow Orchestration Concern>"]
n_handoff_signal --> n_orchestrator_action
n_orchestrator_action --> n_handoff_signal
n_workflow_creation_kernel --> n_dsl_compliance_loading
n_workflow_creation_kernel --> n_agent_workflow_file_modification_recovery
n_workflow_creation_kernel --> n_context_forking_configuration
n_workflow_creation_kernel --> n_workspace_configuration_discovery
n_workflow_creation_kernel --> n_shared_document_workspace
n_workflow_creation_kernel --> n_agent_sequence_definition
n_workflow_creation_kernel --> n_handoff_signal
n_workflow_creation_kernel --> n_workflow_coordination_sequence
n_workflow_creation_kernel --> n_checklist_integration
n_workflow_creation_kernel --> n_phase_documentation_template
n_workflow_creation_kernel --> n_capability_invocation_protocol
n_workflow_creation_kernel --> n_template_assembly
n_workflow_creation_kernel --> n_workflow_validation_gate
n_workflow_creation_kernel --> n_workflow_type_document_selection
n_workflow_creation_kernel --> n_agent_activation_invocation
n_workflow_creation_kernel --> n_first_time_initiation
```

### Hybrid Workflow Orchestration

- Stage: [derive](https://banes-lab.com/records/stage/derive.md)
- Axis: [reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Classify workflow phases by execution verb, run discovery and investigation agents in parallel forked contexts, run action and mutation agents sequentially, and coordinate all agents through shared artifacts and handoff signals.

Invariant
Multi-agent workflows should parallelize independent knowledge gathering while serializing state-changing work.

Flow

```text
WorkflowObjective → AgentPhases → ExecutionClassification → ParallelDiscovery → SequentialAction → Handoff
```

Productions

```bnf
HybridWorkflowOrchestration ::= <WorkflowObjective> "->" <AgentSequence> "->" <ExecutionModeClassification> "->" <ParallelBatchSet> "->" <SequentialActionSet> "->" <WorkflowCompletion>
ExecutionMode ::= "PARALLEL" | "SEQUENTIAL"
ParallelPhase ::= "DISCOVERY" | "INVESTIGATION" | "RESEARCH" | "ANALYSIS" | "EXPLORATION"
SequentialPhase ::= "CREATE" | "WRITE" | "EXECUTE" | "VERIFY" | "IMPLEMENT" | "REFACTOR"
```

Composes
none

Forces
[runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [state_transaction](https://banes-lab.com/records/force/state-transaction.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [event_messaging](https://banes-lab.com/records/force/event-messaging.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
Every agent runs sequentially, even independent discovery — the workflow crawls.
```

After

```text
objective → agent sequence → classify by verb → parallel discovery (forked context) + sequential action (normal context) → handoff
```

### DSL Compliance Loading

- Stage: [orient](https://banes-lab.com/records/stage/orient.md)
- Axis: [ontology](https://banes-lab.com/records/reason/axis-ontology.md)
- Math type: [set-theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- Yields: set | boolean

Details

Intent
Load grammar, keyword, operator, workflow, and checklist references before workflow generation, then require generated content to follow the declared DSL, naming, handoff, execution, forking, spawning, and capability rules.

Invariant
Workflow generation must begin by loading the language and orchestration contracts that constrain output.

Flow

```text
DSLSources → Requirements → ComplianceGate → Proceed|Block
```

Productions

```bnf
DSLComplianceLoading ::= <DSLSpecSet> "->" <WorkflowRequirementSet> "->" <ComplianceValidationGate>
WorkflowRequirementSet ::= "agent_dsl_syntax" "," "agent_oriented_content" "," "stable_filename_convention" "," "handoff_protocol" "," "hybrid_parallel_sequential" "," "context_isolation" "," "agent_spawn_mechanism" "," "capability_invocation"
```

Composes
none

Composed by
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Named in the derivation of
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [event_messaging](https://banes-lab.com/records/force/event-messaging.md), [metaprogramming_modeling](https://banes-lab.com/records/force/metaprogramming-modeling.md), [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
Workflow generated free-form, ignoring the DSL and handoff contracts.
```

After

```text
load DSL + keyword + workflow + checklist specs → require{agent-DSL syntax, handoff protocol, hybrid execution, context isolation, agent spawn} → compliance gate
```

### File Modification Recovery

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
When a file modification conflict occurs, detect the error, re-read the current file, merge the intended delta into the current content, write the complete new version, verify persistence, and log recovery automatically without asking the developer.

Invariant
State-mutation conflicts are synchronization failures and should trigger deterministic recovery, not a prompt to the developer.

Flow

```text
ModificationError → RereadMerge → CompleteRewrite → Verify
```

Productions

```bnf
FileModificationRecovery ::= <FileModificationError> "->" <RecoveryProtocolSelection> "->" <RereadAndMerge> "->" <CompleteRewrite> "->" <RecoveryLog>
RecoveryProtocol ::= "reread-merge-complete-rewrite" | "snapshot-restore-on-failure"
ForbiddenRecovery ::= "retry_edit_without_recovery" | "ask_user_for_tool_error_recovery"
```

Composes
none

Composed by
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[state_transaction](https://banes-lab.com/records/force/state-transaction.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [resilience_recovery](https://banes-lab.com/records/force/resilience-recovery.md)

Grounds
none

Before

```text
A stale-write conflict re-reads the file and retries the same edit, or stops to ask the developer.
```

After

```text
modification error → re-read current → merge the delta into full state → write complete version → verify → log; never retry-without-recovery, never ask for a tool error
```

### Context Forking Configuration

- Stage: [derive](https://banes-lab.com/records/stage/derive.md)
- Axis: [reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Assign forked context to discovery, investigation, and documentation agents; assign normal context to action and validation agents; preserve model and parallel eligibility metadata per agent class.

Invariant
Context isolation improves independent analysis, while normal context preserves continuity for mutation and validation.

Flow

```text
AgentClass → ContextMode → ParallelEligibility → ExecutionPolicy
```

Productions

```bnf
ContextForkingConfiguration ::= <AgentClass> "->" <ContextMode> "->" <ParallelPolicy> "->" <ExecutionConfiguration>
AgentClass ::= "discovery" | "investigation" | "documentation" | "action" | "validation"
ContextMode ::= "fork" | "normal"
ParallelPolicy ::= "parallel_true" | "parallel_false"
```

Composes
none

Composed by
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [state_transaction](https://banes-lab.com/records/force/state-transaction.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
Every agent shares one context — discovery pollutes the action agent's state.
```

After

```text
agent class → discovery/investigation/documentation → fork ; action/validation → normal → per-class parallel eligibility preserved
```

### Verb-Based Execution Classification

- Stage: [derive](https://banes-lab.com/records/stage/derive.md)
- Axis: [reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Extract the primary verb from each agent purpose, classify it against parallel or sequential verb sets, and bind execution mode, context, and parallel eligibility.

Invariant
Execution mode should be derived from action semantics, not arbitrary phase numbering.

Flow

```text
AgentPurpose → PrimaryVerb → VerbClass → ExecutionMode
```

Productions

```bnf
VerbExecutionClassification ::= <AgentPurpose> "->" <PrimaryVerb> "->" <VerbSetMatch> "->" <AgentExecutionMode>
ParallelVerb ::= "ANALYZE" | "FIND" | "EXTRACT" | "READ" | "DISCOVER" | "INVESTIGATE" | "RESEARCH" | "EXPLORE" | "TRACE"
SequentialVerb ::= "CREATE" | "WRITE" | "EXECUTE" | "VERIFY" | "IMPLEMENT" | "LINK" | "ITERATE" | "REFACTOR" | "DEPLOY"
```

Composes
none

Forces
[model_governance](https://banes-lab.com/records/force/model-governance.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
Execution mode assigned by phase number, not by what the agent does.
```

After

```text
agent purpose → primary verb → {ANALYZE/FIND/DISCOVER → PARALLEL(fork)} | {CREATE/WRITE/VERIFY → SEQUENTIAL(normal)}
```

### Workspace Configuration Discovery

- Stage: [orient](https://banes-lab.com/records/stage/orient.md)
- Axis: [ontology](https://banes-lab.com/records/reason/axis-ontology.md)
- Math type: [set-theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- Yields: set | boolean

Details

Intent
Read workspace configuration, extract zones, semantic extensions, root path, agent definitions, shared zone, workflow zone, and task zone before generating any workflow artifacts.

Invariant
Workflow artifacts must be placed by discovered workspace configuration, not hardcoded paths.

Flow

```text
WorkspaceConfig → Zones → AgentDefinitions → ArtifactBasePath
```

Productions

```bnf
WorkspaceConfigurationDiscovery ::= <WorkspaceConfigFile> "->" <WorkspaceConfig> "->" <ZoneConfig> "->" <AgentDefinitionSet> "->" <ArtifactPathPolicy>
ArtifactPathPolicy ::= "shared_zone/workflow_name" "," "workflow_zone" "," "task_zone" "," "no_hardcoded_paths"
```

Composes
none

Composed by
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
none

Before

```text
Artifact paths hardcoded — the workflow only runs in one layout.
```

After

```text
workspace-config → zones + root + agent defs → artifact base = shared_zone/workflow_name; no hardcoded paths
```

### Shared Document Workspace

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Pre-create workflow documents once, require every agent to read and edit the same documents, prohibit duplicate versions, and enforce single source of truth across phases.

Invariant
Multi-agent coordination should refine shared artifacts rather than create divergent outputs.

Flow

```text
CoreDocuments → PreCreate → AgentReadEdit → SingleSourceValidation
```

Productions

```bnf
SharedDocumentWorkspace ::= <CoreDocumentSet> "->" <PreCreation> "->" <SharedAccessProtocol> "->" <IterativeRefinement> "->" <SingleSourceOfTruthGate>
SharedAccessProtocol ::= "all_agents_same_documents" "," "orchestrator_creates" "," "agents_refine" "," "append_mode_false"
```

Composes
none

Composed by
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
Each agent writes its own output file; findings diverge across N versions.
```

After

```text
pre-create core documents once → every agent reads + edits the same set → no duplicate versions → single source of truth
```

### Workflow Type Document Selection

- Stage: [derive](https://banes-lab.com/records/stage/derive.md)
- Axis: [reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Analyze workflow objective, classify workflow type, select five to eight semantically distinct core documents, and map each document to a non-overlapping purpose.

Invariant
Workflow coordination needs the right shared document set for the work type.

Flow

```text
WorkflowObjective → WorkflowType → CoreDocuments → PurposeMap
```

Productions

```bnf
WorkflowDocumentSelection ::= <WorkflowObjective> "->" <WorkflowType> "->" <CoreDocumentSet> "->" <DocumentPurposeMap>
WorkflowType ::= "cleanup" | "analysis" | "refactoring" | "documentation" | "implementation" | "security" | "performance" | "infrastructure" | "migration"
CoreDocumentConstraint ::= "document_count_between_5_and_8" "," "distinct_logical_purpose" "," "semantic_names_only"
```

Composes
none

Named in the derivation of
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[model_governance](https://banes-lab.com/records/force/model-governance.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
Generic output.md / results.md documents with overlapping purpose.
```

After

```text
objective → workflow_type{cleanup|analysis|refactoring|security|migration} → 5-8 distinct-purpose documents → one non-overlapping purpose each
```

### Agent Sequence Definition

- Stage: [project](https://banes-lab.com/records/stage/project.md)
- Axis: [reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- Math type: [algebra](https://banes-lab.com/records/reason/math-type-algebra.md)
- Yields: ordered-structure

Details

Intent
For each agent slot, create an agent object with name, type, phase, purpose, methodology, inputs, outputs, validation gates, document responsibilities, focus areas, edit protocol, agent activation, and 4D graph.

Invariant
An orchestration plan requires agent objects with executable metadata, not just agent names.

Flow

```text
AgentCount → AgentObjectSet → AgentSequence
```

Productions

```bnf
AgentSequenceDefinition ::= <AgentCount> "->" <AgentObjectSet> "->" <AgentSequence>
AgentObject ::= <AgentName> "," <AgentType> "," <PhaseNumber> "," <Purpose> "," <Methodology> "," <InputArtifacts> "," <OutputArtifacts> "," <ValidationGates> "," <DocumentResponsibilities> "," <ExecutionMode> "," <Graph4D>
```

Composes
none

Composed by
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Named in the derivation of
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
A plan that is just a list of agent names, no executable metadata.
```

After

```text
agent_count → agent objects{name, type, phase, purpose, inputs, outputs, validation gates, doc responsibilities, execution mode, 4D graph}
```

### Agent Document Responsibility

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
For each core document, require every agent to read current state, identify outdated or incorrect content, remove stale sections, replace with new discoveries, avoid duplicate findings, and maintain single source of truth.

Invariant
Shared-document workflows should use surgical refinement rather than additive accumulation.

Flow

```text
Document → Read → DetectStale → Remove → Replace → Deduplicate
```

Productions

```bnf
AgentDocumentResponsibility ::= <CoreDocument> "->" <ReadCurrentState> "->" <ContradictionDetection> "->" <StaleContentRemoval> "->" <AccurateReplacement> "->" <SingleSourceValidation>
ProhibitedDocumentOperation ::= "append_only" | "duplicate_findings" | "new_version_file"
```

Composes
none

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
none

Before

```text
Agents append findings, accumulating duplicates and contradictions.
```

After

```text
document → read current state → detect contradictions → remove stale → replace with new → single source of truth (never append, never a new version file)
```

### Agent Activation Invocation

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
For every agent activation, construct a spawn invocation with agent type, prompt, description, model, and context; use forked context for parallel agents and normal context for sequential agents.

Invariant
Orchestrators must execute agents through the runtime spawn primitive, not simulate agent behavior in the main session.

Flow

```text
AgentObject → SpawnInvocation → AgentExecution
```

Productions

```bnf
AgentActivationInvocation ::= <AgentObject> "->" <SpawnCall> "->" <ExecutionResult>
SpawnCall ::= "agent_type" "," "prompt" "," "description" "," "model" "," "context_if_parallel"
ForbiddenOrchestration ::= "simulate_agent_execution_in_orchestrator"
```

Composes
none

Named in the derivation of
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[model_governance](https://banes-lab.com/records/force/model-governance.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
The orchestrator simulates the agent's work in its own session.
```

After

```text
agent object → spawn primitive{agent_type, prompt, model, context-if-parallel} → real activation; never simulate in the orchestrator
```

### Parallel Batch Execution

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Accumulate adjacent parallel agents into a batch, invoke all spawns in a single concurrent batch, wait for all completions, and merge findings through shared documents.

Invariant
Parallel agents should execute concurrently only when their work is investigation-safe and state-isolated.

Flow

```text
ParallelAgents → ConcurrentSpawnBatch → WaitAll → MergeFindings
```

Productions

```bnf
ParallelBatchExecution ::= <ParallelAgentSet> "->" <ConcurrentSpawnBatch> "->" <CompletionWait> "->" <SharedDocumentMerge>
ConcurrentSpawnBatch ::= "single_batch_concurrent_spawn"
ParallelSafety ::= "context_fork" "," "discovery_or_investigation_only" "," "shared_artifact_refinement"
```

Composes
none

Forces
[model_governance](https://banes-lab.com/records/force/model-governance.md), [event_messaging](https://banes-lab.com/records/force/event-messaging.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
Parallel agents launched in separate messages, so they run one after another anyway.
```

After

```text
adjacent parallel agents → one concurrent batch of forked-context spawns → wait for all → merge via shared documents
```

### Sequential Agent Execution

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Execute state-changing or validation agents one at a time in normal context, pass handoff context from the previous phase, wait for completion signal, then activate the next agent.

Invariant
Mutating workflow phases must serialize to prevent conflicting edits and ambiguous state.

Flow

```text
PreviousHandoff → SpawnCall → WaitCompletion → NextHandoff
```

Productions

```bnf
SequentialAgentExecution ::= <HandoffContext> "->" <SequentialSpawnInvocation> "->" <CompletionSignal> "->" <NextAgentActivation>
SequentialConstraint ::= "one_spawn_at_a_time" "," "wait_for_completion" "," "context_normal"
```

Composes
none

Forces
[state_transaction](https://banes-lab.com/records/force/state-transaction.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [event_messaging](https://banes-lab.com/records/force/event-messaging.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
Two mutating agents launched at once, producing conflicting edits.
```

After

```text
prior handoff → one normal-context spawn at a time → wait for completion → activate the next
```

### Four-Dimensional Agent Graph

- Stage: [project](https://banes-lab.com/records/stage/project.md)
- Axis: [reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- Math type: [graph](https://banes-lab.com/records/reason/math-type-graph.md)
- Yields: edge-list

Details

Intent
For each agent, build sequential dependencies, lateral parallel peers, diagonal artifact/data dependencies, and propagation effects including superseded state, propagated contracts, and breakage risks.

Invariant
Multi-agent workflows need topology, not only order.

Flow

```text
Agent → Z + X + Y + W Graph
```

Productions

```bnf
FourDAgentGraph ::= <AgentObject> "->" <SequentialAxis> "," <LateralAxis> "," <DiagonalAxis> "," <PropagationAxis>
SequentialAxis ::= "Z: prior_required_agents"
LateralAxis ::= "X: peer_parallel_agents"
DiagonalAxis ::= "Y: cross_phase_artifact_dependencies"
PropagationAxis ::= "W: superseded_state, propagated_contracts, breaks_if_changed"
```

Composes
none

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
An agent records only its order, not its cross-phase data or downstream ripple.
```

After

```text
agent → Z{prior required agents} + X{peer parallel} + Y{cross-phase artifact deps} + W{superseded state, propagated contracts, breaks-if-changed}
```

### Handoff Signal

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Require every agent to end with a structured handoff signal containing completed agent, phase status, artifact location, next agent, execution mode, context used, findings, files, validation status, parallel results, 4D graph, and orchestrator action.

Invariant
Handoffs are control messages that preserve workflow state across agent boundaries.

Flow

```text
AgentCompletion → HandoffContext → OrchestratorAction
```

Productions

```bnf
HandoffSignal ::= <AgentCompleted> "," <PhaseStatus> "," <ArtifactsLocation> "," <NextAgent> "," <ExecutionMode> "," <ContextUsed> "," <KeyFindings> "," <CriticalFiles> "," <ValidationGatesPassed> "," <ParallelResults> "," <Graph4D> "," <OrchestratorAction>
OrchestratorAction ::= "ACTIVATE_NEXT_AGENT" | "PAUSE_FOR_USER" | "WORKFLOW_COMPLETE"
```

Composes
[Orchestrator Action](https://banes-lab.com/records/algo/orchestrator-action.md)

Composed by
[Orchestrator Action](https://banes-lab.com/records/algo/orchestrator-action.md), [Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [event_messaging](https://banes-lab.com/records/force/event-messaging.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
An agent finishes with a prose summary the orchestrator cannot route on.
```

After

```text
agent completion → handoff{completed, phase status, artifacts, next agent, execution mode, context, findings, validation, 4D graph, orchestrator_action}
```

### Orchestrator Action

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Interpret handoff action as activate next agent, pause for the developer, or complete workflow; automatically continue unless a critical decision or repeated recovery failure requires the developer's involvement.

Invariant
The orchestrator is a control loop driven by structured handoff actions.

Flow

```text
HandoffSignal → ActionType → Execute|Pause|Complete
```

Productions

```bnf
OrchestratorActionHandling ::= <HandoffSignal> "->" <ActionType> "->" <OrchestrationDecision>
ActionType ::= "ACTIVATE_NEXT_AGENT" | "PAUSE_FOR_USER" | "WORKFLOW_COMPLETE"
ContinuationRule ::= "never_ask_should_I_continue" "," "use_orchestrator_action"
```

Composes
[Handoff Signal](https://banes-lab.com/records/algo/handoff-signal.md)

Composed by
[Handoff Signal](https://banes-lab.com/records/algo/handoff-signal.md)

Forces
[state_transaction](https://banes-lab.com/records/force/state-transaction.md), [resilience_recovery](https://banes-lab.com/records/force/resilience-recovery.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [event_messaging](https://banes-lab.com/records/force/event-messaging.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
The orchestrator asks the developer 'should I continue?' after every agent.
```

After

```text
handoff → orchestrator_action{ACTIVATE_NEXT_AGENT | PAUSE_FOR_USER | WORKFLOW_COMPLETE} → auto-continue unless a critical decision or repeated recovery failure
```

### Workflow Coordination Sequence

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Pre-create documents, execute parallel batches where eligible, execute sequential agents one at a time, update checkpoints, validate single source of truth, and mark workflow completion.

Invariant
Coordination is the explicit execution trace for the whole workflow.

Flow

```text
PreCreateDocs → ParallelBatch|SequentialTask → Handoff → Checkpoint → Complete
```

Productions

```bnf
WorkflowCoordinationSequence ::= <DocumentPreCreation> "->" <AgentExecutionStepSet> "->" <CheckpointUpdateSet> "->" <WorkflowCompletionState>
WorkflowCompletionState ::= "WORKFLOW_PROGRESS_100_percent" "," "core_documents_refined" "," "final_output_ready"
```

Composes
none

Composed by
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [observability_traceability](https://banes-lab.com/records/force/observability-traceability.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
Coordination left implicit — no record states the spawn order.
```

After

```text
pre-create docs → parallel batches where eligible + sequential tasks one at a time → handoffs → checkpoint updates → 100% complete
```

### Workflow Recovery Loop

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [dynamical-systems](https://banes-lab.com/records/reason/math-type-dynamical-systems.md)
- Yields: boolean | counter

Details

Intent
If an agent fails validation, read shared documents, identify unmet expectation, research the error pattern, relaunch the agent with adapted context, and pause for the developer after bounded recovery attempts.

Invariant
Agent failure should trigger bounded evidence-based recovery, not silent continuation.

Flow

```text
ValidationFail → Diagnose → Research → Relaunch → RetryLimit|Recover
```

Productions

```bnf
WorkflowRecoveryLoop ::= <FailedAgentResult> "->" <SharedDocumentRead> "->" <UnmetExpectationAnalysis> "->" <ResolutionResearch> "->" <AgentRelaunch> "->" <RecoveryDecision>
RecoveryDecision ::= "continue_after_recovery" | "pause_for_user_after_limit"
```

Composes
none

Forces
[state_transaction](https://banes-lab.com/records/force/state-transaction.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [resilience_recovery](https://banes-lab.com/records/force/resilience-recovery.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
none

Before

```text
A failed agent is silently skipped and the workflow continues.
```

After

```text
validation fail → read shared docs → diagnose unmet expectation → research the error → relaunch with adapted context → pause for the developer after the bound
```

### Checklist Integration

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Create a workflow progress checklist in the artifact workspace, include execution model metadata, phases in linear dependency order with severity metadata, task checkboxes, progress bars, success criteria, and agent-edit coordination rules.

Invariant
Workflow state must persist independently of any one agent context.

Flow

```text
Workflow → Checklist → AgentUpdates → ResumableProgress
```

Productions

```bnf
ChecklistIntegration ::= <WorkflowName> "->" <ChecklistFrontmatter> "->" <PhaseStructure> "->" <TaskBreakdown> "->" <ProgressTracking> "->" <SuccessCriteria>
ChecklistCoordinationRule ::= "orchestrator_precreates" "," "all_agents_edit_same_checklist" "," "phase_complete_before_handoff" "," "resume_by_reading_checklist"
```

Composes
none

Composed by
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[model_governance](https://banes-lab.com/records/force/model-governance.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md), [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
Workflow state lives only in the orchestrator context; a restart loses it.
```

After

```text
workflow → progress checklist{execution model, linear phases + severity metadata, task checkboxes, success criteria} → any agent resumes by reading it
```

### Phase Documentation Template

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
For each agent phase, render phase header, execution mode, context mode, methodology, 4D graph, artifact flow, focus areas, deliverable, and agent activation example.

Invariant
Workflow templates must document how each agent is activated and what it contributes.

Flow

```text
AgentPhase → DocumentationSection → InvocationExample
```

Productions

```bnf
PhaseDocumentationTemplate ::= <AgentObject> "->" <PhaseHeader> "->" <ExecutionModeDescription> "->" <MethodologySummary> "->" <Graph4DRendering> "->" <ArtifactSection> "->" <FocusSection> "->" <OutputSection> "->" <AgentActivationExample>
```

Composes
none

Composed by
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[model_governance](https://banes-lab.com/records/force/model-governance.md), [metaprogramming_modeling](https://banes-lab.com/records/force/metaprogramming-modeling.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
A phase documented with no execution mode, graph, or invocation example.
```

After

```text
agent phase → header + execution mode + context + methodology + 4D graph + artifacts + focus + deliverable + agent activation example
```

### Workflow Principles Mapping

- Stage: [derive](https://banes-lab.com/records/stage/derive.md)
- Axis: [reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Derive workflow principles from the agent sequence, first agent grounding role, final agent quality guarantee, intermediate agent contributions, automation, context awareness, recovery, scalability, hybrid execution, context forking, and workspace integration.

Invariant
A workflow should state the qualities guaranteed by its orchestration structure.

Flow

```text
AgentSequence → PrincipleSet → WorkflowValueStatement
```

Productions

```bnf
WorkflowPrinciplesMapping ::= <AgentSequence> "->" <AgentContributionSet> "->" <WorkflowPrincipleSet>
WorkflowPrinciple ::= "grounded_in_codebase_reality" | "fully_automated" | "context_aware" | "self_recovering" | "dynamically_scalable" | "hybrid_execution" | "context_forking" | "workspace_integrated"
```

Composes
none

Forces
[state_transaction](https://banes-lab.com/records/force/state-transaction.md), [resilience_recovery](https://banes-lab.com/records/force/resilience-recovery.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
none

Before

```text
A workflow that never states what its structure guarantees.
```

After

```text
agent sequence → per-agent contribution{first grounds, final guarantees quality} → principles{grounded, automated, context-aware, self-recovering, scalable}
```

### Capability Invocation Protocol

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Define specialized capability invocation patterns, classify which capabilities run forked or normal, include examples, and allow workflows to call capabilities for research, validation, calculation, and specialized subroutines.

Invariant
Workflows should support specialized capabilities without embedding every capability into every agent.

Flow

```text
CapabilityNeed → CapabilityPattern → ContextMode → Invocation
```

Productions

```bnf
CapabilityInvocationProtocol ::= <CapabilityNeed> "->" <CapabilitySelection> "->" <CapabilityInvocation> "->" <CapabilityResultIntegration>
CapabilityInvocation ::= "invoke(capability=name, args=args)"
CapabilityContextRule ::= "discovery_capability_context_fork" | "validation_capability_context_normal"
```

Composes
none

Composed by
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
none

Before

```text
Every capability baked into every agent instead of a shared, invocable one.
```

After

```text
capability need → select → invoke(capability, args){discovery → forked, validation → normal} → integrate result
```

### Template Assembly

- Stage: [commit](https://banes-lab.com/records/stage/commit.md)
- Axis: [representation](https://banes-lab.com/records/reason/axis-representation.md)
- Math type: [information-theory](https://banes-lab.com/records/reason/math-type-information-theory.md)
- Yields: hash | novelty-score

Details

Intent
Assemble frontmatter, workspace config, overview, phase documentation, checklist requirements, orchestration protocol, handoff format, coordination sequence, capability integration, workflow principles, and domain notes into one workflow artifact.

Invariant
The workflow template is a compiled orchestration contract.

Flow

```text
Sections → FinalTemplate → OutputPath → Write
```

Productions

```bnf
TemplateAssembly ::= <WorkflowFrontmatter> "->" <WorkspaceConfigSection> "->" <WorkflowOverview> "->" <PhaseDocumentationSet> "->" <ChecklistRequirements> "->" <AgentOrchestrationProtocol> "->" <HandoffSignalFormat> "->" <WorkflowCoordination> "->" <CapabilityIntegrationProtocol> "->" <WorkflowPrinciples> "->" <OutputArtifact>
OutputArtifact ::= "{workflow_output_dir}/{workflow_name}-WORKFLOW.{workflow_ext}"
```

Composes
none

Composed by
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Named in the derivation of
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [event_messaging](https://banes-lab.com/records/force/event-messaging.md), [metaprogramming_modeling](https://banes-lab.com/records/force/metaprogramming-modeling.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md), [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
Workflow sections written ad hoc, missing the handoff format or coordination.
```

After

```text
assemble{frontmatter, workspace config, overview, phase docs, checklist, orchestration protocol, handoff format, coordination, capabilities, principles} → {name}-WORKFLOW file
```

### First-Time Initiation

- Stage: [terminate](https://banes-lab.com/records/stage/terminate.md)
- Axis: [termination](https://banes-lab.com/records/reason/axis-termination.md)
- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
After generating the workflow template, present a summary and request explicit first-run action: execute workflow, edit template, or cancel.

Invariant
Generation and first execution are separate approval states.

Flow

```text
GeneratedWorkflow → UserChoice → Execute|Edit|Cancel
```

Productions

```bnf
FirstTimeInitiation ::= <GeneratedWorkflow> "->" <WorkflowSummary> "->" <UserChoice> "->" <InitialAction>
UserChoice ::= "Execute Workflow" | "Edit Template" | "Cancel"
```

Composes
none

Named in the derivation of
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[model_governance](https://banes-lab.com/records/force/model-governance.md), [metaprogramming_modeling](https://banes-lab.com/records/force/metaprogramming-modeling.md)

Grounds
[ter-stop](https://banes-lab.com/records/reason/node-ter-stop.md)

Before

```text
The generated workflow auto-executes without the developer's go-ahead.
```

After

```text
generated workflow → summary → developer choice{Execute | Edit Template | Cancel} → generation and first execution are separate approvals
```

### Workflow Validation Gate

- Stage: [verify](https://banes-lab.com/records/stage/verify.md)
- Axis: [verification](https://banes-lab.com/records/reason/axis-verification.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Validate DSL compliance, workspace discovery, dynamic agent count, execution classification, context configuration, 4D graphs, handoff protocol, hybrid execution, checklist integration, capability integration, template assembly, dynamic paths, uppercase filenames, and agent-oriented content.

Invariant
A workflow template is complete only when orchestration, artifact, context, and validation contracts all pass.

Flow

```text
WorkflowTemplate → GateSet → Valid|Invalid
```

Productions

```bnf
WorkflowValidationGate ::= <GeneratedWorkflow> "->" <DSLComplianceCheck> "->" <WorkspaceConfigCheck> "->" <AgentSequenceCheck> "->" <ExecutionModeCheck> "->" <Graph4DCheck> "->" <HandoffProtocolCheck> "->" <ChecklistIntegrationCheck> "->" <CapabilityIntegrationCheck> "->" <ArtifactPathCheck> "->" <CompletionVerdict>
CompletionVerdict ::= "workflow_template_valid" | "workflow_template_invalid"
```

Composes
none

Composed by
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Named in the derivation of
[Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [event_messaging](https://banes-lab.com/records/force/event-messaging.md), [metaprogramming_modeling](https://banes-lab.com/records/force/metaprogramming-modeling.md), [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
[ver-evidence](https://banes-lab.com/records/reason/node-ver-evidence.md)

Before

```text
A workflow shipped without checking its handoff, 4D graphs, or dynamic paths.
```

After

```text
template → checks{DSL, workspace, agent sequence, execution mode, 4D graph, handoff, checklist, capabilities, artifact paths} → valid | invalid
```

### Workflow Creation Kernel

- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Load DSL and orchestration references, configure file recovery and context forking, discover workspace zones and agents, select shared documents, define dynamic agent sequence, classify execution mode, build 4D graphs, define handoff protocol, assemble coordination sequence, integrate checklist and capabilities, generate phase documentation, assemble template, and validate success criteria.

Invariant
Workflow creation is a compiler from objective and workspace configuration into an executable multi-agent orchestration contract.

Flow

```text
Specs → Workspace → Documents → Agents → Graphs → Handoffs → Coordination → Checklist → Capabilities → Template → Validation
```

Productions

```bnf
WorkflowCreationKernel ::= <DSLComplianceLoading> "->" <FileModificationRecovery> "->" <ContextForkingConfiguration> "->" <WorkspaceConfigurationDiscovery> "->" <WorkflowDocumentSelection> "->" <SharedDocumentWorkspace> "->" <AgentSequenceDefinition> "->" <VerbExecutionClassification> "->" <FourDAgentGraph> "->" <HandoffSignal> "->" <WorkflowCoordinationSequence> "->" <ChecklistIntegration> "->" <PhaseDocumentationTemplate> "->" <CapabilityInvocationProtocol> "->" <TemplateAssembly> "->" <WorkflowValidationGate>
```

Composes
[DSL Compliance Loading](https://banes-lab.com/records/algo/dsl-compliance-loading.md), [File Modification Recovery](https://banes-lab.com/records/algo/agent-workflow-file-modification-recovery.md), [Context Forking Configuration](https://banes-lab.com/records/algo/context-forking-configuration.md), [Workspace Configuration Discovery](https://banes-lab.com/records/algo/workspace-configuration-discovery.md), [Shared Document Workspace](https://banes-lab.com/records/algo/shared-document-workspace.md), [Agent Sequence Definition](https://banes-lab.com/records/algo/agent-sequence-definition.md), [Handoff Signal](https://banes-lab.com/records/algo/handoff-signal.md), [Workflow Coordination Sequence](https://banes-lab.com/records/algo/workflow-coordination-sequence.md), [Checklist Integration](https://banes-lab.com/records/algo/checklist-integration.md), [Phase Documentation Template](https://banes-lab.com/records/algo/phase-documentation-template.md), [Capability Invocation Protocol](https://banes-lab.com/records/algo/capability-invocation-protocol.md), [Template Assembly](https://banes-lab.com/records/algo/template-assembly.md), [Workflow Validation Gate](https://banes-lab.com/records/algo/workflow-validation-gate.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [state_transaction](https://banes-lab.com/records/force/state-transaction.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [resilience_recovery](https://banes-lab.com/records/force/resilience-recovery.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [event_messaging](https://banes-lab.com/records/force/event-messaging.md), [metaprogramming_modeling](https://banes-lab.com/records/force/metaprogramming-modeling.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md), [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
[derivation-loop](https://banes-lab.com/ontology/reasoning/reason-loop-derivation-loop.md)

Derivation map

orient
[DSL Compliance Loading](https://banes-lab.com/records/algo/dsl-compliance-loading.md)

derive
[Workflow Type Document Selection](https://banes-lab.com/records/algo/workflow-type-document-selection.md)

project
[Agent Sequence Definition](https://banes-lab.com/records/algo/agent-sequence-definition.md)

act
[Agent Activation Invocation](https://banes-lab.com/records/algo/agent-activation-invocation.md)

verify
[Workflow Validation Gate](https://banes-lab.com/records/algo/workflow-validation-gate.md)

commit
[Template Assembly](https://banes-lab.com/records/algo/template-assembly.md)

terminate
[First-Time Initiation](https://banes-lab.com/records/algo/first-time-initiation.md)

Before

```text
An objective turned straight into a hardcoded, single-threaded agent script.
```

After

```text
load specs → discover workspace → select docs → define agents → classify execution → 4D graphs → handoffs → coordinate → checklist + capabilities → assemble → validate
```

### <Workflow Orchestration Concern>

- Meta record

Details

Intent
<Load orchestration grammar> → <Discover workspace config> → <Select shared documents> → <Define agents> → <Classify parallel vs sequential> → <Fork discovery contexts> → <Serialize action phases> → <Build 4D graphs> → <Create handoff protocol> → <Coordinate shared-document refinement> → <Integrate checklist and capabilities> → <Validate template>

Invariant
Any multi-agent workflow should be generated as an executable orchestration contract where discovery is parallel, mutation is sequential, state is shared through documents, and handoffs preserve graph-aware context.

Flow

```text
Grammar → Workspace → Documents → Agents → ExecutionMode → Context → Graph → Handoff → Coordination → Validation
```

Productions

```bnf
WorkflowOrchestrationConcern ::= <GrammarContract> "->" <WorkspaceContract> "->" <SharedArtifactContract> "->" <AgentSequenceContract> "->" <HybridExecutionContract> "->" <ContextForkingContract> "->" <Graph4DContract> "->" <HandoffContract> "->" <ChecklistContract> "->" <CapabilityContract> "->" <ValidationGate>
HybridExecutionContract ::= "parallel_discovery" "," "sequential_actions" "," "spawn_primitive_required" "," "no_orchestrator_simulation" "," "single_source_of_truth_documents"
```

Composes
[Validation Gate](https://banes-lab.com/records/algo/validation-gate.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [state_transaction](https://banes-lab.com/records/force/state-transaction.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [event_messaging](https://banes-lab.com/records/force/event-messaging.md), [metaprogramming_modeling](https://banes-lab.com/records/force/metaprogramming-modeling.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md), [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

## Links to

- [Derive](https://banes-lab.com/records/stage/derive.md)
- [Reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- [Logic](https://banes-lab.com/records/reason/math-type-logic.md)
- [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md)
- [state_transaction](https://banes-lab.com/records/force/state-transaction.md)
- [model_governance](https://banes-lab.com/records/force/model-governance.md)
- [event_messaging](https://banes-lab.com/records/force/event-messaging.md)
- [control_coordination](https://banes-lab.com/records/force/control-coordination.md)
- [Orient](https://banes-lab.com/records/stage/orient.md)
- [Ontology](https://banes-lab.com/records/reason/axis-ontology.md)
- [Set Theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- [Workflow Creation Kernel](https://banes-lab.com/records/algo/workflow-creation-kernel.md)
- [contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md)
- [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)
- [metaprogramming_modeling](https://banes-lab.com/records/force/metaprogramming-modeling.md)
- [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)
- [Act](https://banes-lab.com/records/stage/act.md)
- [Formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- [Computation](https://banes-lab.com/records/reason/math-type-computation.md)
- [resilience_recovery](https://banes-lab.com/records/force/resilience-recovery.md)
- [semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md)
- [Project](https://banes-lab.com/records/stage/project.md)
- [Algebra](https://banes-lab.com/records/reason/math-type-algebra.md)
- [modularity](https://banes-lab.com/records/force/modularity.md)
- [Graph](https://banes-lab.com/records/reason/math-type-graph.md)
- [Orchestrator Action](https://banes-lab.com/records/algo/orchestrator-action.md)
- [Handoff Signal](https://banes-lab.com/records/algo/handoff-signal.md)
- [observability_traceability](https://banes-lab.com/records/force/observability-traceability.md)
- [Dynamical Systems](https://banes-lab.com/records/reason/math-type-dynamical-systems.md)
- [Commit](https://banes-lab.com/records/stage/commit.md)
- [Representation](https://banes-lab.com/records/reason/axis-representation.md)
- [Information Theory](https://banes-lab.com/records/reason/math-type-information-theory.md)
- [Terminate](https://banes-lab.com/records/stage/terminate.md)
- [Termination](https://banes-lab.com/records/reason/axis-termination.md)
- [Optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- [Ter Stop](https://banes-lab.com/records/reason/node-ter-stop.md)
- [Verify](https://banes-lab.com/records/stage/verify.md)
- [Verification](https://banes-lab.com/records/reason/axis-verification.md)
- [Ver Evidence](https://banes-lab.com/records/reason/node-ver-evidence.md)
- [DSL Compliance Loading](https://banes-lab.com/records/algo/dsl-compliance-loading.md)
- [File Modification Recovery](https://banes-lab.com/records/algo/agent-workflow-file-modification-recovery.md)
- [Context Forking Configuration](https://banes-lab.com/records/algo/context-forking-configuration.md)
- [Workspace Configuration Discovery](https://banes-lab.com/records/algo/workspace-configuration-discovery.md)
- [Shared Document Workspace](https://banes-lab.com/records/algo/shared-document-workspace.md)
- [Agent Sequence Definition](https://banes-lab.com/records/algo/agent-sequence-definition.md)
- [Workflow Coordination Sequence](https://banes-lab.com/records/algo/workflow-coordination-sequence.md)
- [Checklist Integration](https://banes-lab.com/records/algo/checklist-integration.md)
- [Phase Documentation Template](https://banes-lab.com/records/algo/phase-documentation-template.md)
- [Capability Invocation Protocol](https://banes-lab.com/records/algo/capability-invocation-protocol.md)
- [Template Assembly](https://banes-lab.com/records/algo/template-assembly.md)
- [Workflow Validation Gate](https://banes-lab.com/records/algo/workflow-validation-gate.md)
- [The derivation loop](https://banes-lab.com/ontology/reasoning/reason-loop-derivation-loop.md)
- [Workflow Type Document Selection](https://banes-lab.com/records/algo/workflow-type-document-selection.md)
- [Agent Activation Invocation](https://banes-lab.com/records/algo/agent-activation-invocation.md)
- [First-Time Initiation](https://banes-lab.com/records/algo/first-time-initiation.md)
- [Validation Gate](https://banes-lab.com/records/algo/validation-gate.md)
