nvcf / stargate
AGENTS.md261 starsChanged 9 days agoApache-2.0View on GitHub
This guidance covers the Rust workspace, including stargate-k8s-router and the shared stargate-forwarding crate. - stargate-k8s-router supports raw-quic and webtransport tunnel traffic. Plain http3 tunnel traffic uses an L4 path and does not pass through this router. - Raw QUIC request streams are bidirectional. During drain, prioritizing bidirectional acceptance over unidirectional acceptance is intentional. - WebTransport uses a separate session bridge. Do not infer a plain HTTP/3 stream fairness requirement for the raw QUIC relay from that implementation. For router transport…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository133 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-tooling/AGENTS.mdAGENTS.md
- deploy/helm/cassandra/AGENTS.mdAGENTS.md
- deploy/helm/cert-manager/AGENTS.mdAGENTS.md
- deploy/helm/cloud-functions/AGENTS.mdAGENTS.md
- deploy/helm/cloud-tasks/AGENTS.mdAGENTS.md
- deploy/helm/encrypted-secret-store/AGENTS.mdAGENTS.md
- deploy/helm/icms/AGENTS.mdAGENTS.md
- deploy/helm/llm-request-router/AGENTS.mdAGENTS.md
- deploy/helm/nats/AGENTS.mdAGENTS.md
- deploy/helm/notary/AGENTS.mdAGENTS.md
- deploy/helm/nvcf-pki/AGENTS.mdAGENTS.md
- deploy/helm/openbao/AGENTS.mdAGENTS.md
- deploy/helm/vanity-gateway/AGENTS.mdAGENTS.md
- deploy/releases/AGENTS.mdAGENTS.md
- deploy/stacks/AGENTS.mdAGENTS.md
- deploy/stacks/observability/AGENTS.mdAGENTS.md
- deploy/stacks/stargate-dev/AGENTS.mdAGENTS.md
- deploy/stacks/stargate-dev/benchmark/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- docs/overview/samples/scripts/AGENTS.mdAGENTS.md
- examples/AGENTS.mdAGENTS.md
- infra/cassandra/AGENTS.mdAGENTS.md
- infra/openbao/AGENTS.mdAGENTS.md
- infra/openbao/plugins/vault-plugin-secrets-jwt/AGENTS.mdAGENTS.md
- infra/openbao/tests/AGENTS.mdAGENTS.md
- migrations/cassandra/AGENTS.mdAGENTS.md
- migrations/openbao/AGENTS.mdAGENTS.md
- src/compute-plane-services/byoo-otel-collector/AGENTS.mdAGENTS.md
- src/compute-plane-services/ess-agent/AGENTS.mdAGENTS.md
- src/compute-plane-services/image-credential-helper/AGENTS.mdAGENTS.md
- src/compute-plane-services/nvca/AGENTS.mdAGENTS.md
- src/compute-plane-services/nvsnap/docs/AGENTS.mdAGENTS.md
- src/compute-plane-services/nvstor/AGENTS.mdAGENTS.md
- src/compute-plane-services/request-trace-uploader/AGENTS.mdAGENTS.md
- src/control-plane-services/admin-token-issuer-proxy/AGENTS.mdAGENTS.md
- src/control-plane-services/api-keys/AGENTS.mdAGENTS.md
- src/control-plane-services/cloud-functions/AGENTS.mdAGENTS.md
- src/control-plane-services/cloud-tasks/AGENTS.mdAGENTS.md
- src/control-plane-services/encrypted-secret-store/AGENTS.mdAGENTS.md
- src/control-plane-services/function-autoscaler/AGENTS.mdAGENTS.md
- src/control-plane-services/function-autoscaler/local_env/AGENTS.mdAGENTS.md
- src/control-plane-services/instance-cluster-management/AGENTS.mdAGENTS.md
- src/control-plane-services/nats-auth-callout/AGENTS.mdAGENTS.md
- src/control-plane-services/notary/AGENTS.mdAGENTS.md
- src/invocation-plane-services/grpc-proxy/AGENTS.mdAGENTS.md
- src/invocation-plane-services/http-invocation/AGENTS.mdAGENTS.md
- src/invocation-plane-services/llm-api-gateway/AGENTS.mdAGENTS.md
- src/invocation-plane-services/ratelimiter/AGENTS.mdAGENTS.md
- src/invocation-plane-services/vanity-gateway/AGENTS.mdAGENTS.md
- src/libraries/go/lib/AGENTS.mdAGENTS.md
- src/libraries/go/worker/AGENTS.mdAGENTS.md
- src/libraries/java/nv-boot-parent/AGENTS.mdAGENTS.md
- src/libraries/python/nv-cloud-function-helpers/AGENTS.mdAGENTS.md
- src/libraries/rust/nvcf-info/AGENTS.mdAGENTS.md
- src/uis/nvcf-ui/AGENTS.mdAGENTS.md
- src/uis/nvcf-ui/helm/AGENTS.mdAGENTS.md
- tests/bdd/AGENTS.mdAGENTS.md
- tools/AGENTS.mdAGENTS.md
- tools/docs-version-sync/AGENTS.mdAGENTS.md
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Run commands from this directory.
- Distinctive: line 36
Before marking a Pull Request ready or merging, run at least one local, AWS, or CI mock integration test for every meaningful Stargate …
- Distinctive: line 55
Follow the root local QA safety rules.
- Distinctive: line 79
Do not run the full policy and profile matrix by default.
- Distinctive: line 83
Use release builds and identical hardware, resource allocation, topology, mock-engine settings, policy, load-generator version, …
- Distinctive: line 89
Run at least three measured repetitions per revision for each selected profile, alternate revision order, and report individual results and …
- Distinctive: line 102
Treat a candidate metric as worse only when it falls outside the baseline range across repetitions and moves in the same direction in every …
- Very specific: line 142
Use Rust 2024 and the workspace formatter and Clippy rules.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Stargate agent guide
This guidance covers the Rust workspace, including stargate-k8s-router and
the shared stargate-forwarding crate.
Assumed deployment invariants
stargate-k8s-routersupportsraw-quicandwebtransporttunnel traffic. Plainhttp3tunnel traffic uses an L4 path and does not pass through this router.- Raw QUIC request streams are bidirectional. During drain, prioritizing bidirectional acceptance over unidirectional acceptance is intentional.
- WebTransport uses a separate session bridge. Do not infer a plain HTTP/3 stream fairness requirement for the raw QUIC relay from that implementation.
For router transport changes, inspect crates/stargate-k8s-router/src/quic.rs
and crates/stargate-forwarding/src/lib.rs. The
transport guide describes available protocol
implementations and their routing paths.
Build and verification
Run commands from this directory. For router and relay Rust changes:
cargo build --locked -p stargate-k8s-router
cargo test --locked -p stargate-k8s-router -p stargate-forwarding -- --test-threads=1
cargo clippy --locked -p stargate-k8s-router -p stargate-forwarding --all-targets -- -D warnings
cargo fmt --all -- --checkFor other Rust changes, select the affected workspace packages with -p.
For documentation changes, check whitespace and link targets.
Mandatory Pull Request validation
Before marking a Pull Request ready or merging, run at least one local, AWS, or CI mock integration test for every meaningful Stargate change. This covers Stargate, router/relay, Pylon, mock engines, authentication, dependencies, image pins, related charts, deployment settings, benchmark logic, and CI changes that affect how these components build or run. Pure documentation and formatting changes are exempt; explain the exemption in the Pull Request.
- Build the affected binaries or images from the candidate commit. Send real requests through the changed path with mock inference backends. Check registration/readiness, response correctness, completion, and streaming when applicable. Exercise the affected transport and routing policies.
- Choose a relevant loopback integration test such as
scripts/e2e-last-cluster.sh, a local k3d deployment, an isolated AWS mock deployment, or a CI job that runs equivalent request traffic. See the development stack for deployment, streaming checks, and benchmark campaigns. - Unit tests, chart rendering, mocked kubectl, microbenchmarks, and readiness checks alone do not satisfy this integration gate. A CI job must exercise the affected runtime path; a green build alone does not count.
- Follow the root local QA safety rules. Give runs unique resources and artifacts. Serialize campaigns that share backends or mutate deployment state; separate output directories do not isolate caches, queues, or resets.
- Record the tested commit, commands, environment, image digests, policies, workload, acceptance results, and retained artifact links in the Pull Request. Retest after changes that alter the validated behavior. Blocked or failed validation keeps the Pull Request unready and blocks merge.
Performance regression gate
For changes that can affect request handling, routing, transport, caching, concurrency, scheduling, resource limits, or performance measurements, compare the merge-base baseline and candidate on the same test environment before marking the Pull Request ready or merging.
Scope the comparison before running it:
- Compare baseline and candidate image digests and runtime settings for each component on the measured path. When both match, record them and skip the comparison for that component; identical builds measure only noise.
- Benchmark only the components that differ. For example, a change limited to charts and the auth fixture needs the integration gate plus an auth RPC benchmark, not a routing comparison.
- Select the policies and workload profiles that exercise the changed path. Do not run the full policy and profile matrix by default.
Run the comparison:
- Use release builds and identical hardware, resource allocation, topology, mock-engine settings, policy, load-generator version, workload/seed, offered load, concurrency, cache state, warmup, and run duration. Change only the component or setting under test. Exclude unrelated traffic and overlapping campaigns. Local and AWS measurements must be compared within their own environments.
- Run at least three measured repetitions per revision for each selected profile, alternate revision order, and report individual results and variation. Use representative sustained load. A short smoke run alone is insufficient.
- Compare successful throughput, p95/p99 time to first token and end-to-end latency, failures/timeouts/retries, and CPU/memory where relevant. Include admission failures and cancellations, not only completed-request latency.
- Retain raw baseline and candidate reports and a comparison table. Algorithm comparisons within one build do not establish revision-level performance. Explain unavailable metrics and collect another observable for that risk.
Judge the results:
- Treat a candidate metric as worse only when it falls outside the baseline range across repetitions and moves in the same direction in every pair. Report smaller or mixed differences as within run-to-run variation.
- Policies that sample backends without a fixed seed, such as PowerOfN, choose different backends for the same workload on each run. Note this in the report; their tail variation alone does not establish a regression.
- Investigate any result that meets the worse-result rule. Any reproducible degradation blocks merge. For an inconclusive profile, run at most one additional reversed-order pair, then report the result and ask the user to decide instead of collecting more runs.
- An intentional tradeoff requires explicit user approval with the measured impact before merge. Mock results support the tested workload, not production capacity claims.
Routing methods
routing_methods.json lists every load-balancing algorithm name, alias, and
routing-expression parameter. When you add, rename, or remove one, update that
file and run cargo test --locked -p stargate --lib routing_method. A failure
names the other code, docs, and configs to update.
The function API in src/control-plane-services/cloud-functions/nvcf-core
stores routingMethod after a format check only. Its
LlmRoutingMethodValidatorTest reads the manifest and fails if that check
would reject a listed name, alias, or parameter. Run it from the repository
root:
bazel test //src/control-plane-services/cloud-functions/nvcf-core:tests \
--test_arg=--exclude-classname='^(?!com\.nvidia\.nvcf\.rest\.function\.management\.dto\.LlmRoutingMethodValidatorTest$).*$'LLM routing BDD
The @llm-function-type scenarios in the single- and multi-cluster Helmfile
features cover LLM routing and request handling. See tests/bdd/README.md
to run them.
Code style
Use Rust 2024 and the workspace formatter and Clippy rules. Match existing
crate structure and use tracing for structured logs. Keep deployment
assumptions explicit when reviewing transport behavior.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

