concepts.md | Always — before writing any integration code. The mental model. ~5 min read. |
apis.md | When generating actual code. Verified per-SDK templates for publish, subscribe, lifecycle. |
patterns.md | When the user describes a task ("I need a relay", "I need persistence", "I need fan-out across machines"). Maps tasks to recipes. |
mesh.md | When the user is deploying multi-host. Production transport recipe — PSK / identity bootstrap, peer discovery, NAT traversal toggles, port mapping, 2-node and 3-node working configs. |
capabilities.md | When the user wants to route to "the GPU node" or "a node that has model X loaded". find_nodes / find_best_node / scope filters. The differentiator vs Kafka/NATS/Redis. |
scheduler.md | When the user wants to atomically claim a contended exclusive resource under competition (a GPU island / accelerator slot / licensed seat) without double-booking across a partition — publish_island_topology / match_islands / reserve_island / claim_island — and/or drive a task lifecycle on top (WorkflowAdapter, shards, triggers). Contended arbitration + the workflow layer, distinct from advisory capability routing. |
streams.md | When the user needs ordered point-to-point delivery (large payloads, telemetry-to-one-peer, credit-grant backpressure). Per-peer streams — different surface from the bus despite overlapping vocabulary. |
nrpc.md | When the user needs request/response (typed call → typed reply, deadlines, retries, hedging, response streaming). Separate convention layer on top of the bus — don't reach for it for fire-and-forget broadcast. Also covers ingress/egress batching (batched_ingress) and the optional net-mesh typegen codegen path for discovered AI tools. |
mcp.md | When the user wants to bridge Model Context Protocol tools over the mesh — wrap an existing stdio MCP server as owner-scoped mesh capabilities (net wrap), or expose the mesh's capabilities to a local MCP host (Claude Code / Cursor) via net mcp serve with fail-closed consent + human-approved pinning (net mcp pin). Also credential forwarding (net forwarding) — the opt-in, deny-by-default exception to credential locality. Rides on capabilities.md (discovery) + nrpc.md (invoke); credentials stay local by default. |
redex.md | When the user needs durable per-channel append-only logs ("survive a node restart", "replay from offset N", "tail this channel with retention"). Local files per node; cross-node replication is opt-in per file. |
cortex.md | When the user needs folded queryable state ("SQLite-shaped queries on the event stream", "react to changes in derived state", Tasks / Memories / custom adapters, NetDB cross-adapter query façade). Sits on top of RedEX. |
dataforts.md | When the user asks about greedy caching, data gravity (chains drift toward readers), blob refs (substrate carries content-addressed pointers; bytes in S3 / Ceph / IPFS / FS), read-your-writes (WriteToken + wait_for_token so a producer reads its own write deterministically), or peer-to-peer blob/dir transfer over the mesh (fetch_blob / store_dir / fetch_dir, the net-mesh transfer CLI). Compositional data plane on top of RedEX + CortEX. |
runtime.md | When writing a shutdown path, handling errors, integrating into an existing async runtime (axum, FastAPI, Express), or debugging "why are my events missing?" |
observability.md | When the user asks "how do I know events are being dropped?" or wires Prometheus/OTel. Stat fields per SDK, the silent-drop trap, tuning knobs. |
payloads.md | When the user is shaping their event schema or asking about size limits, large blobs, batching, or cross-language schema interop (u64/BigInt edges, casing, optional/null, schema evolution). |
filter-dsl.md | When the user wants a subscriber to receive only some events on a channel (equality predicates, $and/$or/$not, dot-paths) — the bus-side filter. Not to be confused with capability predicates (capabilities.md), which select nodes, not payloads. |
error-codes.md | When the user needs to classify a specific error variant (TokenError::Revoked, TagMatcherError::RegexNotBuiltIn, ScalingError::InCooldown, StreamError::Backpressure, RpcError::NoMatchingServer) to decide retry vs. drop vs. re-auth vs. fix-a-bug. The fuller core-crate + subsystem taxonomy under runtime.md's SDK-facing errors. |
cli.md | When the user wants the net-mesh command surface — transfer (blob/dir recv/send/ls/status/cancel) and typegen (generate/snapshot/diff) — plus exit codes and scripting notes. |
testing.md | When writing unit/integration tests against the SDK. Covers fixtures, race conditions, CI gotchas. |
gotchas.md | When the user is migrating from Kafka / NATS / Redis Streams / Pulsar, or when their question reveals broker-thinking. |
event-semantics.md | When the user is deciding what an event should assert — naming events, or shaping payloads that carry success/acknowledgement meaning (x.ok, write.done, status: 200, delivered: true) instead of stating a fact. The doctrine: an event is a fact observed at one layer, not an end-to-end "OK." Transport success ≠ application success ≠ business success. |
examples/ | When the user is starting from scratch — minimal, runnable hello-world for each SDK. Use as the first thing they run after install, before they write application code. |