Unclassified

Execution Fabric

How work gets done — the set of capabilities that actually perform actions in external systems

How It Gets Done.

The Execution Fabric is the set of capabilities that actually perform work in external systems. It is the "hands" of SpineWorkspace — the layer that translates approved decisions into real-world actions.

Design Principles

  1. Governed execution — Nothing executes without a governance token
  2. Observable — Every action is traced and auditable
  3. Reversible — Actions can be rolled back or compensated
  4. Resilient — Retries, circuit breakers, graceful degradation
  5. Cost-aware — Execution costs are tracked and budgeted

Execution Components

ComponentPurpose
APIs & ServicesDirect API calls to external systems
MCP / ToolsModel Context Protocol tool invocations
WorkflowsMulti-step process execution
HermesExecution service for complex actions
Functions / WorkersServerless compute execution
External IntegrationsThird-party service calls

Execution Flow

Approved Action → Execution Token → Routing → Adapter → External System → Receipt → Reconciliation
  1. Approved Action — An action approved by governance
  2. Execution Token — Unique token for this execution
  3. Routing — Select the right execution path
  4. Adapter — Translate to target system format
  5. External System — Execute in the target system
  6. Receipt — Capture execution result
  7. Reconciliation — Verify outcome, feed to Spine

Execution Token

Every execution requires a unique token:

interface ExecutionToken {
  id: string;
  tenantId: string;
  workItemRef: string;
  action: ActionDef;
  approvedBy: ActorRef;
  approvedAt: string;
  expiresAt: string;
  constraints: Constraint[];
  budget: CostBudget;
}

Token Rules

  • Tokens are single-use
  • Tokens expire after a configurable TTL
  • Tokens are scoped to a specific action
  • Tokens cannot be reused or transferred
  • Invalid or expired tokens reject execution

MCP / Tools

The Model Context Protocol provides a standard interface for tool invocation:

Tool CategoryExamples
Data OperationsRead, write, query, transform
CommunicationSend message, schedule meeting
File OperationsCreate, update, share document
WorkflowStart process, advance stage
IntegrationCall external API, sync data

MCP Tool Contract

interface MCPTool {
  id: string;
  name: string;
  description: string;
  inputSchema: JSONSchema;
  outputSchema: JSONSchema;
  permissions: Permission[];
  cost: CostEstimate;
  
  execute(input: unknown, context: ExecutionContext): Promise<ToolResult>;
}

Hermes (Execution Service)

Hermes is the primary execution service for complex actions:

CapabilityDescription
Multi-step executionExecute chains of dependent actions
Parallel executionExecute independent actions simultaneously
CompensationRollback or compensate on failure
Timeout handlingGraceful handling of slow operations
IdempotencySafe retry of failed executions

Functions / Workers

Serverless compute for custom execution logic:

Use CaseImplementation
Custom transformsData transformation functions
ValidationCustom validation rules
EnrichmentData enrichment from multiple sources
AggregationCombine data from multiple systems
NotificationCustom notification logic

Execution Monitoring

MetricDescription
Execution countTotal executions per time period
Success ratePercentage of successful executions
Average latencyTime from token to receipt
Error ratePercentage of failed executions
Cost per executionToken and compute costs
External system healthHealth of connected systems

Governance

RuleDescription
Token requiredNo execution without a valid token
Scope limitedToken scoped to specific action
Time limitedToken expires after TTL
Budget limitedExecution cost tracked and limited
Audit loggedEvery execution is audited
Rollback capableActions can be compensated