SimetrikDocs
Guides

Declarative flows (fixtures)

Declarative flows (fixtures)

Goal: describe a complete reconciliation flow in one file and run it reproducibly — ideal for demos, onboarding, and for an agent to set up an end-to-end scenario without manual steps.

simetrik fixtures run flow.yaml

The file

A playbook is an ordered list of named steps. Each step has a kind (the action) and params. It accepts YAML or JSON:

schema_version: "1"
name: basic-recon
steps:
  - name: create-source
    kind: source.create
    params: { name: cobros-banco, type: csv }

  - name: create-recon
    kind: recon.create
    params: { name: conciliacion-diaria, source_id: "${create-source:id}" }

  - name: run-recon
    kind: recon.run
    params: { id: "${create-recon:id}" }

References between steps

${step-name:field} takes a value from the result of a previous step (dot-path: id, data.id, …). If the reference points to a nonexistent step or field, the flow fails immediately, before running that step — it never sends a call with a made-up value.

Available kinds (v1)

kindAction
source.createCreate a source
file.createRegister an uploaded file
recon.createCreate a reconciliation
recon.runRun a reconciliation
apiRaw call (any method/path) — escape hatch

Execution and result

Steps run in order and stop at the first one that fails (no rollback): the file tells you what happened in each. For an agent, the JSON output is a per-step array:

simetrik --output json fixtures run flow.yaml
# → {"ok":true,"schema_version":"1","steps":[
#      {"step":"create-source","status":"completed","output":{...}},
#      {"step":"create-recon","status":"completed","output":{...}},
#      {"step":"run-recon","status":"completed","output":{...}} ]}

Idempotency

Re-running a playbook does not duplicate resources where the API allows it: for source.create and recon.create, if one with the same name already exists, the step reuses it instead of creating another. Steps without a natural key (file.create, api) are marked with a likely-duplicate warning.

simetrik init creates a project with a sample playbook ready for fixtures run. It's the fastest way to go from zero to a running reconciliation.

fixtures run executes real calls against your workspace. Review the file before running it, especially the creation and execution steps.

On this page