the monorepo
Packages
TypeScript strict, Node ≥ 20, ESM only. Zod schemas are the single source of truth for types. Pure logic — pruning, fingerprinting, templating, accounting — lives in dependency-free functions so it's property-testable; side effects live at the edges behind narrow interfaces. Everything may depend on core; core depends on nothing; CI enforces no cycles.
@rote/core
spineZod schemas, pure data logic, serializers. Zero I/O — everything depends on it, it depends on nothing.
TrajectoryEventSchema · PlaybookSchema · ExpectSchema · buildEnvFingerprint · renderTemplate · applyPatch
@rote/recorder
learningAn observationally-invisible stdio MCP proxy: tees a downstream server unmodified while recording every tools/call as an append-only, fsync-per-event, crash-safe trajectory.
runProxy · buildTrajectoryEvent · appendTrajectoryEvent · rote-record
@rote/executor
actionThe replay executor. Walks a playbook's step DAG — deterministic steps cost zero LLM tokens, slot steps one scoped call, judgment steps a closed-enum classification. Checks every expect and the final verify before reporting success.
runPlaybook · evaluateExpect · McpToolCaller · rote-replay
@rote/browser
perceptionThe browser capture boundary: a static-HTML fixture backend for deterministic tests and a minimal CDP backend for live Chrome.
CdpBrowserBackend · captureStaticHtml · FixtureSiteServer
@rote/perception
perceptionPure perception logic — captured pages become stable, compact observations. Distillation, stable node IDs, exact-reconstruction diffs, and an adaptive full→diff→bootstrap renderer under a 100K-char ceiling.
distillPage · renderObservation · diffObservations · renderAdaptiveObservation
@rote/action
actionAction hardening before dispatch: settledness (zero pending requests plus a quiet DOM window) and self-healing element resolution (stable-ID → role+name → text proximity).
waitForSettled · resolveElementTarget · assertBrowserExpect
@rote/agent
decisionThe compact-observation observe→plan→act loop, planner-client agnostic. Assembles the cache-stable context and enforces prefix immutability at runtime.
runBrowserAgent · assemblePlannerContext · assertCacheStablePrefix
@rote/llm
spineThe shared source-tagged LLM boundary — every provider call is attributed (planner|matcher|slot|repair|verify|distill); direct SDK calls outside it fail lint. Routes the immutable prefix's SHA-256 through prompt_cache_key on OpenAI.
TaggedLlmClient · OpenAiTaggedLlmClient · openAiPromptCacheKey
@rote/bench
learningDeterministic benchmark orchestration and reporting — the launch gate lives here. Failed cells are never dropped; bootstrap CIs and the price table are code, not spreadsheets.
runBenchmarkMatrix · buildCurveReport · bootstrapReductionInterval · evaluateLaunchGate
@rote/cli
surfaceThe rote command: launch verified cold browser tasks, inspect recorded runs, and promote candidates — preferring exact-fingerprint zero-LLM replay when one matches.
rote run · rote runs ls · rote runs show · rote candidate create
Designed but absent — the honest gaps: decision, predictor, memory, and mcp-server exist in the architecture docs, not in packages/.