Skip to content

Instrument Author Cheat Sheet

jinflow currently ships seven authorable instrument types, arranged in the analytical diamond:

#InstrumentWhat it doesCompiles to
1SignalDetect a pattern in Gold data (or Silver for audits) — the leaf-level instrumentsignal_findings__<id>.sql
2PerspectiveAggregate findings from multiple Signals into an entity-level lenssignal_findings__<id>.sql (signal with type: perspective)
3ThesisEvaluate a business question against Signal evidence — produces a Verdict statusthesis_verdicts__<id>.sql
4VerdictExplain the root cause of a confirmed Thesis with actionable recommendationverdict_findings__<id>.sql
5Subject MatterAtomic, attributed expert knowledge — the Wisdom layersmebit_registry.sql (+ verdict SQL for Level 1)
6DossierCurated narrative grouping of Subject Matter entriesbitbundle_registry.sql + bitbundle_memberships.sql
7ReportAudience-targeted structured summary — executive, operational, data-qualityreport_registry.sql (+ per-section models)

Everything is YAML-defined. All seven types get validated by a <type>check.py script and compiled by a <type>compile.py script — both run automatically inside jinflow make.

TypeDirectoryFilename patternID rule
Signalsignals/signal_*.yamlsignal_id = filename
Perspectiveperspectives/perspective_*.yamlsignal_id = filename (type: perspective)
Thesistheses/thesis_*.yamlthesis_id = filename
Verdictverdicts/verdict_*.yamlverdict_id = filename
Subject Mattersmebits/smebit_*.yamlsmebit_id = filename (slug preserved)
Dossierbitbundles/bb_*.yamlbitbundle_id = filename (slug preserved)
Reportreports/report_*.yamlreport_id = filename

Filename slugs smebit_* and bb_* (and the directories smebits/ and bitbundles/) are preserved for git-history compatibility — the vocabulary rename to Subject Matter / Dossier is display-facing only.

Thirteen types, each with its own DSL block in the YAML:

TypeWhat it checks
balanceTwo aggregates match (e.g. usage vs billing)
mandatory_itemQualifying entities have required items
distribution_outlierZ-score anomalies against reference
duplicateDuplicate records by field combination
ratioNumerator / denominator within tolerance
trendWorsening metric over time
temporal_sequenceEvents in expected order
silver_auditSilver-layer data quality (validity or activity variant)
perspectiveAggregate findings across multiple Signals
entity_filterEntities matching a set of conditions
reconciliationDual fact-table comparison
enrichmentDimension + fact derived metric
hand_writtenCustom SQL (bypass the DSL, keep the contract)

Standard Signals:

severity_rules:
- above: 10.0 # if value > 10 → high
level: high
- above: 2.0 # if value > 2 → medium
level: medium
- default: low # everything else

Perspectives (compound):

severity_rules:
- conditions:
- field: finding_count
above: 50
- field: total_risk
above: 10000
level: high
- field: finding_count
above: 10
level: medium
- default: low
RoleWeightImpact
primary3Must have findings for “confirmed”
supporting2Strengthens the case
context1Background, not decisive
countervariesReduces score if findings exist

Must have at least one primary entry.

verdict:
thresholds:
confirmed: 0.65 # score >= 0.65 → confirmed
plausible: 0.35 # score >= 0.35 → plausible
# score < 0.35 → not_observed

Rule: 0 <= plausible < confirmed <= 1

ValueMeaning
complianceRegulatory / policy exposure
data_qualityData integrity concern
financial_anomalyDirect revenue / cost impact
operationalEverything else operational

No custom categories — validator enforces the enum.

Four-letter codes for URL slugs and inter-thesis references. Validator requires a vowel (a, e, i, o, u) at position 2 or 3 so the code can be spoken aloud.

  • FRR — three consonants
  • RELI — E at position 2
  • FIRM — I at position 2
CategoryWhat it means
process_failureBroken or incomplete business process
system_failureIT system malfunction or integration gap
data_qualityStale, missing, or inconsistent master data
behavioralHuman behaviour patterns (workarounds, skipped steps)
structuralOrganizational or contractual misalignment
externalExternal factors (supplier, regulatory)
confidence:
base: 0.6 # starting confidence
boost_if:
- signal_id: signal_x
field: finding_count
above: 50
boost: 0.2 # max 0.3 per boost
KindScopePortable?
wisdomCross-tenant / pack-level knowledgeYes — travels with the pack
fiftycentsTenant-specific, contextual knowledgeNo — anchored to one tenant

For wisdom: scope.tenant_id: "*" or absent. For fiftycents: scope.tenant_id must name a real tenant.

LevelHas check block?Produces verdict?
0 (Statement)NoRegistry only
1 (Check)Yesconfirmed / violated / no_data

data_quality · mapping · business_rule · process · system · seasonal · historical · structural

Always fill the why: field. The validator warns (not errors) if absent — but the nudge ensures the question is asked. The difference between data and knowledge is the why.

TypeNeedsShows
kpi_griditemsKey metric boxes
calloutitemsHighlighted callout
severity_barquerySeverity distribution bar
tablequeryData table
textcontentStatic text
footertextFooter text
chart_barqueryBar chart
chart_trendqueryTime-series chart
{{ gold('entity_name') }} -- resolves to {{ ref('gold_entity') }}
{{ silver('entity_name') }} -- resolves to {{ ref('silver_entity') }}
{{ ref('model_name') }} -- dbt reference
{{ var("tenant_id") }} -- current tenant
ContractUsed byReference
gold.v1SignalsGold entity fields
silver.v1silver_audit SignalsSilver entity fields
findings.v1Perspectives (input)Signal-findings output shape
verdict.v1Verdicts (output)Verdict findings output shape
smebit.v1Subject Matter (output)Registry + Level-1 verdict shape
bitbundle.v1Dossiers (output)Registry + memberships shape
report.v1Reports (output)Registry + section shape

All user-facing text must have en, de, fr:

title:
en: "English title"
de: "Deutscher Titel"
fr: "Titre français"

Applies to: statement, interpretation, explanation, recommendation, subject, content, why, narrative, title, description, display_name.

1. Write YAML under the tenant AFS
2. jinflow make <pack>.<tenant> ← validates, compiles, builds
3. jinflow explore <pack>.<tenant> ← see results
4. Iterate

All <type>check.py validators and <type>compile.py compilers run automatically inside jinflow make. You can invoke them standalone with --check (dry-run) and --afs <path> while authoring for immediate feedback.

jazzisnow jinflow is a jazzisnow product
v0.64.7 · built 2026-09-20 19:48 UTC