New:Socket for Asana Is Now Available.Learn more
Get Started

@sigrank/cascade

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sigrank/cascade

Canonical cascade math for SigRank — pure functions for Yield, SNR, Leverage, Velocity, 10xDEV, and the 24-stage RS05 class taxonomy.

npmnpm
Version
0.1.1
Version published
Weekly downloads
606
0.83%
Maintainers
1
Weekly downloads
 
Created
Source

@sigrank/cascade

Canonical cascade math for SigRank. Pure functions only — no filesystem, no API, no auth, no transport.

This is the single source of truth for:

  • Υ Yield = (cacheRead × output) / input²
  • SNR = output / (input + output)
  • Leverage = cacheRead / input
  • Velocity = output / input
  • 10xDEV = log10(cacheRead / input)
  • RS05 24-stage class taxonomy

Install

npm install @sigrank/cascade
# or
bun add @sigrank/cascade

Usage

cascade(input, output, cacheCreate, cacheRead)

Compute the full cascade from 4 token pillars.

import { cascade } from "@sigrank/cascade";

const c = cascade(1_251_211, 11_296_121, 128_196_310, 2_555_179_769);

console.log(c.yield);     // 18436.98
console.log(c.leverage);  // 2042.2
console.log(c.velocity);  // 9.028
console.log(c.snr);       // 0.9001
console.log(c.dev10x);    // 3.31
console.log(c.class);     // "BEARER I"

classify(totalTokens)

Classify an operator by total token volume into one of 24 RS05 stages.

import { classify } from "@sigrank/cascade";

classify(2_694_000_000);  // "BEARER I"
classify(0);              // "IGNITER III"

round(n, d)

Round to d decimal places. Returns null for non-finite inputs.

import { round } from "@sigrank/cascade";

round(3.14159, 2);  // 3.14
round(Infinity, 2); // null

fieldStats(yields, leverages?, velocities?, snrs?)

Compute field statistics from an array of yields. Returns null if fewer than 5 data points.

import { fieldStats } from "@sigrank/cascade";

const stats = fieldStats([100, 200, 300, 400, 500, 600, 1000]);
// { count: 7, median_yield: 400, top_10_percent_yield: 1000, ... }

percentileOf(value, field)

Percentage of field values below the given value.

import { percentileOf } from "@sigrank/cascade";

percentileOf(900, [100, 200, 300, 400, 500, 600, 1000]); // 85.7

rankOf(value, field)

Rank of a value against a field (1 = best/highest).

import { rankOf } from "@sigrank/cascade";

rankOf(900, [100, 200, 300, 400, 500, 600, 1000]); // 2

operatorSignature(cascadeResult)

Generate a compact operating signature from cascade metrics.

import { cascade, operatorSignature } from "@sigrank/cascade";

const c = cascade(1_251_211, 11_296_121, 128_196_310, 2_555_179_769);
const sig = operatorSignature(c);
// { code: "L2042-V9.03-S0.90-C11.34", archetype: "BALANCED_ELITE", dominant_trait: "combined reuse + throughput" }

evaluateOperator(pillars, options?)

Build a full OperatorEvaluation from pillars, optionally with field data for benchmarking.

import { evaluateOperator } from "@sigrank/cascade";

const eval = evaluateOperator(
  { input: 1_251_211, output: 11_296_121, cache_read: 2_555_179_769, cache_write: 128_196_310 },
  {
    codename: "MOSES",
    fieldYields: [1000, 2000, 3000, 4000, 5000, 18436.98],
  }
);

Exports

ExportType
cascade()function
classify()function
round()function
fieldStats()function
percentileOf()function
rankOf()function
operatorSignature()function
evaluateOperator()function
RS05_CLASS_THRESHOLDSconstant
CascadeResultinterface
OperatorEvaluationinterface
FieldStatsinterface
ClassThresholdinterface

Canonical reference

MO§ES Υ 18436.98 from (1251211, 11296121, 128196310, 2555179769).

License

UNLICENSED

Keywords

sigrank

FAQs

Package last updated on 26 Aug 2026

Related posts