jinflow make
The make command is the build pipeline. It compiles YAML instruments, runs dbt, and produces the KLS.
Basic Usage
Section titled “Basic Usage”jin make # build current tenantjin make --tenant millesime.domaine_zufferey # build a specific tenantjin make --pack alptrack # build all tenants in a packjin make --all # build all tenants across all packsPre-Make
Section titled “Pre-Make”pre-make is the preparation phase. It has two channels:
- Source data — extracts XLSX → CSV, validates against the extraction contract, writes to
raw/ - User content — fetches notes and bookmarks from the SIS, writes them to
afs/notebook/*.yamlandafs/bookmarks/*.yaml
After pre-make, make has everything it needs and runs as a pure function.
jinflow pre-make # extract + publish SIS content (default tenant)jinflow pre-make millesime.domaine_zufferey # specific tenantjinflow pre-make --notes-only # just publish SIS content, skip extractionjinflow pre-make --extract-only # just extract sources, skip SISPre-make commits to git when it’s done (pre-make: sync sources + publish SIS content), which makes every build auditable: the AFS commit history shows exactly what changed between runs.
Where the SIS lives depends on the operating mode. In local mode pre-make reads a file; in cloud modes it calls the Explorer API. The developer doesn’t care.
Data Sync (—sync)
Section titled “Data Sync (—sync)”--sync copies CSVs from the Data Landing Zone (DLZ) into the tenant’s raw/ directory before building. Only changed files are copied (SHA-256 comparison against the previous manifest).
jin make --sync # sync DLZ → raw → buildjin make --all --sync # all tenants, only copy changed CSVsjin make --tenant millesime.domaine_zufferey --sync # single tenant with syncExtraction (—extract)
Section titled “Extraction (—extract)”--extract runs source-system-specific extraction scripts (e.g. Excel → CSV) in the DLZ before syncing. Implies --sync.
jin make --extract # extract Excel → CSV → sync → buildjin make --all --extract # extract + sync + build all tenantsExtraction is governed by the extraction contract (pipeline.yml at the tenant AFS root), which pins every source file by SHA-256, declares its expected schema, and fails hard on any mismatch. Read the Extraction Guide for the full trust-boundary model, the six source types, and the jin extract --contract inspection command.
Not all source systems have extraction pipelines. Tenants without one skip extraction and proceed to sync.
Operating Modes
Section titled “Operating Modes”make adapts to the operating mode without changing invocation:
- Local —
makeruns on your machine, reads and writes local files. - Proxy (P2P2P) —
makeruns on the data owner’s machine; the proxy serves the resulting KLS via tunnel. - Cloud (R2) —
makeruns locally, thenjinflow cloud syncuploads the KLS to R2. - Semi-Cloud —
makeruns locally; the SIS lives in the cloud andpre-makefetches from it remotely. - Make-as-a-Service —
makeruns in the cloud on push or cron; no local invocation.
Clean (—clean)
Section titled “Clean (—clean)”--clean clears intermediary build artifacts (compiled SQL, enriched CSVs) and forces a full rebuild. Does not touch the AFS or raw data.
jin make --clean # clean rebuildjin make --tenant millesime.domaine_zufferey --clean # reset single tenantSnapshots (—snapshot)
Section titled “Snapshots (—snapshot)”--snapshot freezes the KLS after a successful build. The snapshot is immutable — make will refuse to overwrite it.
jin make --snapshot # auto-tagged: YYYYMMDD-HHMMjin make --snapshot post-audit # named snapshot| Flag | Effect |
|---|---|
--sync | Copy changed CSVs from DLZ → raw/ |
--prune | Remove files from raw/ that no longer exist in DLZ (with —sync) |
--extract | Run extraction scripts, conditional on Excel file changes (implies —sync) |
--clean | Clean rebuild, clear intermediaries |
--snapshot [tag] | Freeze KLS after build |
--all | Build all tenants across all packs |
--pack <name> | Build all tenants in one pack |
--tenant <id> | Build a specific tenant (pack.tenant) |
--continue-on-error | Don’t stop on compiler/dbt errors |
--quiet | Suppress dbt output |
--skip-enrich | Skip CSV enrichment phase |
--skip-validate | Skip CSV schema validation |
--metadata-only | Only rebake metadata (logo, branding, about) — skip all build phases |
Build Phases
Section titled “Build Phases”0a Extract (--extract, source-system-specific)0b Sync from DLZ (--sync, copies changed CSVs to raw/)1a Validate CSVs (schema check against source system definition)1b Enrich CSVs (taxonomy generation, backfill, normalization)2 Compile (YAML → dbt SQL: signals, theses, verdicts, ...)3 dbt build (Bronze → Silver → Gold → Signals → Theses → ...)4 Post-build (pipeline graph, audit reports, PDF generation)5 Stamp + package (metadata, AFS archive, snapshot)Conditional Behavior
Section titled “Conditional Behavior”- —extract hashes Excel files against
_extract_manifest.json— skips extraction if unchanged - —sync only copies CSVs whose SHA-256 hash differs from the previous sync manifest
- —prune removes files from raw/ that no longer exist in DLZ (default: warn only)
- No-extraction systems are skipped with an info message (no xslx/ directory → no extract pipeline)
- Metadata-only changes auto-detected: if only tenant.yml, about.yaml, logo, or jinflow.yml changed since the last build, rebakes metadata without running dbt. Also available as
--metadata-only - Incremental builds reuse the existing KLS — dbt skips models that haven’t changed
- Failed builds are detected on retry (missing KLS stamp → automatic fresh start)
Examples
Section titled “Examples”# Daily routine: sync new data, rebuildjin make --all --sync
# After editing signals/theses: rebuild without re-syncing datajin make
# Fresh start after schema changesjin make --clean
# Just update logo/branding (no rebuild)jin make --metadata-only
# Freeze a good state before making changesjin make --snapshot before-refactor
# Build only the millesime packjin make --pack millesime --sync
# Extract new Excel files, sync, buildjin make --tenant millesime.domaine_zufferey --extract