Skip to main content

Workspace Config Reference

event-spec.yaml is the root configuration file for a project. See Getting Started — Workspace for an introduction.

Fields​

FieldTypeRequiredDefaultDescription
versionintegerYes—Config schema version. Always 1.
workspacestringYes—Logical workspace name. Used in generated package/module names and registry grouping.
registry.modestringNolocalRegistry backend: local | git | server.
registry.remotestringConditional—Git clone URL of the shared tracking-plan repo (git mode).
registry.branchstringNomainBranch to follow (git mode). Each pull moves the cache to its remote tip.
registry.refstringNo—Exact commit SHA or tag to pin the cache to (git mode). Overrides registry.branch. Resolved against the remote as a tag, then a remote branch, then a commit SHA, so a branch name is accepted too; a name that resolves to two different commits is refused rather than guessed at.
registry.urlstringConditional—Server base URL (server mode).
registry.cache_dirstringNo~/.event-spec/cache/<hash>Local clone path for git mode. Override for CI or monorepo layouts.
registry.api_keystringConditional—API key for server mode. Supports ${ENV_VAR} expansion.
specs_dirstringNo./specsPath to event spec YAML directory tree.
sources_dirstringNo./sourcesPath to source definition directory.
destinations_dirstringNo./destinationsPath to destination definition directory.
audit.pathstringNo.Default scan path for event-spec audit.
audit.coverage_minnumberNo0Default minimum coverage percentage.
audit.reportstringNotextDefault audit report format.

Examples​

Local mode (simplest)​

version: 1
workspace: "my-company"
registry:
mode: local
specs_dir: ./specs
sources_dir: ./sources
destinations_dir: ./destinations

Git mode​

version: 1
workspace: "my-company"
registry:
mode: git
remote: https://github.com/my-org/analytics-specs.git
branch: main

Server mode​

version: 1
workspace: "my-company"
registry:
mode: server
url: https://registry.example.com
api_key: "${REGISTRY_API_KEY}"

With audit defaults​

version: 1
workspace: "my-company"
registry:
mode: local
specs_dir: ./specs
sources_dir: ./sources
destinations_dir: ./destinations
audit:
path: ./src
coverage_min: 80
report: json