jevrecipes

Recipe catalog / deadline-risk

Grade the risk of missing a deadline

deadline-risk is a Jev recipe from the jev-recipes TypeScript package. How at risk is the work of missing deadline given progress, from on track to already missed or impossible? Use it when a supervisor or planner has a stated deadline and a progress report and needs a graded read on whether to escalate, replan, or leave the work alone.

Last updated .

Explore this recipe interactively · Source and implementation guide · Markdown version

How do I use deadline-risk in TypeScript?

Install with npm install jev-recipes. Requires Node.js 22.9 or newer and ES modules. Set TYPESAFE_API_KEY in your server environment for live calls, which send input to TypeSafe and use API quota. See the installation guide.

import { deadlineRisk } from 'jev-recipes/deadline-risk';

const result = await deadlineRisk({
  "deadline": "The migrated customer records must be live in the new CRM by end of day Friday, per the signed contract. It is now Thursday at 6pm.",
  "progress": "The export from the old system finished Wednesday. The import script rejects about 30% of records with a schema mismatch that nobody has diagnosed yet. The engineer who wrote the field mapping is out until Monday. No fallback or partial go-live has been agreed with the customer.",
  "minConfidence": 0.8
});
console.log(result);

What input does deadline-risk take?

FieldTypeNeeded
deadlinestringRequired
progressstringRequired
minConfidencenumberOptional
Full input and result schemas
{
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "deadline": {
        "type": "string"
      },
      "progress": {
        "type": "string"
      },
      "minConfidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "required": [
      "deadline",
      "progress"
    ]
  },
  "result": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "model": {
        "type": "string"
      },
      "usage": {
        "type": "object",
        "properties": {
          "input_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "output_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "input_tokens",
          "output_tokens"
        ],
        "additionalProperties": false
      },
      "status": {
        "type": "string",
        "enum": [
          "ready",
          "review"
        ]
      },
      "score": {
        "type": "number",
        "minimum": 0
      },
      "level": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
      },
      "confidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      },
      "probabilities": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      },
      "risk": {
        "type": "string",
        "enum": [
          "none",
          "minor",
          "moderate",
          "high",
          "missed"
        ]
      }
    },
    "required": [
      "model",
      "usage",
      "status",
      "score",
      "level",
      "confidence",
      "probabilities",
      "risk"
    ],
    "additionalProperties": false
  }
}

What does a deadline-risk result look like?

This hand-authored response demonstrates the contract. It is not a model accuracy measurement. Run it without an API key: npx jev-recipes demo deadline-risk.

{
  "model": "demo-fixture",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "status": "ready",
  "score": 2.99,
  "level": 3,
  "confidence": 0.82,
  "probabilities": {
    "0": 0,
    "1": 0.01,
    "2": 0.08,
    "3": 0.82,
    "4": 0.09
  },
  "risk": "high"
}

Input

See shared options and behavior for client configuration, validation, and errors. Types are inferred from this folder's Zod 4 schemas.

Result

risk is one of none, minor, moderate, high, missed, taken from the most likely rubric level. level is that level's index from 0 to 4. score is Jev's expected value across the rubric and can fall between levels; use it for ranking or thresholds where a single label loses information.

A result is ready when confidence meets minConfidence. Otherwise it is review and still carries the graded values for inspection. probabilities is keyed by level index.

Reuse and calls

Uses the shared score helper. This folder owns the question, the rubric wording, and the review policy. A live invocation makes one logical Jev request.

Limits

The grade reflects what the two texts say about remaining work, blockers, and time left; the recipe does not read calendars or compute durations, so state the time remaining explicitly rather than only giving dates. A progress report that omits blockers or overstates completion will earn a better grade than the work deserves, and the recipe cannot detect that. The grade does not choose a response. Whether to escalate, cut scope, or renegotiate the deadline is a decision for the caller.

Example input

demo.json contains editable input and a hand-authored response. After installing jev-recipes, npx jev-recipes demo deadline-risk shows an offline illustration, not an accuracy measurement. Use npx jev-recipes describe deadline-risk to inspect the input and result schemas.

How accurate is deadline-risk?

Fixture only

No verified live accuracy measurement is available. Evaluate representative cases before using this decision in your workflow.

Use the evaluation guide to measure this decision on your own labeled cases.

What are the limits of deadline-risk?