REPOSITORY ANALYSIS

discern

A semantic control-flow library for Effect: Jev's `Choice` / `Noul` / `Score` answers become typed branches. Thresholds are caller-supplied, and an answer below them takes an explicit `Uncertain` branch the compiler forces you to handle rather than being rounded up to the top label. Procedure routing filters candidates with deterministic predicates first and skips the model call entirely when one candidate survives.

E2 · source reviewedPublic material or source evidence was reviewed. A fixed-version source review requires checking a pinned revision; this is not a reproduction, performance endorsement, or safety guarantee.
Stars
12
Forks
2
License
MIT
Last commit
2026-09-22

What Jev does here

Jev returns a structured decision for the local program; consult the source for the exact decision policy.

Adds structured choices or scores to the workflow; performance and cost benefits have not been independently verified.

The cited src/index.ts was checked for separate match/miss thresholds and explicit Uncertain dispatch. No Effect workflow or model request was executed here. The uncertainty branch is inspectable control flow, not evidence that the thresholds are calibrated.

What task does this project fit?

Make uncertainty an explicit control-flow outcome in an Effect application.

Material analysed:

From input to action

  1. Declare semantic observations independently of policy.
  2. Batch/cache/replay evidence through the model layer.
  3. Evaluate ordered Match, Miss and Uncertain branches before invoking a handler.

Implementation details that matter

A middle probability is not automatically false

A pattern can declare a match threshold and a separate miss threshold. Values between them remain Uncertain; negation preserves that uncertainty instead of collapsing it.

Inspect the supporting source ↗

Missing uncertainty handling fails explicitly

The dispatcher uses an onUncertain handler or raises UncertainMatchError. A low-confidence higher-priority rule does not silently fall through to an unrelated fallback.

Inspect the supporting source ↗

When to choose it

Useful when semantic evidence should feed auditable typed policies. It does not choose the correct thresholds for you; those require validation against actual outcomes.

How to inspect it yourself

Trace pattern evaluation and dispatch in src/index.ts. Use a fixed 0.62 probability between missBelow=0.5 and match=0.8, then inspect the explicit uncertainty branch.

Limits of this review

  • No Effect workflow or model call was executed here.
  • Replay and cache consistency are engineering properties, not proof that cached semantic judgments are correct.
Primary material used in this analysis