stokes

architect on canvas. bob writes the code.

redesign your schema, caches, and queues visually. bob 2.0 automatically rewrites your SQL migrations, Python workers, and Rust buffers.

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

requires ibm bob 2.0 shell · 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

figma for storage pipelines.

add a ClickHouse column, introduce a KV cache, or rewire an ETL stage directly on the canvas. bob 2.0 updates your SQL schemas, rewrites your Python data contracts, and recalculates your Rust fixed-capacity buffers in real time. there is no manual cross-repo refactoring.

storage-topology.stk
events_r0.sqlclickhouse
bot_signals
280 partition cols
schema reflection
→
catalog_sync.pypython
dict(row.items())
unbounded stream
dynamic kv push
→
features.jsonquicksilver kv
280 feature keys
replicated mesh
330 edge pops
c/b = 1.40✕ →
buffer.rsselected
[Feature; 200]
TryFromSliceError
panic on item #201
synthesized dual-zone partition:
0 b heap·7.66 ns p99

01 / topology modeling

spatial dag architecture.

bob maps your cross-language data paths into an interactive directed acyclic graph, connecting analytical DDL tables, intermediate serializers, distributed caches, and fixed-capacity runtime memory.

02 / cardinality verification

cardinality risk ratio analysis.

bob calculates the mathematical ratio between upstream schema cardinality and downstream memory bounds (c / b), flagging dynamic reflections that overflow fixed-capacity memory before deployment.

03 / automated code synthesis

bidirectional cross-compiler sync.

bob 2.0 translates canvas edits into production code. wiring or dropping a node on the canvas automatically synthesizes synchronized SQL migrations, Python data contracts, and Rust dual-zone buffers without manual cross-repo refactoring.

terminal

one command, three compilers.

bob 2.0 coordinates parallel verification across 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 --generate-contract
⎡ · ■ · ⎤stokes v0.2.0 · scanning "dirichlet"
⎢ ■ ■ · ⎥agent: IBM Bob 2.0 (multi-agent orchestrator)
⎣ · · ■ ⎦subagents: 4 active (stokes-sql, stokes-python, stokes-rust, stokes-verify)
SCANBob orchestrator scanning workspace:./dirichlet
├──stokes-sql›parsing ClickHouse schema AST & column reflection...
├──stokes-python›analyzing services/feature-pipeline/catalog_sync.py...
├──stokes-rust›inspecting crates/dirichlet-proxy/src/lib.rs buffer bounds...
└──stokes-verify›preparing Criterion benchmarks & stack bounds...
boundary scan complete: 3 boundaries discovered
.stokes/contracts.json · AGENTS.md

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

bob partitions the buffer and synthesizes the dual-zone guard: 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
watch bob isolate the failure cascade and synthesize buffer remediations interactivelyopen canvas studio →

faq

frequently asked questions

common questions about the studio canvas, automated code synthesis, and ci verification.

what is stokes?+
stokes is an integrated storage pipeline studio and cross-compiler verification system. it lets you visually redesign schemas, caches, and queues on a continuous canvas while Bob synthesizes the production code across SQL, Python, and Rust, paired with a deterministic CLI that verifies memory bounds and cross-language invariants in CI.
is stokes just a linter or does it write code?+
stokes is an active visual studio and code synthesis engine, not a passive linter. single-language linters (like sqlfluff or mypy) only inspect syntax within their own silo. when you add a ClickHouse column, introduce a KV cache, or rewire an ETL stage in stokes studio, Bob automatically writes and synchronizes your SQL migrations, Python data contracts, and Rust fixed-capacity buffers. the CLI then provides deterministic verification in CI so uncommitted mismatches never reach production.
what is stokes studio?+
stokes studio is an interactive visual modeler and architecture canvas 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 and synthesizing synchronized code 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 prevents this at both design time and CI: on the studio canvas, it recalculates cardinality risk ratios in real time and automatically bounds Rust dual-zone buffers when schemas expand; in CI, stokes verify checks cross-language invariants so single-compiler blind spots never reach production.
why does it run inside ibm bob 2.0?+
stokes uses Bob 2.0's multi-agent architecture to power both its cross-compiler code synthesis engine and parallel boundary verification. when you make changes on the canvas, Bob synthesizes synchronized code across SQL, Python, and Rust simultaneously, while coordinating parallel subagents for boundary checks, orchestration, and schema conformance.
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 is 3.88x faster and does not allocate any heap memory, which matters when you are 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 model and verify?

launch stokes studio and let bob 2.0 write your multi-compiler code, or install the cli to verify boundary invariants in ci.