k8s-launch-kit
AGENTS.md18 starsChanged 48 days agoApache-2.0View on GitHub
Kubernetes Launch Kit (l8k) discovers hardware, resolves configuration, renders networking artifacts, deploys them, and validates the result. This file is the repository entrypoint for development agents. Read CONTRIBUTING.md and any instructions scoped to the files you change. 1. Confirm the requested outcome, current branch/base, and worktree status. For new work, refresh the intended base unless the user specifies a revision. Preserve unrelated changes; use an isolated .sbx/<task>/ worktree when needed. 2. Read the affected implementation, callers, nearby tests and documentation…
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,542 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 repository13 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- k8s-launch-kit-cleanSkill
- k8s-launch-kit-configSkill
- k8s-launch-kit-deploySkill
- k8s-launch-kit-discoverSkill
- k8s-launch-kit-dryrunSkill
- k8s-launch-kit-generateSkill
- k8s-launch-kit-pipelineSkill
- k8s-launch-kit-sharedSkill
- k8s-launch-kit-troubleshootSkill
- k8s-launch-kit-validateSkill
- k8s-network-engineerSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
25 rules. About 1 is common, 12 are distinctive, and 12 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Read the affected implementation, callers, nearby tests and documentation before proposing a change.
- Distinctive: line 26
Keep changes focused. For interface changes, update the interface, implementations, consumers, mocks, tests and affected documentation …
- Common: line 28
Put rendered smoke outputs and diagnostic evidence in the workspace's designated scratch directory outside the checkout.
- Distinctive: line 38
Read the row for the task, then follow its relevant references.
- Distinctive: line 58
Prefer the skill source in the checkout under development over a machine-local adapter pointing at another checkout.
- Distinctive: line 63
Read the applicable extension contracts before changing an integration boundary.
- Very specific: line 70
Update the relevant spec when a shared promise or documented exception changes.
- Very specific: line 83
Use Go types/tags, canonical config, profile metadata and release catalogs for mechanical facts.
- Very specific: line 92
Add config-backed flags through options.Options tags and the shared binding/resolver path.
- Very specific: line 109
Keep one validated desired-artifact snapshot per operation.
- Distinctive: line 118
Keep machine-specific PCI selectors tied to their source group.
- Distinctive: line 145
Follow nearby Go style, nil-guard public pointer inputs, check collection bounds and return descriptive wrapped errors.
- Distinctive: line 151
Check the pinned operator APIs, chart contracts and generated manifests when changing integration behavior.
- Very specific: line 154
When bumping NIC Configuration Operator, inspect whether make sync-nic-config-crds must refresh the embedded discovery CRDs.
- Very specific: line 157
Use released versions or real pseudo-versions for deliverable cross-repo dependencies.
- Very specific: line 167
Read the checked-out Makefile, go.mod, lint config and CI workflows for current tool versions and required gates.
- Distinctive: line 184
Use Ginkgo/Gomega for new behavioral suites.
- Distinctive: line 187
Use existing mocks/fakes; explicitly initialize fields relevant to the scenario.
- Very specific: line 193
Keep fixtures anonymized. Use generic host/site/model identifiers unless a public hardware identifier is essential to the behavior under …
- Very specific: line 212
Use --output json for scripted assertions, retain stderr/logs separately, and check the process exit code and the command's actual result …
- Very specific: line 232
Before editing: search for descriptions of the affected behavior in README.md, docs/, skills/ and their bundled references.
- Distinctive: line 235
During implementation: update those sections alongside the code.
- Very specific: line 238
Before finishing: check examples against the current types, schema and command help.
- Distinctive: line 246
Use this impact map to find the relevant sections.
- Distinctive: line 258
Keep this file about development rules and navigation.
≈ “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
<!--
SPDX-FileCopyrightText: Copyright 2026 NVIDIA CORPORATION & AFFILIATES
SPDX-License-Identifier: Apache-2.0
-->Launch Kit development guide
Kubernetes Launch Kit (l8k) discovers hardware, resolves configuration, renders networking
artifacts, deploys them, and validates the result. This file is the repository entrypoint for
development agents. Read CONTRIBUTING.md and any instructions scoped to the files
you change.
Working approach
- Confirm the requested outcome, current branch/base, and worktree status. For new work, refresh
the intended base unless the user specifies a revision. Preserve unrelated changes; use an
isolated
.sbx/<task>/worktree when needed. - Read the affected implementation, callers, nearby tests and documentation before proposing a
change. Use
rg, Git history and available code-navigation tools; optional MCP servers are not prerequisites. - Trace the whole behavior across affected commands and external consumers. For a bug, establish expected versus actual behavior and a concrete reproducer before changing the implementation.
- For nontrivial work, record affected files, compatibility, tests and documentation updates. Continue within the user's existing authorization; clarify only unresolved scope or consequential choices.
- Keep changes focused. For interface changes, update the interface, implementations, consumers, mocks, tests and affected documentation together.
- Put rendered smoke outputs and diagnostic evidence in the workspace's designated scratch directory outside the checkout. Keep credentials and customer-specific data out of tracked files.
A request only to plan or review does not authorize implementation. Follow the full user request when it combines planning, implementation or delivery. A skill does not expand that authority. New PR work uses a new branch from the requested base; authorized review fixes stay on the existing PR branch.
Where to start
Read the row for the task, then follow its relevant references. Do not load every operational skill for every source change.
| Task | Implementation | Documentation and repository skill |
| CLI, target routing, command compatibility | pkg/cmd, pkg/target, pkg/target/host, pkg/options, pkg/app | Targets, CLI, pipeline |
| Configuration, defaults, CLI overrides | pkg/config, pkg/configinput, pkg/configflags, pkg/resolve | Configuration, config |
| Discovery and topology presets | pkg/nicconfigdaemon, pkg/networkoperatorplugin/discovery*, pkg/presets | Discovery, presets, discover |
| Profiles, grouping, templates, networking | pkg/profiles, profiles, pkg/networkoperatorplugin/templates.go, pkg/networkoperatorplugin/scopes.go, pkg/networkoperatorplugin/spectrumx | Generation, heterogeneous clusters, Spectrum-X, generate, networking context |
| Artifact parsing and lifecycle handoff | pkg/bundle, pkg/app, pkg/target/host, pkg/networkoperatorplugin | Artifact bundle, architecture |
| Deployment, preflight, readiness | pkg/networkoperatorplugin/deploy*, pkg/networkoperatorplugin/preflight, pkg/networkoperatorplugin/crstate, pkg/networkoperatorplugin/helmclient, pkg/target/host/deploy.go | Deployment, deploy, dry run |
| Validation, connectivity, reports | pkg/target/host/validate*, pkg/networkoperatorplugin/connectivity, pkg/networkoperatorplugin/crstate | Validation, validate |
| OpenShift flavor | pkg/config/flavor.go, pkg/networkoperatorplugin/ocp_config.go, flavor-specific profiles and lifecycle code | OpenShift; relevant lifecycle skill's OpenShift section |
| Cleanup | pkg/cmd/clean.go, pkg/networkoperatorplugin/clean.go | Cleanup, clean |
| Diagnostics and automation | pkg/cmd/sosreport.go, pkg/kubeclient, pkg/log, pkg/ui, pkg/errors | Troubleshooting, automation, troubleshoot |
| Dependencies, release catalogs, packaging | go.mod, pkg/networkoperatorplugin/releases, hack, Makefile, .github/workflows | Installation, configuration, maintenance |
For actual CLI operation, read shared guidance and the
matching skill in full. Resolve its references relative to that skill. These skills describe
operating l8k; they do not require a deployed cluster or installed binary for source development.
Prefer the skill source in the checkout under development over a machine-local adapter pointing at
another checkout.
Extension contracts
Read the applicable extension contracts before changing an integration boundary. They cover configuration, discovery, workflows, platforms, profiles, artifacts, resource kinds, effects, connectivity and outcomes. Select only the contracts relevant to the change; record integration decisions and map affected scenarios to verification. Check each contract's baseline exceptions before claiming conformance.
Update the relevant spec when a shared promise or documented exception changes. A routine field/flag/Kind addition that follows existing contracts does not require a new permanent spec or edits to every contract. Continue updating affected user documentation and skills in the same PR. OpenSpec structural validation does not replace implementation tests or live qualification.
Sources and behavior to preserve
Code and tests show current implementation; reviewed requirements describe intended behavior. If they disagree with a guide or skill, identify the discrepancy and reconcile it in the change. Do not silently reinterpret a documented guarantee. Historical plans and prior-session memory are leads to verify, not proof of current support.
Use Go types/tags, canonical config, profile metadata and release catalogs for mechanical facts.
Query the built binary's schema/command help for supported flags. Avoid adding another
hand-maintained flag, default, release or CRD-version table here.
Configuration and command boundaries
- Preserve precedence: canonical defaults < hardware defaults < user YAML < explicit CLI. Presence matters: omitted/null differs from explicit false, zero, empty string and empty collections. Supplied values still undergo validation.
- Add config-backed flags through
options.Optionstags and the shared binding/resolver path. Complex coordinated inputs use typed resolver requests. Keep command scope and schema metadata aligned; do not add a parallel manual flag-to-YAML registry. - The selected release remains authoritative for catalog-managed coordinates after merging. Preserve flavor-specific defaulting and explicit user overrides as implemented in the resolver.
- Resolution must not mutate inputs or shared defaults. Generation preserves source YAML and writes
.l8k/resolved-config.yaml. Deploy/validate prefer an explicit user config, then resolved bundle metadata when present, before legacy fallback. - Discovery refresh with
--user-configreplaces inventory and explicit CLI-targeted fields while preserving unrelated fields, comments, omissions and explicit values. Fresh discovery has a different defaulting path; test both when changing resolution. - Bind typed lifecycle requests through the target registry. Keep Cobra/process termination in
pkg/cmd; services return errors and honor context. Unsupported target phases must reject rather than fall through into Host execution.
Artifacts, rendering and topology
- Keep one validated desired-artifact snapshot per operation. Validate rendered artifacts before replacing output and validate deploy inputs before Helm/remediation/apply. Preserve source file/document diagnostics and deterministic ordering.
- Consumers must not mutate the retained bundle. Reuse desired state while refreshing live Kubernetes state during polling. Structural bundle validation does not prove admission, schema validity or runtime readiness.
- A new rendered Kind needs an explicit decision in the scope registry. Check singleton, bucket, per-source and namespace behavior, unique identities, references and selectors under full and subset group selection.
- Keep machine-specific PCI selectors tied to their source group. Do not broaden a selected group set, mix north-south NICs into east-west configuration, or derive persisted identifiers independently of the shared identity code.
- Preserve preset matching/deviation behavior and topology lifetimes. Keep worker-specific probe data transient when it cannot represent the whole group. Check naming/netplan conflicts and relevant profile/RA/mode combinations.
Ownership, readiness and platform support
- Preserve dependency ordering, observation freshness and error classification in deploy/validate. Missing permissions, malformed resources and incomplete checks must not become successful evidence.
- External Helm ownership disables the Helm boundary; it does not disable CR handling. Preflight
remediation and explicit
cleanhave different deletion scopes. Read the cleanup contract before changing either; do not assume cleanup is limited to this run's resources. - OpenShift is a Host flavor with external operator ownership and different namespaces, selectors and permissions. Use its explicit flavor paths and qualification matrix; do not infer support from Kubernetes templates or a successful render.
- Connectivity checks must use the intended source interface and topology. Do not substitute guessed GPU/rail identities. Preserve per-check gating, failure evidence, report writing and cleanup on partial/error paths.
- Render, server dry-run, simulated tests and live validation establish different things. A skipped/deferred check is not a pass; qualification applies only to the tested profile, platform and hardware.
Implementation and integration
- Follow nearby Go style, nil-guard public pointer inputs, check collection bounds and return descriptive wrapped errors. Add meaningful regression cases for new behavior and failure paths.
- Preserve stderr when executing commands. Use
CombinedOutput()for ordinary subprocess capture and the existing pod-exec helper for separately captured streams. Route diagnostics through existing logging, with bounded/redacted output where needed; never print credentials or kubeconfig contents. - Check the pinned operator APIs, chart contracts and generated manifests when changing integration behavior. A dependency bump can affect templates, readiness validators, discovery assets, release cohorts and consumers outside this repository.
- When bumping NIC Configuration Operator, inspect whether
make sync-nic-config-crdsmust refresh the embedded discovery CRDs. Regenerate changed canonical config withgo generate ./pkg/configand review generated diffs. - Use released versions or real pseudo-versions for deliverable cross-repo dependencies. Local
sibling
replacedirectives are temporary development aids and cannot be assumed to work in single-repo Docker build contexts. - Preserve release-cohort consistency and existing GA/prerelease transition rules. Verify current catalog/profile gates rather than copying a release snapshot from a skill.
- Match surrounding license headers; new files use the current-year NVIDIA copyright and the repository's SPDX convention.
Verification
Read the checked-out Makefile, go.mod, lint config and CI workflows for current tool versions
and required gates.
make build # produces build/l8k with version metadata
./build/l8k schema # inspect this checkout's capabilities
python3 scripts/check-docs.py --binary build/l8k # offline documentation contracts
# Replace the placeholder with each affected package:
go test ./pkg/<affected-package>/... -count=1
make test # repository-wide tests
make lint # use the golangci-lint version pinned by CI
# Match CI's race gate on a supported platform with CGO enabled:
go test -race -count=1 ./...
# After installing requirements-docs.txt into an isolated Python environment:
mkdocs build --strict- Use Ginkgo/Gomega for new behavioral suites; current code also has Go/testing and testify tests. Extend an existing regression suite in its established style and avoid unrelated framework migrations. Controller integration tests in sibling operators follow their own envtest guidance.
- Use existing mocks/fakes; explicitly initialize fields relevant to the scenario. For asynchronous behavior, model live-state transitions rather than only invocation counts. Assert both expected effects and prohibited side effects where the contract needs them.
- For renderer/bundle changes, use valid resolved fixtures, render relevant profiles/modes and group
subsets, parse output through
bundle.FromFiles, and inspect identities/selectors/references. File counts alone do not verify manifest correctness. - Keep fixtures anonymized. Use generic host/site/model identifiers unless a public hardware identifier is essential to the behavior under test; preserve necessary PCI topology. Do not silently change shared fixture assumptions to make a test pass.
- Choose checks by impact: targeted regression tests during iteration; required build/test/lint
gates for code; strict docs and example checks for documentation. Report any gate not run and why.
make build-allis relevant to platform/build changes and remains a hosted CI gate. - Diagnose environment failures against a clean base or isolated inputs. Do not assume a historically failing preset test is still an expected failure, silently skip it, or stash/reset somebody else's checkout to compare.
- Develop with
make buildand./build/l8kfrom the repository root. Global installation is optional; source installation usesscripts/install-local.sh. The Makefile's install targets can download supporting assets and write system paths. - For cluster images, select the intended target explicitly; this workspace defaults to
linux/amd64. Usedocker buildx build --platform=linux/amd64with an appropriate load/push choice and verify image architecture. Native CLI builds remain supported on their documented platforms.
Running CLI smoke checks and live workflows
Use --output json for scripted assertions, retain stderr/logs separately, and check the process
exit code and the command's actual result shape. Do not discard diagnostic evidence by default or
add root-only --yes to subcommands. Text/help/schema inspection is appropriate when testing those
interfaces.
Generation without deploy can be tested offline. Discovery creates temporary cluster resources;
connectivity validation also creates test resources. A pipeline's --dry-run does not establish
that every phase is read-only. Resolve the target/context and stay within the user's existing
live-operation authority. clean has no dry run; inspect its precise scope and retention choice
before invoking it.
For diagnosis, start with the supplied reproducer/logs or sosreport, trace the failing layer, and
collect additional evidence proportionally. Use debug then bounded trace logging when needed. Do
not run discovery, deployment or a full connectivity matrix merely to inspect source code.
Required documentation updates
Documentation is part of completing a change. Agents must update the relevant existing sections in the same PR whenever behavior, usage, interfaces or development procedures change.
- Before editing: search for descriptions of the affected behavior in
README.md,docs/,skills/and their bundled references. Include the relevant sections in the change plan; follow links to find duplicated examples or guarantees. - During implementation: update those sections alongside the code. Explain the resulting behavior, prerequisites, defaults, compatibility and limitations where readers need them. Update existing guidance instead of adding a parallel manual or a change log to this file.
- Before finishing: check examples against the current types, schema and command help;
regenerate affected generated documentation using its documented generator; verify links and run
mkdocs build --strictfor site changes. Inspect the final diff for contradictory or stale descriptions. - In the PR and completion report: name the documentation sections updated and the checks performed. If no documentation update is needed, explain why the existing documentation remains accurate. Do not make unrelated documentation edits just to satisfy this check.
Use this impact map to find the relevant sections; a change does not require editing every row.
| Changed area | Documentation to review and update when affected |
| Commands, flags, config fields, defaults or precedence | CLI/configuration reference, relevant user or advanced guide, README examples, phase skill and its references |
| Profiles, templates, selectors or emitted resources | Profile and generation guides, relevant networking guide, render examples and generate/config skill references |
| Package ownership, interfaces, lifecycle or artifact handoff | Architecture overview and diagrams, specific architecture document, exported API comments and library examples |
| Deployment, cleanup, validation or platform support | Operational guides, prerequisites and qualification matrices, troubleshooting guidance, corresponding skills |
| Build, tests, installation, dependencies or release workflow | CONTRIBUTING, README development section, installation/maintenance guides, shared skill and affected workflow documentation |
Guidance maintenance and delivery
- Keep this file about development rules and navigation. Detailed procedures stay in docs/skills;
version/default facts stay with their existing source.
CLAUDE.mdpoints here instead of maintaining a second manual. - Preserve local-only guidance before replacing it. Keep personal paths, credentials, lab state, active PR status and historical incident logs outside the shared guide. Update persistent personal memory only when explicitly requested.
- For an authorized PR, follow CONTRIBUTING.md, use DCO sign-off and inspect the final diff. When authorized to address review, verify findings against the current head, amend the relevant commit where appropriate, and use lease-protected pushes for rewrites.
- Report what changed, why, exact checks/results and remaining limitations. Keep local validation, hosted checks, review approval, merge, publication and live qualification distinct. Read-only review findings need concrete code paths and evidence.
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.

