executor-architecture

Document the chaingraph-executor package architecture, components, and interaction patterns.

15|3|Updated Apr 29, 2025
One-click install
npx skills add https://github.com/chaingraphlabs/chaingraph --skill executor-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: executor-architecture
Source: https://github.com/chaingraphlabs/chaingraph/tree/main/.claude/skills/executor-architecture
Command: npx skills add https://github.com/chaingraphlabs/chaingraph --skill executor-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides architectural guidance for the ChainGraph executor package to help teams design, implement, and maintain a durable, exactly-once execution model using DBOS, event streams, and modular layers.

Core Features & Use Cases

  • Clear architecture overview of the executor stack (API, Services, DBOS, Implementations, Stores, and Trpc routes).
  • Two execution modes: DBOS production mode and Local development mode, including event bus, task queue, and admin UI.
  • Key files and responsibilities: ExecutionWorkflow, ExecuteFlowAtomicStep, ExecutionService, ServiceFactory, DBOSEventBus, TRPC router, Postgres schema.
  • Guidance on deployment, configuration, and environment variables.

Quick Start

Open the executor package at packages/chaingraph-executor to review the architecture and initialize development using ENABLE_DBOS_EXECUTION in your environment.

Frequently Asked Questions about executor-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does durable execution work with DBOS and PostgreSQL?

Durable execution with DBOS and PostgreSQL relies on structured workflows, event buses, and task queues to guarantee exactly-once processing. The architecture separates API, services, and implementation layers to maintain state consistency.

What is the architecture of a tRPC and PostgreSQL workflow executor?

A tRPC and PostgreSQL workflow executor structures components into API routes, core services, DBOS workflows, and data stores. This modular layering enforces clear interaction patterns between client requests and durable backend processing.

How do I set up the local development mode for a DBOS executor?

To set up local development mode for a DBOS executor, navigate to the executor package and enable local execution using the ENABLE_DBOS_EXECUTION environment variable. This bypasses production deployment requirements.

When should I use DBOS production mode versus local development mode?

Use DBOS production mode for deployed environments requiring durable exactly-once execution guarantees. Use local development mode to test architecture layers, event buses, and tRPC routes without full infrastructure overhead.

What are the key components of a durable workflow executor architecture?

Key components of a durable workflow executor include the ExecutionWorkflow, ExecuteFlowAtomicStep, ServiceFactory, and DBOSEventBus. These files manage state transitions, service instantiation, and event-driven communication.

Does the executor architecture support tRPC routes for client-server integration?

Yes, the executor architecture supports tRPC routes to bridge client and server interactions. A dedicated TRPC router exposes administrative and execution endpoints over the durable DBOS workflow layer.