Prysm
// Module — Data Contracts

Stop finding out about bad data from your customers.

Declarative rules on the data your team relies on — field types, required columns, allowed values, freshness windows. PrysmOS re-checks on a schedule, warns or blocks on violation, tracks every breach, and triggers fixes before the wrong numbers ship.

  • Per-field type, required & value rules
  • Freshness checks, now or on schedule
  • Warn while you tune, block when it matters
  • Triggers fire checks & unattended Juno runs
orders_feed.contract.ts
contract("orders_feed", {
rules: [
"email: string, required",
"status: oneof(active, paused, churned)",
"amount: number, min 0",
"order_date: date, required",
"freshness: maxAgeHours 6",
],
enforce: "block", // warn while you tune
on_violation: ["notify:#data-ops", "trigger:juno.repair"],
});
next scheduled check · 11mlast run · all 5 rules passing

one contract covers sheets, connection imports & script outputs

// How it works

Four steps between you and trusted data

A contract takes two minutes to write and then watches forever — quietly, on a schedule, on every write.

01

Declare the rules

Write the contract once: per-field types, required columns, allowed values, and a maxAgeHours freshness window. Plain, readable, versionable.

02

Checks run themselves

Fire a check on demand or let the schedule handle it — imports, syncs, and script outputs included. No babysitting.

03

Warn or block

Warn mode logs violations while you tune. Block mode quarantines failing rows and pauses everything downstream.

04

Violations take action

Every breach is tracked with a status and can fire a trigger — notify a channel, hit a webhook, or send Juno in to repair and re-check.

// What's inside

Rules that actually enforce themselves

Not documentation nobody reads — live rules, checked continuously, with teeth when you want them.

Schema rules per field

Type and required checks on every field — strings, numbers, dates, booleans — plus nullable and regex patterns for the messy real world.

Allowed values

oneof enums, min/max ranges, and fixed value sets. status = 'archived' never sneaks through again.

Freshness windows

Set maxAgeHours and PrysmOS tracks when data last changed. If the nightly feed stalls, the contract trips before your dashboard shows a frozen chart.

Warn vs. block

Pick enforcement per contract: warn for visibility while you tune, block when the data is load-bearing and bad rows must not spread.

Row-level quarantine

In block mode, failing rows are held with per-row reasons — clean them, approve them, or send them back.

Violation tracking

Every breach is a record with a status — open, acknowledged, resolved. Failing rule, sample rows, who fixed it, when. An audit trail instead of a shrug.

Run now or on schedule

Kick a check off the moment you suspect something, or let contracts re-validate on whatever cadence the data deserves.

Coverage gap analysis

See which sheets, imports, and outputs have no contract at all — and which rules your critical data is missing. The gaps surface before they hurt.

Violations fire triggers

A breach can notify #data-ops, call a webhook, or launch an unattended Juno run to repair the data automatically.

Rules that version

Contracts are declarative and diffable — review changes, see when a rule tightened, roll back in a click.

Covers every inlet

Sheets, connection imports, and script outputs can all carry contracts. One standard for every byte.

// See it run

Watch a contract fail — then fix itself

Run the check, watch two rules trip, and see exactly what block mode does about it. Then apply the fix and go green.

app.prysmhq.co/contracts/orders-feed

orders_feed

5 rules · checks every 30m

awaiting check
email: string, required
status: oneof(active, paused, churned)
amount: number, min 0
order_date: date, required
freshness: max 6h
enforcement · block (warn available)

Violation log · status tracked per breach

Every check, violation and resolution lands on this timeline. Run the check →

every event is a record

Rule, sample rows, who fixed it, when. Exportable for audits — timestamps included.

// Triggers

One engine for everything that should happen on its own

Cron, interval, and event triggers live in one place — firing contract checks or unattended Juno runs on timezone-aware schedules, with a full history of every firing.

triggers · orders workspace

all times localized

orders-feed-contract

cron · */30 * * * * · America/New_York

runs contract check · orders_feed

active

nightly-repair-agent

cron · 0 2 * * * · UTC

juno run · instruction: fix & re-check failing rows

active

on-violation-escalation

event · contract.violation

juno run · tools: sheets,http · cap: 25 calls

active

recent trigger runs

  • 04:00orders-feed-contract fired · check failed (2 rules)
  • 04:00on-violation-escalation fired · juno run started
  • 04:12juno run finished · 11 tool calls · fix proposed
  • 04:20orders-feed-contract fired · all 5 rules passing

Cron, interval, or event

One engine for all three: cron expressions, simple intervals, or event hooks like contract.violation. No separate schedulers to reconcile.

Unattended Juno runs

A trigger can wake Juno with an instruction, a tool allowlist, a model override, and a hard cap on tool calls — autonomy with a leash.

Timezone-aware

Schedules pin to a real timezone, so '02:00' means your 02:00 — through daylight saving and across regions.

Every firing on record

Trigger run history shows what fired, when, and what it did — including which Juno runs a trigger started and how they ended.

// In the wild

Three ways contracts save the week

freshness

The stale nightly feed

A partner CSV lands at 2am — except tonight it didn't. Six hours past maxAgeHours, the freshness contract trips: block mode pauses the exec dashboard, #data-ops gets pinged, and a Juno trigger drafts the 'feed is late' note before you've had coffee.

block mode

Bad rows never make it in

A bulk import has 38 rows where status reads 'archived' — a value nobody agreed on. Block mode quarantines them with per-row reasons while 14k clean rows flow through. Fix, approve, done.

audit trail

Compliance-ready by default

Auditors ask when the revenue numbers were last verified. You export the contract log: every check, every violation, every resolution — timestamps included. The audit takes an afternoon, not a quarter.

// Questions

Fine print, answered

Warn logs the violation and notifies whoever you choose — nothing stops. Block goes further: failing rows are quarantined and downstream consumers (dashboards, endpoints) pause until the check clears. Most teams start in warn, then graduate contracts to block once they're tuned.

// One workspace

Put a contract on the data you can't afford to be wrong about.

Two minutes to write, forever on watch. Free to start — no credit card required.