Skip to content

Commit 0541a88

Browse files
committed
chore(skills): add dynamic plugin maintainer guidance
Signed-off-by: Will Killian <wkillian@nvidia.com>
1 parent 25e5ee1 commit 0541a88

7 files changed

Lines changed: 145 additions & 5 deletions

File tree

.agents/skills/contribute-docs/SKILL.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ Use this skill for docs-only or example-heavy changes.
2626
- Keep stable user-facing wrappers at `scripts/` root in docs and examples;
2727
only point at namespaced helper paths when documenting internal maintenance
2828
work
29+
- Dynamic plugin docs must keep Rust native plugin examples, Python worker
30+
plugin examples, and `grpc-v1` protocol details on separate pages.
31+
- Dynamic plugin manifests in docs/examples should use
32+
`compat.relay = ">=0.5,<1.0"` unless deliberately narrower.
2933
- In MDX files, top-of-file comments must use JSX comment delimiters:
3034
`{/*` to open and `*/}` to close. Do not use HTML comments for MDX SPDX
3135
headers.
@@ -36,6 +40,8 @@ Use this skill for docs-only or example-heavy changes.
3640
- [ ] Relevant getting-started or reference docs updated
3741
- [ ] Example commands still match current package names and paths
3842
- [ ] Relevant package or crate `README.md` files updated when examples or binding guidance changed
43+
- [ ] Dynamic plugin entry pages link to native, worker, Rust example, Python
44+
example, and protocol pages when those pages exist
3945
- [ ] New or regenerated MDX files use `{/* ... */}` for top-of-file SPDX comments
4046
- [ ] Release-policy docs still point to GitHub Releases as the only release-history source of truth
4147
- [ ] Run `just docs` when the docs site changed; `./scripts/build-docs.sh html` remains the compatibility wrapper

.agents/skills/maintain-ci/SKILL.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ reliability, or reproducibility.
3434
pipeline has tag-based publish behavior.
3535
- Keep release-tag policy aligned with `RELEASING.md`: raw SemVer tags only,
3636
no leading `v`.
37+
- Keep Codecov component paths aligned with new crates, packages, and generated
38+
outputs. Dynamic plugin SDK/protocol paths belong in the plugin component.
39+
- Keep pure-Python plugin SDK packaging as a single wheel artifact instead of
40+
duplicating it across every platform matrix entry.
3741

3842
## Permission Model
3943

@@ -61,6 +65,10 @@ reliability, or reproducibility.
6165
- [ ] Every external action is pinned to a full SHA
6266
- [ ] Cache settings are tied to lockfiles, manifests, or explicit tool versions
6367
- [ ] Secrets are only passed to the jobs that consume them
68+
- [ ] Codecov upload counts match `codecov.yml` after adding or removing upload
69+
jobs
70+
- [ ] Package artifacts include any first-class SDK packages introduced by the
71+
change
6472
- [ ] Concurrency, branch filters, and publish guards still reflect release intent
6573
- [ ] Artifact upload, download, and Pages deploy steps have matching permissions
6674
- [ ] Tag-triggered release workflows fail early when a tag violates repo policy
@@ -92,3 +100,4 @@ source instead of assuming local success proves remote success.
92100
- `.pre-commit-config.yaml`
93101
- `maintain-packaging`
94102
- `validate-change`
103+
- `maintain-dynamic-plugins`
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
name: maintain-dynamic-plugins
3+
description: Maintain NeMo Relay dynamic plugin loaders, manifests, Rust native SDKs, gRPC worker protocol, Python worker SDK, docs, tests, and release workflow coverage
4+
author: NVIDIA Corporation and Affiliates
5+
license: Apache-2.0
6+
---
7+
8+
# Maintain Dynamic Plugins
9+
10+
## Companion Guidance
11+
12+
Use `karpathy-guidelines`, `validate-change`, `maintain-packaging`, and
13+
`contribute-docs` alongside this skill when implementation, packaging, CI, or
14+
documentation changes are involved.
15+
16+
Use this skill for `plugin.kind = "rust_dynamic"`, `plugin.kind = "worker"`,
17+
`nemo-relay-plugin`, `nemo-relay-worker`, `nemo-relay-worker-proto`,
18+
`nemo-relay-types`, and the Python `nemo-relay-plugin` package.
19+
20+
## Rules
21+
22+
- Keep the stable boundary explicit: native plugins cross a C ABI; worker
23+
plugins cross `grpc-v1`.
24+
- Do not pass Rust runtime types, trait objects, futures, or allocator-owned
25+
strings across the native dynamic-library boundary.
26+
- Keep worker protocol DTOs in `JsonEnvelope`; protobuf owns control flow, not
27+
duplicated Relay data models.
28+
- Keep `relay-plugin.toml` dynamic records separate from generic runtime
29+
components. Enabled dynamic records may synthesize internal component specs;
30+
disabled records stay inspectable but unloaded.
31+
- Treat plugin Relay compatibility as normal SemVer. Use `>=0.5,<1.0` in
32+
examples unless a plugin intentionally declares a narrower range.
33+
- Do not add tests under `src`; Rust tests belong in crate `tests/` trees and
34+
Python SDK tests belong under `python/tests`.
35+
- Native and worker plugins are trusted extensions. Document that native plugins
36+
are in-process and unsandboxed; worker plugins provide process isolation but
37+
not a security sandbox.
38+
39+
## Checklist
40+
41+
- [ ] Manifest validation covers kind, compatibility, load contract, integrity,
42+
capability mismatch, and disabled-plugin behavior.
43+
- [ ] Native loader keeps libraries alive until registered callbacks are cleared
44+
and deregisters plugin kinds before unload.
45+
- [ ] Worker activation covers process launch, token auth, handshake, validation,
46+
declarative registration, proxy rollback, cancellation, and shutdown.
47+
- [ ] Rust and Python SDKs expose every supported registration surface.
48+
- [ ] Runtime helpers cover marks, scopes, continuations, and isolated scope
49+
stacks.
50+
- [ ] CLI `plugins list/inspect/validate/doctor` diagnostics include native ABI
51+
and worker protocol status without leaking secret config.
52+
- [ ] Docs include separate Rust native, Python worker, and `grpc-v1` protocol
53+
pages.
54+
- [ ] `justfile`, Codecov, and CI package/test workflows include new plugin
55+
crates and packages.
56+
57+
## Validation
58+
59+
```bash
60+
cargo test -p nemo-relay-types
61+
cargo test -p nemo-relay-plugin
62+
cargo test -p nemo-relay-worker-proto
63+
cargo test -p nemo-relay-worker
64+
cargo test -p nemo-relay --test native_plugin_tests --test worker_plugin_tests
65+
uv run pytest python/tests/plugin
66+
just test-rust
67+
just test-python
68+
just docs
69+
```
70+
71+
For broad runtime or public API changes, run the full `validate-change` matrix.
72+
73+
## References
74+
75+
- `crates/core/src/plugin/dynamic/`
76+
- `crates/plugin`
77+
- `crates/worker`
78+
- `crates/worker-proto`
79+
- `crates/types`
80+
- `python/plugin`
81+
- `examples/rust-native-plugin`
82+
- `docs/build-plugins`
83+
- `examples/python-grpc-worker-plugin`

.agents/skills/maintain-packaging/SKILL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ consumed outside the source tree.
2121

2222
- Rust `Cargo.toml` package names and workspace metadata
2323
- Python packaging in `pyproject.toml`
24+
- Python worker plugin SDK packaging in `python/plugin/pyproject.toml`
2425
- Go module path in `go/nemo_relay/go.mod`
2526
- Node workspace metadata in root `package.json` and `package-lock.json`
2627
- Node package metadata in `crates/node/package.json`
2728
- WebAssembly package naming and generated package expectations
2829
- FFI header and library naming
2930
- CI workflows, install commands, and example commands
31+
- `justfile` build, test, clean, version, and package recipes for plugin crates
32+
and packages
3033
- Release tags, release-note surfaces, and registry-facing version translation
3134

3235
## Checklist
@@ -36,12 +39,15 @@ consumed outside the source tree.
3639
- [ ] Docs and examples use the current install/import/build commands
3740
- [ ] CI references the same package names as local workflows
3841
- [ ] Public packaging changes are reflected in release-facing docs
42+
- [ ] `nemo-relay-plugin` Rust and Python packages track the project SemVer
43+
policy and Python wheels use valid PEP 440 translation
3944
- [ ] Release tags still use raw SemVer without a leading `v`
4045
- [ ] Release history and release notes still point to GitHub Releases, not `CHANGELOG.md` or docs pages
4146

4247
## References
4348

4449
- `pyproject.toml`
50+
- `python/plugin/pyproject.toml`
4551
- `go/nemo_relay/go.mod`
4652
- `package.json`
4753
- `package-lock.json`
@@ -50,3 +56,4 @@ consumed outside the source tree.
5056
- `.github/workflows/ci_pipe.yml`
5157
- `.github/workflows/ci.yaml`
5258
- `.gitlab-ci.yml`
59+
- `maintain-dynamic-plugins`

.agents/skills/test-python-binding/SKILL.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@ work. Keep changes scoped, surface assumptions, and define focused validation
1515
before editing.
1616

1717
Use this skill when the change is primarily in `python/nemo_relay`,
18-
`python/tests`, `crates/python`, or Python-facing docs/examples.
18+
`python/plugin`, `python/tests`, `crates/python`, or Python-facing
19+
docs/examples.
1920

2021
## Default Path
2122

22-
1. Format changed Python wrapper and test files with `uv run ruff format python`.
23+
1. Format changed Python wrapper and test files with `uv run ruff format python python/plugin`.
2324
2. Run focused `pytest` first when you know the affected area.
2425
3. Run the full Python suite with `just test-python` before review.
2526
4. If any Rust files changed as part of the Python work, also run
2627
`cargo fmt --all`, `just test-rust`, and
2728
`cargo clippy --workspace --all-targets -- -D warnings`.
2829
5. Use `just build-python` when you want an explicit build-only pass.
29-
6. If the native Rust bridge changed, add the Rust crate tests for
30+
6. Use `just build-python-plugin` when the Python worker SDK changed.
31+
7. If the native Rust bridge changed, add the Rust crate tests for
3032
`nemo-relay-python`.
3133

3234
## Python Test Style
@@ -53,9 +55,10 @@ Use this skill when the change is primarily in `python/nemo_relay`,
5355
```bash
5456
# Focused test loop
5557
uv run pytest -k "<pattern>"
58+
uv run pytest python/tests/plugin
5659

5760
# Format Python files
58-
uv run ruff format python
61+
uv run ruff format python python/plugin
5962

6063
# Full Python suite
6164
just test-python
@@ -68,6 +71,9 @@ cargo clippy --workspace --all-targets -- -D warnings
6871
# Rebuild the editable package plus native extension
6972
just build-python
7073

74+
# Rebuild/install the Python worker plugin SDK
75+
just build-python-plugin
76+
7177
# Native extension crate when crates/python changed
7278
cargo test -p nemo-relay-python
7379
```
@@ -76,6 +82,8 @@ cargo test -p nemo-relay-python
7682

7783
- If `crates/core`, `crates/adaptive`, or shared runtime semantics changed,
7884
also use `validate-change`.
85+
- If `python/plugin` or worker protocol behavior changed, also use
86+
`maintain-dynamic-plugins`.
7987
- If the change is actually about docs only, prefer `contribute-docs`
8088
plus targeted command checks.
8189

@@ -85,6 +93,9 @@ cargo test -p nemo-relay-python
8593
- `crates/python/Cargo.toml`
8694
- `crates/python/README.md`
8795
- `python/nemo_relay/README.md`
96+
- `python/plugin/pyproject.toml`
97+
- `python/plugin/src/nemo_relay_plugin`
98+
- `python/tests/plugin`
8899
- `docs/getting-started/python.md`
89100
- `docs/contribute/testing-and-docs.md`
90101
- `validate-change`

.agents/skills/test-rust-core/SKILL.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ work. Keep changes scoped, surface assumptions, and define focused validation
1515
before editing.
1616

1717
Use this skill when a change is primarily in `crates/core`, `crates/adaptive`,
18-
or shared Rust runtime semantics.
18+
dynamic plugin Rust crates, or shared Rust runtime semantics.
1919

2020
## Default Path
2121

@@ -46,6 +46,13 @@ cargo test -p nemo-relay
4646
# Adaptive crate when touched
4747
cargo test -p nemo-relay-adaptive
4848

49+
# Dynamic plugin crates when touched
50+
cargo test -p nemo-relay-types
51+
cargo test -p nemo-relay-plugin
52+
cargo test -p nemo-relay-worker-proto
53+
cargo test -p nemo-relay-worker
54+
cargo test -p nemo-relay --test native_plugin_tests --test worker_plugin_tests
55+
4956
# Compile sweep
5057
just build-rust
5158

@@ -57,6 +64,9 @@ just ci=true test-rust
5764

5865
- If a public API, event shape, middleware behavior, plugin semantics, or any
5966
`crates/core`/`crates/adaptive` behavior changed, also use `validate-change`.
67+
- If native dynamic plugins, gRPC workers, `nemo-relay-plugin`,
68+
`nemo-relay-worker`, `nemo-relay-worker-proto`, or `nemo-relay-types` changed,
69+
also use `maintain-dynamic-plugins`.
6070
- If the change is isolated to one binding wrapper on top of unchanged Rust
6171
semantics, prefer that binding's build/test skill instead.
6272

@@ -69,3 +79,4 @@ just ci=true test-rust
6979
- `crates/adaptive/README.md`
7080
- `docs/contribute/testing-and-docs.md`
7181
- `validate-change`
82+
- `maintain-dynamic-plugins`

.agents/skills/validate-change/SKILL.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ surfaces touched by a change.
2828
Python, Go, Node.js, and WebAssembly.
2929
- If a language surface changed, always run that language's test target even when
3030
Rust core did not change.
31+
- If dynamic plugin behavior changed, use `maintain-dynamic-plugins` and include
32+
the native SDK, worker protocol, Python SDK, docs, packaging, and Codecov
33+
surfaces in the validation plan.
3134
- If code changes alter APIs, bindings, commands, paths, packaging behavior,
3235
observability/adaptive semantics, or documented best practices, update any
3336
dependent maintainer or consumer skills in the same branch.
@@ -50,6 +53,10 @@ surfaces touched by a change.
5053
Use `test-wasm-binding`.
5154
- **FFI surface change**
5255
Use `test-ffi-surface`.
56+
- **Dynamic plugin loader, SDK, or protocol change**
57+
Use `maintain-dynamic-plugins`. Run the targeted plugin crates and
58+
`python/tests/plugin` first, then escalate to the core validation matrix when
59+
runtime behavior or `crates/core` changed.
5360
- **Third-party integration or patch change**
5461
Run patch validation with `./scripts/apply-patches.sh --check` and the relevant
5562
integration tests. Keep the root `./scripts/*.sh` wrappers for third-party
@@ -82,9 +89,11 @@ cargo clippy --workspace --all-targets -- -D warnings
8289

8390
# Python
8491
just build-python
92+
just build-python-plugin
8593
just test-python
8694
uv run ruff format python
8795
uv run pytest -k "<pattern>"
96+
uv run pytest python/tests/plugin
8897

8998
# Go
9099
just build-go
@@ -118,6 +127,7 @@ just docs-linkcheck
118127
- `test-node-binding`
119128
- `test-wasm-binding`
120129
- `test-ffi-surface`
130+
- `maintain-dynamic-plugins`
121131

122132
## Pre-commit Semantics
123133

@@ -163,6 +173,8 @@ If the change is large or public-facing, also verify:
163173
- README and docs entry points still match current package names and paths
164174
- Examples still run with the documented commands
165175
- Any renamed public surfaces are reflected consistently in manifests and docs
176+
- Dynamic plugin examples use `compat.relay = ">=0.5,<1.0"` unless deliberately
177+
narrower.
166178

167179
## References
168180

@@ -171,3 +183,4 @@ If the change is large or public-facing, also verify:
171183
- Build and test dispatchers: `justfile`
172184
- Patch helpers: `scripts/apply-patches.sh`, `scripts/generate-patches.sh`
173185
- Third-party script implementations: `scripts/third-party/`
186+
- Dynamic plugin guidance: `maintain-dynamic-plugins`

0 commit comments

Comments
 (0)