Skip to content

About

Stress-test disruptions across connected industries and supply routes. Trace how shocks travel through a dependency graph, compare feasible responses, and reproduce each scenario from its sources and assumptions.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

82 stars

Watchers

9 watching

Forks

Latest commit

 

History

38 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CascadeLens

Trace a disruption through a supply network and compare the responses available.

CI CodeQL Latest release Apache-2.0 license Python 3.11 or newer

Open the live product · Run in 60 seconds · Explore 16 cases · Read the docs · Inspect the evidence

CascadeLens overview showing the Suez route scenario, bounded results, and verified release scope

When a shipping route closes, an operations analyst needs to know which suppliers are exposed, how soon the disruption could reach production, and where a buffer would help. CascadeLens turns that question into a scenario another analyst can rerun. It freezes the information available at a chosen date, maps the dependencies and propagates a shock over time.

In the Suez case, you can compare rerouting with adding inventory, see how their estimated impacts change across assumptions, and inspect the cost and feasibility of each response. The exported RiskPack keeps the graph, assumptions and results together so a reviewer can reproduce the comparison. Explore the Suez scenario

60-second Python start

pip install "cascadelens @ git+https://github.com/limingrui679-design/CascadeLens.git@v0.6.0"
cascadelens demo --out demo-riskpack

The second command runs a complete scenario, writes a checksummed RiskPack, and recomputes it. No Node.js setup or external data is required.

How to read the output

A run takes a WorldGraph snapshot at a frozen decision cutoff and reports lower, central, and upper impacts. Compare feasible Pareto trade-offs to see which combinations offer the largest impact reduction at each cost. The Suez example returns scenario_only and writes a RiskPack whose metadata and analytical outputs are recomputed during verification.

Use your graph
JSON · CSV · GraphML · NetworkX
Import guide →
Use Python
CLI · API · Jupyter
Quick start →
Check the method
Equations · baselines · failure gates
Methods →

Thirty-second CascadeLens Workbench demonstration: switch cases, change parameters, recompute bounds, and export analysis

Real local run · 16-case selector · 5 × 5 normalized-severity surface · evidence-gated decision · JSON + decision-brief export

16
executable cases
11
connector contracts
4,027
normalized official-source facts
PASS
Node + Python unit suites

Explore all 16 cases

CascadeLens capability matrix across sixteen complete scenario-only pipelines

01 · Suez route
Maritime trade · chain
02 · Semiconductors
Manufacturing · branch/merge
03 · Medical PPE
Public health · branch/merge
04 · Commodity compound
Food + energy · cycle
05 · Panama drought
Climate + logistics · activation
06 · Red Sea routing
Shipping · expiry
07 · Baltimore port
Infrastructure · chain
08 · Refining hurricane
Energy · chain
09 · Critical minerals
Technology policy · chain
10 · Sanctions change
Compliance · chain
11 · Drug shortage
Medicine access · chain
12 · Food export compound
Agriculture · compound
13 · Health interoperability
Health IT · branch/merge
14 · Behavioral evidence
Experimentation · branch/merge
15 · Regeneration equity
Housing + place · branch/merge
16 · Portfolio concentration
Fiduciary risk · chain

9 context-grounded re-stresses + 7 synthetic stress fixtures. Public pages frame questions; they do not supply the assumed topology, weights, shocks, or intervention effects.

One comparison plane—not sixteen disconnected demos

Decision lens What the executable task makes visible
Health information systems Terminology, provenance, accountable review, and population reporting
Behavioral evaluation Measurement, assignment, response signals, reversible rollout, and null-result discipline
Place-based policy Housing, access, local business continuity, affected groups, and transition costs
Portfolio risk Concentration, liquidity, mandate constraints, beneficiary objectives, and fiduciary limits

The generated capability matrix maps every case to 15 analytical, engineering, decision, and domain capabilities. The live case library renders the same matrix and filters from the same specifications.

Why CascadeLens

Most risk demos collapse sources, assumptions, inference, and outcomes into one number. CascadeLens keeps them separate from input to export.

flowchart LR
    A["Sources + manifests"] --> B["WorldGraph"]
    C["ShockScript"] --> D["Bounded engine"]
    B --> D
    D --> E["Lower"]
    D --> F["Central"]
    D --> G["Upper"]
    E & F & G --> H["InterventionLab"]
    E & F & G --> I["Observability frontier"]
    H & I --> J["RiskPack"]
    J --> K["Recompute + verify"]
Loading
Evidence stays graded
Observed, reported, verified, extracted, and inferred links never silently merge.
Time stays explicit
Valid time and knowledge time block future information at a frozen cutoff.
Decisions stay reversible
Costs, lead times, constraints, alternatives, and reversal thresholds remain visible.

Develop the hosted interface

git clone https://github.com/limingrui679-design/CascadeLens.git
cd CascadeLens
npm ci
npm run generate:catalog
npm run generate:cases
npm run dev

Open http://localhost:3000, or use one focused path:

Goal Start here
Explore without installing Live product
Analyze your own graph `cascadelens run --graph <csv
Use a notebook or NetworkX Jupyter + NetworkX guide
Create and verify a RiskPack cascadelens pack --graph <file> --out riskpack · cascadelens verify riskpack
List or rebuild cases npm run cascadelens -- cases list · cases build <slug>
Maintain the hosted demo npm ci · npm run ci

Change an assumption. Watch the boundary move.

CascadeLens workbench with editable shock assumptions, bounded results, and a Pareto frontier

1 · Compile
Edit a declared shock; never mutate the sealed source snapshot.
2 · Compare
See known, verified, and assumption envelopes side by side.
3 · Export
Share state or export machine-readable output for local verification.

The workbench switches among all 16 reviewed cases and accepts a user WorldGraph plus ShockScript. Each run can recompute a 5 × 5 normalized-severity–transmission sensitivity surface, export machine-readable JSON, and generate a stakeholder-facing Markdown decision brief that carries the same scenario_only and evidence_required boundaries. For binary disable operations, the surface discloses a partial-capacity proxy while preserving the binary reviewed base run. Imported topology stays user-provided and unverified.

Every edge carries its own evidence

WorldGraph explorer showing bitemporal evidence and an assumed dependency chain

Grade Lower Central Upper
Official observed ✓ ✓ ✓
Entity reported ✓ ✓ ✓
Third-party verified — ✓ ✓
Text extracted — — ✓
Model inferred — — ✓
flowchart LR
    V["Valid time<br/>When was it true?"] --> G["Eligible graph at day t"]
    K["Knowledge time<br/>When was it knowable?"] --> G
    G --> R["Daily recomputation"]
    R --> O["Mean · peak · end state"]
Loading

Confidence never upgrades a weaker evidence grade. Extracted and inferred links remain outside lower and central estimates.

One question → one verifiable RiskPack

flowchart LR
    Q["Decision question"] --> S["Sealed graph<br/>+ ShockScript"]
    S --> B["Lower · central · upper<br/>cascade bounds"]
    B --> D["Options · evidence priorities<br/>+ benchmark gate"]
    D --> R["Checksummed<br/>RiskPack"]
    R --> V["Independent recomputation<br/>verify or reject"]
Loading
Open the complete RiskPack decision and verification graph
flowchart TD
    Q["Decision question"] --> S["Sealed graph + ShockScript"]
    S --> B["Bounded cascade"]
    B --> P["Feasible Pareto set"]
    B --> O["Evidence priorities"]
    B --> C["Benchmark gate"]
    P & O & C --> R["RiskPack"]
    R --> V{"Independent recomputation"}
    V -->|match| PASS["VERIFIED RECOMPUTED"]
    V -->|mismatch| FAIL["Reject + locate failure"]
Loading
What is inside a RiskPack?
riskpack/
├── sources/manifest.json
├── graph/snapshot.json
├── scenario.json
├── assumptions.json
├── model-card.json
├── limitations.json
├── results/
│   ├── cascade-bounds.json
│   ├── interventions.json
│   ├── observability.json
│   └── benchmark.json
├── checksums.sha256
└── REBUILD.txt

Verification validates schemas, paths, versions, semantic assumption bindings, model-card status, limitations, checksums, and every recomputed analytical output.

Public data: what ships and what does not

11
bounded contracts
4
frozen official runs
4,027
normalized facts
222
published sector input edges

Connectors: UN Comtrade · OECD ICIO · SEC EDGAR · GLEIF · FAOSTAT · openFDA · OFAC · WITS · UNCTAD LSCI · IMF PortWatch · BEA Input-Output

Generic mapping preserves facts as metric nodes and refuses to invent topology. The BEA-specific mapper preserves 222 positive, published sector-average input coefficients as MODEL_INFERRED edges: upper bound only, never firm-level supplier links. Seven connectors currently ship contracts and fixtures without frozen public runs.

Data catalog · Connector contract · Data licenses · Frozen-run ledger

Release evidence, not a trust shortcut

20,000
node smoke profile
19,999
synthetic edges
2×
offline build match
PASS
CI + CodeQL at release
flowchart LR
    A["Clean source archive"] --> B["npm ci"]
    B --> C["Regenerate artifacts"]
    C --> D["Full CI"]
    D --> E["Two offline builds"]
    E --> F["Exact dist digest"]
    F --> G["Manifest + SBOM + receipt"]
Loading

The scale check is a synthetic chain engineering budget—not a production SLA or empirical-domain benchmark.

Acceptance matrix · Release process · Performance · Security

Interfaces

Surface Use it for
Workbench Edit bounded assumptions and compare feasible responses
WorldGraph Inspect provenance, time, evidence grade, and eligibility
Case library Compare 16 pipelines, filter by capability, and download RiskPacks
CascadeBench See no-lookahead gates and honest scoring coverage
Python CLI Import, validate, run, pack, and verify locally
Python API Embed analysis in scripts, notebooks, or NetworkX workflows
TypeScript compatibility layer Power the hosted browser demonstration

Repository map

src/cascadelens/  canonical Python core + CLI  examples/      CSV · GraphML · Jupyter
app/              hosted browser product       content/       cases + reviewed artifacts
packages/         browser compatibility layer  schemas/       public JSON Schemas
tests_python/     Python parity + import gates  tests/         web + release assurance
docs/             methods + tutorials           scripts/       hosted build verification
If you want to… Open
Understand the design Architecture · Product requirements
Compare or add a case Capability matrix · Extension guide
Audit versions and compatibility Schema compatibility · Changelog
Plan legitimate external validation External validation protocol
Navigate everything Documentation hub

Evidence boundaries

Important

Stable release: v0.6.0. It contains 0 historically scored cases, 0 external validations, 0 structured user studies, 0 verified organizational adoptions, and 0 demonstrated real-world impacts. All 16 cases are deterministic, scenario_only research demonstrations—not forecasts or client projects.

Demonstrated Not demonstrated
Deterministic computation on checked fixtures Predictive accuracy or calibrated real-world weights
Bitemporal no-lookahead enforcement Complete or perfectly true public sources
Four reproducible public-data acquisition runs and 222 published sector-level input coefficients A populated firm-level or current global dependency graph
Feasibility and value-of-information under declared assumptions Operational, causal, clinical, legal, or investment advice
RiskPack integrity and analytical recomputation Publisher identity without an external trust channel
Reproducible release engineering Production SLA, adoption, or real-user impact

Public data are not client projects. Simulated impacts are not forecasts or realized losses. Internal reproducibility is not independent method review, security certification, external validation, adoption, or impact.

Contributing

Connectors, engines, cases, product surfaces, documentation, and assurance improvements are welcome. Preserve source, time, license, evidence grade, and scenario status; then run:

python -m pip install -e ".[dev]"
python -m mypy
PYTHONPATH=src python -m coverage run -m unittest discover -s tests_python -v
python -m coverage combine
python -m coverage report
npm run ci

CI enforces strict Python typing, branch-aware Python source coverage, and TypeScript package coverage thresholds in addition to the functional, rendering, accessibility, security, performance, and reproducibility gates.

Contribution guide · Code of Conduct · Private security reporting

Cite and license

Use CITATION.cff to cite the exact reviewed release. Licensed under Apache-2.0. © 2026 Mingrui Li.

Which intervention is worth its cost?

The intervention workbench and the SDK functions policySwitches(frontier) (TypeScript) and policy_switches(frontier) (Python) give switching values for the objective cost + value × worst-case impact. These thresholds identify a change in the winner across all feasible bundles. The existing reversalThresholds compare neighboring Pareto alternatives pairwise. For (cost, impact) of (0, 10), (6, 8), and (10, 0), all three are Pareto-efficient, but the middle bundle never minimizes the objective. The decision switches directly between the first and third at a value of 1 per impact unit. Exact ties at a switch may admit several optima.

About

Stress-test disruptions across connected industries and supply routes. Trace how shocks travel through a dependency graph, compare feasible responses, and reproduce each scenario from its sources and assumptions.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

82 stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors

Languages