jevrecipes

Recipe catalog / requirement-testability

Check whether a requirement is testable

requirement-testability is a Jev recipe from the jev-recipes TypeScript package. Decide whether a requirement defines an observable way to distinguish meeting it from failing it. Use it when you need to check whether a requirement has clear, observable acceptance criteria before building it.

Last updated .

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

How do I use requirement-testability 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 { requirementTestability } from 'jev-recipes/requirement-testability';

const result = await requirementTestability({
  "requirement": "The dashboard should load quickly."
});
console.log(result);

What input does requirement-testability take?

FieldTypeNeeded
requirementstringRequired
contextstringOptional
minConfidencenumberOptional
Full input and result schemas
{
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "requirement": {
        "type": "string",
        "description": "One requirement whose completion criteria need review."
      },
      "context": {
        "type": "string",
        "description": "Supplied definitions, acceptance criteria, and observation conditions."
      },
      "minConfidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "required": [
      "requirement"
    ]
  },
  "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"
        ]
      },
      "verdict": {
        "type": "string",
        "enum": [
          "testable",
          "not_testable",
          "unclear"
        ]
      },
      "confidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      },
      "probabilities": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "enum": [
            "testable",
            "not_testable",
            "unclear"
          ]
        },
        "additionalProperties": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "required": [
          "testable",
          "not_testable",
          "unclear"
        ]
      }
    },
    "required": [
      "model",
      "usage",
      "status",
      "verdict",
      "confidence",
      "probabilities"
    ],
    "additionalProperties": false
  }
}

What does a requirement-testability 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 requirement-testability.

{
  "model": "demo-fixture",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "status": "ready",
  "verdict": "not_testable",
  "confidence": 0.96,
  "probabilities": {
    "testable": 0.02,
    "not_testable": 0.96,
    "unclear": 0.02
  }
}

Input

Supply non-empty text for each required field. Optional context must also be non-empty when supplied. minConfidence defaults to 0.8 and accepts values from 0 to 1.

See shared options and behavior for client configuration, validation, and errors.

Result

Verdict Meaning
testable The supplied requirement and definitions establish observable conditions for distinguishing pass from fail.
not_testable The intended requirement is understandable, but the supplied criteria do not define an observable pass/fail boundary.
unclear The requirement or its references are too ambiguous to determine what would need to be observed.

The result has status: 'ready' when confidence meets minConfidence and the verdict is not unclear. Otherwise it has status: 'review'. An unclear verdict always requires review, even at high confidence or with a zero threshold. ready describes confidence in the assessment, not approval to act.

Decision boundaries

These cases document the intended decision policy. They are not live model evaluation results.

Supplied situation Intended verdict
"For a rejected password, display the text Password not accepted beneath the password field." testable
"The page loads in at most two seconds" with the measurement start, end, and test conditions supplied. testable
"The dashboard should load quickly" with no further definition. not_testable
"Follow the standard" without identifying or supplying that standard. unclear

Reuse

This checks whether completion could be observed using the stated criteria. step-complete checks whether supplied evidence shows that a known condition has been met.

Uses the shared choice helper and makes one logical Jev request. It does not call another recipe or perform application actions.

Limits

How accurate is requirement-testability?

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 requirement-testability?