Socotra
Concepts

The YAML schema

High-level tour of socotra.yaml. For every field and validation rule see the full reference.


Top-level shape

Every socotra.yaml file lives under a single root key. As of v1.0.0-beta2 only schema version: "1.0" is supported — the older 1.1 branch was dropped and no migration is required.

# yaml-language-server: $schema=https://essalab.github.io/Socotra.Schemas/schemas/v1/schema.json
socotra:
  version: "1.0"
  solution:    { ... }
  architecture: { ... }
  modules:     [ ... ]
  shared:      [ ... ]
  host:        { ... }

Section purpose

  • solution — global settings: name, root namespace, target framework, output path, defaults.
  • architecture — pattern (modular-monolith, clean-architecture, or custom). Built-in patterns enforce required layers (SCT-019) and layer-to-layer dependency rules (SCT-020); allowedDependencies only applies to pattern: custom.
  • modules — business modules, each with its own layers (typed projects).
  • shared — cross-cutting projects (e.g. SharedKernel) any module can reference.
  • host — the entry-point project (Web API, Worker) that wires modules together.

Schema annotation

A JSON Schema (Draft 2020-12) is published at https://essalab.github.io/Socotra.Schemas/schemas/v1/schema.json. Adding the comment # yaml-language-server: $schema=... at the top of any socotra.yaml turns on hover docs, autocomplete, and validation in editors that speak the YAML Language Server (VS Code, JetBrains IDEs). socotra init writes this line for you.

Full reference

The complete field-by-field reference, validation rules, and architecture-pattern semantics live in the YAML reference.

Schema 1.0 · CLI 1.0