audio-stage-authoring
Make a new or existing NeMo Curator audio stage agent-ready so the audio agent can discover, configure and chain it. Use when adding an audio stage, writing or fixing its describe() contract or StageContract, adding *_key fields or semantic roles, writing a capability card, or when card conformance or assert_agent_ready fails. This is for authoring stage code in a Curator checkout, not for curating a dataset - use the audio-curation skill for that.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-11
- Stars
- ★ 1.9k
- Forks
- 371
01 前言 Front Matter
- name
- audio-stage-authoring
- description
- Make a new or existing NeMo Curator audio stage agent-ready so the audio agent can discover, configure and chain it. Use when adding an audio stage, writing or fixing its describe() contract or StageContract, adding *_key fields or semantic roles, writing a capability card, or when card conformance or assert_agent_ready fails. This is for authoring stage code in a Curator checkout, not for curating a dataset - use the audio-curation skill for that.
03 SKILL.md 正文
Making an audio stage agent-ready
This skill is the procedure. The authoritative checklist it drives is
nemo_curator/stages/audio/AGENT_READY.md — read that file for the mechanical
contract rather than working from memory, and do not restate it here.
Golden rule, from that document: every new knob defaults to today's behavior. Agent-readiness must never change how a stage runs in an existing pipeline. If a change alters existing output, it is a behavior change and needs its own justification.
Before writing code, read these
nemo_curator/stages/audio/AGENT_READY.md— the contract:AgentReady+describe()returningreads,writes,cardinality, honestgates;*_keyconstructor fields;ConditionalWrite; what is auto-derived and must not be hand-written.nemo_curator/stages/audio/audio_agent/knowledge/CARD_SCHEMA.md— the capability card schema..cursor/rules/processing-stage-patterns.mdcand.cursor/rules/composite-stage-patterns.mdc— the repo's own conventions forProcessingStageandCompositeStage. These are upstream-maintained framework rules; read them, do not copy from them, and never edit them. (Checkout-only: they are not part of the installed package.)
The order that works
- Write the stage the normal way first, following the two pattern rules above. Agent-readiness is a declaration layer over working code, not a substitute for it.
- Turn every
task.datakey into a*_keyconstructor field. A bare key literal insideprocess()is invisible to the agent and cannot be remapped when wiring two stages together. This is the single most common omission. - Implement
describe()withreads,writes,cardinality, and honestgates. Do not putparamsin it — those are auto-derived from the dataclass fields. - Reuse an existing semantic role with a class-local
KEY_ROLE_OVERRIDESmapping when a new key parameter means an existing concept. Add a shared_roles.KEY_ROLESentry only for a new cross-stage concept; declare genuinely internal keys in the stage'sINTERNAL_KEY_FIELDS. Internal fields are unioned across the MRO. - Write the capability card with the meaning of every externally consumed output: meaning, unit or range, provenance, scope or granularity, propagation across fan-out/nesting/aggregation, and at least one counterexample. Roles prove that two stages can connect; only the card lets the host judge whether connecting them achieves the user's intent.
- Add the conformance test:
assert_agent_ready(MyStage(...), fixture_factory=...). For GPU or model stages, reuse the fake-model or stub setup in the relevant stage's test module so the conformance test needs no GPU. - Run the card gate:
card_conformance.audit()must report zero violations, and an unknown top-level card key is a violation rather than something silently ignored.
Declare honestly, especially where it costs you
The contract is a promise the agent plans against, so an optimistic declaration is worse than a missing one. Three traps worth naming:
- A stage that may drop rows is
cardinality="filter", even when dropping is a side effect of something else. A strict sample-rate check that returns[]for a mismatched row is filtering, and declaring1:1makes validation treat a silently discarded corpus as a pass-through. gatesare environment facts, not aspirations.writes_to_disk=Truewith an emptyoutput_path_paramsis refused by smoke, because it claims disk writes while offering nothing to redirect into the sandbox.- Durable task-ID dependencies are resume facts. If framework
task.task_identers an output filename, archive member, or durable row identifier, declaregates.requires_stable_task_id=True; metadata checkpoints do not serialize that identity. ConditionalWritelabels possibility, not intent. Itsconditionmust describe a real code branch using configured key values. Usevalue_origin="upstream_same_key"when the stage merely copies a field, so the original producer keeps credit for the meaning and the copier is not presented as a new metric producer.
Verify
.venv/bin/python -m pytest tests/stages/audio -m "not gpu" -q
.venv/bin/python -m nemo_curator.stages.audio.audio_agent describe MyStage --params '{"score_key": "my_score"}'
describe is the agent's view of the stage. If its reads/writes do not match what the
code actually touches for those params, the contract is wrong no matter what the tests say.
Then confirm the stage is reachable through the public surface, not the private catalog:
from nemo_curator.stages.audio import agent
agent.list_agent_ready_stages() # your stage should appear
Checklist
Copy the PR checklist at the end of nemo_curator/stages/audio/AGENT_READY.md rather than
a paraphrase of it — that list is maintained with the framework and this file is not.
04 同仓库更多 Skills
checkpoint-placement
Select a core-proven metadata checkpoint for same-dataset parameter feedback. Use after recipe validation and semantic critique, before authoritative smoke, when the user expects to tune a declared downstream decision after seeing results.
audio-curation
Build and run a NeMo Curator audio curation pipeline from a natural-language goal (host-driven planner over the audio_agent tool core). Use for any audio, speech or audio-dataset task - quality filtering, transcription, WER filtering, VAD, diarization, ALM windowing, resampling, channel conversion, or inspecting an audio corpus. Route such work through this skill rather than writing ad-hoc ffprobe, librosa or soundfile scripts.
nemo-curator-docs
Maintain the NeMo Curator Fern docs site — add, update, move, or remove pages under fern/. Use for any documentation changes.
getting-started
Set up NeMo Curator for data curation (text, image, video, audio)
audio-curation
暂无简介
checkpoint-placement
暂无简介