stokes
stokes studio 1.0·visual storage pipeline modeler

systems that cannot crash.

visually model your storage pipeline. catch cross-language bugs that single compilers miss.

$curl -fsSL https://stokes.dev/install.sh | sh

requires ibm bob 2.0 · macos · linux · windows (wsl)

works with

GitHub Actions
GitLab CI/CD
Tekton
Docker
Kubernetes
OpenShift
Cloudflare
WebAssembly
Bitbucket Pipelines
CircleCI
GitHub Actions
GitLab CI/CD
Tekton
Docker
Kubernetes
OpenShift
Cloudflare
WebAssembly
Bitbucket Pipelines
CircleCI
visual pipeline modeler

figma for storage pipelines.

design, connect, and inspect end-to-end dataflows across clickhouse tables, python etl workers, quicksilver kv caches, and rust l7 proxies. stokes studio catches mathematical boundary overflows before they reach production.

cardinality risk: 1.40 (fatal breach)
tier 1 · sql analyticsddl
migrations/001_bot.sql
SELECT * FROM bot_signals
↳ projects: 280 columns
+80 unpartitioned extra
compiler: sqlfluff✓ pass
→
tier 2 · etl pipelinepython
catalog_sync.py
dict(row.items())
↳ unbounded serialization
dynamic kv broadcast
compiler: mypy✓ pass
→
tier 3 · distributed meshkv
quicksilver config
features.json
↳ 280 feature keys
replicated to 330 PoPs
json schema✓ valid
✕ →
tier 4 · l7 proxyoverflow
crates/proxy/buffer.rs
[Feature; 200]
↳ TryFromSliceError!
panic on element #201
compiler: rustc💥 crash
stokes invariant remediation:
0 b heap alloc·7.66 ns p99

01 / spatial canvas

spatial dag architecture modeling.

replace fragile yaml specs and disconnected diagrams. visually connect analytical ddl schemas, stream topics, and fixed-capacity reverse proxy buffers on a continuous, low-latency 2d canvas with 24px baseline snapping.

02 / cross-boundary invariants

cardinality risk ratio visualizer.

individual compilers cannot see across language boundaries. stokes calculates the real-time ratio between upstream schema reflection and downstream memory allocations (c / b), flagging fatal buffer overflows before code commits.

03 / autonomous remediation

one-click ibm bob 2.0 patch synthesis.

dispatch autonomous subagents directly from the studio. bob synthesizes synchronized cross-boundary patches across clickhouse catalog qualification and dual-zone in-place quickselect in rust, dropping recovery time from 4 hours to 90 seconds.

terminal

one command, three compilers.

Stokes scans your SQL schemas, Python pipelines, and Rust services in a single pass. It finds where they disagree and tells you exactly what broke.

$stokes scan --contracts
✓[stokes-sql]ClickHouse AST parsed: 200 partition columns locked in migrations/001_bot_signals.sql
✓[stokes-python]Catalog sync verified: 200 telemetry signals matched in services/feature-pipeline/
✓[stokes-rust]Buffer allocation bounds verified: fixed stack buffer [Feature; 200]
ℹ[stokes-verify]Data flow verified: ClickHouse → Python ETL → Rust L7 Proxy
3/3 service boundaries checked
0 drift detected
all checks passing
7.66 ns•0 B Heap•SHA-256

benchmarks

fits entirely in l1 cache.

The hot path does partial selection in-place on a fixed stack buffer. No heap allocations, no latency spikes, all 200 feature descriptors in 25 cache lines.

Criterion Micro-benchmark: Hot-Path P99 Latency10k iterations · plotters

Lower is better. Nanoseconds per packet feature partition.

stokes dual-zone (in-place)7.66 ns
heap vector (Vec::with_capacity)29.74 ns
std quicksort (slice::sort_unstable)42.10 ns
dynamic realloc (naive vector expansion)68.50 ns
Stokes Throughput:130.5M features/sec
Resource Profile

How the hot path avoids panics when schemas grow.

memory allocation
Heap Allocation0 Bytes
cpu cache footprint
200 Descriptors25 L1 Lines (1,600 B)
algorithmic complexity
Partial QuickselectO(N) Expected
property fuzzing battery
Proptest Cases10,000 / 10,000 PASS
Tested on AMD EPYC 7763 & Apple M3 Max

case study

the $5.4m/hr single-compiler blind spot.

Based on the Cloudflare November 18, 2025 outage. Three compilers (sqlfluff, mypy, rustc) each passed on their own. But a schema change added 80 extra columns that overflowed a fixed-size buffer downstream, taking the whole fleet offline.

T+0mLEAK
Schema Reflection

Internal replica tables quietly project 280 features instead of the expected 200 into KV metadata.

sqlfluff: PASS
T+90mSYNC
KV Replication

Automated KV sync pushes dynamic config fleet-wide. Early restarts look like transient jitter.

mypy: PASS
T+91mPANIC
TryFromSliceError

The proxy's fixed [Feature; 200] buffer gets 280 entries. Worker threads panic, edge traffic drops to zero.

rustc: PASS
WITH STOKES90s MTTR
Dual-Zone Shedding

Stokes partitions the buffer: 128 core rules stay pinned, 72 adaptive features get Zone 1, 80 extras get safely dropped. No heap allocations.

100% Uptime Guaranteed
90s
MTTR (from 4h)
7.66 ns
In-place selection
0 Bytes
Heap alloc on hot path
100%
Active core rules
visualize the failure cascade and buffer remediation interactivelyopen canvas studio →

faq

frequently asked questions

common questions about how stokes works, what it checks, and how to run it in ci.

what is stokes?+
Stokes is a CLI tool that checks whether your SQL schemas, Python ETL pipelines, and Rust services actually agree with each other. Think of it as a linter, but instead of checking one language at a time, it reads all three and flags the places where they silently disagree.
what is stokes studio?+
Stokes Studio is an interactive visual modeler for storage pipelines. It lets you visually map ClickHouse DDL schemas, Python ETL pipelines, Quicksilver KV meshes, and Rust reverse proxies onto a continuous 2D canvas, computing cross-boundary cardinality risk ratios in real-time.
how does stokes prevent cloudflare-style outages?+
The Cloudflare Nov 18, 2025 outage happened because sqlfluff, mypy, and rustc all passed individually, but nobody checked that a schema change pushed 280 features into a buffer sized for 200. Stokes catches exactly that kind of mismatch: it reads the SQL schema, the Python config, and the Rust buffer declaration together, and fails the build if the numbers don't line up.
why does it run inside ibm bob 2.0?+
Stokes uses Bob 2.0's multi-agent architecture to run multiple specialized checkers at the same time (one for SQL, one for Python, one for Rust, one for verification). Bob handles the orchestration, parallel execution, and document understanding so Stokes can focus on the actual boundary checks.
what do the benchmark numbers mean?+
The 7.66 ns number is the time it takes to partition features using in-place selection on a fixed stack buffer. The comparison (29.74 ns for heap vectors) shows why Stokes uses a stack-allocated approach: it's 3.88x faster and doesn't allocate any heap memory, which matters when you're processing packets at line rate.
what is the boundary lockfile?+
When Stokes finishes a scan, it writes a lockfile (stokes.lock) with SHA-256 hashes of every boundary-critical file. In CI, `stokes verify --strict` re-checks those hashes and fails the pipeline if someone changed a schema or buffer size without re-running the full verification. It also writes a human-readable CONFORMANCE.md for code review.

ready to verify?

install the cli, point it at your repo, and add `stokes verify` to your ci pipeline. takes about two minutes.