nvcf / nvcf-ui
AGENTS.md261 starsChanged 9 days agoApache-2.0View on GitHub
Context and conventions for AI agents working in this codebase. Read before making changes. This file covers cross-cutting rules that apply to every task. Verify file paths, function names, and code patterns against the actual codebase before following them.
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/libraries/rust/stargate/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
11 rules. About 0 are common, 3 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
8
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 28
Use import type for type-only imports (verbatimModuleSyntax: true)
- Distinctive: line 34
Component ownership: ask "would the source feature's team recognize this as theirs?" If yes, it belongs in the source feature.
- Distinctive: line 35
Before building new components, check if similar logic or UI already exists — extract and graduate rather than duplicating
- Very specific: line 44
Always use the generated React Query hooks — do not write manual fetch calls for endpoints with generated hooks
- Very specific: line 47
Use generated query options factories (e.g.
- Very specific: line 48
Use generated Zod schemas for route search param validation via validateSearch
- Distinctive: line 60
Test user-visible behavior, not implementation details
- Very specific: line 65
Always prefer KUI components (Text, Heading, Panel, Button, etc.
- Very specific: line 78
All source files require an Apache 2.0 license header — task license:add
- Very specific: line 79
Run task lint:fix after making changes
- Very specific: line 84
Run task generate after spec changes (Orval generates React Query hooks, TypeScript model interfaces, and MSW mock handlers from each spec)
≈ “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
Context and conventions for AI agents working in this codebase. Read before making changes.
This file covers cross-cutting rules that apply to every task. Verify file paths, function names, and code patterns against the actual codebase before following them.
Project Structure
ui/src/
├── main.tsx # Entry point — mounts providers, stays thin
├── rootRoute.tsx # Root route — app shell and layout
├── router.tsx # Route tree composition — imports feature routes, wires tree
├── components/ # Shared UI components (feature-agnostic)
├── features/ # One folder per domain — self-contained modules
├── generated/ # Orval output — read-only, never edit
├── hooks/ # Shared hooks (feature-agnostic)
├── lib/ # Preconfigured instances (fetch client, queryClient)
├── mocks/ # MSW setup, baseline handlers, custom scenarios
├── types/ # Shared TypeScript types
└── utils/ # Pure utility functionsTypeScript
strict: true— do not useany, non-null assertions, or disable strict checks- Path alias:
~/maps tosrc/(configured intsconfig.json) - Use
import typefor type-only imports (verbatimModuleSyntax: true)
Import Rules
- Features may import directly from other features, but imports must be unidirectional — no circular dependencies
- Graduation rule: graduate shared code to
src/components/,src/hooks/, etc. only when the concept is genuinely domain-agnostic (e.g.StatusBadge,useDebounce). Domain-specific code stays in its owning feature - Component ownership: ask "would the source feature's team recognize this as theirs?" If yes, it belongs in the source feature. If shaped by the consumer's layout, it belongs with the consumer
- Before building new components, check if similar logic or UI already exists — extract and graduate rather than duplicating
State Management
- TanStack Query owns all server state — no Redux, Zustand, or global stores
- Local UI state lives in the component or a feature-scoped hook
Data Loading
- Always use the generated React Query hooks — do not write manual
fetchcalls for endpoints with generated hooks - In route components, use suspense hook variants (
useGetFunctionsSuspense) — notuseQuery+isPendingchecks - Route loaders use
ensureQueryDatawithrevalidateIfStale: trueto avoid flashing stale content - Use generated query options factories (e.g.
getGetFunctionsQueryOptions) in loaders - Use generated Zod schemas for route search param validation via
validateSearch
Fetch and Error Handling
lib/fetch.tsprovides a custom fetch mutator used by all generated Orval hooks- Non-2xx responses throw an
HttpErrorautomatically — do not add manual response checks in feature code - Route errors surface through the router's global
defaultErrorComponent(RouteErrorFallback), whose retry callsrouter.invalidate()to re-run the loader — don't add per-routeerrorComponentlambdas. UseAsyncBoundaryfor component-level (non-route) suspense/error isolation (e.g. dashboard panels)
Testing
- Tests are not optional — when adding or modifying a component, add or update the corresponding tests
- Vitest + Testing Library; test files live alongside code (
Widget.test.tsxnext toWidget.tsx) - Test user-visible behavior, not implementation details
Styling
- Tailwind CSS 4 + KUI (NVIDIA design system)
- Always prefer KUI components (
Text,Heading,Panel,Button, etc. from@nvidia/foundations-react-core) over plain HTML elements - The KUI Tailwind plugin overrides default theme values — standard Tailwind classes already use KUI design tokens
- KUI vendor CSS is committed in
vendor/kui-foundations/— runtask ui:vendor-cssafter bumping the package
Backend
- Go code lives in
backend/— a self-contained module with its owngo.mod
Linting and License
- UI: Biome —
task ui:lint/task ui:lint:fix - Backend: golangci-lint —
task backend:lint/task backend:lint:fix - All:
task lintruns everything including license check - All source files require an Apache 2.0 license header —
task license:add - Run
task lint:fixafter making changes
Code Generation
- Edit the spec files in
spec/(control-plane-openapi.yaml,nvcf-openapi.yaml,sis-openapi.yaml) directly — never edit anything inui/src/generated/ - Run
task generateafter spec changes (Orval generates React Query hooks, TypeScript model interfaces, and MSW mock handlers from each spec) - The generated models are the source of truth — import types and status enums (e.g.
FunctionDtoStatus,GetClusterResponseStatus) from~/generated/model/...; don't hand-roll status constants
Mocking (dev + tests)
- The default MSW baseline is a seeded in-memory store (
ui/src/mocks/store/): stable, referentially-consistent data (list ids match detail, keyed by the active accountncaId). Both the browser worker and the Node test server use it VITE_SCENARIO=feature:filefiles inmocks/scenarios/layer on top — MSW is first-match-wins and scenarios are prepended, so they override the baseline- Fix mock-data realism at the source — the
mock.propertiesoverrides inorval.config.ts, thentask generate— never by patching generated output or the store
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.

