From 5680a8e45acb748a85b782c09930ee37bbb4c099 Mon Sep 17 00:00:00 2001 From: Venkat Balan Date: Wed, 28 Oct 2026 10:38:27 -0700 Subject: [PATCH 1/3] feat: add six PVA SDK skills from source Signed-off-by: Venkat Balan --- skills/pva-build-test/BENCHMARK.md | 153 +++ skills/pva-build-test/README.md | 155 +++ skills/pva-build-test/SKILL.md | 248 ++++ skills/pva-build-test/agents/openai.yaml | 7 + .../assets/build-test-result-template.json | 94 ++ .../config/skillspector-baseline.yaml | 9 + skills/pva-build-test/evals/EVAL.md | 30 + skills/pva-build-test/evals/config.yml | 10 + skills/pva-build-test/evals/evals.json | 63 + .../evals/files/emu-only/emu.log | 5 + .../evals/files/unverified/doctor-report.md | 10 + .../references/build-test-result-schema.md | 33 + .../references/direct-ssh-tegra.md | 194 +++ skills/pva-build-test/skill-card.md | 84 ++ skills/pva-build-test/skill.oms.sig | 1 + skills/pva-debug/BENCHMARK.md | 153 +++ skills/pva-debug/README.md | 155 +++ skills/pva-debug/SKILL.md | 149 ++ skills/pva-debug/agents/openai.yaml | 7 + .../pva-debug/assets/debug-report-template.md | 65 + .../config/skillspector-baseline.yaml | 9 + skills/pva-debug/evals/EVAL.md | 30 + skills/pva-debug/evals/config.yml | 10 + skills/pva-debug/evals/evals.json | 61 + .../evals/files/unverified/doctor-report.md | 10 + .../evals/files/unverified/failure.md | 10 + skills/pva-debug/skill-card.md | 82 ++ skills/pva-debug/skill.oms.sig | 1 + skills/pva-doctor/BENCHMARK.md | 155 +++ skills/pva-doctor/README.md | 155 +++ skills/pva-doctor/SKILL.md | 343 +++++ skills/pva-doctor/agents/openai.yaml | 7 + .../assets/doctor-report-template.md | 79 ++ .../config/skillspector-baseline.yaml | 9 + skills/pva-doctor/evals/EVAL.md | 31 + skills/pva-doctor/evals/config.yml | 10 + skills/pva-doctor/evals/evals.json | 81 ++ .../evals/files/overlap/sdk/share/doc/VERSION | 1 + .../references/reference-maintenance.md | 111 ++ .../references/sdk-doc-sources.json | 122 ++ .../scripts/materialize_sdk_references.py | 1215 +++++++++++++++++ skills/pva-doctor/skill-card.md | 84 ++ skills/pva-doctor/skill.oms.sig | 1 + skills/pva-opgen/BENCHMARK.md | 153 +++ skills/pva-opgen/README.md | 155 +++ skills/pva-opgen/SKILL.md | 233 ++++ skills/pva-opgen/agents/openai.yaml | 7 + .../pva-opgen/assets/opgen-result-template.md | 64 + .../config/skillspector-baseline.yaml | 9 + skills/pva-opgen/evals/EVAL.md | 30 + skills/pva-opgen/evals/config.yml | 15 + skills/pva-opgen/evals/evals.json | 65 + .../evals/files/invalid/opgen-inputs.json | 4 + .../evals/files/nonfinite/opgen-inputs.json | 1 + .../scripts/finalize_opgen_inputs.py | 515 +++++++ skills/pva-opgen/skill-card.md | 82 ++ skills/pva-opgen/skill.oms.sig | 1 + skills/pva-setup/BENCHMARK.md | 155 +++ skills/pva-setup/README.md | 155 +++ skills/pva-setup/SKILL.md | 193 +++ skills/pva-setup/agents/openai.yaml | 7 + skills/pva-setup/evals/EVAL.md | 13 + skills/pva-setup/evals/config.yml | 10 + skills/pva-setup/evals/evals.json | 73 + skills/pva-setup/skill-card.md | 84 ++ skills/pva-setup/skill.oms.sig | 1 + skills/pva-spec/BENCHMARK.md | 153 +++ skills/pva-spec/README.md | 155 +++ skills/pva-spec/SKILL.md | 244 ++++ skills/pva-spec/agents/openai.yaml | 7 + .../assets/configure-report-template.md | 38 + skills/pva-spec/assets/evidence-template.json | 9 + .../assets/operator-spec-template.json | 75 + .../pva-spec/assets/test-matrix-template.json | 17 + .../config/skillspector-baseline.yaml | 9 + skills/pva-spec/evals/EVAL.md | 30 + skills/pva-spec/evals/config.yml | 10 + skills/pva-spec/evals/evals.json | 65 + .../evals/files/approved/doctor-report.md | 5 + .../evals/files/approved/evidence.json | 16 + .../evals/files/approved/operator-spec.json | 92 ++ .../evals/files/approved/test-matrix.json | 59 + .../evals/files/unresolved/doctor-report.md | 5 + .../evals/files/unresolved/evidence.json | 16 + .../evals/files/unresolved/operator-spec.json | 92 ++ .../evals/files/unresolved/test-matrix.json | 61 + .../references/handoff-requirements.md | 85 ++ .../pva-spec/scripts/finalize_opgen_inputs.py | 515 +++++++ skills/pva-spec/skill-card.md | 83 ++ skills/pva-spec/skill.oms.sig | 1 + 90 files changed, 8109 insertions(+) create mode 100644 skills/pva-build-test/BENCHMARK.md create mode 100644 skills/pva-build-test/README.md create mode 100644 skills/pva-build-test/SKILL.md create mode 100644 skills/pva-build-test/agents/openai.yaml create mode 100644 skills/pva-build-test/assets/build-test-result-template.json create mode 100644 skills/pva-build-test/config/skillspector-baseline.yaml create mode 100644 skills/pva-build-test/evals/EVAL.md create mode 100644 skills/pva-build-test/evals/config.yml create mode 100644 skills/pva-build-test/evals/evals.json create mode 100644 skills/pva-build-test/evals/files/emu-only/emu.log create mode 100644 skills/pva-build-test/evals/files/unverified/doctor-report.md create mode 100644 skills/pva-build-test/references/build-test-result-schema.md create mode 100644 skills/pva-build-test/references/direct-ssh-tegra.md create mode 100644 skills/pva-build-test/skill-card.md create mode 100644 skills/pva-build-test/skill.oms.sig create mode 100644 skills/pva-debug/BENCHMARK.md create mode 100644 skills/pva-debug/README.md create mode 100644 skills/pva-debug/SKILL.md create mode 100644 skills/pva-debug/agents/openai.yaml create mode 100644 skills/pva-debug/assets/debug-report-template.md create mode 100644 skills/pva-debug/config/skillspector-baseline.yaml create mode 100644 skills/pva-debug/evals/EVAL.md create mode 100644 skills/pva-debug/evals/config.yml create mode 100644 skills/pva-debug/evals/evals.json create mode 100644 skills/pva-debug/evals/files/unverified/doctor-report.md create mode 100644 skills/pva-debug/evals/files/unverified/failure.md create mode 100644 skills/pva-debug/skill-card.md create mode 100644 skills/pva-debug/skill.oms.sig create mode 100644 skills/pva-doctor/BENCHMARK.md create mode 100644 skills/pva-doctor/README.md create mode 100644 skills/pva-doctor/SKILL.md create mode 100644 skills/pva-doctor/agents/openai.yaml create mode 100644 skills/pva-doctor/assets/doctor-report-template.md create mode 100644 skills/pva-doctor/config/skillspector-baseline.yaml create mode 100644 skills/pva-doctor/evals/EVAL.md create mode 100644 skills/pva-doctor/evals/config.yml create mode 100644 skills/pva-doctor/evals/evals.json create mode 100644 skills/pva-doctor/evals/files/overlap/sdk/share/doc/VERSION create mode 100644 skills/pva-doctor/references/reference-maintenance.md create mode 100644 skills/pva-doctor/references/sdk-doc-sources.json create mode 100755 skills/pva-doctor/scripts/materialize_sdk_references.py create mode 100644 skills/pva-doctor/skill-card.md create mode 100644 skills/pva-doctor/skill.oms.sig create mode 100644 skills/pva-opgen/BENCHMARK.md create mode 100644 skills/pva-opgen/README.md create mode 100644 skills/pva-opgen/SKILL.md create mode 100644 skills/pva-opgen/agents/openai.yaml create mode 100644 skills/pva-opgen/assets/opgen-result-template.md create mode 100644 skills/pva-opgen/config/skillspector-baseline.yaml create mode 100644 skills/pva-opgen/evals/EVAL.md create mode 100644 skills/pva-opgen/evals/config.yml create mode 100644 skills/pva-opgen/evals/evals.json create mode 100644 skills/pva-opgen/evals/files/invalid/opgen-inputs.json create mode 100644 skills/pva-opgen/evals/files/nonfinite/opgen-inputs.json create mode 100755 skills/pva-opgen/scripts/finalize_opgen_inputs.py create mode 100644 skills/pva-opgen/skill-card.md create mode 100644 skills/pva-opgen/skill.oms.sig create mode 100644 skills/pva-setup/BENCHMARK.md create mode 100644 skills/pva-setup/README.md create mode 100644 skills/pva-setup/SKILL.md create mode 100644 skills/pva-setup/agents/openai.yaml create mode 100644 skills/pva-setup/evals/EVAL.md create mode 100644 skills/pva-setup/evals/config.yml create mode 100644 skills/pva-setup/evals/evals.json create mode 100644 skills/pva-setup/skill-card.md create mode 100644 skills/pva-setup/skill.oms.sig create mode 100644 skills/pva-spec/BENCHMARK.md create mode 100644 skills/pva-spec/README.md create mode 100644 skills/pva-spec/SKILL.md create mode 100644 skills/pva-spec/agents/openai.yaml create mode 100644 skills/pva-spec/assets/configure-report-template.md create mode 100644 skills/pva-spec/assets/evidence-template.json create mode 100644 skills/pva-spec/assets/operator-spec-template.json create mode 100644 skills/pva-spec/assets/test-matrix-template.json create mode 100644 skills/pva-spec/config/skillspector-baseline.yaml create mode 100644 skills/pva-spec/evals/EVAL.md create mode 100644 skills/pva-spec/evals/config.yml create mode 100644 skills/pva-spec/evals/evals.json create mode 100644 skills/pva-spec/evals/files/approved/doctor-report.md create mode 100644 skills/pva-spec/evals/files/approved/evidence.json create mode 100644 skills/pva-spec/evals/files/approved/operator-spec.json create mode 100644 skills/pva-spec/evals/files/approved/test-matrix.json create mode 100644 skills/pva-spec/evals/files/unresolved/doctor-report.md create mode 100644 skills/pva-spec/evals/files/unresolved/evidence.json create mode 100644 skills/pva-spec/evals/files/unresolved/operator-spec.json create mode 100644 skills/pva-spec/evals/files/unresolved/test-matrix.json create mode 100644 skills/pva-spec/references/handoff-requirements.md create mode 100755 skills/pva-spec/scripts/finalize_opgen_inputs.py create mode 100644 skills/pva-spec/skill-card.md create mode 100644 skills/pva-spec/skill.oms.sig diff --git a/skills/pva-build-test/BENCHMARK.md b/skills/pva-build-test/BENCHMARK.md new file mode 100644 index 000000000..fb640dce1 --- /dev/null +++ b/skills/pva-build-test/BENCHMARK.md @@ -0,0 +1,153 @@ +# Skill Benchmark: pva-build-test + +> ✅ **Overall verdict: PASS — Recommended for publication** + +## Publication Recommendation + +Recommended for publication based on the completed evaluation evidence in this report. + +## Evaluation Metadata + +- Skill: `pva-build-test` +- Validation status: `passed` +- Evaluation date: 2026-10-28 +- Evaluator version: `1.6.3` +- Agents: Claude Code (`aws/anthropic/bedrock-claude-opus-5-5`), Codex (`openai/openai/gpt-6.1-sol`) +- Tasks: 4 evaluation tasks (3 positive, 1 negative) +- Dataset digest: `sha256:a4f9d1d2892bbba5832f465f6dd847921574c86e3234fd9cba37cf22369034bb` (skill-evaluator-dataset-snapshot/1) +- Attempts per task: 1 +- Environment: `k8s-sandbox` +- Tier 2 evidence: required for publication +- Tier 3 evidence: required for publication + +Each task attempt ran in its own isolated sandbox pod. + +## Tier 1 LLM Provenance + +SkillSpector provider, model, analyzer revision, and determinism evidence retained for this scan. + +| Skill | Provider | Adapter | Analyzer | Model | Revision | Determinism | +| --- | --- | --- | --- | --- | --- | --- | +| pva-build-test | nv_inference | openai | mcp_tool_poisoning | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | +| pva-build-test | nv_inference | openai | semantic_developer_intent | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | +| pva-build-test | nv_inference | openai | semantic_quality_policy | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | +| pva-build-test | nv_inference | openai | semantic_security_discovery | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | +| pva-build-test | nv_inference | openai | meta_analyzer | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | + +- Controls for `pva-build-test`: temperature=not set (source=provider_default, forwarded=no); seed=not set (source=unset, forwarded=no); reasoning_effort=not set (source=provider_default, forwarded=no) + +## What This Report Answers + +The three-tier evaluation checks whether the skill: + +- is safe to use; +- produces correct answers; +- is discovered and activated when needed; +- helps the agent complete the user's goal and expected workflow; and +- avoids wasted skill and tool usage. + +## Results at a Glance + +| Measure | Claude Code (Baseline → Skill Uplift) | Codex (Baseline → Skill Uplift) | +|---|---:|---:| +| Overall | 97.8% — baseline ran, but no comparable score was available; uplift unavailable | 95.3% — baseline ran, but no comparable score was available; uplift unavailable | +| Security | 100.0% → 100.0% (±0.0 points) | 100.0% → 100.0% (±0.0 points) | +| Correctness | 85.0% → 100.0% (+15.0 points) | 100.0% → 100.0% (±0.0 points) | +| Discoverability | 91.7% — baseline ran, but no comparable score was available; uplift unavailable | 81.7% — baseline ran, but no comparable score was available; uplift unavailable | +| Effectiveness | 100.0% → 100.0% (±0.0 points) | 100.0% → 100.0% (±0.0 points) | +| Efficiency | 97.2% — baseline ran, but no comparable score was available; uplift unavailable | 94.9% — baseline ran, but no comparable score was available; uplift unavailable | + +**How to read this table:** baseline is the same task attempted without the target skill. Scores are rounded to one decimal; threshold-adjacent values use additional precision so their displayed band matches the verdict. Uplift is derived from those displayed scores and shown in percentage points. + +Example: `47.0% → 92.0% (+45.0 points)` means the skill-assisted run scored 92.0%, 45.0 percentage points above its 47.0% no-skill baseline. + +A partial dimension was calculated from only the available configured signals; review the detailed report before relying on it. + +### Comparison details + +Shared-source comparisons use the same signals and weights on both conditions. They do not replace the full dimension scores above or change the publication verdict. + +| Agent | Dimension | Basis | Baseline → With skill (uplift) | Explanation | +| --- | --- | --- | --- | --- | +| claude-code | Discoverability | Dimension comparison | N/A | Discoverability is not applicable to the no-skill baseline; there is no installed skill to discover. | +| claude-code | Efficiency | Token-only comparison | 98.1% → 94.5% (-3.6 points) | Only Token Efficiency is comparable; the full dimension scores use different evaluator sources. | +| codex | Discoverability | Dimension comparison | N/A | Discoverability is not applicable to the no-skill baseline; there is no installed skill to discover. | +| codex | Efficiency | Token-only comparison | 92.6% → 89.7% (-2.9 points) | Only Token Efficiency is comparable; the full dimension scores use different evaluator sources. | + +## Token Usage + +Actual Tier 3 execution usage is reported for every observed agent/case pair and both conditions. + +| Agent | Dataset case | With skill | Without skill | Delta | Change | Coverage | +|---|---|---:|---:|---:|---:|---| +| claude-code | All cases | 654,368 | 473,043 | +181,325 | +38.33% | skill 4/4; base 4/4 | +| claude-code | build-test-emu-is-not-hardware | 207,682 | 183,498 | +24,184 | +13.18% | skill 1/1; base 1/1 | +| claude-code | build-test-missing-inputs | 206,719 | 108,208 | +98,511 | +91.04% | skill 1/1; base 1/1 | +| claude-code | build-test-negative | 35,485 | 35,303 | +182 | +0.52% | skill 1/1; base 1/1 | +| claude-code | build-test-unverified-corpus | 204,482 | 146,034 | +58,448 | +40.02% | skill 1/1; base 1/1 | +| codex | All cases | 408,329 | 291,810 | +116,519 | +39.93% | skill 4/4; base 4/4 | +| codex | build-test-emu-is-not-hardware | 160,053 | 137,586 | +22,467 | +16.33% | skill 1/1; base 1/1 | +| codex | build-test-missing-inputs | 107,166 | 55,664 | +51,502 | +92.52% | skill 1/1; base 1/1 | +| codex | build-test-negative | 13,291 | 13,192 | +99 | +0.75% | skill 1/1; base 1/1 | +| codex | build-test-unverified-corpus | 127,819 | 85,368 | +42,451 | +49.73% | skill 1/1; base 1/1 | +| ALL AGENTS | Dataset aggregate | 1,062,697 | 764,853 | +297,844 | +38.94% | skill 8/8; base 8/8 | + +Prompt tokens include cached reads, so total tokens are `prompt + completion` (cached is not added twice). The Efficiency score uses `(prompt - cached) + completion`. Change is `100 * (with - without) / without`; negative means fewer tokens. N/A comparisons include their reason in the coverage column; coverage is never estimated. + +## Tier Status + +| Tier | Purpose | Status | Evidence | +|---|---|---|---| +| Tier 1 | Static validation | **PASSED WITH OBSERVATIONS** | 11 validator(s); 11 finding(s) | +| Tier 2 | Semantic deduplication | **PASSED** | 2 validator(s); 0 finding(s) | +| Tier 3 | Live agent evaluation | **PASS** | 2 agent(s); 4 task(s) | + +## Findings and Observations + +
+Show detailed findings and successful checks + +- **MEDIUM** QUALITY/quality_correctness: SKILL_SPEC recommended field missing: 'metadata.tags' (`skills/pva-build-test/SKILL.md`) +- **MEDIUM** SCHEMA/body_recommended_section: Missing recommended section: '## Instructions' (`skills/pva-build-test/SKILL.md`) +- **MEDIUM** SCHEMA/body_recommended_section: Missing recommended section: '## Examples' (`skills/pva-build-test/SKILL.md`) +- **MEDIUM** SECURITY/Sudo/Root Execution (PE2): Privilege Escalation: sudo (`references/direct-ssh-tegra.md:117`) +- **LOW** QUALITY/quality_correctness: No examples provided (`skills/pva-build-test/SKILL.md`) +- 6 additional finding(s) are available in the full evaluation artifacts. + +
+ +## Scoring Methodology + +
+Show dimension definitions, source signals, and thresholds + +| Dimension | Question | Scored signals | +|---|---|---| +| Security | Is it safe to use? | `security` (100%) | +| Correctness | Is the answer correct? | `accuracy` (100%) | +| Discoverability | Was the right skill loaded when needed? | `skill_execution` (100%) | +| Effectiveness | Did the skill help complete the task? | `goal_accuracy` (50%) + `behavior_check` (50%) | +| Efficiency | Did it avoid wasted tool calls and token usage? | `skill_efficiency` (50%) + `token_efficiency` (50%) | + +- Dimension bands: PASS at 50% or above; NEUTRAL from 40% to below 50%; FAIL below 40%. +- Overall Tier 3 lift: PASS at +5 points or more; FAIL at -10 points or less; values between those bands are NEUTRAL. +- Overall verdict: PASS only when every configured dimension passes for at least one supported agent. Lift is reported as diagnostic evidence and does not override this gate. +- The 50% attempt pass threshold is a separate per-task gate; it is not the dimension pass threshold. +- Effectiveness is the equal-weight mean of goal completion (`goal_accuracy`) and expected workflow adherence (`behavior_check`). +- Efficiency is 50% tool-call productivity (the backward-compatible `skill_efficiency` wire id) and 50% `token_efficiency`. Positive-case skill routing is scored under Discoverability, not Efficiency; a negative case without a routing target is N/A. N/A sources are omitted, remaining weights are renormalized, and the dimension is marked partial. + +Signals present in this run: + +- `security` (Security): unsafe operations, secret leakage, and unauthorized access. +- `skill_execution` (Skill Execution): whether the expected skill was selected, decoys were avoided, and the workflow executed. +- `skill_efficiency` (Tool Productivity): tool-call productivity (legacy wire id; routing is scored under Discoverability). +- `accuracy` (Accuracy): final-answer correctness against the reference answer. +- `goal_accuracy` (Goal Accuracy): whether the user's goal was achieved. +- `behavior_check` (Behavior Check): whether the expected workflow behavior was followed. +- `token_efficiency` (Token Efficiency): actual uncached prompt plus completion usage (50% of Efficiency). + +
+ +## Freshness + +Regenerate this benchmark when the skill, evaluation dataset, target agent/model, evaluator version, environment, or scoring policy changes. diff --git a/skills/pva-build-test/README.md b/skills/pva-build-test/README.md new file mode 100644 index 000000000..b9e5c00be --- /dev/null +++ b/skills/pva-build-test/README.md @@ -0,0 +1,155 @@ + + +# PVA development skills + +Agent skills for creating, changing, or repairing NVIDIA PVA operators +in your PVA SDK application or PVA Solutions source tree. They turn +requirements into code, verify it on Tegra hardware, and repair failures within +a debug budget. + +## Skills + +| Skill | Purpose | +| --- | --- | +| [Doctor](https://github.com/NVIDIA/skills/blob/main/skills/pva-doctor/SKILL.md) | Check the SDK, toolchain, project, target, and SDK references. | +| [Setup](https://github.com/NVIDIA/skills/blob/main/skills/pva-setup/SKILL.md) | Install missing SDK, NVVPU, and L4T runtime components, then rerun Doctor. | +| [Spec](https://github.com/NVIDIA/skills/blob/main/skills/pva-spec/SKILL.md) | Define operator behavior, correctness tests, and the OpGen handoff. | +| [OpGen](https://github.com/NVIDIA/skills/blob/main/skills/pva-opgen/SKILL.md) | Generate and integrate the operator, then invoke Build-Test and Debug. | +| [Build-Test](https://github.com/NVIDIA/skills/blob/main/skills/pva-build-test/SKILL.md) | Build, verify correctness on hardware, and measure requested performance cases. | +| [Debug](https://github.com/NVIDIA/skills/blob/main/skills/pva-debug/SKILL.md) | Diagnose and repair a reproduced failure. | + +## Prerequisites + +- An authenticated coding agent with local skill support and shell/file access. + See [agent support](#agent-support) below. +- A development host running regular x86-64 Ubuntu supported by the requested SDK. +- An Arm64 Jetson board running compatible Jetson Linux (L4T), with working + key-based SSH and a trusted host key. +- A matching SDK installation guide (file or URL), access to its installer, + and administrative permissions for required installation steps. +- A writable project: your PVA SDK application or a PVA Solutions source package + or checkout. This is where OpGen adds or changes code. Install Git LFS if the + project uses it. + +When PVA Solutions is selected, Setup uses +[NVIDIA/PVA-Solutions](https://github.com/nvidia/pva-solutions) by default and +clones into the supplied project path, or `$WORK_DIR/source` when omitted. +It reuses an existing source tree and accepts another repository or archive. +Doctor checks the selected source and reports missing required files. + +Run the agent and build tools on the development host. `PVA_BUILD_MODE=L4T` +cross-compiles there for execution on the board. `PVA_BUILD_MODE=EMU` builds +for emulation on the development host. + +Setup installs or reuses the SDK, NVVPU, required build and reference tools, +and board runtime. EMU is optional. Setup calls Doctor before +making changes and again afterward; no existing Doctor report is required. +Setup reads the installer URL from the guide. Supply a separate installer path +or URL only when the guide does not provide one. The guide and installer must +match the requested SDK release. +Setup reads the board's installed BSP and checks SDK compatibility. Supply an +expected BSP release only when you want to require a specific release. + +## Set up a workspace + +Copy all six PVA skill folders from the public +[NVIDIA skills catalog](https://github.com/NVIDIA/skills/tree/main/skills) +into `$HOME/pva-sdk-skills`. Keep each folder's scripts, references, and assets. +The resulting layout is `$HOME/pva-sdk-skills/pva-setup/SKILL.md`, and the +same layout for the other five skills. + +```bash +git clone --depth 1 https://github.com/NVIDIA/skills.git "$HOME/nvidia-skills" +mkdir -p "$HOME/pva-sdk-skills" +for pva_skill in pva-setup pva-doctor pva-spec pva-opgen pva-build-test pva-debug; do + cp -R "$HOME/nvidia-skills/skills/$pva_skill" "$HOME/pva-sdk-skills/" +done +``` + +Use a separate workspace for each operator task. Replace the project path below +with your writable PVA SDK application or PVA Solutions source directory. + +```bash +mkdir -p "$HOME/operator_test/my_operator" +cd "$HOME/operator_test/my_operator" +ln -s "/absolute/path/to/your/project" source + +pva_skill_dir=.claude/skills # For Codex, use .agents/skills +mkdir -p "$pva_skill_dir" +for pva_skill in "$HOME/pva-sdk-skills"/pva-*; do + ln -s "$pva_skill" "$pva_skill_dir/" +done +``` + +Reload skills or restart the agent session after creating the links. +`source/` points to the project OpGen will modify; the surrounding workspace +holds your inputs, generated configuration, and reports. Each skill carries its +required scripts and templates. Install all six for the full workflow; +OpGen invokes Build-Test and Debug by their installed skill names. +Generated SDK references belong in `references/sdk/` in this workspace. +Doctor records their verified absolute location in its report. + +## Agent support + +- **Claude Code:** Used for the recorded operator runs and the commands below. +- **Codex:** Supports [local skills](https://learn.chatgpt.com/docs/build-skills#where-to-save-skills) + in `.agents/skills`, invoked with `$pva-spec` or another skill name. + These skills include `agents/openai.yaml` metadata. OpGen uses the agent's + available skill mechanism for Build-Test and Debug. Without a callable skill + tool, it loads the child skill's `SKILL.md` and executes its full workflow + before resuming OpGen with the reports and verdict. + +## Run Setup → Doctor → Spec → OpGen + +Create `requirements.md` in the workspace: operator name/path, task mode (`new`, +`change`, or `repair`), required behavior, supported inputs, API, and performance +requirements. For an existing operator, include relevant source and test paths. + +Run these **headless Claude Code commands** one at a time from the development +host's workspace. Replace the guide and board settings below. Setup resolves +the SDK release, installer, package names, and installation paths from the +guide and package metadata. Package paths are not fixed in the skill. +You can provide an explicit SDK release or path override when needed. + +```bash +export PVA_OPERATOR_MAX_DEBUG_ATTEMPTS=3 + +# 1. Setup: check and prepare the host and board +claude -p "Run pva-setup for spec, opgen, and build-test. +Installation guide: http://docs.nvidia.com/pva/sdk/installation.html. +Target: user@; PVA generation: . +Project: $PWD/source; work directory: $PWD." + +# 2. Doctor: verify readiness after Setup +claude -p "Run pva-doctor for spec, opgen, and build-test using +$PWD/reports/pva-setup-report.md. +Project: $PWD/source; work directory: $PWD." + +# 3. Spec: run after Doctor is ready +# Spec runs its finalizer to create and validate configure/opgen-inputs.json. +claude -p "Invoke pva-spec through the Skill tool using +$PWD/requirements.md and $PWD/reports/doctor-report.md. +Project: $PWD/source; work directory: $PWD." + +# 4. OpGen: run after Spec returns CONFIGURED +claude -p "Invoke pva-opgen through the Skill tool using $PWD/configure/opgen-inputs.json." +``` + +Doctor writes `$WORK_DIR/reports/doctor-report.md` automatically. The examples +use `$PWD` as the work directory so Spec and OpGen can use the resulting files. + +OpGen runs Build-Test and invokes Debug as needed. Read the final result in +`reports/opgen-report.md`. + +See [reference maintenance](https://github.com/NVIDIA/skills/blob/main/skills/pva-doctor/references/reference-maintenance.md) for SDK-reference +regeneration and upgrades. + +## Maintaining the helpers + +Spec owns [finalize_opgen_inputs.py](https://github.com/NVIDIA/skills/blob/main/skills/pva-spec/scripts/finalize_opgen_inputs.py). +OpGen ships [an identical copy](https://github.com/NVIDIA/skills/blob/main/skills/pva-opgen/scripts/finalize_opgen_inputs.py) +so handoff validation works when the skills are installed separately. +After changing the Spec helper, update the OpGen copy too. +Generated SDK references and operator reports belong in the operator workspace. diff --git a/skills/pva-build-test/SKILL.md b/skills/pva-build-test/SKILL.md new file mode 100644 index 000000000..d763605b3 --- /dev/null +++ b/skills/pva-build-test/SKILL.md @@ -0,0 +1,248 @@ +--- +name: pva-build-test +description: >- + Build and verify an NVIDIA PVA operator with the public PVA SDK. Use alone or + from OpGen. Run optional EMU correctness, a fresh L4T build with + the NVVPU or ASIP/Chess backend that Doctor proved, direct-SSH Tegra hardware + correctness, and optional hardware performance. Return PASSED, FAILED, or + BLOCKED with exact evidence. +metadata: + author: "Venkat Balan " +--- + + + +# Build and test a PVA operator + +Build the current source. Test it on a directly connected Tegra. Do not change +source code, expected results, or tolerances. + +Build-Test owns verification stages, evidence, and verdicts. + +## Resolve paths + +`SKILL_ROOT` is the absolute directory containing this skill's `SKILL.md`, +after resolving symlinks. Bundled files are relative to that directory. Resolve +supplied relative paths against the invocation directory before changing +directories. `PROJECT_ROOT` is the active source +workspace; `RESULT_DIR` is the caller's result directory. All build directories, +reports, logs, and manifests below are under `RESULT_DIR`, not the shell's CWD. + +## Get the inputs + +Require these inputs for all scopes: + +- Caller identity: `OpGen` for an OpGen call; otherwise the direct user. +- A Doctor report that is ready for `build-test`, or accepted limitations. +- Absolute project (`PROJECT_ROOT`) and result (`RESULT_DIR`) paths. +- Operator name and PVA generation. +- Test scope: `correctness-only` or `correctness-and-performance`. +- Report label. Use `build-test` when none is supplied. +- SDK version, safety variant, and Doctor's proved compiler backend. +- EMU policy; when EMU execution is available or required, + Doctor's proved EMU build mode and configure options, plus test commands. +- L4T configure command and hardware system-test target and filter. +- Correctness cases, independent references, and tolerances. +- Complete install target or deployment manifest. +- Tegra address, user, port, and persistent known-hosts file. + +For `correctness-and-performance`, also require: + +- KPI or profiling target and case filter. +- Profiling method, metric, warm-up count, and at least 1000 samples. +- User-approved clock and clock-verification commands. +- Expected clock values and target power mode. +- Performance target and acceptance rule when the caller requests a comparison. + +Do not require a KPI target, profiling artifact, clock input, sample count, or +performance filter for `correctness-only`. + +Do not guess a command, target account, filter, expected result, clock setting, +or acceptance rule. + +## Verify the inputs and references + +Require Doctor's `public-reference-corpus` check to be `PASS`. Set +`SDK_REFERENCES` to the report's absolute `sdk_reference_root`. Require a readable +`index.md` and `reference-lock.json`, a lock SHA-256 matching the report's +`sdk_reference_lock_sha256`, and the reported SDK version matching this task. +If these fields are absent or no longer match, return `BLOCKED` and request a +fresh Doctor report. Do not fall back to an installed package or CWD path. Read the +`pva-build-test` route in `$SDK_REFERENCES/index.md`. +Before reading Markdown, check its SHA-256 against the lock +`outputs` entry; return `BLOCKED` on a mismatch. Resolve links relative to each +generated file. Use `rg` to +select relevant build, compiler, deployment, signing, EMU, and +profiling Markdown. + +Read [the direct-SSH procedure](references/direct-ssh-tegra.md) before target +access. Fill [the JSON result template](assets/build-test-result-template.json) +using [the result rules](references/build-test-result-schema.md), then write the +Markdown report from the same values. + +Validate: + +- Absolute and readable project paths and a writable result path. +- At least one correctness case with an independent expected result. +- Unambiguous build, test, deployment, and target commands. +- At least one matching hardware system test. +- Performance inputs only when performance is in scope. +- PVA generation, SDK runtime, and safety-variant consistency. + +Return `BLOCKED` for a missing or ambiguous required input. + +For each product fact, record the SDK documentation root, local Markdown path, +packaged source path, source SHA-256, version, and section or PDF page. + +## Protect evidence + +Before the build: + +1. Create new build directories under the result directory. +2. Write `source-manifest-before.sha256` with paths relative to the project + root. Exclude new build and result directories. +3. Record Git identity and dirty state when Git metadata exists. +4. Record each command, exit code, log, and principal artifact hash. + +Do not reuse a build, log, target result, or profile from an earlier source +state. + +## Run the stages + +Run these stages in order: + +| Stage | Required action | +| --- | --- | +| Input | Validate inputs, source identity, references, and scope. | +| EMU build | If EMU is available or required, create a fresh build using Doctor's proved EMU mode and configure options. Otherwise record `SKIPPED_OPTIONAL`. | +| EMU test | Run the approved EMU cases. Stop with `FAILED` on a demonstrated source or result defect. | +| L4T build | Create a fresh release build with `PVA_BUILD_MODE=L4T`, the requested generation, `PVA_DISASSEMBLE=ON`, and Doctor's proved NVVPU or ASIP/Chess backend. | +| Listing | Record and inspect the generated compiler listing. Confirm vectorization in the main data path. | +| Target probe | Use the direct-SSH procedure. Confirm Arm64, BSP, runtime version, safety variant, libraries, and required permissions. | +| Deploy | Stage and transfer an explicit archive. Check dynamic dependencies on the target. | +| Hardware test | List and run the filtered system tests for the complete correctness matrix. | +| Performance | Run only for `correctness-and-performance`, after hardware correctness passes. | +| Freshness | Hash the final source and compare it with the initial manifest. | + +### EMU rules + +Use `PVA_BUILD_MODE=EMU` with Doctor's proved SDK, generation, compiler, and +other EMU configure options. Keep the L4T compiler selection separate. +Replace the probe's source and build paths with `PROJECT_ROOT` and a new +directory under `RESULT_DIR`; +use the project's supplied test targets. Record the selected mode and options +in `emulator` and the full command in `commands.log`. Return `BLOCKED` +if an available or required EMU backend lacks this evidence or its settings +conflict with the requested SDK or generation. Do not substitute another host +execution tool for EMU. + +With policy `optional`, an unavailable EMU component is +`SKIPPED_OPTIONAL`. An EMU stage that starts and shows a source, build, or +result defect is `FAILED`. + +With policy `required`, an unavailable EMU component is `BLOCKED`. + +EMU execution is an early correctness aid. It is not hardware evidence. + +Run the same approved correctness cases, inputs, references, and tolerances on +EMU and hardware when EMU runs. Do not reduce the EMU matrix because it is slow. +Record the case IDs and counts for both environments. + +### L4T and compiler rules + +Build the hardware system-test executable for both scopes. Build the KPI or +profiling executable only for `correctness-and-performance`. + +Accept the NVVPU or ASIP/Chess backend that Doctor proved. Do not require an +ASIP path or Synopsys license when NVVPU is selected. Return `BLOCKED` if the +proved backend is no longer usable. Return `FAILED` when current source causes +the build to fail. + +Require the compiler listing after a successful build. Record its path, hash, +generation, entry point, main vector operations, address-generation evidence, +spills, warnings, and scheduling facts that affect correctness. Return +`FAILED` if the main data path is not vectorized. + +### Deployment rules + +Use a project install target when it creates a complete deployment tree. +Otherwise, use the supplied manifest. + +Always include the hardware system-test executable, project libraries, device +data, and test assets. Include the KPI or profiling executable and its assets +only for `correctness-and-performance`. + +Do not copy host-architecture libraries. Retain the remote directory unless +the user asks for its removal. + +### Hardware correctness rules + +Run `--gtest_list_tests` with the approved filter. Reject a zero-match filter. +Then run the same filtered system-test executable. + +For each case, record the input shape, format, pitch, parameters, independent +reference, tolerance, exit code, comparison, and maximum error when relevant. + +Return `FAILED` if the process, command status, output, case coverage, or +tolerance check fails. Do not use a KPI-binary pass as correctness evidence. + +### Performance rules + +Skip this stage for `correctness-only`. + +For `correctness-and-performance`: + +1. Run the approved clock command and verify clocks and power mode. +2. Run warm-ups separately. +3. Collect at least 1000 hardware samples with the approved public profiling + method. +4. Verify clocks and power mode again. +5. Record the metric, unit, workload, warm-ups, samples, minimum, maximum, + mean, median, target conditions, and raw data path. +6. Compare with a target only when the caller supplied a target and acceptance + rule. + +Do not use EMU time, host wall time, or total test duration as PVA execution +time. Do not derive a target from the implementation under test. + +A missed target is `FAILED` only when the acceptance rule makes it required. + +## Decide the verdict + +- `PASSED`: Every stage required by the selected scope passed for the current + source. An optional EMU stage can be `SKIPPED_OPTIONAL`. +- `FAILED`: A stage ran and produced a negative source, build, correctness, + vectorization, or required performance result. +- `BLOCKED`: A required stage could not run because an external input, + dependency, permission, corpus, or target was unavailable. + +Do not return `PASSED` from evidence for another source state. Do not change +`BLOCKED` to `PASSED` because EMU tests passed. + +## Write the outputs + +Always write: + +- `reports/.md` +- `reports/.json` +- `source-manifest-before.sha256` +- `source-manifest.sha256` +- `source-identity.txt` +- `commands.log` + +Write stage logs and artifact hashes only for stages that run. For +`correctness-only`, do not require clock, profile, KPI, or raw performance +files. If work stops early, mark later stages `NOT_RUN` and name the exact +failed or blocked stage. + +Do not remove raw evidence or replace it with a summary. + +## Return control + +Return the verdict and absolute report paths to the caller. When called by +OpGen, continue the existing OpGen workflow before ending the overall run: +`FAILED` with remaining attempts goes to Debug; zero or exhausted attempts go +to OpGen's final `FAILED` report. `PASSED` and `BLOCKED` also require OpGen's +final report. Do not reinvoke OpGen or end with only a Build-Test response. diff --git a/skills/pva-build-test/agents/openai.yaml b/skills/pva-build-test/agents/openai.yaml new file mode 100644 index 000000000..83ecdb9c4 --- /dev/null +++ b/skills/pva-build-test/agents/openai.yaml @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +interface: + display_name: "PVA Build-Test" + short_description: "Build and test a PVA operator on Tegra" + default_prompt: "Use $pva-build-test to build this PVA operator, run optional EMU checks when available, and verify it on my directly connected Tegra." diff --git a/skills/pva-build-test/assets/build-test-result-template.json b/skills/pva-build-test/assets/build-test-result-template.json new file mode 100644 index 000000000..806ae9ffb --- /dev/null +++ b/skills/pva-build-test/assets/build-test-result-template.json @@ -0,0 +1,94 @@ +{ + "schema_version": "2.0", + "verdict": "PASSED | FAILED | BLOCKED", + "reason": "Exact result reason", + "failed_stage": "INPUT | EMU_BUILD | EMU_TEST | L4T_BUILD | LISTING | TARGET_PROBE | DEPLOY | HARDWARE_TEST | CLOCK | PROFILE | COMPARE | SOURCE_FRESHNESS | NONE", + "operator": "Operator name", + "test_scope": "correctness-only | correctness-and-performance", + "emulator": { + "policy": "optional | required", + "build_mode": null, + "configure_options": [], + "status": "PASSED | FAILED | BLOCKED | SKIPPED_OPTIONAL", + "reason": "Exact status reason" + }, + "result_time_utc": "ISO 8601 timestamp", + "source": { + "project_root": "Absolute path", + "build_sdk_version": "PVA SDK major.minor.patch", + "build_safety_variant": "safety | non-safety", + "compiler_backend": "NVVPU | ASIP/Chess", + "manifest": "Absolute path to source-manifest.sha256", + "git_identity": "Commit plus dirty state, or not available" + }, + "target": { + "host": "Target address", + "architecture": "Target architecture", + "kernel": "Kernel version", + "bsp": "BSP identity", + "cupva_runtime": "Runtime identity", + "runtime_version": "PVA runtime major.minor.patch", + "runtime_safety_variant": "safety | non-safety", + "runtime_match": "PASSED | FAILED | BLOCKED", + "clock_setup": "PASSED | FAILED | BLOCKED | NOT_REQUIRED", + "expected_clock_and_power_state": "CPU, PVA, AXI, EMC, and power-mode values or not required", + "clock_evidence_before": "Absolute local path or not required", + "clock_evidence_after": "Absolute local path or not required" + }, + "stages": [ + { + "name": "Stage name", + "status": "PASSED | FAILED | BLOCKED | SKIPPED_OPTIONAL | NOT_RUN", + "reason": "Exact stage reason", + "command_exit_code": 0, + "log": "Absolute local path" + } + ], + "correctness": [ + { + "environment": "EMU | HARDWARE", + "case": "Case identifier", + "status": "PASSED | FAILED | SKIPPED_OPTIONAL | NOT_RUN", + "inputs": [ + { + "name": "Input name", + "shape_format_pitch_parameters": "Exact case values" + } + ], + "outputs": [ + { + "name": "Output name", + "status": "PASSED | FAILED | NOT_RUN", + "reference": "Independent reference identity", + "comparison": "Exact | absolute | relative | combined", + "absolute_tolerance": null, + "relative_tolerance": null, + "maximum_error": null + } + ] + } + ], + "performance": [ + { + "case": "Case identifier", + "method": "Profiling Stream | Nsight Systems | VPU timestamp counter", + "unit": "ns | cycles", + "warmups": 0, + "samples": 1000, + "minimum": null, + "maximum": null, + "mean": null, + "median": null, + "target": null, + "acceptance": "PASSED | FAILED | NOT_REQUIRED" + } + ], + "evidence": [ + { + "name": "Artifact name", + "path": "Absolute local path", + "sha256": "Lowercase SHA-256" + } + ], + "remote_directory": "Retained target path" +} diff --git a/skills/pva-build-test/config/skillspector-baseline.yaml b/skills/pva-build-test/config/skillspector-baseline.yaml new file mode 100644 index 000000000..313e795e0 --- /dev/null +++ b/skills/pva-build-test/config/skillspector-baseline.yaml @@ -0,0 +1,9 @@ +# Temporary AE1 exception for PVA skills MR !3. +# Context: https://nvidia.slack.com/archives/C08GC28NBAS/p1789040586702479 +# Remove after the SkillSpector fix and a clean scan without this baseline. +version: 2 +rules: + - id: AE1 + path: SKILL.md + message: "SKILL.md (partial)" + reason: "Temporary exception: runtime file references mark readable SKILL.md partial; awaiting SkillSpector fix." diff --git a/skills/pva-build-test/evals/EVAL.md b/skills/pva-build-test/evals/EVAL.md new file mode 100644 index 000000000..79bfdaddf --- /dev/null +++ b/skills/pva-build-test/evals/EVAL.md @@ -0,0 +1,30 @@ +# CI smoke evaluations + +Covered: Missing inputs, unverified references, separation of emulation from hardware evidence, and routing. + +Not covered: Real L4T/EMU compilation, board deployment, numerical correctness, and performance measurement. + +## Behaviors + +Check case assertions against the result and actions. A correct refusal passes +a negative-path case; it does not prove operator generation or hardware correctness. +The task environment supplies Python 3.9+ only. PVA SDK, PVA Solutions, +NVVPU/ASIP, CUDA, EMU, and a board are absent. No case may install them or +contact a remote host. SDK version/generation mentions are requested target +metadata, not evidence of an installed SDK. Fixture logs are supplied text; +they do not require running an emulator. + +## Negative Cases + +The last case must not activate this skill. Other cases expect this skill, even +when the correct result is BLOCKED, NOT_READY, or NEEDS_INPUT. + +## Notes + +Validate from this skill directory: `skillevaluator tier3 validate . --strict`. +Run Claude Code and Codex, with and without the skill, using identical inputs. +Each case explicitly selects fixtures under `evals/files/`; the evaluator stages +these under `/workspace/input/`. Dataset answers and this guidance stay private. +CI version 1.5.6 requires nonempty assertions. See +[benchmark results](../BENCHMARK.md) for measured results. These CI smoke tests +do not cover SDK builds, EMU, or hardware execution. diff --git a/skills/pva-build-test/evals/config.yml b/skills/pva-build-test/evals/config.yml new file mode 100644 index 000000000..2e4a4703b --- /dev/null +++ b/skills/pva-build-test/evals/config.yml @@ -0,0 +1,10 @@ +schema_version: 1 +harbor: + task_source: evals_json + n_attempts: 1 + stop_on_pass: false + n_concurrent: 1 +grading: + mode: default +skill_workspace: + mode: isolated diff --git a/skills/pva-build-test/evals/evals.json b/skills/pva-build-test/evals/evals.json new file mode 100644 index 000000000..8b7f45d9d --- /dev/null +++ b/skills/pva-build-test/evals/evals.json @@ -0,0 +1,63 @@ +{ + "skill_name": "pva-build-test", + "evals": [ + { + "id": "build-test-missing-inputs", + "prompt": "This CI environment has Python but no PVA SDK, PVA Solutions, NVVPU or ASIP toolchain, CUDA, emulator, or board. Use only bundled skill helpers and supplied fixtures; do not install dependencies or access remote hosts. Use pva-build-test for a PVA operator with correctness-only scope. SDK 2.10.0~rc3, GEN2, NVVPU, L4T; EMU is optional. Work directory: /workspace/build-check. The source project, Doctor report, test matrix, and board connection details have not been supplied. Do not guess them or ask questions. Report readiness to run.", + "expected_skill": "pva-build-test", + "expected_script": null, + "expected_output": "BLOCKED with the missing required inputs named. No build or hardware test is claimed to have run.", + "assertions": [ + "Identifies the missing project, Doctor report, matrix, and target details.", + "Returns BLOCKED rather than PASSED or a demonstrated implementation FAILED verdict.", + "Does not invent commands, exit codes, board access, or test results.", + "Does not install dependencies or access a remote host or board." + ], + "files": [] + }, + { + "id": "build-test-emu-is-not-hardware", + "prompt": "This CI environment has Python but no PVA SDK, PVA Solutions, NVVPU or ASIP toolchain, CUDA, emulator, or board. Use only bundled skill helpers and supplied fixtures; do not install dependencies or access remote hosts. I have an old EMU log in /workspace/input/emu-only/emu.log for a PVA operator. It is the only evidence available; no current source, Doctor report, matrix, or board is supplied. Use pva-build-test to determine whether this proves current L4T hardware correctness. Use /workspace/emu-review as the report work directory. Do not ask questions or invent missing inputs.", + "expected_skill": "pva-build-test", + "expected_script": null, + "expected_output": "BLOCKED: the old emulation log cannot establish current-source L4T hardware correctness. Missing inputs and hardware evidence are stated explicitly.", + "assertions": [ + "Does not treat the EMU log as current hardware evidence.", + "Does not infer a current source identity from the old log.", + "Reports the required missing inputs and does not return PASSED.", + "Does not install dependencies or access a remote host or board." + ], + "files": [ + "files/emu-only" + ] + }, + { + "id": "build-test-unverified-corpus", + "prompt": "This CI environment has Python but no PVA SDK, PVA Solutions, NVVPU or ASIP toolchain, CUDA, emulator, or board. Use only bundled skill helpers and supplied fixtures; do not install dependencies or access remote hosts. Use pva-build-test to check whether verification can start with /workspace/input/unverified/doctor-report.md. The report is the only supplied input and says SDK references were not verified. Target SDK is 2.10.0~rc3, GEN2, NVVPU, L4T; scope is correctness-only. Work directory: /workspace/unverified-build. Do not fabricate inputs, run Doctor, or ask questions.", + "expected_skill": "pva-build-test", + "expected_script": null, + "expected_output": "BLOCKED because a verified SDK corpus is missing, along with other absent build inputs. A LIMITATION entry is not accepted as public-reference-corpus PASS.", + "assertions": [ + "Identifies the unverified SDK reference corpus as a blocker.", + "Does not invent a corpus path or verified lock hash.", + "Does not build, deploy, or claim passing tests.", + "Does not install dependencies or access a remote host or board." + ], + "files": [ + "files/unverified" + ] + }, + { + "id": "build-test-negative", + "prompt": "Explain what a compiler does. Give a short conceptual answer without running commands or testing software.", + "expected_skill": null, + "expected_script": null, + "expected_output": "A short compiler explanation without invoking PVA verification.", + "assertions": [ + "Answers the conceptual question.", + "Does not invoke pva-build-test or run build/test commands." + ], + "files": [] + } + ] +} diff --git a/skills/pva-build-test/evals/files/emu-only/emu.log b/skills/pva-build-test/evals/files/emu-only/emu.log new file mode 100644 index 000000000..a46f457ba --- /dev/null +++ b/skills/pva-build-test/evals/files/emu-only/emu.log @@ -0,0 +1,5 @@ +Synthetic historical emulation log; not hardware evidence. +Mode: EMU +Case: matmul-small +Result: PASS +Source identity: not recorded diff --git a/skills/pva-build-test/evals/files/unverified/doctor-report.md b/skills/pva-build-test/evals/files/unverified/doctor-report.md new file mode 100644 index 000000000..9de7141c9 --- /dev/null +++ b/skills/pva-build-test/evals/files/unverified/doctor-report.md @@ -0,0 +1,10 @@ +# Synthetic incomplete Doctor report + +SDK: 2.10.0~rc3 +PVA generation: GEN2 + +| Check | Required | Result | Evidence | +| --- | --- | --- | --- | +| public-reference-corpus | yes | LIMITATION | Verification was not performed | + +No verified reference root or lock hash is available. diff --git a/skills/pva-build-test/references/build-test-result-schema.md b/skills/pva-build-test/references/build-test-result-schema.md new file mode 100644 index 000000000..8ced7e5a6 --- /dev/null +++ b/skills/pva-build-test/references/build-test-result-schema.md @@ -0,0 +1,33 @@ + + +# Build-Test result rules + +This output contract belongs to the skill workflow. +It is not an NVIDIA SDK output format. + +Use [the JSON result template](../assets/build-test-result-template.json) for +machine-readable output, as Spec does for its inputs. This Markdown file +explains the contract; it is not a second copy of the template or a JSON Schema. +Replace each placeholder and select one value from each `|`-separated list. +Build-Test checks the result against its stage evidence; no standalone result +validator is shipped. Write the Markdown report from the same final JSON values. + +Set `command_exit_code` to `null` when a stage has `NOT_RUN` or +`SKIPPED_OPTIONAL` status. For a stage that ran, record its actual integer exit +code. + +Use JSON `null` for an unavailable optional value. +Do not use `null` for a required test result. + +When EMU execution runs, record `EMU` in +`emulator.build_mode` and the actual configure-option arguments as strings +in `emulator.configure_options`. When no backend was proved, use `null` +and `[]`. Use correctness environment labels `EMU` and `HARDWARE`, and stage +labels `EMU_BUILD` and `EMU_TEST` for host emulation. The hardware build remains +`PVA_BUILD_MODE=L4T`, using Doctor's proved NVVPU or ASIP/Chess compiler backend. + +For `correctness-only`, write an empty `performance` list. Set target clock +fields to `NOT_REQUIRED` or `not required` as the template specifies. Do not +require KPI, clock, profile, or performance artifacts. diff --git a/skills/pva-build-test/references/direct-ssh-tegra.md b/skills/pva-build-test/references/direct-ssh-tegra.md new file mode 100644 index 000000000..cf9a367f1 --- /dev/null +++ b/skills/pva-build-test/references/direct-ssh-tegra.md @@ -0,0 +1,194 @@ + + +# Direct-SSH Tegra procedure + +This procedure is a skill workflow. +It is not an NVIDIA SDK procedure. + +Use it only for a Tegra that the current host can reach directly. + +## Contents + +- [Inputs](#inputs) +- [Probe](#probe) +- [Transfer](#transfer) +- [Run](#run) +- [Prohibited actions](#prohibited-actions) + +## Inputs + +Set these values from user-supplied inputs: + +```bash +PROJECT_ROOT= +RESULT_DIR= +DUT_HOST= +DUT_USER= +DUT_PORT= +DUT_KNOWN_HOSTS= +REMOTE_DIR= +DEPLOY_ARCHIVE= +BUILD_SDK_MAJOR_MINOR= +BUILD_SAFETY_VARIANT= +``` + +Validate each path and value before use. +Do not put a password in a command, environment variable, log, or report. + +Apply these minimum checks: + +```bash +[[ "$PROJECT_ROOT" == /* ]] +[[ "$RESULT_DIR" == /* ]] +[[ "$DUT_KNOWN_HOSTS" == /* ]] +[[ "$DEPLOY_ARCHIVE" == /* && -f "$DEPLOY_ARCHIVE" ]] +[[ "$DUT_PORT" =~ ^[0-9]+$ ]] +(( DUT_PORT >= 1 && DUT_PORT <= 65535 )) +[[ "$DUT_USER" =~ ^[A-Za-z_][A-Za-z0-9_-]*$ ]] +[[ "$DUT_HOST" =~ ^([A-Za-z0-9]([A-Za-z0-9.-]*[A-Za-z0-9])?|[0-9A-Fa-f:]+)$ ]] +[[ "$REMOTE_DIR" =~ ^/tmp/[A-Za-z0-9._/-]+$ ]] +[[ "$REMOTE_DIR" != *..* ]] +[[ "$BUILD_SDK_MAJOR_MINOR" =~ ^[0-9]+\.[0-9]+$ ]] +[[ "$BUILD_SAFETY_VARIANT" =~ ^(safety|non-safety)$ ]] + +if [[ "$DUT_HOST" == *:* ]]; then + DUT_SCP_HOST="[$DUT_HOST]" +else + DUT_SCP_HOST="$DUT_HOST" +fi +``` + +Validate each test argument against its expected type. +Do not permit shell operators, command substitutions, or redirections in a test argument. + +## Probe + +Use key or SSH-agent authentication. +Use a persistent known-hosts file. +Disable proxy commands and jump hosts for this connection. + +Inspect the effective SSH configuration before the probe. +Require both `proxycommand none` and `proxyjump none`. + +```bash +mkdir -p "$(dirname "$DUT_KNOWN_HOSTS")" + +ssh \ + -p "$DUT_PORT" \ + -o BatchMode=yes \ + -o ProxyCommand=none \ + -o ProxyJump=none \ + -o ConnectTimeout=10 \ + -o StrictHostKeyChecking=accept-new \ + -o UserKnownHostsFile="$DUT_KNOWN_HOSTS" \ + "$DUT_USER@$DUT_HOST" \ + 'uname -m; uname -r; cat /etc/nv_tegra_release 2>/dev/null || true' +``` + +Require an Arm64 architecture and a compatible BSP. + +Check the cuPVA runtime without changing the target: + +```bash +ssh \ + -p "$DUT_PORT" \ + -o BatchMode=yes \ + -o ProxyCommand=none \ + -o ProxyJump=none \ + -o StrictHostKeyChecking=accept-new \ + -o UserKnownHostsFile="$DUT_KNOWN_HOSTS" \ + "$DUT_USER@$DUT_HOST" \ + 'dpkg-query -W -f="\${Package} \${Version}\n" "pva-sdk-*-l4t" && + /sbin/ldconfig -p | grep -E "libcupva_host|libcupva_host_utils"' +``` + +Compare the installed package major and minor version with `BUILD_SDK_MAJOR_MINOR`. +Confirm that the installed package variant matches `BUILD_SAFETY_VARIANT`. +Stop if the version, variant, or required libraries are absent or incompatible. + +Use the supplied account for transfers and tests without elevation where possible. +Require administrative permissions only for requested commands that need them, +such as clock configuration, allowlist updates, or privileged deployment. Accept +an already prepared target or a user-approved noninteractive method scoped to +those commands. Do not require unrestricted passwordless sudo. + +Check permissions for the actual executable and arguments. `sudo -n true` does +not establish whether a different, command-scoped operation is allowed. Do not +run a state-changing command merely to probe access. If a required operation +cannot run with the approved permissions, return `BLOCKED` and name that operation. +Do not request a password or change sudoers, ownership, or device permissions. + +## Transfer + +Create a unique directory. + +```bash +ssh \ + -p "$DUT_PORT" \ + -o BatchMode=yes \ + -o ProxyCommand=none \ + -o ProxyJump=none \ + -o StrictHostKeyChecking=accept-new \ + -o UserKnownHostsFile="$DUT_KNOWN_HOSTS" \ + "$DUT_USER@$DUT_HOST" \ + "mkdir -p '$REMOTE_DIR'" + +scp \ + -P "$DUT_PORT" \ + -o BatchMode=yes \ + -o ProxyCommand=none \ + -o ProxyJump=none \ + -o StrictHostKeyChecking=accept-new \ + -o UserKnownHostsFile="$DUT_KNOWN_HOSTS" \ + "$DEPLOY_ARCHIVE" \ + "$DUT_USER@$DUT_SCP_HOST:$REMOTE_DIR/input.tar.gz" +``` + +Extract the archive and check dynamic dependencies: + +```bash +ssh \ + -p "$DUT_PORT" \ + -o BatchMode=yes \ + -o ProxyCommand=none \ + -o ProxyJump=none \ + -o StrictHostKeyChecking=accept-new \ + -o UserKnownHostsFile="$DUT_KNOWN_HOSTS" \ + "$DUT_USER@$DUT_HOST" \ + "cd '$REMOTE_DIR' && tar -xzf input.tar.gz && ldd " +``` + +Stop if `ldd` reports a missing required library. + +## Run + +Run the supplied test command in the remote directory. + +```bash +ssh \ + -p "$DUT_PORT" \ + -o BatchMode=yes \ + -o ProxyCommand=none \ + -o ProxyJump=none \ + -o StrictHostKeyChecking=accept-new \ + -o UserKnownHostsFile="$DUT_KNOWN_HOSTS" \ + "$DUT_USER@$DUT_HOST" \ + "cd '$REMOTE_DIR' && " +``` + +Do not interpolate an unvalidated operator name, test filter, or file path into the remote command. + +Copy result files back with `scp` and `DUT_SCP_HOST`. +Preserve the remote directory unless the user asks you to remove it. + +## Prohibited actions + +- Do not guess credentials. +- Do not disable host-key checking. +- Do not use an SSH proxy, relay, or jump host. +- Do not place secrets in logs. +- Do not change target packages without user approval. +- Do not run a performance test before correctness passes. +- Do not report host wall time as PVA execution time. diff --git a/skills/pva-build-test/skill-card.md b/skills/pva-build-test/skill-card.md new file mode 100644 index 000000000..49b988181 --- /dev/null +++ b/skills/pva-build-test/skill-card.md @@ -0,0 +1,84 @@ +## Description:
+Build and verify an NVIDIA PVA operator with the public PVA SDK, running optional EMU correctness, a fresh L4T build with the Doctor-proved NVVPU or ASIP/Chess backend, direct-SSH Tegra hardware correctness, and optional hardware performance, then return PASSED, FAILED, or BLOCKED with exact evidence.
+ +This skill is ready for commercial/non-commercial use.
+ +## Owner +NVIDIA
+ +### License/Terms of Use:
+CC-BY-4.0 AND Apache 2.0
+## Use Case:
+Developers and engineers building NVIDIA PVA operators use this skill, on its own or from OpGen, to build the current source, verify correctness on a directly connected Tegra device, optionally measure hardware performance, and produce evidence-backed verdict reports.
+ +### Deployment Geography for Use:
+Global
+ +## Requirements / Dependencies:
+**Requires API Key or External Credential:** [Yes]
+**Credential Type(s):** [Other [SSH key or SSH-agent authentication to the Tegra target]]
+ +Do not include secrets in prompts/logs/output; use least-privilege credentials; rotate keys as appropriate.
+ +## Known Risks and Mitigations:
+Risk: Review before execution as proposals could introduce incorrect or misleading guidance into skills.
+Mitigation: Review and scan skill before deployment.
+ +## Reference(s):
+- [Direct-SSH Tegra procedure](references/direct-ssh-tegra.md)
+- [Build-Test result rules](references/build-test-result-schema.md)
+- [Build-Test result JSON template](assets/build-test-result-template.json)
+ + +## Skill Output:
+**Output Type(s):** [Shell commands, Files, Analysis]
+**Output Format:** [Markdown and JSON reports with SHA-256 manifests and command logs]
+**Output Parameters:** [1D]
+**Other Properties Related to Output:** [Verdict is PASSED, FAILED, or BLOCKED; raw evidence and stage logs are retained under the caller's result directory.]
+ +## Evaluation Agents Used:
+- Claude Code (`aws/anthropic/bedrock-claude-opus-5-5`)
+- Codex (`openai/openai/gpt-6.1-sol`)
+ + + +## Evaluation Tasks:
+4 evaluation tasks (3 positive, 1 negative), 1 attempt per task, each in an isolated sandbox pod.
+ +## Evaluation Metrics Used:
+Reported benchmark dimensions:
+- Security: Is it safe to use?
+- Correctness: Is the answer correct?
+- Discoverability: Was the right skill loaded when needed?
+- Effectiveness: Did the skill help complete the task?
+- Efficiency: Did it avoid wasted tool calls and token usage?
+ +Underlying evaluation signals used in this run:
+- `security`: Unsafe operations, secret leakage, and unauthorized access.
+- `skill_execution`: Whether the expected skill was selected, decoys were avoided, and the workflow executed.
+- `skill_efficiency`: Tool-call productivity.
+- `accuracy`: Final-answer correctness against the reference answer.
+- `goal_accuracy`: Whether the user's goal was achieved.
+- `behavior_check`: Whether the expected workflow behavior was followed.
+- `token_efficiency`: Actual uncached prompt plus completion usage.
+ + + +## Evaluation Results:
+| Measure | Claude Code (Baseline → Skill Uplift) | Codex (Baseline → Skill Uplift) | +|---|---:|---:| +| Overall | 97.8% — baseline ran, but no comparable score was available; uplift unavailable | 95.3% — baseline ran, but no comparable score was available; uplift unavailable | +| Security | 100.0% → 100.0% (±0.0 points) | 100.0% → 100.0% (±0.0 points) | +| Correctness | 85.0% → 100.0% (+15.0 points) | 100.0% → 100.0% (±0.0 points) | +| Discoverability | 91.7% — baseline ran, but no comparable score was available; uplift unavailable | 81.7% — baseline ran, but no comparable score was available; uplift unavailable | +| Effectiveness | 100.0% → 100.0% (±0.0 points) | 100.0% → 100.0% (±0.0 points) | +| Efficiency | 97.2% — baseline ran, but no comparable score was available; uplift unavailable | 94.9% — baseline ran, but no comparable score was available; uplift unavailable | + +## Skill Version(s):
+2975dc7 (source: git SHA, committed 2026-10-28)
+ +## Ethical Considerations:
+NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal team to ensure this skill meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
+ +(For Release on NVIDIA Platforms Only)
+Please report quality, risk, security vulnerabilities or NVIDIA AI Concerns [here](https://app.intigriti.com/programs/nvidia/nvidiavdp/detail).
diff --git a/skills/pva-build-test/skill.oms.sig b/skills/pva-build-test/skill.oms.sig new file mode 100644 index 000000000..2857c223a --- /dev/null +++ b/skills/pva-build-test/skill.oms.sig @@ -0,0 +1 @@ +{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"x509CertificateChain":{"certificates":[{"rawBytes":"MIICgzCCAgmgAwIBAgIUKIyS7SxNteQIiWzK1dWj85E6520wCgYIKoZIzj0EAwMwVTELMAkGA1UEBhMCVVMxGzAZBgNVBAoMEk5WSURJQSBDb3Jwb3JhdGlvbjEpMCcGA1UEAwwgTlZJRElBIEFnZW50IENhcGFiaWxpdGllcyBJQ0EgMDEwHhcNMjYwNDAxMDAwMDAwWhcNMjgwNDIyMTUzMzA5WjBUMQswCQYDVQQGEwJVUzEbMBkGA1UECgwSTlZJRElBIENvcnBvcmF0aW9uMSgwJgYDVQQDDB9OVklESUEgQWdlbnQgU2tpbGxzIFNpZ25pbmcgMDAxMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEYoRM9bQl/dGlwSRNi6bTpIJUXH8Nv9GciP6LSflJYYMLCc296kpyuTSsk5ddbAWiDcFX3C/ydX3jwc+qCLYP6uHy9XphyLjOQ27Yb2J6rBLVtRBS1mgGco/Gr7fL6ODco4GaMIGXMB0GA1UdDgQWBBRQ/5ZW3nJ6lmo9SVk7I15o7UGmpTAfBgNVHSMEGDAWgBRPGpILxMBBleJSsBGjrMKsby1CgjAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIHgDA3BggrBgEFBQcBAQQrMCkwJwYIKwYBBQUHMAGGG2h0dHA6Ly9vY3NwLm5kaXMubnZpZGlhLmNvbTAKBggqhkjOPQQDAwNoADBlAjAUygu/GiOCIXrgGr4SmLgeEVDcEitfFUv7ALbv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iAic2hhMjU2IgogICAgICB9CiAgICBdLAogICAgInNlcmlhbGl6YXRpb24iOiB7CiAgICAgICJtZXRob2QiOiAiZmlsZXMiLAogICAgICAiaWdub3JlX3BhdGhzIjogWwogICAgICAgICIuZ2l0aHViIiwKICAgICAgICAiLmdpdGlnbm9yZSIsCiAgICAgICAgIi5naXQiLAogICAgICAgICIuZ2l0YXR0cmlidXRlcyIKICAgICAgXSwKICAgICAgImFsbG93X3N5bWxpbmtzIjogZmFsc2UsCiAgICAgICJoYXNoX3R5cGUiOiAic2hhMjU2IgogICAgfQogIH0KfQ==","payloadType":"application/vnd.in-toto+json","signatures":[{"sig":"MGQCMH5ZHslpsn1HycGO40x8N0zxJSP9uykLQyCQKqxv0B25swWe0KfkJDSQjRHkrbtF4wIwI8h2xokj1MhfXoCQfxkspK43dYg1MwdXESOWCDvptiHVUUGfKl6zh7UomCp7hM1g","keyid":""}]}} \ No newline at end of file diff --git a/skills/pva-debug/BENCHMARK.md b/skills/pva-debug/BENCHMARK.md new file mode 100644 index 000000000..da75577a4 --- /dev/null +++ b/skills/pva-debug/BENCHMARK.md @@ -0,0 +1,153 @@ +# Skill Benchmark: pva-debug + +> ✅ **Overall verdict: PASS — Recommended for publication** + +## Publication Recommendation + +Recommended for publication based on the completed evaluation evidence in this report. + +## Evaluation Metadata + +- Skill: `pva-debug` +- Validation status: `passed` +- Evaluation date: 2026-10-28 +- Evaluator version: `1.6.3` +- Agents: Claude Code (`aws/anthropic/bedrock-claude-opus-5-5`), Codex (`openai/openai/gpt-6.1-sol`) +- Tasks: 4 evaluation tasks (3 positive, 1 negative) +- Dataset digest: `sha256:a8cf25f8aae4bbf25e5486ee05522ad68af43f97d45e798f89157fcb2847840c` (skill-evaluator-dataset-snapshot/1) +- Attempts per task: 1 +- Environment: `k8s-sandbox` +- Tier 2 evidence: required for publication +- Tier 3 evidence: required for publication + +Each task attempt ran in its own isolated sandbox pod. + +## Tier 1 LLM Provenance + +SkillSpector provider, model, analyzer revision, and determinism evidence retained for this scan. + +| Skill | Provider | Adapter | Analyzer | Model | Revision | Determinism | +| --- | --- | --- | --- | --- | --- | --- | +| pva-debug | nv_inference | openai | mcp_tool_poisoning | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | +| pva-debug | nv_inference | openai | semantic_developer_intent | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | +| pva-debug | nv_inference | openai | semantic_quality_policy | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | +| pva-debug | nv_inference | openai | semantic_security_discovery | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | +| pva-debug | nv_inference | openai | meta_analyzer | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | + +- Controls for `pva-debug`: temperature=not set (source=provider_default, forwarded=no); seed=not set (source=unset, forwarded=no); reasoning_effort=not set (source=provider_default, forwarded=no) + +## What This Report Answers + +The three-tier evaluation checks whether the skill: + +- is safe to use; +- produces correct answers; +- is discovered and activated when needed; +- helps the agent complete the user's goal and expected workflow; and +- avoids wasted skill and tool usage. + +## Results at a Glance + +| Measure | Claude Code (Baseline → Skill Uplift) | Codex (Baseline → Skill Uplift) | +|---|---:|---:| +| Overall | 97.7% — baseline ran, but no comparable score was available; uplift unavailable | 97.2% — baseline ran, but no comparable score was available; uplift unavailable | +| Security | 100.0% → 100.0% (±0.0 points) | 100.0% → 100.0% (±0.0 points) | +| Correctness | 90.0% → 100.0% (+10.0 points) | 100.0% → 100.0% (±0.0 points) | +| Discoverability | 98.3% — baseline ran, but no comparable score was available; uplift unavailable | 90.0% — baseline ran, but no comparable score was available; uplift unavailable | +| Effectiveness | 100.0% → 100.0% (±0.0 points) | 100.0% → 100.0% (±0.0 points) | +| Efficiency | 89.9% — baseline ran, but no comparable score was available; uplift unavailable | 95.8% — baseline ran, but no comparable score was available; uplift unavailable | + +**How to read this table:** baseline is the same task attempted without the target skill. Scores are rounded to one decimal; threshold-adjacent values use additional precision so their displayed band matches the verdict. Uplift is derived from those displayed scores and shown in percentage points. + +Example: `47.0% → 92.0% (+45.0 points)` means the skill-assisted run scored 92.0%, 45.0 percentage points above its 47.0% no-skill baseline. + +A partial dimension was calculated from only the available configured signals; review the detailed report before relying on it. + +### Comparison details + +Shared-source comparisons use the same signals and weights on both conditions. They do not replace the full dimension scores above or change the publication verdict. + +| Agent | Dimension | Basis | Baseline → With skill (uplift) | Explanation | +| --- | --- | --- | --- | --- | +| claude-code | Discoverability | Dimension comparison | N/A | Discoverability is not applicable to the no-skill baseline; there is no installed skill to discover. | +| claude-code | Efficiency | Token-only comparison | 97.8% → 96.5% (-1.3 points) | Only Token Efficiency is comparable; the full dimension scores use different evaluator sources. | +| codex | Discoverability | Dimension comparison | N/A | Discoverability is not applicable to the no-skill baseline; there is no installed skill to discover. | +| codex | Efficiency | Token-only comparison | 92.8% → 91.5% (-1.3 points) | Only Token Efficiency is comparable; the full dimension scores use different evaluator sources. | + +## Token Usage + +Actual Tier 3 execution usage is reported for every observed agent/case pair and both conditions. + +| Agent | Dataset case | With skill | Without skill | Delta | Change | Coverage | +|---|---|---:|---:|---:|---:|---| +| claude-code | All cases | 577,642 | 486,969 | +90,673 | +18.62% | skill 4/4; base 4/4 | +| claude-code | debug-exhausted-budget | 152,360 | 35,361 | +116,999 | +330.87% | skill 1/1; base 1/1 | +| claude-code | debug-missing-evidence | 195,000 | 145,321 | +49,679 | +34.19% | skill 1/1; base 1/1 | +| claude-code | debug-negative | 35,496 | 35,256 | +240 | +0.68% | skill 1/1; base 1/1 | +| claude-code | debug-unverified-corpus | 194,786 | 271,031 | -76,245 | -28.13% | skill 1/1; base 1/1 | +| codex | All cases | 304,554 | 202,067 | +102,487 | +50.72% | skill 4/4; base 4/4 | +| codex | debug-exhausted-budget | 60,032 | 13,292 | +46,740 | +351.64% | skill 1/1; base 1/1 | +| codex | debug-missing-evidence | 98,127 | 87,251 | +10,876 | +12.47% | skill 1/1; base 1/1 | +| codex | debug-negative | 13,434 | 13,315 | +119 | +0.89% | skill 1/1; base 1/1 | +| codex | debug-unverified-corpus | 132,961 | 88,209 | +44,752 | +50.73% | skill 1/1; base 1/1 | +| ALL AGENTS | Dataset aggregate | 882,196 | 689,036 | +193,160 | +28.03% | skill 8/8; base 8/8 | + +Prompt tokens include cached reads, so total tokens are `prompt + completion` (cached is not added twice). The Efficiency score uses `(prompt - cached) + completion`. Change is `100 * (with - without) / without`; negative means fewer tokens. N/A comparisons include their reason in the coverage column; coverage is never estimated. + +## Tier Status + +| Tier | Purpose | Status | Evidence | +|---|---|---|---| +| Tier 1 | Static validation | **PASSED WITH OBSERVATIONS** | 11 validator(s); 10 finding(s) | +| Tier 2 | Semantic deduplication | **PASSED** | 2 validator(s); 0 finding(s) | +| Tier 3 | Live agent evaluation | **PASS** | 2 agent(s); 4 task(s) | + +## Findings and Observations + +
+Show detailed findings and successful checks + +- **MEDIUM** QUALITY/quality_correctness: SKILL_SPEC recommended field missing: 'metadata.tags' (`skills/pva-debug/SKILL.md`) +- **MEDIUM** SCHEMA/body_recommended_section: Missing recommended section: '## Instructions' (`skills/pva-debug/SKILL.md`) +- **MEDIUM** SCHEMA/body_recommended_section: Missing recommended section: '## Examples' (`skills/pva-debug/SKILL.md`) +- **LOW** QUALITY/quality_correctness: No examples provided (`skills/pva-debug/SKILL.md`) +- **LOW** QUALITY/quality_discoverability: Description very long (316 chars, recommend 50-150) (`skills/pva-debug/SKILL.md`) +- 5 additional finding(s) are available in the full evaluation artifacts. + +
+ +## Scoring Methodology + +
+Show dimension definitions, source signals, and thresholds + +| Dimension | Question | Scored signals | +|---|---|---| +| Security | Is it safe to use? | `security` (100%) | +| Correctness | Is the answer correct? | `accuracy` (100%) | +| Discoverability | Was the right skill loaded when needed? | `skill_execution` (100%) | +| Effectiveness | Did the skill help complete the task? | `goal_accuracy` (50%) + `behavior_check` (50%) | +| Efficiency | Did it avoid wasted tool calls and token usage? | `skill_efficiency` (50%) + `token_efficiency` (50%) | + +- Dimension bands: PASS at 50% or above; NEUTRAL from 40% to below 50%; FAIL below 40%. +- Overall Tier 3 lift: PASS at +5 points or more; FAIL at -10 points or less; values between those bands are NEUTRAL. +- Overall verdict: PASS only when every configured dimension passes for at least one supported agent. Lift is reported as diagnostic evidence and does not override this gate. +- The 50% attempt pass threshold is a separate per-task gate; it is not the dimension pass threshold. +- Effectiveness is the equal-weight mean of goal completion (`goal_accuracy`) and expected workflow adherence (`behavior_check`). +- Efficiency is 50% tool-call productivity (the backward-compatible `skill_efficiency` wire id) and 50% `token_efficiency`. Positive-case skill routing is scored under Discoverability, not Efficiency; a negative case without a routing target is N/A. N/A sources are omitted, remaining weights are renormalized, and the dimension is marked partial. + +Signals present in this run: + +- `security` (Security): unsafe operations, secret leakage, and unauthorized access. +- `skill_execution` (Skill Execution): whether the expected skill was selected, decoys were avoided, and the workflow executed. +- `skill_efficiency` (Tool Productivity): tool-call productivity (legacy wire id; routing is scored under Discoverability). +- `accuracy` (Accuracy): final-answer correctness against the reference answer. +- `goal_accuracy` (Goal Accuracy): whether the user's goal was achieved. +- `behavior_check` (Behavior Check): whether the expected workflow behavior was followed. +- `token_efficiency` (Token Efficiency): actual uncached prompt plus completion usage (50% of Efficiency). + +
+ +## Freshness + +Regenerate this benchmark when the skill, evaluation dataset, target agent/model, evaluator version, environment, or scoring policy changes. diff --git a/skills/pva-debug/README.md b/skills/pva-debug/README.md new file mode 100644 index 000000000..b9e5c00be --- /dev/null +++ b/skills/pva-debug/README.md @@ -0,0 +1,155 @@ + + +# PVA development skills + +Agent skills for creating, changing, or repairing NVIDIA PVA operators +in your PVA SDK application or PVA Solutions source tree. They turn +requirements into code, verify it on Tegra hardware, and repair failures within +a debug budget. + +## Skills + +| Skill | Purpose | +| --- | --- | +| [Doctor](https://github.com/NVIDIA/skills/blob/main/skills/pva-doctor/SKILL.md) | Check the SDK, toolchain, project, target, and SDK references. | +| [Setup](https://github.com/NVIDIA/skills/blob/main/skills/pva-setup/SKILL.md) | Install missing SDK, NVVPU, and L4T runtime components, then rerun Doctor. | +| [Spec](https://github.com/NVIDIA/skills/blob/main/skills/pva-spec/SKILL.md) | Define operator behavior, correctness tests, and the OpGen handoff. | +| [OpGen](https://github.com/NVIDIA/skills/blob/main/skills/pva-opgen/SKILL.md) | Generate and integrate the operator, then invoke Build-Test and Debug. | +| [Build-Test](https://github.com/NVIDIA/skills/blob/main/skills/pva-build-test/SKILL.md) | Build, verify correctness on hardware, and measure requested performance cases. | +| [Debug](https://github.com/NVIDIA/skills/blob/main/skills/pva-debug/SKILL.md) | Diagnose and repair a reproduced failure. | + +## Prerequisites + +- An authenticated coding agent with local skill support and shell/file access. + See [agent support](#agent-support) below. +- A development host running regular x86-64 Ubuntu supported by the requested SDK. +- An Arm64 Jetson board running compatible Jetson Linux (L4T), with working + key-based SSH and a trusted host key. +- A matching SDK installation guide (file or URL), access to its installer, + and administrative permissions for required installation steps. +- A writable project: your PVA SDK application or a PVA Solutions source package + or checkout. This is where OpGen adds or changes code. Install Git LFS if the + project uses it. + +When PVA Solutions is selected, Setup uses +[NVIDIA/PVA-Solutions](https://github.com/nvidia/pva-solutions) by default and +clones into the supplied project path, or `$WORK_DIR/source` when omitted. +It reuses an existing source tree and accepts another repository or archive. +Doctor checks the selected source and reports missing required files. + +Run the agent and build tools on the development host. `PVA_BUILD_MODE=L4T` +cross-compiles there for execution on the board. `PVA_BUILD_MODE=EMU` builds +for emulation on the development host. + +Setup installs or reuses the SDK, NVVPU, required build and reference tools, +and board runtime. EMU is optional. Setup calls Doctor before +making changes and again afterward; no existing Doctor report is required. +Setup reads the installer URL from the guide. Supply a separate installer path +or URL only when the guide does not provide one. The guide and installer must +match the requested SDK release. +Setup reads the board's installed BSP and checks SDK compatibility. Supply an +expected BSP release only when you want to require a specific release. + +## Set up a workspace + +Copy all six PVA skill folders from the public +[NVIDIA skills catalog](https://github.com/NVIDIA/skills/tree/main/skills) +into `$HOME/pva-sdk-skills`. Keep each folder's scripts, references, and assets. +The resulting layout is `$HOME/pva-sdk-skills/pva-setup/SKILL.md`, and the +same layout for the other five skills. + +```bash +git clone --depth 1 https://github.com/NVIDIA/skills.git "$HOME/nvidia-skills" +mkdir -p "$HOME/pva-sdk-skills" +for pva_skill in pva-setup pva-doctor pva-spec pva-opgen pva-build-test pva-debug; do + cp -R "$HOME/nvidia-skills/skills/$pva_skill" "$HOME/pva-sdk-skills/" +done +``` + +Use a separate workspace for each operator task. Replace the project path below +with your writable PVA SDK application or PVA Solutions source directory. + +```bash +mkdir -p "$HOME/operator_test/my_operator" +cd "$HOME/operator_test/my_operator" +ln -s "/absolute/path/to/your/project" source + +pva_skill_dir=.claude/skills # For Codex, use .agents/skills +mkdir -p "$pva_skill_dir" +for pva_skill in "$HOME/pva-sdk-skills"/pva-*; do + ln -s "$pva_skill" "$pva_skill_dir/" +done +``` + +Reload skills or restart the agent session after creating the links. +`source/` points to the project OpGen will modify; the surrounding workspace +holds your inputs, generated configuration, and reports. Each skill carries its +required scripts and templates. Install all six for the full workflow; +OpGen invokes Build-Test and Debug by their installed skill names. +Generated SDK references belong in `references/sdk/` in this workspace. +Doctor records their verified absolute location in its report. + +## Agent support + +- **Claude Code:** Used for the recorded operator runs and the commands below. +- **Codex:** Supports [local skills](https://learn.chatgpt.com/docs/build-skills#where-to-save-skills) + in `.agents/skills`, invoked with `$pva-spec` or another skill name. + These skills include `agents/openai.yaml` metadata. OpGen uses the agent's + available skill mechanism for Build-Test and Debug. Without a callable skill + tool, it loads the child skill's `SKILL.md` and executes its full workflow + before resuming OpGen with the reports and verdict. + +## Run Setup → Doctor → Spec → OpGen + +Create `requirements.md` in the workspace: operator name/path, task mode (`new`, +`change`, or `repair`), required behavior, supported inputs, API, and performance +requirements. For an existing operator, include relevant source and test paths. + +Run these **headless Claude Code commands** one at a time from the development +host's workspace. Replace the guide and board settings below. Setup resolves +the SDK release, installer, package names, and installation paths from the +guide and package metadata. Package paths are not fixed in the skill. +You can provide an explicit SDK release or path override when needed. + +```bash +export PVA_OPERATOR_MAX_DEBUG_ATTEMPTS=3 + +# 1. Setup: check and prepare the host and board +claude -p "Run pva-setup for spec, opgen, and build-test. +Installation guide: http://docs.nvidia.com/pva/sdk/installation.html. +Target: user@; PVA generation: . +Project: $PWD/source; work directory: $PWD." + +# 2. Doctor: verify readiness after Setup +claude -p "Run pva-doctor for spec, opgen, and build-test using +$PWD/reports/pva-setup-report.md. +Project: $PWD/source; work directory: $PWD." + +# 3. Spec: run after Doctor is ready +# Spec runs its finalizer to create and validate configure/opgen-inputs.json. +claude -p "Invoke pva-spec through the Skill tool using +$PWD/requirements.md and $PWD/reports/doctor-report.md. +Project: $PWD/source; work directory: $PWD." + +# 4. OpGen: run after Spec returns CONFIGURED +claude -p "Invoke pva-opgen through the Skill tool using $PWD/configure/opgen-inputs.json." +``` + +Doctor writes `$WORK_DIR/reports/doctor-report.md` automatically. The examples +use `$PWD` as the work directory so Spec and OpGen can use the resulting files. + +OpGen runs Build-Test and invokes Debug as needed. Read the final result in +`reports/opgen-report.md`. + +See [reference maintenance](https://github.com/NVIDIA/skills/blob/main/skills/pva-doctor/references/reference-maintenance.md) for SDK-reference +regeneration and upgrades. + +## Maintaining the helpers + +Spec owns [finalize_opgen_inputs.py](https://github.com/NVIDIA/skills/blob/main/skills/pva-spec/scripts/finalize_opgen_inputs.py). +OpGen ships [an identical copy](https://github.com/NVIDIA/skills/blob/main/skills/pva-opgen/scripts/finalize_opgen_inputs.py) +so handoff validation works when the skills are installed separately. +After changing the Spec helper, update the OpGen copy too. +Generated SDK references and operator reports belong in the operator workspace. diff --git a/skills/pva-debug/SKILL.md b/skills/pva-debug/SKILL.md new file mode 100644 index 000000000..10e2914ca --- /dev/null +++ b/skills/pva-debug/SKILL.md @@ -0,0 +1,149 @@ +--- +name: pva-debug +description: >- + Diagnose and narrowly repair one reproduced NVIDIA PVA operator failure. Use + from OpGen or manually for compile, link, cuPVA lifecycle, dataflow, DMA, + numerical, EMU-versus-hardware, runtime, or performance failures. Preserve + the original evidence and return the repaired source to the caller for a + fresh Build-Test. +metadata: + author: "Venkat Balan " +--- + + + +# Debug a PVA operator + +Find one demonstrated cause. Make the smallest safe repair. Do not declare the +complete operator passed. + +## Resolve paths + +`SKILL_ROOT` is the absolute directory containing this skill's `SKILL.md`, +after resolving symlinks. Bundled files are relative to that directory. Resolve +supplied relative paths against the invocation directory before changing +directories. Reuse OpGen's `WORK_DIR` for its reports. +For a direct call, use the supplied absolute report path, or resolve the caller's +report work directory as `WORK_DIR`. + +## Get the inputs + +Require: + +- A Doctor report that covers the failed capability. +- Absolute source and artifact paths, plus a report path or work directory. +- Caller identity: OpGen or a user with the same complete failure evidence. +- Failed stage, exact command, return code, full log, and source identity. +- Smallest known failing input, expected result, and tolerance. +- SDK version, PVA generation, compiler backend, build mode, and target + identity when relevant. +- EMU and hardware results that already exist. +- One-based attempt number and maximum attempts for an OpGen call. + +Return `BLOCKED` before a source change when required evidence is absent or the +attempt number is greater than the maximum. + +## Load the technical basis + +Require Doctor's `public-reference-corpus` check to be `PASS`. Set +`SDK_REFERENCES` to the report's absolute `sdk_reference_root`. Require a readable +`index.md` and `reference-lock.json`, a lock SHA-256 matching the report's +`sdk_reference_lock_sha256`, and the reported SDK version matching this task. +If these fields are absent or no longer match, return `BLOCKED` and request a +fresh Doctor report. Do not fall back to an installed package or CWD path. Read the +`pva-debug` route in `$SDK_REFERENCES/index.md`. +Before reading Markdown, check its SHA-256 against the lock +`outputs` entry; return `BLOCKED` on a mismatch. Resolve links relative to each +generated file. Use `rg` +to find the narrow Markdown that matches the first failed stage. + +For each product fact, record the SDK documentation root, local Markdown path, +packaged source path, source SHA-256, version, and section or PDF page. + +Use supplied or public implementations within the user's authorized scope and +their license terms. + +## Preserve and reproduce the failure + +1. Save the original source identity, uncommitted changes, command, return + code, log, input, actual output, and expected output. +2. Reproduce the failure without a source change. +3. Reduce the input only when the failure signature stays the same. +4. Identify the first failed command, operation, or output. + +Return `NOT_REPRODUCED` if the supplied source and command do not reproduce the +failure. Do not make a speculative repair. + +## Diagnose one cause + +Classify the first failure as: + +- Compile. +- Link or device integration. +- cuPVA API or lifecycle. +- Dataflow, DMA, memory, or synchronization. +- Numerical or output correctness. +- EMU-pass but hardware-fail. +- Target runtime. +- Performance regression. + +For each hypothesis: + +1. State one falsifiable cause. +2. Name the supporting evidence. +3. Run the smallest diagnostic that can prove or reject it. +4. Save the command and result. +5. Reject an unsupported hypothesis before you test another. + +Use the independent CPU reference and first wrong element for numerical work. +Use hardware evidence for a hardware-only failure. Use target compiler listings +and hardware profiles for a performance regression. Do not use EMU timing +as PVA performance evidence. + +## Repair and check + +Change only the code that the proved cause requires. Do not change the public +API, required result, tolerance, or performance test to hide the failure. + +Record each changed file and reason. Keep the original evidence unchanged. +Write diagnostics and repair evidence to new files. + +Then: + +1. Rebuild the failed target. +2. Run the original failing case. +3. Run nearby affected cases. +4. Run the EMU matrix when source changed and EMU support is available or + required. Missing optional EMU support is not a failure. Record + `SKIPPED_OPTIONAL` when optional EMU support is absent. +5. Run the original hardware case for a hardware-only or performance failure. +6. Confirm that the original signature is absent. +7. Record commands, return codes, logs, outputs, and repaired source identity. + +These checks prove only the narrow repair. Build-Test owns final verification. + +## Return control + +Write the report with +[the debug report template](assets/debug-report-template.md). For an OpGen +workflow, use `$WORK_DIR/reports/debug-attempt-.md`. For a direct call, +use the supplied absolute report path or `$WORK_DIR/reports/debug-report.md`. + +Return one result: + +- `REPAIRED`: The original case and affected checks pass. +- `NOT_REPRODUCED`: The supplied source and command do not reproduce the + failure. +- `BLOCKED`: Required evidence, source, toolchain, target, contract, or attempt + budget is unavailable. + +Return the report to the caller. Direct the caller to invoke +`$pva-build-test` with the complete original matrix and repaired source. +For an OpGen call, resume the existing OpGen workflow: `REPAIRED` requires +fresh Build-Test, and other results require OpGen's final report. Do not +reinvoke OpGen or end the overall run with only the Debug response. + +Check public release notes before you identify an SDK limitation. Do not claim +an SDK defect without direct evidence. diff --git a/skills/pva-debug/agents/openai.yaml b/skills/pva-debug/agents/openai.yaml new file mode 100644 index 000000000..2eda95756 --- /dev/null +++ b/skills/pva-debug/agents/openai.yaml @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +interface: + display_name: "PVA Debug" + short_description: "Diagnose and repair focused PVA failures" + default_prompt: "Use $pva-debug to reproduce, diagnose, and narrowly repair this recorded OpGen failure." diff --git a/skills/pva-debug/assets/debug-report-template.md b/skills/pva-debug/assets/debug-report-template.md new file mode 100644 index 000000000..b828e6ae7 --- /dev/null +++ b/skills/pva-debug/assets/debug-report-template.md @@ -0,0 +1,65 @@ + + +# PVA debug report + +## Result + +- Result: `REPAIRED | NOT_REPRODUCED | BLOCKED` +- Caller: +- Debug attempt: +- Maximum debug attempts: +- Failed stage: +- Failure class: +- Report time: + +## Original evidence + +- Source path: +- Source identity: +- Initial uncommitted changes: +- SDK version: +- PVA generation: +- Compiler front end: +- Build mode: +- EMU policy: +- Target identity: +- Command: +- Return code: +- First failing diagnostic or output: +- Failing input: +- Expected output and tolerance: +- Original log: + +## Diagnosis + +- Reproduction result: +- Reduced reproduction: +- Confirmed root cause: +- Supporting evidence: +- Local SDK-reference root, Markdown path, packaged source path, and source SHA-256: +- Rejected hypotheses: + +## Repair + +- Changed files: +- Narrow change: +- Reason: +- Repaired source identity: + +## Repair checks + +| Check | Result | Evidence | +| --- | --- | --- | +| Original failing case | | | +| Affected nearby cases | | | +| Complete EMU matrix or optional skip | | | +| Original hardware case | | | + +## Return to caller + +- Next owner: +- Required Build-Test inputs: +- Remaining risks: +- Exact blocking condition: diff --git a/skills/pva-debug/config/skillspector-baseline.yaml b/skills/pva-debug/config/skillspector-baseline.yaml new file mode 100644 index 000000000..313e795e0 --- /dev/null +++ b/skills/pva-debug/config/skillspector-baseline.yaml @@ -0,0 +1,9 @@ +# Temporary AE1 exception for PVA skills MR !3. +# Context: https://nvidia.slack.com/archives/C08GC28NBAS/p1789040586702479 +# Remove after the SkillSpector fix and a clean scan without this baseline. +version: 2 +rules: + - id: AE1 + path: SKILL.md + message: "SKILL.md (partial)" + reason: "Temporary exception: runtime file references mark readable SKILL.md partial; awaiting SkillSpector fix." diff --git a/skills/pva-debug/evals/EVAL.md b/skills/pva-debug/evals/EVAL.md new file mode 100644 index 000000000..9a87548b0 --- /dev/null +++ b/skills/pva-debug/evals/EVAL.md @@ -0,0 +1,30 @@ +# CI smoke evaluations + +Covered: Missing evidence, exhausted attempt budget, unverified references, and routing. + +Not covered: Reproduction of a real failure, REPAIRED/NOT_REPRODUCED paths, and hardware regression checks. + +## Behaviors + +Check case assertions against the result and actions. A correct refusal passes +a negative-path case; it does not prove operator generation or hardware correctness. +The task environment supplies Python 3.9+ only. PVA SDK, PVA Solutions, +NVVPU/ASIP, CUDA, EMU, and a board are absent. No case may install them or +contact a remote host. SDK version/generation mentions are requested target +metadata, not evidence of an installed SDK. Fixture logs are supplied text; +they do not require running an emulator. + +## Negative Cases + +The last case must not activate this skill. Other cases expect this skill, even +when the correct result is BLOCKED, NOT_READY, or NEEDS_INPUT. + +## Notes + +Validate from this skill directory: `skillevaluator tier3 validate . --strict`. +Run Claude Code and Codex, with and without the skill, using identical inputs. +Each case explicitly selects fixtures under `evals/files/`; the evaluator stages +these under `/workspace/input/`. Dataset answers and this guidance stay private. +CI version 1.5.6 requires nonempty assertions. See +[benchmark results](../BENCHMARK.md) for measured results. These CI smoke tests +do not cover SDK builds, EMU, or hardware execution. diff --git a/skills/pva-debug/evals/config.yml b/skills/pva-debug/evals/config.yml new file mode 100644 index 000000000..2e4a4703b --- /dev/null +++ b/skills/pva-debug/evals/config.yml @@ -0,0 +1,10 @@ +schema_version: 1 +harbor: + task_source: evals_json + n_attempts: 1 + stop_on_pass: false + n_concurrent: 1 +grading: + mode: default +skill_workspace: + mode: isolated diff --git a/skills/pva-debug/evals/evals.json b/skills/pva-debug/evals/evals.json new file mode 100644 index 000000000..48b8585dd --- /dev/null +++ b/skills/pva-debug/evals/evals.json @@ -0,0 +1,61 @@ +{ + "skill_name": "pva-debug", + "evals": [ + { + "id": "debug-missing-evidence", + "prompt": "This CI environment has Python but no PVA SDK, PVA Solutions, NVVPU or ASIP toolchain, CUDA, emulator, or board. Use only bundled skill helpers and supplied fixtures; do not install dependencies or access remote hosts. Use pva-debug: my GEN2 PVA operator crashes. SDK 2.10.0~rc3, NVVPU, L4T. No source, Doctor report, failing command, log, or reproducer is available. Use /workspace/debug-missing as the report work directory. Do not guess a cause, change code, or ask questions; report the missing evidence.", + "expected_skill": "pva-debug", + "expected_script": null, + "expected_output": "BLOCKED with the missing failure evidence identified. No diagnosis is presented as proved and no repair is claimed.", + "assertions": [ + "Identifies missing source identity, command, log, reproducer, and Doctor evidence.", + "Returns BLOCKED before any repair.", + "Does not claim REPAIRED or invent a demonstrated cause.", + "Does not install dependencies or access a remote host or board." + ], + "files": [] + }, + { + "id": "debug-exhausted-budget", + "prompt": "This CI environment has Python but no PVA SDK, PVA Solutions, NVVPU or ASIP toolchain, CUDA, emulator, or board. Use only bundled skill helpers and supplied fixtures; do not install dependencies or access remote hosts. OpGen requests pva-debug attempt 4 with maximum attempts 3. Work directory: /workspace/debug-budget. There are no source or evidence files available in this request. Report whether this repair attempt is permitted. Do not reset the count, modify code, invoke another skill, or ask questions.", + "expected_skill": "pva-debug", + "expected_script": null, + "expected_output": "BLOCKED because attempt 4 exceeds maximum 3; missing evidence may also be reported. No repair attempt is executed.", + "assertions": [ + "Identifies that attempt 4 exceeds the maximum of 3.", + "Does not reset, decrement, or disregard the attempt number.", + "Does not edit source or invoke OpGen or Build-Test.", + "Does not install dependencies or access a remote host or board." + ], + "files": [] + }, + { + "id": "debug-unverified-corpus", + "prompt": "This CI environment has Python but no PVA SDK, PVA Solutions, NVVPU or ASIP toolchain, CUDA, emulator, or board. Use only bundled skill helpers and supplied fixtures; do not install dependencies or access remote hosts. Use pva-debug to assess the reported PVA numerical failure in /workspace/input/unverified/failure.md. The accompanying doctor-report.md states that SDK reference verification was not performed; no source or runnable reproducer is supplied. Use /workspace/debug-unverified as the report work directory. Preserve the supplied failure evidence. Do not run Doctor, invent a repair, or ask questions.", + "expected_skill": "pva-debug", + "expected_script": null, + "expected_output": "BLOCKED because the verified technical basis and required reproducer/source evidence are absent. The recorded tolerance and expected result stay unchanged.", + "assertions": [ + "Identifies missing verified SDK references and executable failure evidence.", + "Does not claim a reproduced cause or REPAIRED result.", + "Preserves the supplied expected result and tolerance without weakening the check.", + "Does not install dependencies or access a remote host or board." + ], + "files": [ + "files/unverified" + ] + }, + { + "id": "debug-negative", + "prompt": "Explain absolute versus relative numerical error with one simple example. This is not a software failure report; do not inspect or change code.", + "expected_skill": null, + "expected_script": null, + "expected_output": "A correct explanation of absolute and relative error without starting a PVA repair.", + "assertions": [ + "Explains absolute and relative error correctly.", + "Does not invoke pva-debug or modify code." + ], + "files": [] + } + ] +} diff --git a/skills/pva-debug/evals/files/unverified/doctor-report.md b/skills/pva-debug/evals/files/unverified/doctor-report.md new file mode 100644 index 000000000..9de7141c9 --- /dev/null +++ b/skills/pva-debug/evals/files/unverified/doctor-report.md @@ -0,0 +1,10 @@ +# Synthetic incomplete Doctor report + +SDK: 2.10.0~rc3 +PVA generation: GEN2 + +| Check | Required | Result | Evidence | +| --- | --- | --- | --- | +| public-reference-corpus | yes | LIMITATION | Verification was not performed | + +No verified reference root or lock hash is available. diff --git a/skills/pva-debug/evals/files/unverified/failure.md b/skills/pva-debug/evals/files/unverified/failure.md new file mode 100644 index 000000000..3a073888c --- /dev/null +++ b/skills/pva-debug/evals/files/unverified/failure.md @@ -0,0 +1,10 @@ +# Synthetic numerical failure report + +Case: integer identity operation +Input: [1, 2, 3] +Expected: [1, 2, 3] +Reported actual: [1, 2, 4] +Tolerance: 0 (approved exact integer contract) + +No source identity, command, or runnable reproducer is available. +This is a missing-evidence test, not evidence of a real PVA defect. diff --git a/skills/pva-debug/skill-card.md b/skills/pva-debug/skill-card.md new file mode 100644 index 000000000..2fe5e09a6 --- /dev/null +++ b/skills/pva-debug/skill-card.md @@ -0,0 +1,82 @@ +## Description:
+Diagnose and narrowly repair one reproduced NVIDIA PVA operator failure, preserving the original evidence and returning the repaired source to the caller for a fresh Build-Test.
+ +This skill is ready for commercial/non-commercial use.
+ +## Owner +NVIDIA
+ +### License/Terms of Use:
+CC-BY-4.0 AND Apache 2.0
+## Use Case:
+Developers and engineers working on NVIDIA PVA operators use this skill, from OpGen or manually, to reproduce, diagnose, and make the smallest safe repair for a single demonstrated compile, link, cuPVA lifecycle, dataflow, DMA, numerical, EMU-versus-hardware, runtime, or performance failure.
+ +### Deployment Geography for Use:
+Global
+ +## Requirements / Dependencies:
+**Requires API Key or External Credential:** [Not Specified]
+**Credential Type(s):** [None identified]
+ +Do not include secrets in prompts/logs/output; use least-privilege credentials; rotate keys as appropriate.
+ +## Known Risks and Mitigations:
+Risk: Review before execution as proposals could introduce incorrect or misleading guidance into skills.
+Mitigation: Review and scan skill before deployment.
+ +## Reference(s):
+- [PVA debug report template](assets/debug-report-template.md)
+ + +## Skill Output:
+**Output Type(s):** [Analysis, Code, Files, Shell commands]
+**Output Format:** [Markdown debug report with a REPAIRED, NOT_REPRODUCED, or BLOCKED result, plus narrow source repairs and diagnostic commands]
+**Output Parameters:** [1D]
+**Other Properties Related to Output:** [None]
+ +## Evaluation Agents Used:
+- Claude Code (`aws/anthropic/bedrock-claude-opus-5-5`)
+- Codex (`openai/openai/gpt-6.1-sol`)
+ + + +## Evaluation Tasks:
+4 evaluation tasks (3 positive, 1 negative), one attempt per task, each attempt run in its own isolated k8s sandbox pod.
+ +## Evaluation Metrics Used:
+Reported benchmark dimensions:
+- Security: Whether the skill is safe to use, checking for unsafe operations, secret leakage, and unauthorized access.
+- Correctness: Whether the final answer is correct against the reference answer.
+- Discoverability: Whether the right skill was loaded when needed and decoys were avoided.
+- Effectiveness: Whether the skill helped complete the user's goal and expected workflow.
+- Efficiency: Whether the skill avoided wasted tool calls and token usage.
+ +Underlying evaluation signals used in this run:
+- `security`: Unsafe operations, secret leakage, and unauthorized access.
+- `skill_execution`: Whether the expected skill was selected, decoys were avoided, and the workflow executed.
+- `skill_efficiency`: Tool-call productivity (legacy wire id; routing is scored under Discoverability).
+- `accuracy`: Final-answer correctness against the reference answer.
+- `goal_accuracy`: Whether the user's goal was achieved.
+- `behavior_check`: Whether the expected workflow behavior was followed.
+- `token_efficiency`: Actual uncached prompt plus completion usage (50% of Efficiency).
+ + + +## Evaluation Results:
+| Measure | Claude Code (Baseline → Skill Uplift) | Codex (Baseline → Skill Uplift) | +|---|---:|---:| +| Overall | 97.7% — baseline ran, but no comparable score was available; uplift unavailable | 97.2% — baseline ran, but no comparable score was available; uplift unavailable | +| Security | 100.0% → 100.0% (±0.0 points) | 100.0% → 100.0% (±0.0 points) | +| Correctness | 90.0% → 100.0% (+10.0 points) | 100.0% → 100.0% (±0.0 points) | +| Discoverability | 98.3% — baseline ran, but no comparable score was available; uplift unavailable | 90.0% — baseline ran, but no comparable score was available; uplift unavailable | +| Effectiveness | 100.0% → 100.0% (±0.0 points) | 100.0% → 100.0% (±0.0 points) | +| Efficiency | 89.9% — baseline ran, but no comparable score was available; uplift unavailable | 95.8% — baseline ran, but no comparable score was available; uplift unavailable | + +## Skill Version(s):
+2975dc7 (source: git SHA, committed 2026-10-28)
+ +## Ethical Considerations:
+NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal team to ensure this skill meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
+ +(For Release on NVIDIA Platforms Only)
+Please report quality, risk, security vulnerabilities or NVIDIA AI Concerns [here](https://app.intigriti.com/programs/nvidia/nvidiavdp/detail).
diff --git a/skills/pva-debug/skill.oms.sig b/skills/pva-debug/skill.oms.sig new file mode 100644 index 000000000..2e3d1b3cb --- /dev/null +++ b/skills/pva-debug/skill.oms.sig @@ -0,0 +1 @@ +{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"x509CertificateChain":{"certificates":[{"rawBytes":"MIICgzCCAgmgAwIBAgIUKIyS7SxNteQIiWzK1dWj85E6520wCgYIKoZIzj0EAwMwVTELMAkGA1UEBhMCVVMxGzAZBgNVBAoMEk5WSURJQSBDb3Jwb3JhdGlvbjEpMCcGA1UEAwwgTlZJRElBIEFnZW50IENhcGFiaWxpdGllcyBJQ0EgMDEwHhcNMjYwNDAxMDAwMDAwWhcNMjgwNDIyMTUzMzA5WjBUMQswCQYDVQQGEwJVUzEbMBkGA1UECgwSTlZJRElBIENvcnBvcmF0aW9uMSgwJgYDVQQDDB9OVklESUEgQWdlbnQgU2tpbGxzIFNpZ25pbmcgMDAxMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEYoRM9bQl/dGlwSRNi6bTpIJUXH8Nv9GciP6LSflJYYMLCc296kpyuTSsk5ddbAWiDcFX3C/ydX3jwc+qCLYP6uHy9XphyLjOQ27Yb2J6rBLVtRBS1mgGco/Gr7fL6ODco4GaMIGXMB0GA1UdDgQWBBRQ/5ZW3nJ6lmo9SVk7I15o7UGmpTAfBgNVHSMEGDAWgBRPGpILxMBBleJSsBGjrMKsby1CgjAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIHgDA3BggrBgEFBQcBAQQrMCkwJwYIKwYBBQUHMAGGG2h0dHA6Ly9vY3NwLm5kaXMubnZpZGlhLmNvbTAKBggqhkjOPQQDAwNoADBlAjAUygu/GiOCIXrgGr4SmLgeEVDcEitfFUv7ALbvLVGVyMysB3mxmO/uInZfXzWcJZsCMQDxuoxj4ZmO30jhkPIcCxGFCOvnUsnfU3TfGcouYm4M6iRpbKvtVnHPiy4bi6pcKf0="},{"rawBytes":"MIICiDCCAg6gAwIBAgIUZsIuSv9NkpJCNqtYEfCouVv5BzowCgYIKoZIzj0EAwMwUTELMAkGA1UEBhMCVVMxGzAZBgNVBAoME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cmlmaWVkL2ZhaWx1cmUubWQiLAogICAgICAgICJkaWdlc3QiOiAiYjYyOTU1ODg4MzkzNmI2OTM4OGY5MTU4Y2FlMGQ2NGUxZGE5Y2RhY2U4ODNlYjYwZTU4MjBkYzRhMGFiN2FlNiIsCiAgICAgICAgImFsZ29yaXRobSI6ICJzaGEyNTYiCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAibmFtZSI6ICJza2lsbC1jYXJkLm1kIiwKICAgICAgICAiZGlnZXN0IjogIjdiZTJkMDVhYTVhM2U1NzRhNDU1YWJlYWNmZWVkM2NjOTgyYjY1OGEzMWEzYWFmNDc5NTBkY2E5ZWE1ZTJjNDQiLAogICAgICAgICJhbGdvcml0aG0iOiAic2hhMjU2IgogICAgICB9CiAgICBdLAogICAgInNlcmlhbGl6YXRpb24iOiB7CiAgICAgICJhbGxvd19zeW1saW5rcyI6IGZhbHNlLAogICAgICAiaGFzaF90eXBlIjogInNoYTI1NiIsCiAgICAgICJpZ25vcmVfcGF0aHMiOiBbCiAgICAgICAgIi5naXRodWIiLAogICAgICAgICIuZ2l0IiwKICAgICAgICAiLmdpdGF0dHJpYnV0ZXMiLAogICAgICAgICIuZ2l0aWdub3JlIgogICAgICBdLAogICAgICAibWV0aG9kIjogImZpbGVzIgogICAgfQogIH0KfQ==","payloadType":"application/vnd.in-toto+json","signatures":[{"sig":"MGUCMQCKGwby6b+XTYUF7gzTjLspRWvJ27dLvHyIGTxAoLQN1BkbdWmPXZhF5snZ/TfiYBkCMA3u4o4mzXWv3bbNR8dj1DUaTEw+vlfvqGIJB7/M+Rh2OmQ2KmI8fTso7Y5ra+A75Q==","keyid":""}]}} \ No newline at end of file diff --git a/skills/pva-doctor/BENCHMARK.md b/skills/pva-doctor/BENCHMARK.md new file mode 100644 index 000000000..d891fb6a0 --- /dev/null +++ b/skills/pva-doctor/BENCHMARK.md @@ -0,0 +1,155 @@ +# Skill Benchmark: pva-doctor + +> ✅ **Overall verdict: PASS — Recommended for publication** + +## Publication Recommendation + +Recommended for publication based on the completed evaluation evidence in this report. + +## Evaluation Metadata + +- Skill: `pva-doctor` +- Validation status: `passed` +- Evaluation date: 2026-10-28 +- Evaluator version: `1.6.3` +- Agents: Claude Code (`aws/anthropic/bedrock-claude-opus-5-5`), Codex (`openai/openai/gpt-6.1-sol`) +- Tasks: 5 evaluation tasks (4 positive, 1 negative) +- Dataset digest: `sha256:1e939133a9eb08dc70233be230625ddad334942ffd8ab02383d50cecd32ba340` (skill-evaluator-dataset-snapshot/1) +- Attempts per task: 1 +- Environment: `k8s-sandbox` +- Tier 2 evidence: required for publication +- Tier 3 evidence: required for publication + +Each task attempt ran in its own isolated sandbox pod. + +## Tier 1 LLM Provenance + +SkillSpector provider, model, analyzer revision, and determinism evidence retained for this scan. + +| Skill | Provider | Adapter | Analyzer | Model | Revision | Determinism | +| --- | --- | --- | --- | --- | --- | --- | +| pva-doctor | nv_inference | openai | mcp_tool_poisoning | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | +| pva-doctor | nv_inference | openai | semantic_developer_intent | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | +| pva-doctor | nv_inference | openai | semantic_quality_policy | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | +| pva-doctor | nv_inference | openai | semantic_security_discovery | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | +| pva-doctor | nv_inference | openai | meta_analyzer | `aws/anthropic/bedrock-claude-opus-5-5` | `2.13.1` | nondeterministic / provider_defaults | + +- Controls for `pva-doctor`: temperature=not set (source=provider_default, forwarded=no); seed=not set (source=unset, forwarded=no); reasoning_effort=not set (source=provider_default, forwarded=no) + +## What This Report Answers + +The three-tier evaluation checks whether the skill: + +- is safe to use; +- produces correct answers; +- is discovered and activated when needed; +- helps the agent complete the user's goal and expected workflow; and +- avoids wasted skill and tool usage. + +## Results at a Glance + +| Measure | Claude Code (Baseline → Skill Uplift) | Codex (Baseline → Skill Uplift) | +|---|---:|---:| +| Overall | 96.5% — baseline ran, but no comparable score was available; uplift unavailable | 93.9% — baseline ran, but no comparable score was available; uplift unavailable | +| Security | 100.0% → 100.0% (±0.0 points) | 100.0% → 100.0% (±0.0 points) | +| Correctness | 52.0% → 100.0% (+48.0 points) | 44.0% → 100.0% (+56.0 points) | +| Discoverability | 100.0% — baseline ran, but no comparable score was available; uplift unavailable | 93.8% — baseline ran, but no comparable score was available; uplift unavailable | +| Effectiveness | 48.4% → 100.0% (+51.6 points) | 45.6% → 100.0% (+54.4 points) | +| Efficiency | 82.4% — baseline ran, but no comparable score was available; uplift unavailable | 75.6% — baseline ran, but no comparable score was available; uplift unavailable | + +**How to read this table:** baseline is the same task attempted without the target skill. Scores are rounded to one decimal; threshold-adjacent values use additional precision so their displayed band matches the verdict. Uplift is derived from those displayed scores and shown in percentage points. + +Example: `47.0% → 92.0% (+45.0 points)` means the skill-assisted run scored 92.0%, 45.0 percentage points above its 47.0% no-skill baseline. + +A partial dimension was calculated from only the available configured signals; review the detailed report before relying on it. + +### Comparison details + +Shared-source comparisons use the same signals and weights on both conditions. They do not replace the full dimension scores above or change the publication verdict. + +| Agent | Dimension | Basis | Baseline → With skill (uplift) | Explanation | +| --- | --- | --- | --- | --- | +| claude-code | Discoverability | Dimension comparison | N/A | Discoverability is not applicable to the no-skill baseline; there is no installed skill to discover. | +| claude-code | Efficiency | Token-only comparison | 97.9% → 93.1% (-4.8 points) | Only Token Efficiency is comparable; the full dimension scores use different evaluator sources. | +| codex | Discoverability | Dimension comparison | N/A | Discoverability is not applicable to the no-skill baseline; there is no installed skill to discover. | +| codex | Efficiency | Token-only comparison | 92.7% → 88.8% (-3.9 points) | Only Token Efficiency is comparable; the full dimension scores use different evaluator sources. | + +## Token Usage + +Actual Tier 3 execution usage is reported for every observed agent/case pair and both conditions. + +| Agent | Dataset case | With skill | Without skill | Delta | Change | Coverage | +|---|---|---:|---:|---:|---:|---| +| claude-code | All cases | 1,043,748 | 583,269 | +460,479 | +78.95% | skill 5/5; base 5/5 | +| claude-code | doctor-missing-sdk | 263,158 | 146,093 | +117,065 | +80.13% | skill 1/1; base 1/1 | +| claude-code | doctor-missing-solutions-source | 220,392 | 146,811 | +73,581 | +50.12% | skill 1/1; base 1/1 | +| claude-code | doctor-negative | 35,493 | 35,375 | +118 | +0.33% | skill 1/1; base 1/1 | +| claude-code | doctor-overlapping-output | 261,965 | 107,407 | +154,558 | +143.90% | skill 1/1; base 1/1 | +| claude-code | doctor-scoped-prerequisites | 262,740 | 147,583 | +115,157 | +78.03% | skill 1/1; base 1/1 | +| codex | All cases | 494,408 | 386,087 | +108,321 | +28.06% | skill 5/5; base 5/5 | +| codex | doctor-missing-sdk | 149,986 | 86,485 | +63,501 | +73.42% | skill 1/1; base 1/1 | +| codex | doctor-missing-solutions-source | 121,996 | 116,216 | +5,780 | +4.97% | skill 1/1; base 1/1 | +| codex | doctor-negative | 13,401 | 13,256 | +145 | +1.09% | skill 1/1; base 1/1 | +| codex | doctor-overlapping-output | 90,181 | 99,133 | -8,952 | -9.03% | skill 1/1; base 1/1 | +| codex | doctor-scoped-prerequisites | 118,844 | 70,997 | +47,847 | +67.39% | skill 1/1; base 1/1 | +| ALL AGENTS | Dataset aggregate | 1,538,156 | 969,356 | +568,800 | +58.68% | skill 10/10; base 10/10 | + +Prompt tokens include cached reads, so total tokens are `prompt + completion` (cached is not added twice). The Efficiency score uses `(prompt - cached) + completion`. Change is `100 * (with - without) / without`; negative means fewer tokens. N/A comparisons include their reason in the coverage column; coverage is never estimated. + +## Tier Status + +| Tier | Purpose | Status | Evidence | +|---|---|---|---| +| Tier 1 | Static validation | **PASSED WITH OBSERVATIONS** | 11 validator(s); 20 finding(s) | +| Tier 2 | Semantic deduplication | **PASSED** | 2 validator(s); 0 finding(s) | +| Tier 3 | Live agent evaluation | **PASS** | 2 agent(s); 5 task(s) | + +## Findings and Observations + +
+Show detailed findings and successful checks + +- **MEDIUM** QUALITY/quality_correctness: No documented scripts in table format (`skills/pva-doctor/SKILL.md`) +- **MEDIUM** QUALITY/quality_correctness: Instructions don't mention 'run_script' (`skills/pva-doctor/SKILL.md`) +- **MEDIUM** QUALITY/quality_correctness: SKILL_SPEC recommended field missing: 'metadata.tags' (`skills/pva-doctor/SKILL.md`) +- **MEDIUM** SCHEMA/body_recommended_section: Missing recommended section: '## Instructions' (`skills/pva-doctor/SKILL.md`) +- **MEDIUM** SCHEMA/body_recommended_section: Missing recommended section: '## Examples' (`skills/pva-doctor/SKILL.md`) +- 15 additional finding(s) are available in the full evaluation artifacts. + +
+ +## Scoring Methodology + +
+Show dimension definitions, source signals, and thresholds + +| Dimension | Question | Scored signals | +|---|---|---| +| Security | Is it safe to use? | `security` (100%) | +| Correctness | Is the answer correct? | `accuracy` (100%) | +| Discoverability | Was the right skill loaded when needed? | `skill_execution` (100%) | +| Effectiveness | Did the skill help complete the task? | `goal_accuracy` (50%) + `behavior_check` (50%) | +| Efficiency | Did it avoid wasted tool calls and token usage? | `skill_efficiency` (50%) + `token_efficiency` (50%) | + +- Dimension bands: PASS at 50% or above; NEUTRAL from 40% to below 50%; FAIL below 40%. +- Overall Tier 3 lift: PASS at +5 points or more; FAIL at -10 points or less; values between those bands are NEUTRAL. +- Overall verdict: PASS only when every configured dimension passes for at least one supported agent. Lift is reported as diagnostic evidence and does not override this gate. +- The 50% attempt pass threshold is a separate per-task gate; it is not the dimension pass threshold. +- Effectiveness is the equal-weight mean of goal completion (`goal_accuracy`) and expected workflow adherence (`behavior_check`). +- Efficiency is 50% tool-call productivity (the backward-compatible `skill_efficiency` wire id) and 50% `token_efficiency`. Positive-case skill routing is scored under Discoverability, not Efficiency; a negative case without a routing target is N/A. N/A sources are omitted, remaining weights are renormalized, and the dimension is marked partial. + +Signals present in this run: + +- `security` (Security): unsafe operations, secret leakage, and unauthorized access. +- `skill_execution` (Skill Execution): whether the expected skill was selected, decoys were avoided, and the workflow executed. +- `skill_efficiency` (Tool Productivity): tool-call productivity (legacy wire id; routing is scored under Discoverability). +- `accuracy` (Accuracy): final-answer correctness against the reference answer. +- `goal_accuracy` (Goal Accuracy): whether the user's goal was achieved. +- `behavior_check` (Behavior Check): whether the expected workflow behavior was followed. +- `token_efficiency` (Token Efficiency): actual uncached prompt plus completion usage (50% of Efficiency). + +
+ +## Freshness + +Regenerate this benchmark when the skill, evaluation dataset, target agent/model, evaluator version, environment, or scoring policy changes. diff --git a/skills/pva-doctor/README.md b/skills/pva-doctor/README.md new file mode 100644 index 000000000..b9e5c00be --- /dev/null +++ b/skills/pva-doctor/README.md @@ -0,0 +1,155 @@ + + +# PVA development skills + +Agent skills for creating, changing, or repairing NVIDIA PVA operators +in your PVA SDK application or PVA Solutions source tree. They turn +requirements into code, verify it on Tegra hardware, and repair failures within +a debug budget. + +## Skills + +| Skill | Purpose | +| --- | --- | +| [Doctor](https://github.com/NVIDIA/skills/blob/main/skills/pva-doctor/SKILL.md) | Check the SDK, toolchain, project, target, and SDK references. | +| [Setup](https://github.com/NVIDIA/skills/blob/main/skills/pva-setup/SKILL.md) | Install missing SDK, NVVPU, and L4T runtime components, then rerun Doctor. | +| [Spec](https://github.com/NVIDIA/skills/blob/main/skills/pva-spec/SKILL.md) | Define operator behavior, correctness tests, and the OpGen handoff. | +| [OpGen](https://github.com/NVIDIA/skills/blob/main/skills/pva-opgen/SKILL.md) | Generate and integrate the operator, then invoke Build-Test and Debug. | +| [Build-Test](https://github.com/NVIDIA/skills/blob/main/skills/pva-build-test/SKILL.md) | Build, verify correctness on hardware, and measure requested performance cases. | +| [Debug](https://github.com/NVIDIA/skills/blob/main/skills/pva-debug/SKILL.md) | Diagnose and repair a reproduced failure. | + +## Prerequisites + +- An authenticated coding agent with local skill support and shell/file access. + See [agent support](#agent-support) below. +- A development host running regular x86-64 Ubuntu supported by the requested SDK. +- An Arm64 Jetson board running compatible Jetson Linux (L4T), with working + key-based SSH and a trusted host key. +- A matching SDK installation guide (file or URL), access to its installer, + and administrative permissions for required installation steps. +- A writable project: your PVA SDK application or a PVA Solutions source package + or checkout. This is where OpGen adds or changes code. Install Git LFS if the + project uses it. + +When PVA Solutions is selected, Setup uses +[NVIDIA/PVA-Solutions](https://github.com/nvidia/pva-solutions) by default and +clones into the supplied project path, or `$WORK_DIR/source` when omitted. +It reuses an existing source tree and accepts another repository or archive. +Doctor checks the selected source and reports missing required files. + +Run the agent and build tools on the development host. `PVA_BUILD_MODE=L4T` +cross-compiles there for execution on the board. `PVA_BUILD_MODE=EMU` builds +for emulation on the development host. + +Setup installs or reuses the SDK, NVVPU, required build and reference tools, +and board runtime. EMU is optional. Setup calls Doctor before +making changes and again afterward; no existing Doctor report is required. +Setup reads the installer URL from the guide. Supply a separate installer path +or URL only when the guide does not provide one. The guide and installer must +match the requested SDK release. +Setup reads the board's installed BSP and checks SDK compatibility. Supply an +expected BSP release only when you want to require a specific release. + +## Set up a workspace + +Copy all six PVA skill folders from the public +[NVIDIA skills catalog](https://github.com/NVIDIA/skills/tree/main/skills) +into `$HOME/pva-sdk-skills`. Keep each folder's scripts, references, and assets. +The resulting layout is `$HOME/pva-sdk-skills/pva-setup/SKILL.md`, and the +same layout for the other five skills. + +```bash +git clone --depth 1 https://github.com/NVIDIA/skills.git "$HOME/nvidia-skills" +mkdir -p "$HOME/pva-sdk-skills" +for pva_skill in pva-setup pva-doctor pva-spec pva-opgen pva-build-test pva-debug; do + cp -R "$HOME/nvidia-skills/skills/$pva_skill" "$HOME/pva-sdk-skills/" +done +``` + +Use a separate workspace for each operator task. Replace the project path below +with your writable PVA SDK application or PVA Solutions source directory. + +```bash +mkdir -p "$HOME/operator_test/my_operator" +cd "$HOME/operator_test/my_operator" +ln -s "/absolute/path/to/your/project" source + +pva_skill_dir=.claude/skills # For Codex, use .agents/skills +mkdir -p "$pva_skill_dir" +for pva_skill in "$HOME/pva-sdk-skills"/pva-*; do + ln -s "$pva_skill" "$pva_skill_dir/" +done +``` + +Reload skills or restart the agent session after creating the links. +`source/` points to the project OpGen will modify; the surrounding workspace +holds your inputs, generated configuration, and reports. Each skill carries its +required scripts and templates. Install all six for the full workflow; +OpGen invokes Build-Test and Debug by their installed skill names. +Generated SDK references belong in `references/sdk/` in this workspace. +Doctor records their verified absolute location in its report. + +## Agent support + +- **Claude Code:** Used for the recorded operator runs and the commands below. +- **Codex:** Supports [local skills](https://learn.chatgpt.com/docs/build-skills#where-to-save-skills) + in `.agents/skills`, invoked with `$pva-spec` or another skill name. + These skills include `agents/openai.yaml` metadata. OpGen uses the agent's + available skill mechanism for Build-Test and Debug. Without a callable skill + tool, it loads the child skill's `SKILL.md` and executes its full workflow + before resuming OpGen with the reports and verdict. + +## Run Setup → Doctor → Spec → OpGen + +Create `requirements.md` in the workspace: operator name/path, task mode (`new`, +`change`, or `repair`), required behavior, supported inputs, API, and performance +requirements. For an existing operator, include relevant source and test paths. + +Run these **headless Claude Code commands** one at a time from the development +host's workspace. Replace the guide and board settings below. Setup resolves +the SDK release, installer, package names, and installation paths from the +guide and package metadata. Package paths are not fixed in the skill. +You can provide an explicit SDK release or path override when needed. + +```bash +export PVA_OPERATOR_MAX_DEBUG_ATTEMPTS=3 + +# 1. Setup: check and prepare the host and board +claude -p "Run pva-setup for spec, opgen, and build-test. +Installation guide: http://docs.nvidia.com/pva/sdk/installation.html. +Target: user@; PVA generation: . +Project: $PWD/source; work directory: $PWD." + +# 2. Doctor: verify readiness after Setup +claude -p "Run pva-doctor for spec, opgen, and build-test using +$PWD/reports/pva-setup-report.md. +Project: $PWD/source; work directory: $PWD." + +# 3. Spec: run after Doctor is ready +# Spec runs its finalizer to create and validate configure/opgen-inputs.json. +claude -p "Invoke pva-spec through the Skill tool using +$PWD/requirements.md and $PWD/reports/doctor-report.md. +Project: $PWD/source; work directory: $PWD." + +# 4. OpGen: run after Spec returns CONFIGURED +claude -p "Invoke pva-opgen through the Skill tool using $PWD/configure/opgen-inputs.json." +``` + +Doctor writes `$WORK_DIR/reports/doctor-report.md` automatically. The examples +use `$PWD` as the work directory so Spec and OpGen can use the resulting files. + +OpGen runs Build-Test and invokes Debug as needed. Read the final result in +`reports/opgen-report.md`. + +See [reference maintenance](https://github.com/NVIDIA/skills/blob/main/skills/pva-doctor/references/reference-maintenance.md) for SDK-reference +regeneration and upgrades. + +## Maintaining the helpers + +Spec owns [finalize_opgen_inputs.py](https://github.com/NVIDIA/skills/blob/main/skills/pva-spec/scripts/finalize_opgen_inputs.py). +OpGen ships [an identical copy](https://github.com/NVIDIA/skills/blob/main/skills/pva-opgen/scripts/finalize_opgen_inputs.py) +so handoff validation works when the skills are installed separately. +After changing the Spec helper, update the OpGen copy too. +Generated SDK references and operator reports belong in the operator workspace. diff --git a/skills/pva-doctor/SKILL.md b/skills/pva-doctor/SKILL.md new file mode 100644 index 000000000..8fef92a66 --- /dev/null +++ b/skills/pva-doctor/SKILL.md @@ -0,0 +1,343 @@ +--- +name: pva-doctor +description: >- + Check whether a host is ready for requested NVIDIA PVA work. Use before Spec, + OpGen, Build-Test, or Debug. Verify references to the installed SDK + documentation, inspect only the requested capabilities, and prove that either + NVVPU or ASIP/Chess can compile target VPU code when L4T compilation is + required. Report READY, READY_WITH_LIMITATIONS, or NOT_READY. Do not install + or configure software. +metadata: + author: "Venkat Balan " +--- + + + +# Check a PVA development environment + +Check only the capabilities that the user requests. Record other capabilities +as notes. Do not let them lower the verdict. + +Do not install software. Do not change host or target settings. Do not print a +license value, credential, token, or private key. + +## Get the inputs + +Resolve these inputs: + +- Requested capabilities: one or more of `spec`, `opgen`, `build-test`, + or `debug`. +- PVA SDK root and requested version; record the installed version separately. + An absent installation is a check failure, not a missing user input. +- PVA generation: `GEN2`, `GEN3`, or both. +- Project type: PVA SDK application or PVA Solutions source. +- Project path and version, when a project is in scope. +- EMU policy: `optional` by default, or `required` when the user + requires it. +- Work directory (`WORK_DIR`). Default to `./pva-operator/`. +- Optional features, such as CUDA or NvSci interoperability. + +For direct target work, also resolve the target address, user, port, +known-hosts file, and PVA generation. An expected BSP release is optional. +Do not guess a credential, user, proxy, or transport. + +Use this scope table: + +| Capability | Required checks | +| --- | --- | +| `spec` | References, SDK identity, project read access, and Python. | +| `opgen` | References, writable project, build tools, L4T compiler, target access, and `PVA_OPERATOR_MAX_DEBUG_ATTEMPTS`. | +| `build-test` | References, build tools, L4T compiler, transfer tools, and target access. | +| `debug` | References and only the tools, source access, and target access needed for the supplied failure. | + +## Resolve paths + +`SKILL_ROOT` is the absolute directory containing this skill's `SKILL.md`, +after resolving symlinks. Bundled files are relative to that directory. Resolve +user-supplied relative paths, including `WORK_DIR` and `PVA_SDK_ROOT`, against +the invocation directory before changing directories. + +Set `SDK_REFERENCES` to `$WORK_DIR/references/sdk`. Keep generated references +outside installed skill directories and the SDK documentation tree, including +through symlinks. Reject an overlapping destination before creating directories. + +## Verify the local references + +First inspect the selected SDK root and packaged documentation. If the SDK is +absent, record required `sdk-installation` and `public-reference-corpus` checks +as `FAIL`, with the inspected path and requested version. If the SDK exists +but required documentation is missing, record `public-reference-corpus` as +`FAIL` and identify the missing files. Do not run materialization, read a +nonexistent generated index, or invent an installed version or lock hash. + +Continue independent host, project, and target checks within the requested +scope. Skip probes that need the missing SDK or documentation and explain why +they were not performed. Write the report even when setup is incomplete. +Return `NOT_READY` and recommend that the user invoke `pva-setup` for the +missing installation components; do not invoke Setup or install anything. +An absent optional emulator remains neutral. + +Doctor only checks SDK references. Do not create, replace, or repair the corpus, +even when reference writes are authorized. If references are missing, outdated, +or damaged, record the exact path and verification failure, return `NOT_READY`, +and recommend that the user run `pva-setup` for the same SDK and work directory, +then rerun Doctor. Setup runs the materializer; a cache failure alone does not +require reinstalling the SDK. Do not give manual `sync` commands as the next action. + +Record this required check as `public-reference-corpus` in the Doctor report. +Set it to `PASS` only after `verify` succeeds for the selected SDK below; +record a failed verification or a missing required source as `FAIL`. Use +`LIMITATION` only when sources exist but verification was not performed. + +Check `python3 --version` first; the materializer requires Python 3.9 or newer. +A missing prerequisite is `FAIL`. `verify` needs no PDF converter; mark the +`pdftotext` check `NOT_REQUESTED` in Doctor. + +Require: + +- `$SKILL_ROOT/scripts/materialize_sdk_references.py` +- `$SKILL_ROOT/references/sdk-doc-sources.json` +- `$PVA_SDK_ROOT/share/doc/VERSION` +- The packaged SDK HTML files and the Orin and Thor Programmer's Guide PDFs. + +If `$SDK_REFERENCES/` or its lock is absent, record `public-reference-corpus` +as `FAIL` and leave the missing paths absent. Otherwise run this read-only check: + +```bash +python3 "$SKILL_ROOT/scripts/materialize_sdk_references.py" verify \ + --manifest "$SKILL_ROOT/references/sdk-doc-sources.json" \ + --sdk-doc-root "$PVA_SDK_ROOT/share/doc" \ + --output-dir "$SDK_REFERENCES" +``` + +Record the absolute `sdk_reference_root` and the SHA-256 of +`$SDK_REFERENCES/reference-lock.json` as `sdk_reference_lock_sha256` in the +report, together with the selected SDK version and verification command/result. +Record a hash only after successful verification. Consumers use these report +fields; they do not infer a corpus location from their installation or CWD. + +After successful verification, read the `pva-doctor` route in +`$SDK_REFERENCES/index.md`. Resolve links from each generated +Markdown file relative to that file. Use only the local Markdown that applies +to this check. + +## Use these check results + +- `PASS`: A direct check proves the capability. +- `LIMITATION`: A required operation is not proved, but no check failed. +- `FAIL`: A required item is absent, incompatible, or unusable. +- `NOT_AVAILABLE`: An optional capability is unavailable. +- `NOT_REQUESTED`: The check is outside the requested scope. + +Record whether each check is required, plus its command, result, evidence, and +remediation. Required checks use `PASS`, `LIMITATION`, or `FAIL`. +`NOT_AVAILABLE` and `NOT_REQUESTED` are only for non-required checks and do not +lower the verdict. Redact all secrets. + +## Check the host and SDK + +For the requested scope: + +1. Record the host operating system and architecture. +2. Check the matching SDK release notes. If they are unavailable, record a + `LIMITATION` and continue direct probes. +3. Check each required executable with `command -v` and its version command. +4. Read the CMake requirement from the selected SDK's Build System and + Installation documentation. Check additional minimums only for requested + features, such as CUDA interoperability; record the local citation. +5. For L4T, discover compiler names and paths from the selected SDK toolchain + and its Installation documentation. Probe those executables, including a + user-supplied toolchain when configured. +6. Check `ssh`, `scp`, and `tar` only for direct target work. +7. Check `sha256sum` or `shasum -a 256` for evidence manifests. +8. Require `PVA_OPERATOR_MAX_DEBUG_ATTEMPTS` only for `opgen`. This environment + variable caps Debug invocations after failed Build-Test runs; `0` disables + automatic repair. Require a non-negative integer and use the inherited + value. Do not load an arbitrary `.env` file. +9. Confirm the SDK root is readable. Discover the files needed for the requested + capability from its package metadata, CMake configuration, and matching SDK + documentation instead of requiring a fixed subdirectory list. +10. Check required packages with package metadata when it is available. Do not + construct a package name from a version. +11. Create a temporary CMake project outside the SDK. Put + `find_package(pva-sdk REQUIRED)` before `project(...)` when using the SDK's + toolchains: the SDK's Build System / CMake Scripts section requires this + order to select the toolchain before CMake enables languages. With an + explicit custom toolchain, follow the selected SDK's documented setup. + Configure with the requested SDK root; confirm the selected package and path. +12. Remove the temporary project. + +Do not accept a directory as proof that an executable works. +If an SDK requirement cannot be established, record a required `LIMITATION` +and the available probe evidence instead of guessing a version or layout. + +## Check the project + +When PVA Solutions is selected, use the supplied project path or +`$WORK_DIR/source`. Record a required `pva-solutions-source` check. Verify that +the directory and its documented build files are present and readable, and +check any requested version using local metadata. Record the absolute path, +version, and repository URL and commit when Git metadata is available. +Accept a supplied source archive or another checkout; do not require a specific +remote URL or a private repository layout. + +A missing or incomplete required source tree, or a confirmed version mismatch, +is `FAIL`. If its identity or requested version cannot be verified, record +`LIMITATION`. Continue these checks even when the SDK is missing. Recommend +`pva-setup`, which defaults to https://github.com/nvidia/pva-solutions.git; +do not clone, fetch, or restore files in Doctor. For a standalone SDK +application, mark `pva-solutions-source` as non-required `NOT_REQUESTED`. + +When a project is in scope: + +1. Verify its supplied version from local build or package metadata. +2. Confirm that required build files are readable. +3. Prove write access with a temporary file only for `opgen` or `debug`. + Remove the file. +4. Read local minimum and default SDK settings. Use a configure or build probe + to prove compatibility. +5. Check CUDA, NvSci, DLInference, Git, or Git LFS only when the requested work + needs them. Git metadata is optional for an extracted source archive. +6. When compilation is requested, record `project-lfs-assets-` for each + build mode, such as `l4t` or `emu`. Identify needed LFS assets from local + build rules and LFS metadata, including required submodules. Check that + each working file exists, is readable, and is not an unresolved LFS pointer + (first line `version https://git-lfs.github.com/spec/v1`). An installed LFS + tool or a cached object alone does not prove the working file is present. + Apply the file check to extracted source archives too. + +Record the mode, required status, affected paths, evidence, and remediation. +Missing assets for a required mode are `FAIL`. Missing optional EMU assets +are `NOT_AVAILABLE`, with EMU status `UNAVAILABLE`; required L4T checks +continue. Record `NOT_REQUESTED` when a mode needs no LFS assets. If the needed +asset set cannot be established, record a required `LIMITATION`, or optional +EMU `NOT_AVAILABLE` with status `UNPROVED`, and explain the evidence gap. +This asset check reads files only; it does not build, link, run, or fetch assets. + +Do not require a private repository layout. + +## Check target compilation + +Run this check only when the requested scope needs an L4T build. + +Discover NVVPU and ASIP/Chess automatically. Do not ask the user to select a +backend. + +For NVVPU: + +1. Check installed package metadata or equivalent SDK files. +2. Check the CMake toolchain and compiler executable. +3. Do not accept their presence as final proof. + +For ASIP/Chess: + +1. Resolve the ASIP Programmer from the CMake option, environment, or + documented default. +2. Check the release for the selected PVA generation. +3. Check its executable tools. +4. Check `LM_LICENSE_FILE` or `SNPSLMD_LICENSE_FILE`. Do not print either + value. +5. For a license file, check that it is readable. For a server, report only + that a server specification exists. + +When build probes are permitted, use a supplied project or SDK sample: + +1. Try NVVPU first when its required files are present. +2. Configure L4T for the requested generation in a new build directory. +3. Build one VPU target in the foreground. +4. If NVVPU does not succeed, try ASIP/Chess in a separate build directory. +5. Record the backend, executable, compiler model, command, and exit code. +6. Remove each temporary build directory. + +Use these rules: + +- A successful NVVPU build proves compiler readiness. Set ASIP and Synopsys + license checks to `NOT_REQUESTED`. +- A successful ASIP/Chess build proves compiler and license readiness. Report + NVVPU as an unused optional backend. +- Fail the compiler check only when neither backend can complete the probe. +- If no probe is permitted, report a required `LIMITATION`. Do not return + `READY` from files or environment values alone. + +## Check optional EMU support + +Check that the selected SDK documents and provides `PVA_BUILD_MODE=EMU` for +host emulation. Do not substitute another host execution tool. Keep EMU +settings separate from the NVVPU or ASIP/Chess compiler used for L4T builds. + +Before reporting EMU support as available, configure, build, and run a small +supplied EMU target in a temporary build directory outside the SDK. Record +the proved build mode, SDK selection, generation, compiler and other configure +options, plus the exact commands, exit codes, and logs in the report. Build-Test +reuses these settings with fresh project and build paths. Remove the temporary +build directory after saving the evidence. + +For a supplied project whose EMU build needs LFS assets, EMU status +`AVAILABLE` also requires its `project-lfs-assets-` check to pass. A +successful SDK sample does not override missing or unproved project assets. + +When EMU support is `optional`, report missing support as `NOT_AVAILABLE`. +Continue all required L4T checks. + +When EMU support is `required`, report a missing dependency or failed probe as +`FAIL`. If no probe is permitted, record `LIMITATION` and EMU status `UNPROVED`; +do not claim a working backend from package presence alone. + +Do not report EMU execution as hardware verification. + +## Check a direct Tegra + +Run this check only when the requested capability needs hardware access. + +Read the installed BSP release over SSH and check compatibility with the +selected SDK. Check an expected BSP release only when the user supplies one. +Record the installed release, compatibility source, and result. + +Use key or SSH-agent authentication in batch mode. Use the supplied +known-hosts file. Check the Arm64 architecture, BSP, cuPVA runtime version and +safety variant, required libraries, and permissions for the requested commands. +Use the supplied account without elevation where possible. Check administrative +permissions only for a requested operation that needs them, such as clock +configuration or privileged deployment. Accept a user-approved command-scoped +noninteractive method or an already prepared target; do not require unrestricted +passwordless `sudo`. Probe the specific permission without changing target state. + +Do not install packages or change target permissions. For a required operation, +record a demonstrated permission denial as `FAIL`, or an unproved permission as +`LIMITATION`, with the exact operation. Mark unneeded privileged operations +`NOT_REQUESTED`. An unavailable optional target capability is `NOT_AVAILABLE`. + +## Decide and report + +- `READY`: Every required check is `PASS`. When L4T compilation is required, + either NVVPU or ASIP/Chess passed the target build probe. +- `READY_WITH_LIMITATIONS`: No required check is `FAIL`, and at least one is + `LIMITATION`. +- `NOT_READY`: At least one required check is `FAIL`. + +Only checks marked required determine the verdict. Missing optional EMU +support (`NOT_AVAILABLE`) and out-of-scope checks (`NOT_REQUESTED`) are neutral. +A required capability must not be relabeled optional to avoid a failed check. + +Write `$WORK_DIR/reports/doctor-report.md` with +[the report template](assets/doctor-report-template.md). + +Return: + +```text +Verdict: READY | READY_WITH_LIMITATIONS | NOT_READY +Requested capabilities: +Required mode: L4T +EMU policy: +PVA generation: +Target compiler: +Failed checks: +Limitations: +Report: +Next action: +``` + +For each product fact, cite the SDK documentation root, local Markdown path, +packaged source path, source SHA-256, version, and section or PDF page. diff --git a/skills/pva-doctor/agents/openai.yaml b/skills/pva-doctor/agents/openai.yaml new file mode 100644 index 000000000..4cc66a0fc --- /dev/null +++ b/skills/pva-doctor/agents/openai.yaml @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +interface: + display_name: "PVA Doctor" + short_description: "Check public PVA development requirements" + default_prompt: "Use $pva-doctor to check whether this host is ready for my requested NVIDIA PVA work." diff --git a/skills/pva-doctor/assets/doctor-report-template.md b/skills/pva-doctor/assets/doctor-report-template.md new file mode 100644 index 000000000..a3f475242 --- /dev/null +++ b/skills/pva-doctor/assets/doctor-report-template.md @@ -0,0 +1,79 @@ + + +# PVA environment report + +Schema authority: skill workflow + +Generated at UTC: `