Rudder Performance Maintainer
Measure the real bottleneck under a controlled workload, preserve correctness,
and separate evidence from intuition.
Decide The Mode
Classify the request before running expensive work:
AUDIT: measure current health, identify the highest-leverage risk, and
propose the smallest safe next step. This is the default for daily checks.
DIAGNOSE: reproduce a named slowdown and isolate client, server, database,
payload, runtime, or environment cost.
IMPLEMENT: change code only when the user asked to optimize/fix/implement.
VERIFY: run comparable before/after evidence for an existing change.
Do not let a scheduled audit silently turn into a multi-hour implementation.
When the user continues the same task with an implementation request, preserve
the audit evidence and switch modes explicitly.
Route environment startup/hang recovery to
rudder-desktop-dev-recovery-maintainer, a single failed run or missing
transcript to debug-run-transcript-maintainer, and release workflow delay to
release-maintainer. Return here only when bounded measurement identifies a
product latency, throughput, rendering, payload, or memory scaling problem.
Read The Relevant References
- Always read
references/evidence-model.md.
- Read
references/workflow-benchmark.md for API/database/high-volume workflow
baselines and scripts/perf/run-isolated-workflow.ts.
- Read
references/ui-scroll-benchmark.md for Chat/Messenger/Issue/Run
rendering, virtualization, streaming, and
scripts/perf/compare-scroll-evals.mjs.
- Read
references/environment-and-safety.md before using installed Desktop,
prod-local data, large logs, or cleanup/recovery actions.
Do not load UI guidance for a database-only regression or release guidance for
a local benchmark.
First-Principles Performance Model
Performance is the work performed per user-visible outcome:
user action
-> requests and payloads
-> server/query/runtime work
-> client state propagation
-> render/layout/paint
-> observable latency, responsiveness, memory, and correctness
Measure the boundary where cost first grows with data volume or update
frequency. A low-latency API does not prove a responsive UI; low RSS does not
prove smooth frames; a fast initial view does not prove bounded background
polling.
Required Gates
- Source identity — record repository SHA, build identity, runtime
descriptor, instance, version, and UI bundle where available. Treat a stale
installed build as historical shape evidence, not current-source proof.
- Comparable workload — use the same seed manifest, scale, anchor,
viewport, browser/build mode, warmups, iterations, and interaction.
- Correctness sentinels — preserve organization boundaries, ordering,
pagination, deep navigation, realtime completion, final persisted content,
and error states while measuring.
- Bounded evidence — record request count/bytes, query/service timing,
mounted nodes, frame intervals, long tasks, renderer task time, and the
memory metric actually observed.
- Mutation ledger — list disposable records, runtime/process changes,
writes, cleanup, and any intentionally retained evidence.
If these gates cannot be met, return a qualified finding rather than a false
comparison.
Standard Workflow
- Rewrite the concern as a falsifiable hypothesis.
- Establish runtime/source identity and select an evidence target:
current-source isolated, packaged candidate, installed prod-local, or named
external environment.
- For production-shaped dev checks, reuse the persistent
Rudder Performance Lab organization described in references/environment-and-safety.md when
it is compatible with the current schema. Do not create another large seed
by default.
- Start with bounded metadata and summary endpoints. Do not fetch maximum
transcripts or full projections until the hypothesis requires them.
- Run the smallest representative workload, then a production-shaped edge
case where scaling risk appears.
- Capture correctness and performance from the same run.
- Identify the first scaling boundary and propose one smallest safe change.
- In IMPLEMENT mode, use an isolated branch/worktree when the current checkout
contains unrelated changes.
- Run before/after on the same harness and source identities.
- Require independent review and black-box acceptance for implementation.
- Report measured improvements, unchanged metrics, regressions, skipped
evidence, proxy limitations, and remaining risk.
Evidence Language
- Say
JavaScript heap, renderer task time, response bytes, or process RSS exactly; do not rename one metric as another.
- Separate current-source proof from stale installed/prod observations.
- Separate service/query microbenchmarks from browser/Desktop terminal proof.
- Treat p95 from a tiny sample as directional and report sample count.
- Tool volume or memory growth is a lead, not a root cause.
- A performance improvement that loses messages, events, anchors, realtime
state, organization isolation, or accessibility is a failed optimization.
Output
RESULT: GREEN | YELLOW | RED | BLOCKED
Mode:
Source/runtime identity:
Workload:
Current measurements:
Correctness gates:
Primary bottleneck:
Smallest safe action:
Before/after:
Mutation and cleanup ledger:
Evidence limits:
Use GREEN only when the requested current source/target and representative
edge case pass. Use YELLOW for a proven non-incident risk worth scheduling,
RED for a reproduced material regression or unsafe scaling boundary, and
BLOCKED when the required environment or comparable evidence is unavailable.
1---2name: rudder-performance-maintainer3description: Use for repeatable Rudder performance audits, regressions, profiling, optimization proposals, or implementation verification across Messenger, Chat, Issues, Runs, Desktop, API payloads, database queries, rendering, memory, and high-volume workflows. Trigger for daily performance checks, product latency or memory growth, prod-shaped scale tests, before/after benchmarks, virtualization or polling investigations, and requests to prove an optimization. Do not use for dev-startup recovery, one failed agent run, transcript/debug evidence, or release-pipeline duration unless measurement shows a product performance regression.4---56# Rudder Performance Maintainer78Measure the real bottleneck under a controlled workload, preserve correctness,9and separate evidence from intuition.1011## Decide The Mode1213Classify the request before running expensive work:1415- `AUDIT`: measure current health, identify the highest-leverage risk, and16 propose the smallest safe next step. This is the default for daily checks.17- `DIAGNOSE`: reproduce a named slowdown and isolate client, server, database,18 payload, runtime, or environment cost.19- `IMPLEMENT`: change code only when the user asked to optimize/fix/implement.20- `VERIFY`: run comparable before/after evidence for an existing change.2122Do not let a scheduled audit silently turn into a multi-hour implementation.23When the user continues the same task with an implementation request, preserve24the audit evidence and switch modes explicitly.2526Route environment startup/hang recovery to27`rudder-desktop-dev-recovery-maintainer`, a single failed run or missing28transcript to `debug-run-transcript-maintainer`, and release workflow delay to29`release-maintainer`. Return here only when bounded measurement identifies a30product latency, throughput, rendering, payload, or memory scaling problem.3132## Read The Relevant References3334- Always read `references/evidence-model.md`.35- Read `references/workflow-benchmark.md` for API/database/high-volume workflow36 baselines and `scripts/perf/run-isolated-workflow.ts`.37- Read `references/ui-scroll-benchmark.md` for Chat/Messenger/Issue/Run38 rendering, virtualization, streaming, and39 `scripts/perf/compare-scroll-evals.mjs`.40- Read `references/environment-and-safety.md` before using installed Desktop,41 prod-local data, large logs, or cleanup/recovery actions.4243Do not load UI guidance for a database-only regression or release guidance for44a local benchmark.4546## First-Principles Performance Model4748Performance is the work performed per user-visible outcome:4950```text51user action52 -> requests and payloads53 -> server/query/runtime work54 -> client state propagation55 -> render/layout/paint56 -> observable latency, responsiveness, memory, and correctness57```5859Measure the boundary where cost first grows with data volume or update60frequency. A low-latency API does not prove a responsive UI; low RSS does not61prove smooth frames; a fast initial view does not prove bounded background62polling.6364## Required Gates65661. **Source identity** — record repository SHA, build identity, runtime67 descriptor, instance, version, and UI bundle where available. Treat a stale68 installed build as historical shape evidence, not current-source proof.692. **Comparable workload** — use the same seed manifest, scale, anchor,70 viewport, browser/build mode, warmups, iterations, and interaction.713. **Correctness sentinels** — preserve organization boundaries, ordering,72 pagination, deep navigation, realtime completion, final persisted content,73 and error states while measuring.744. **Bounded evidence** — record request count/bytes, query/service timing,75 mounted nodes, frame intervals, long tasks, renderer task time, and the76 memory metric actually observed.775. **Mutation ledger** — list disposable records, runtime/process changes,78 writes, cleanup, and any intentionally retained evidence.7980If these gates cannot be met, return a qualified finding rather than a false81comparison.8283## Standard Workflow84851. Rewrite the concern as a falsifiable hypothesis.862. Establish runtime/source identity and select an evidence target:87 current-source isolated, packaged candidate, installed prod-local, or named88 external environment.893. For production-shaped dev checks, reuse the persistent `Rudder Performance90 Lab` organization described in `references/environment-and-safety.md` when91 it is compatible with the current schema. Do not create another large seed92 by default.934. Start with bounded metadata and summary endpoints. Do not fetch maximum94 transcripts or full projections until the hypothesis requires them.955. Run the smallest representative workload, then a production-shaped edge96 case where scaling risk appears.976. Capture correctness and performance from the same run.987. Identify the first scaling boundary and propose one smallest safe change.998. In IMPLEMENT mode, use an isolated branch/worktree when the current checkout100 contains unrelated changes.1019. Run before/after on the same harness and source identities.10210. Require independent review and black-box acceptance for implementation.10311. Report measured improvements, unchanged metrics, regressions, skipped104 evidence, proxy limitations, and remaining risk.105106## Evidence Language107108- Say `JavaScript heap`, `renderer task time`, `response bytes`, or `process109 RSS` exactly; do not rename one metric as another.110- Separate current-source proof from stale installed/prod observations.111- Separate service/query microbenchmarks from browser/Desktop terminal proof.112- Treat p95 from a tiny sample as directional and report sample count.113- Tool volume or memory growth is a lead, not a root cause.114- A performance improvement that loses messages, events, anchors, realtime115 state, organization isolation, or accessibility is a failed optimization.116117## Output118119```text120RESULT: GREEN | YELLOW | RED | BLOCKED121Mode:122Source/runtime identity:123Workload:124Current measurements:125Correctness gates:126Primary bottleneck:127Smallest safe action:128Before/after:129Mutation and cleanup ledger:130Evidence limits:131```132133Use `GREEN` only when the requested current source/target and representative134edge case pass. Use `YELLOW` for a proven non-incident risk worth scheduling,135`RED` for a reproduced material regression or unsafe scaling boundary, and136`BLOCKED` when the required environment or comparable evidence is unavailable.