add-binding-feature
Add or change a public NeMo Relay API surface across the core runtime and every affected binding
- License 许可
- Apache-2.0
- 所属仓库
- dawsonblock/NEMO
- 最近更新
- 2026-09-30
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- add-binding-feature
- author
- NVIDIA Corporation and Affiliates
- license
- Apache-2.0
- description
- Add or change a public NeMo Relay API surface across the core runtime and every affected binding
03 SKILL.md 正文
Add a Binding Feature
Companion Guidance
Use karpathy-guidelines alongside this skill for implementation or review
work. Keep changes scoped, surface assumptions, and define focused validation
before editing.
Use this skill when a change affects the public runtime surface and must stay in parity across the Rust core, FFI, and one or more bindings.
Do not use this skill for:
- Internal-only core refactors with no public API change
- Binding-local bug fixes that do not change shared behavior
- Docs-only or example-only updates
Implementation Order
- Core Rust
Implement the behavior first in
crates/core/src/api/and related core modules such ascrates/core/src/api/runtime/,crates/core/src/codec/, orcrates/core/src/json.rs. - FFI / shared C surface
Add or update FFI wrappers in the relevant
crates/ffi/src/api/*.rsmodule, re-export them throughcrates/ffi/src/api/mod.rs, and ensure the generatedcrates/ffi/nemo_relay.hstays correct. - Language-native bindings Update Python, Go, and Node.js for every surface that should expose the capability.
- Language wrapper helpers Update Python wrapper modules, Go shorthand packages, typed helpers, or adaptive/plugin helpers if the new behavior belongs there.
- Docs and examples Update reference docs, language-binding docs, and examples when the public surface or expected usage changed.
- Validation
Run the validation matrix from the
validate-changeskill for the affected surfaces.
Naming Conventions
| Layer | Convention | Example |
|---|---|---|
| Rust | snake_case |
nemo_relay_tool_call |
| C FFI | nemo_relay_ prefix |
nemo_relay_tool_call |
| Python | snake_case |
nemo_relay.tools.call |
| Go | PascalCase |
nemo_relay.ToolCall |
| Node.js | camelCase |
toolCall |
Parity Checklist
- [ ] Core function with doc comment in
crates/core/src/api/ - [ ] Runtime callback/state, codec, JSON, or event/tool/LLM/scope types added in the relevant core module if needed
- [ ] FFI wrapper in the relevant
crates/ffi/src/api/*.rsmodule and re-export incrates/ffi/src/api/mod.rs - [ ] Regenerate the shared library/header path with
just build-go - [ ] Python native binding in
crates/python/src/py_api/mod.rs - [ ] Python wrapper with docstring in
python/nemo_relay/<module>.py - [ ] Python type stubs updated in the relevant
python/nemo_relay/*.pyimodules - [ ] Go wrapper in
go/nemo_relay/nemo_relay.gowith doc comment - [ ] Go shorthand package updated if the capability belongs there
- [ ] Node.js binding in
crates/node/src/api/mod.rs - [ ] Typed wrapper or adaptive/plugin helper surfaces updated when applicable
- [ ] Tests added in every affected language surface
- [ ] SPDX license header on any new files
- [ ] Relevant pages under
docs/reference/updated - [ ]
README.md,docs/getting-started/, or binding-level READMEs updated if behavior differs by language - [ ] Relevant getting-started, README, or example docs updated if usage changed
Decision Points
Lock these before implementing:
- Which bindings actually expose the new surface?
- Is the change part of the plain JSON API, typed wrappers, adaptive/plugin helpers, or observability helpers?
- Does the new API need manual lifecycle and managed execute variants, or only one of them?
- Does the new behavior change event fields, metadata, or scope expectations?
- If tool execution is affected, does every callback, continuation, managed
return, and manual end surface use the canonical
ToolExecutionResultcontract and preserve its opaque annotation? - Are docs/examples required because the intended usage changed?
Key References
- Architecture:
docs/about/architecture.md - Reference index:
docs/reference/api/index.md - Getting started and binding status:
README.md,docs/getting-started/quick-start.md,docs/about/release-notes/support-matrix.md - Typed wrappers and codecs:
docs/integrate-frameworks/using-codecs.md,docs/integrate-frameworks/provider-codecs.md - Adaptive config/plugins:
docs/about/concepts/plugins.md,docs/build-plugins/about.md,docs/plugins/adaptive/configuration.md - Existing pattern: follow a surface already implemented across core, FFI, Python, Go, and Node.js rather than inventing a new shape
04 同仓库更多 Skills
nemo-relay-plugin-observability
Use this skill when choosing or configuring NeMo Relay 0.6 or 0.7 observability through the built-in plugin, subscribers, or exporters, including raw ATOF events, ATIF trajectories, OpenTelemetry, OpenInference, or custom event handling.
nemo-relay-plugin-build
Use this skill when building or packaging reusable NeMo Relay runtime behavior as an embedded configuration component or a manifest-backed `rust_dynamic` native or `worker` gRPC plugin, with deterministic validation and rollback-safe registration.
nemo-relay-plugin-adaptive-tuning
Use this skill when baseline NeMo Relay instrumentation exists and the user wants to configure or evaluate adaptive plugin behavior, including telemetry, state, adaptive_hints, tool_parallelism, ACG, hint consumption, or measured rollout.
nemo-relay-migrate-from-flow
Use this skill when migrating applications, examples, integrations, documentation, manifests, or repository code from NeMo Flow to NeMo Relay across Python, Rust, Node.js, Go, C FFI, CLI, configuration, and observability surfaces.
nemo-relay-integrate-upstream
Use this skill when assessing, extending, or implementing NeMo Relay support in an agent harness or agent framework, including coding agents and orchestration runtimes, when the host lacks Relay support or an existing integration needs deeper coverage. It identifies the host's execution boundaries and extension points, selects an appropriate attachment method for each boundary, and verifies the resulting coverage.
nemo-relay-instrument-typed-wrappers
Use this skill when adding NeMo Relay typed wrappers, domain types, or provider codecs while preserving JSON middleware semantics and caller-visible behavior.