nvcf / lib
AGENTS.md261 starsChanged 9 days agoApache-2.0View on GitHub
Scope: everything under src/libraries/go/lib/. This subtree is go-lib, the shared Go library module for NVCF. It is maintained inside the monorepo and uses the module path github.com/dsx-ai-factory/nvcf/src/libraries/go/lib. The package roots under pkg/ are: BYOO-facing otelconfig commands and fixtures live in tools/byoo. Run these from src/libraries/go/lib: Useful targeted commands: Run Bazel commands from the repository root: Bazel build, test, and lint targets are the CI gate for this subtree. The Bazel lint target uses the shared runner at rules/golangci/golangci_lint.sh with this…
- Reads credentials
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/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/libraries/rust/stargate/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
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 34
Run these from src/libraries/go/lib:
- Distinctive: line 53
Run Bazel commands from the repository root:
- Distinctive: line 97
After changing generated inputs, run:
- Distinctive: line 103
If generated sources change package lists or BUILD file source lists, also run Gazelle from the repository root:
- Very specific: line 154
Use GOWORK=off and GOFLAGS=-mod=vendor when running module-scoped Go commands that need to match this module's vendored dependency set.
- Distinctive: line 156
Keep tests next to the code they cover.
- Very specific: line 157
Use testdata/ for fixtures and refresh consolidated icms-translate fixtures with make update-testdata.
- Very specific: line 158
Do not commit secrets, tokens, or generated local output such as _output/.
- Distinctive: line 163
Do not add internal CI, scanner, registry, or toolbox files back to the allowlist.
≈ “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
AGENTS.md
Scope: everything under src/libraries/go/lib/.
Project Overview
This subtree is go-lib, the shared Go library module for NVCF. It is maintained
inside the monorepo and uses the module path
github.com/dsx-ai-factory/nvcf/src/libraries/go/lib.
The package roots under pkg/ are:
pkg/auth/- Authentication token fetchingpkg/cobraautobind/- Cobra command binding helperspkg/core/- HTTP services, event streaming, Kubernetes clients, and context managementpkg/fnds/- FNDS client and common typespkg/http/- HTTP utilities, including logger, retry client, and request headerspkg/icms-translate/- Queue-message translation helpers and CLI support for workload manifestspkg/imagecredential/- Image credential refresh job and Kubernetes secret helperspkg/ngc/- NGC token fetchingpkg/nvkit/- Shared service framework utilities for auth, config, logging, metrics, tracing, servers, and clientspkg/oauth/- OAuth and JWT handling with JWKS cachingpkg/otel/- OpenTelemetry integrationpkg/otelconfig/- OpenTelemetry collector config rendering and backend config templatespkg/secret/- Secret management and file fetchingpkg/types/- Type definitions and configurationpkg/version/- Version utilitiespkg/zapotelspan/- Helpers for adding OpenTelemetry span fields to zap logs
BYOO-facing otelconfig commands and fixtures live in tools/byoo.
Commands
Run these from src/libraries/go/lib:
make vendor-update
make lint
make test
make codegen-update
make update-testdata
make check-testdataUseful targeted commands:
go test ./pkg/core -run TestHTTPServiceRoutes
go test ./pkg/auth
GOWORK=off GOFLAGS=-mod=vendor go test -race -timeout 10m ./...Run Bazel commands from the repository root:
bazel build //src/libraries/go/lib/...
bazel test //src/libraries/go/lib/...
bazel test //src/libraries/go/lib:golangci_lintBazel build, test, and lint targets are the CI gate for this subtree. The Bazel
lint target uses the shared runner at rules/golangci/golangci_lint.sh with this
module's .golangci.yml. make lint still runs the same module-scoped
golangci-lint command for local iteration.
Root CI
Root CI generates the go-lib subproject validation pipeline from
tools/ci/subproject-validations.yaml, an internal GitLab CI config not
present in this public snapshot.
The current subproject checks are:
- vendor:
./tools/ci/check-go-vendor src/libraries/go/lib - codegen:
./tools/ci/check-go-codegen src/libraries/go/lib --command 'make codegen-update' - Bazel build/test/lint:
go-lib-bazel-build-test, including//src/libraries/go/lib:golangci_lint
Local Make targets source .env. Keep these values current when coverage
behavior changes:
GO_TEST_COVERAGE_THRESHOLDGO_TEST_COVERAGE_EXCLUDE_REGEX
Codegen
make codegen-update uses the root helper tools/scripts/update-go-deepcopy.
It regenerates:
pkg/types/nvca/config/zz_generated.deepcopy.gopkg/icms-translate/translate/common/zz_generated.deepcopy.gopkg/icms-translate/translate/function/zz_generated.deepcopy.gopkg/icms-translate/translate/task/zz_generated.deepcopy.go
The shared generated-file header is tools/scripts/boilerplate.go.txt. Generated
files should carry the NVIDIA Apache header.
After changing generated inputs, run:
make codegen-updateIf generated sources change package lists or BUILD file source lists, also run Gazelle from the repository root:
bazel run //:gazelleDependency and Notice Maintenance
This module uses a checked-in vendor/ tree. Do not edit vendor/ by hand.
Use:
make vendor-updateThis subtree does not maintain its own NOTICE file. Vendored notices and
licenses are collected into the repository root NOTICE. When dependencies or
vendored license files change, run from the repository root:
./tools/scripts/update-license
go run ./tools/collect-dependenciesDownstream Vendored Copies
NVCA replaces this module with the in-tree path but compiles its own copy under
src/compute-plane-services/nvca/vendor/. A change to a file NVCA vendors does
not reach NVCA until NVCA re-vendors, so re-vendor in the same Pull Request.
tools/ci/check-go-vendored-lib fails when the copies differ and prints the
commands. CI runs it in the required go-lib codegen check, so a Pull
Request with drift cannot merge. From the repository root:
(cd src/compute-plane-services/nvca && GOWORK=off go mod vendor)
git -C src/compute-plane-services/nvca checkout -- ':(glob)vendor/**/BUILD.bazel'
tools/ci/check-go-vendored-libgo mod vendor deletes or overwrites the BUILD.bazel files committed under
NVCA's vendor/; the git checkout restores them. If a vendored file is
added or removed, update that package's vendor BUILD.bazel srcs or
embedsrcs too.
The check does not see a file added to an embedded subdirectory, such as a
new template under templates/. When you add one, re-vendor NVCA and confirm
the file appears under its vendor/ tree.
Style and Testing
- Use
GOWORK=offandGOFLAGS=-mod=vendorwhen running module-scoped Go commands that need to match this module's vendored dependency set. bazel test //src/libraries/go/lib:golangci_lintrunsgolangci-lintviago runwith.golangci.yml;make lintremains a local equivalent.- Keep tests next to the code they cover.
- Use
testdata/for fixtures and refresh consolidatedicms-translatefixtures withmake update-testdata. - Do not commit secrets, tokens, or generated local output such as
_output/.
Public Mirror
The subtree OSS mirror is controlled by .oss-allowlist. Keep it explicit.
Do not add internal CI, scanner, registry, or toolbox files back to the allowlist.
Root files intentionally omitted from this subtree include local NOTICE,
standalone .gitlab-ci.yml, toolbox files, Renovate config, and restricted
scanner allowlists. Root monorepo tooling owns those concerns now.
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.

