zf-pipeline-contracts

Pipeline contract enforcement for ZINC-Fusion-V15 soybean oil forecasting system. Use when working on any ZINC-Fusion-V15 task involving schema definitions, training pipelines, L0 specialists, data ingestion, MLflow configuration, or debugging contract drift. Triggers on mentions of Prisma database, specialist models, horizon encoding, quantile outputs, OOF predictions, or any ZINC-Fusion development work.

$ Installieren

git clone https://github.com/zincdigitalofmiami/ZINC-Fusion-V15 /tmp/ZINC-Fusion-V15 && cp -r /tmp/ZINC-Fusion-V15/.claude/skills/zf-pipeline-contracts ~/.claude/skills/ZINC-Fusion-V15

// tip: Run this command in your terminal to install the skill


name: zf-pipeline-contracts description: Pipeline contract enforcement for ZINC-Fusion-V15 soybean oil forecasting system. Use when working on any ZINC-Fusion-V15 task involving schema definitions, training pipelines, L0 specialists, data ingestion, MLflow configuration, or debugging contract drift. Triggers on mentions of Prisma database, specialist models, horizon encoding, quantile outputs, OOF predictions, or any ZINC-Fusion development work.

ZF Pipeline Contracts

Enforce schema, drift prevention, and pipeline contracts across the L0→L1→L2→L3 architecture for ZINC-Fusion-V15.

Canonical Naming (Non-Negotiable)

ItemCanonicalNever Use
ProjectZINC-Fusion-V15CBI-V15, CBI, zinc_fusion
DatabasePrisma Postgres-
Python modulefusion.*zinc_fusion.*, cbi.*
Model term"Specialists""Big-10", "Big-8", "buckets"

If you drift to legacy names, stop and correct immediately.

L0 Architecture (12 Models)

IDNameTypeDomain
0coreTimeSeriesPredictorZL price action
1crushTabularPredictorCrush margin dynamics
2chinaTabularPredictorChinese demand/policy
3fxTabularPredictorCurrency impacts
4fedTabularPredictorFed policy
5tariffTabularPredictorTrade policy
6energyTabularPredictorEnergy prices
7biofuelTabularPredictorBiofuel demand
8palmTabularPredictorPalm oil competition
9volatilityTabularPredictorVolatility regimes
10substitutesTabularPredictorVeg oil substitution
11trump_effectTabularPredictorTrump/policy regime dynamics

Time Grains (LOCKED)

GrainPK ColumnHorizon StepsUse Case
_1hts_eventN/A (features only)Intraday volatility, sentiment
_1das_of_date5, 21, 63, 126Core forecasting, all OOF

Only _1h and _1d exist. Do not invent _4h, _8h, _1w grains.

Pipeline Layers

L3: Risk Layer      → Monte Carlo → VaR/CVaR → Procurement signals
        ↑
L2: Ensemble Layer  → Weighted fusion → P10/P50/P90 forecasts
        ↑
L1: Meta-Learner    → TabularPredictor stacking OOF from L0
        ↑
L0: Base Models     → 1 Core + 11 Specialists (12 total)

Neural Sentiment → ALL Specialists

Sentiment feeds ALL specialists, not just tariff/china/biofuel:

SpecialistWeightRationale
crush0.10WASDE/supply sentiment
china0.15Trade/demand sentiment
fx0.08Currency sentiment
fed0.10Monetary policy tone
tariff0.15Trade policy sentiment
energy0.12Energy/crude sentiment
biofuel0.12Biofuel mandate sentiment
palm0.08Palm/deforestation sentiment
volatility0.05Risk sentiment amplifier
substitutes0.05Cross-commodity sentiment

Total: 1.00

Top 3 Failure Modes

PriorityFailureCauseDetection
1Contract driftColumn names diverge from codeSchema diff query
2Join-key driftL0 outputs don't uniquely key on (as_of_date, horizon_steps)Duplicate check
3Quantile crossingp10 > p50 or p50 > p90Monotonicity query

Reference Files

Load these based on task:

FileLoad When
references/naming_contracts.mdStarting any ZF work
references/schema_contracts.mdCreating/modifying tables
references/horizon_encoding.mdWorking with time horizons
references/hourly_contracts.mdWorking with 1h grain data
references/neural_sentiment_routing.mdSentiment feature engineering
references/guardrail_queries.sqlBefore/after data mutations
references/manifest.yamlAdding data sources
references/new_specialist_checklist.mdAdding L0 specialist

Quick Validation Workflow

Before any commit touching pipeline code:

  1. Read references/guardrail_queries.sql
  2. Run quantile crossing check
  3. Run join-key uniqueness check (per specialist)
  4. Run horizon encoding check
  5. If adding tables, verify against references/schema_contracts.md