Skip to content

Architecture

sarr-io edited this page Jun 12, 2026 · 21 revisions

Architecture

Zinc is the host runtime for Circuitry systems.

Split of responsibility

Layer Owns
Circuitry 0.6.1 Portable action-system YAML: circuitry, name, about, takes, uses, does, gives, $value references
Zinc Execution boundary: zinc, @package refs, model presets, package resolution, adapter calls, typed values, traces, config, policy
YAML Mapping/sequence/scalar syntax and block scalars

Circuitry tooling should preserve Zinc fields. Zinc interprets them.

Run flow

  1. Resolve a file path or zinc:// reference.
  2. Parse and confirm the Circuitry 0.6.1 shape through circuitry-zig.
  3. Load Zinc config and package aliases.
  4. Build the value graph from uses.
  5. Determine the lazy frontier needed to settle requested top-level gives.
  6. Run ready parts serially or in parallel according to config.
  7. Invoke inline/model/external/package shape execution.
  8. Store values, reasoning, and artifacts.
  9. Print outputs and the run URI.

Execution surfaces

A uses entry can execute through:

  • inline does
  • configured model preset
  • external Circuitry file
  • package-provided Circuitry shape

A file with no uses becomes one implicit part using the default model preset.

Dependencies

Zinc is built from publishable Zig packages:

  • circuitry-zig supplies the Circuitry parser, system view, and diagnostics
  • limbo-zig supplies the database binding
  • serde.zig supplies YAML parsing helpers

Clone this wiki locally