— CUPEL · BY NEURABYTE

Ordinary TypeScript in. Certified Go out. Your project always runs.

Cupel is a maximally compatible certified TypeScript-to-Go system. Every grounded project stays executable in its exact pinned Node runtime, while every class-free, any-free region is automatically considered for machine-checkable promotion to readable native Go.

NORMATIVE SPEC v1.3.2 · SEPTEMBER 2026 · 29 SECTIONS (§0–§28) · @cupel/runtime
THE PRINCIPAL INVARIANTS
No source region is forced into an unvalidated native representation.
Native ineligibility never invalidates the grounded project.
A failed proof doesn't break your build. Regions that can't be promoted stay in the exact pinned Node capsule — behind stable facades, with the same behavior they had yesterday.
01 — THREE EXECUTION DESTINATIONS
PREFERRED
Readable native Go
Human-shaped Go with ordinary allocation, pointers, slices, escape analysis, and garbage collection. Bounded units, stable APIs, source-to-Go navigation.
WHERE CORRECT & USEFUL
Machine-oriented Go
Exact, validator-accepted state machines and dispatch loops for stateful or performance-sensitive regions — always reported separately, never counted as readable.
THE FLOOR
Exact Node capsule
Every unresolved region keeps running in the exact pinned Node deployment. A whole-project capsule is always a valid operational fallback.
ADMISSION PREFERENCE: ORDINARY TYPESCRIPT → AUTOMATIC CERTIFICATION → NATIVE GO WHERE VALIDATED → CAPSULE WHERE UNRESOLVED
02 — EVERY REGION, EXPLICITLY CLASSIFIED

Five assurance classes. No blurry claims.

Every managed source region carries exactly one execution class, and reports must account for all of them: CEN + GN + TN + MN + CAP = 1. A test result is never reported as a proof.

CLASS MEANING EVIDENCE
CEN Certified Exact Native — readable Go accepted by the final source-to-Go validator; participates in the strict equivalence theorem [CERT]
GN Guarded Native — native Go under explicit runtime guards; stateless or transactional, fail-closed on guard failure [CERT]+guards
TN Tested Native — passes differential tests, property tests, corpus replay, and benchmarks; deployable under a non-strict policy, never reported as certified [TEST]
MN Machine Native — machine-oriented Go with an explicit suffix: MN-CERT, MN-GUARDED, or MN-TEST; no subtype counts as readable decomposition per suffix
CAP Capsule — remains in the exact Node runtime; the reference execution path, with no native coverage credit [DEF]
03 — ONLY TWO CATEGORICAL EXCLUSIONS
class
Class declarations or expressions in the native dependency closure block native admission of that closure — and nothing else. The code still runs, in the capsule, until an ordinary validated rewrite removes it.
any
Implicit, explicit, resolved, or flow-contaminating any taints its closure out of native eligibility. Everything else — nullish operators, exceptions, async, generators, built-ins — is fair game for promotion.
These exclusions apply to native admission, not project execution. Cupel never rejects an otherwise runnable project because a region isn't eligible for Go.
04 — ZERO-EDIT PROMOTION, SIDE BY SIDE

Ordinary TypeScript. Human-shaped Go.

No proprietary syntax, no custom parser. Bare arithmetic is admitted when the synthesized proof validates; explicit intrinsics are the fallback where proof may fail. If any native proof is rejected, this exact file keeps running in Node.

ORDINARY .TS — WHAT YOU WRITE
export function totalBatch(
  items: DenseArray<LineItem>,
): Int53 {
  try {
    // 0 is statically an Int53 — certified elaboration
    let total: Int53 = 0;
    for (const item of items) {
      const label =
        item.description?.trim() ?? item.sku;
      if (item.quantity < 0) {
        throw { kind: "invalidQuantity",
          sku: item.sku, label } satisfies PricingError;
      }
      // bare * admitted — arithmetic proof synthesized
      const extended =
        item.quantity * item.unitPrice;
      const discount = item.discount ?? 0;
      // explicit intrinsic where proof may fail
      const net = Int53.subOrThrow(extended, discount);
      total = Int53.addOrThrow(total, net);
    }
    return total;
  } catch (error: unknown) {
    if (Int53Error.is(error)) {
      throw { kind: "overflow" } satisfies PricingError;
    }
    throw error;
  }
}
READABLE GO — WHAT VALIDATES
func TotalBatch(
    items cupel.DenseArray[LineItem],
) (cupel.Int53, error) {
    total := cupel.Int53(0)
    for it := items.Values(); it.Next(); {
        item := it.Value()
        label := item.SKU
        if item.Description.IsValue() {
            label = cupel.StringTrim(
                item.Description.Value())
        }
        if item.Quantity < 0 {
            return 0, PricingErrorInvalidQuantity{
                SKU: item.SKU, Label: label}
        }
        // direct * — the per-site proof validated
        extended := item.Quantity * item.UnitPrice
        discount := cupel.Int53(0)
        if item.Discount.IsDefined() {
            discount = item.Discount.Value()
        }
        net, err := cupel.Int53Sub(extended, discount)
        if err != nil { return 0, PricingErrorOverflow{} }
        total, err = cupel.Int53Add(total, net)
        if err != nil { return 0, PricingErrorOverflow{} }
    }
    return total, nil
}
ORDINARY GO MEMORY · EXACT OPTIONALITY, UTF-16 STRINGS, ARITHMETIC, ITERATION & EXCEPTION BEHAVIOR · STABLE FACADES
05 — TOOLING IS NORMATIVE, NOT A DEMO
cupel check
Per-region eligibility, taint paths, proof results, and capsule-retention reasons — classification, never a fake syntax error.
cupel fix
Idempotent canonical repairs, classified from DefinitionallyExact (auto-applied) to BehaviorChanging (approval required).
cupel explain
Why a construct was admitted, which proof was used, why synthesis failed, and the safest available repair.
cupel preview-go
The generated Go, the source-to-Go mapping, and every inserted temporary — before you commit to anything.
ALSO NORMATIVE: ground · propose · compile · validate · test · benchmark · report · package · TS LANGUAGE-SERVICE PLUGIN
EARLY ACCESSSPEC v1.3.2 · SEPTEMBER 2026

Migrate without a leap of faith.

The preferred outcome is zero-edit, bounded, human-shaped Go. The worst case is the exact Node app you already run — and every claim in between is classified and evidenced.

Also from Neurabyte: Cupel
Lore's core mechanisms are patent-pending. Product names are trademarks of their respective owners; listing an integration doesn't imply a partnership.
© 2026 NEURABYTE INC.