github.com/Chaintable/blockx); python/ holds the Python executor, SDK, and auditor. This page helps you find your way around the code quickly once you have the repository; for the system-level division of responsibilities, see Architecture overview.
Layering conventions
AGENTS.md defines the directory skeleton, and docs/specs/code-style.md expands it into checkable implementation constraints. The key points:
cmd/: assembly and startup only. The Worker and Coordinator entry points are anapp.Profilemanifest plus a singleapp.Run(...)line;workerProfile()incmd/worker/main.golistsDeployment,Service,WorkerRegistryPrefix,UsageService,Builders, andPlugins, whilecmd/bundle_worker/main.gojust swaps in a different manifest and adjusts defaults throughTuneDefaults. Assembly order, shutdown order, and config parsing live ininternal/worker/app/andinternal/coordinator/app/; they must not be copied per entry point.internal/<module>/core/: Sans-IO domain logic. State machines, idempotency decisions, phase advancement, and result convergence all live here, for exampleWorkerCoreininternal/worker/core/worker.goandDispatcherCoreininternal/worker/core/dispatcher.go.internal/<module>/adapters/: side effects such as transport, storage, clocks, logging, and metrics. For exampleinternal/worker/adapters/grpc_server.go,etcd_publisher.go,orchestrator*.go, and the subpackageinternal/worker/adapters/executor/(UDS executor adapter and process pool).internal/<module>/app/: assembly and configuration.WorkerFullConfigininternal/worker/app/config.gois the source of truth for configuration;app.gobuilds the builder/plugin registries and IO backend modules according to theProfileand chains startup and shutdown together.- Scope-oriented modules:
internal/io/does not use an event/command core; instead it usesWorkerIOScope(internal/io/core/worker_scope.go) andTaskIOScope(internal/io/core/task_scope.go) to bind quota, cache, singleflight, and cleanup to the scope lifecycle. api/: protocol structs, message envelopes, and field conventions shared across modules. Side-effect-free validation and codec helpers are allowed; handlers, storage models, and state machines are not.python/: not directly governed bycode-style.md; seepython/README.mdandAGENTS.mdfor run and test commands.
code-style.md §3 and §5 can be summarized in one paragraph: core/ must not reference gRPC, etcd clients, database clients, logging implementations, or metrics implementations; it does not read the clock, generate random values, or start goroutines on its own, and avoids taking context.Context where possible. Cancellation, timeouts, and TTL expiry are all passed in as explicit inputs, and the output is an enumerable set of commands, decision results, or state snapshots. adapters/ own all IO and concurrency, translate core commands into side effects, and repackage timers, executors, plugins, and IO callbacks as core events. app/ and cmd/ only do assembly, with no domain decisions, admission policy, or protocol-semantics branches. When an adapter calls core it depends on the concrete types directly (WorkerCore, CoordinatorCore); no extra interface is abstracted for core.
Module index
Site page links point to the corresponding component page; “Main spec” refers to files underdocs/specs/ in the blockx repository.
cmd/
internal/
api/, python/, e2e/, and others
To build a single binary, use
go build ./cmd/<name>; this is the same command the Dockerfile and each cmd/*/README.md use.
docs/specs index
docs/specs/ holds the design documents for behavioral semantics. There are two kinds of file names: those without a date prefix are long-lived subsystem designs (named after the subsystem, e.g. plugin-system.md), and those with a YYYY-MM-DD- prefix are incremental designs or change proposals, where the date is when the proposal was made. Files stay in place after they land, and some note their status at the top (e.g. “Status: Implemented” in 2026-07-21-block-bundle-clusters.md).
Six must-reads: architecture.md, worker.md, call-execution-subsystem.md, io-subsystem.md, plugin-system.md, code-style.md.
Subsystem designs (no date prefix)
Subsystem designs (no date prefix)
Incremental designs and changes (date prefix)
Incremental designs and changes (date prefix)
”I want to change X, where should I look?”
Related docs
AGENTS.mdin the blockx repository: directory skeleton, commands, commit conventions.docs/specs/code-style.mdin the blockx repository: implementation constraints forcore/adapters/api/scope.docs/specs/architecture.mdin the blockx repository: system overview.docs/capability-backend-guide.mdin the blockx repository: file-by-file walkthrough for adding a capability backend.- On this site: Architecture overview, Design principles and code conventions, Protocols and interfaces, Local development environment, Testing, Contributing.