Wardian docs

USL scalability lab

Try it

This suite uses its own database, Splunk or channels, which need a Wardian. Download it and import it in Wardian to run it.

Download usl-lab.wardian Import it in Wardian: Settings → Import.

For anyone who runs load tests: paste the results, and the lab fits them to the Universal Scalability Law. It shows where adding load stops paying off, what a target throughput needs, and what a change to the system would do, before you build it.

What you put in#

FieldTypeUnitAllowedDefaultRequired
Runs, one per linetext: load, throughput, optional response time per linethe units belownumbers above 0; at least 4 runs at 3 or more different loadsthe example datayes
Load unitshort text—up to 24 charactersthreadsno
Throughput unitshort text, with its time base—up to 24 characters, like req/sreq/sno
Response times are inmilliseconds or seconds——millisecondsyes
Describe your systemlong text—up to 1,000 charactersemptyno
Target throughputdecimalper second, minute or hourabove 0emptyno
Contention, Coherency, Single-unit speedsliders× the fitted value0–3, 0–3 and 0.25–31yes
Or describe a changeshort text—up to 200 charactersemptyno

Runs can also come from a file (CSV, TSV or text) or from the latest table of the Splunk table app, where you pick the Load, Throughput and, optionally, Response time columns.

What it shows#

How it behaves#

Layout#

  1. Inputs (the side column): Measurements (the runs box, size-full, with Use example, Open file… and Clear), From the Splunk table app (three column choices, size-md), Units and context (Load unit and Throughput unit size-sm, Response times size-sm, Describe your system size-full).
  2. Throughput as load grows, What it means (with Target throughput size-sm, num, and its time unit), Try a change (three sliders, Reset, the plain-language box size-full), What the fit says, Can you trust it?, Diagnosis and Take it with you, in the main column.

The tab order follows that reading order. Errors are marked with aria-invalid and explained in the field's hint through aria-describedby. Disabled downloads say why next to them.

How it is built#

A wasm-like architecture using plain web technology. Each app is a sealed unit with a declared contract; the kernel enforces it. The result builds into one self-contained HTML page (what the Claude viewer publishes).

apps/<name>/view.html   markup the app owns
apps/<name>/app.js      Kernel.register({ name, emits, listens, provides, needs, caps, init(ctx) })
core/kernel.js          runtime: contracts, copied messages, capability grants, hot-plug (UslKernel.mount)
core/lib.js             frozen pure helpers (formatting, model, peak maths)
core/engine.js          the maths. Identical source runs in a Web Worker or on the page
core/style.css          shared theme
build.py                audits every app, then assembles dist/usl-lab-apps.html
test/e2e.js             boots the page in jsdom: all apps, worker + fallback, sealing tests
appownstalks to
inputsmeasurements, units, context, storage, tables from the Splunk table app (channel splunk.table)emits data:changed, context:changed; receives splunk.table
sessionnothing visible; coordinatesdata:changed -> engine.analyze -> analysis:ready
enginethe maths, in a worker (or page)provides analyze, curve; emits engine:status
chartchart, legend, hover, target lineanalysis:ready, whatif:changed, target:changed -> engine.curve
meaningplain-language reading of the fit (fixed rules, no AI), "Plan for a target", the N/X/R glossary (storage)analysis:ready, checks:ready -> emits target:changed
whatifsliders, plain-language boxemits whatif:changed; calls diagnosis.parseWhatIf
readoutsparameters and rangesanalysis:ready
checksfindings in wordsanalysis:ready -> emits checks:ready
diagnosisthe Diagnosis panel: Interpret results, Stop, the Markdown; passes what-ifs oncalls ai.status, ai.diagnose, ai.whatIf, ai.cancel; emits capability:ai, diagnosis:updated
exportreport/CSV (claude:downloads)many listens; calls engine.curve
ainothing visible; the lab's AI, the only part with Claude (claude:sample)analysis:ready, checks:ready, context:changed; provides diagnose, whatIf, chat for Ask

What makes them "wasm-like": declared imports/exports; nothing shared by reference (every message and call is structuredClone'd); no DOM/window/storage/network except through granted capabilities (build.py audits this); retained topics so a late-joining app gets the latest state; apps can be hot-plugged at runtime.

How the AI works#

The AI is the out-of-sight ai part, and its skill and tools are data (ADR-2610131300):

In Wardian, open the lab, then ⋯ → AI skill and tools to read, edit or improve them; each save is a version in History. Ask, beside the title, is a chat that the same AI answers: where the system peaks, what limits it, whether to trust the data.

Build: python3 build.py then node test/e2e.js (needs npm i jsdom). Debug in the browser console: UslKernel.apps(), UslKernel.trace(), UslKernel.faults().

This page is apps/usl-lab/README.md in the repository. Something wrong or missing? Change that file.