Skip to content

Commit ac1316d

Browse files
committed
chore(docs): improved site metadata and tests
- Enhanced metadata handling in various layout files to improve SEO and user experience. - Introduced a new skill to verify the availability of NVIDIA Elements packages on npm and check the documentation site status. - Added a deterministic script for generating the availability report, including npm metadata checks and temporary project management. - Updated the pre-tool use hook to warn about destructive git operations in isolated VM environments. Signed-off-by: Cory Rylan <crylan@nvidia.com>
1 parent 1cda122 commit ac1316d

27 files changed

Lines changed: 825 additions & 63 deletions

File tree

.agents/hooks/pre-tool-use-bash.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ if [[ -z "$COMMAND" ]] || ! echo "$COMMAND" | grep -qE '(^|[;&|][[:space:]]*)git
1313
fi
1414

1515
block() {
16+
if [[ -n "${CURSOR_AGENT:-}" ]]; then
17+
echo "WARNING: Destructive git operation detected." >&2
18+
echo " Command: $COMMAND" >&2
19+
echo " Reason: $1." >&2
20+
echo "" >&2
21+
echo "Per AGENTS.md policy, destructive git operations require explicit user confirmation on user machines." >&2
22+
echo "In isolated VM environments, this hook is warning instead of blocking." >&2
23+
exit 0
24+
fi
25+
1626
echo "BLOCKED: Destructive git operation detected." >&2
1727
echo " Command: $COMMAND" >&2
1828
echo " Reason: $1." >&2
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
name: availability-report
3+
description: Generate a production availability report for NVIDIA Elements packages and documentation.
4+
---
5+
6+
You are an Elements package availability verification agent.
7+
8+
## Goal
9+
10+
Verify that the latest NVIDIA Elements packages are available on npm, confirm the documentation site is live, and generate a brief status report.
11+
12+
## Deterministic Script
13+
14+
Run the deterministic report script:
15+
16+
```shell
17+
node .agents/skills/availability-report/scripts/generate-availability-report.js
18+
```
19+
20+
The script is the source of truth for:
21+
22+
- package order through `PACKAGES`
23+
- docs URL order through `DOCS_URLS`
24+
- npm metadata checks
25+
- npm install checks
26+
- Node package resolution checks
27+
- docs URL checks
28+
- package version comparison
29+
- temporary project creation and cleanup
30+
- status calculation
31+
- report formatting
32+
33+
Do not repeat those lists or the report format in this skill. Update `scripts/generate-availability-report.js` instead.
34+
35+
## Script Behavior
36+
37+
The CLI prints the formatted report to standard output. It exits with code `1` only when the generated report has `overallStatus: "FAIL"`.
38+
39+
The exported API returns both the formatted report and structured data:
40+
41+
```js
42+
const { formattedReport, report } = await generateReport();
43+
```
44+
45+
Return or surface `formattedReport` as the generated report.
46+
47+
The script creates a temporary npm project with:
48+
49+
- `mkdtemp(path.join(os.tmpdir(), 'nvidia-elements-availability-report-'))`
50+
- `npm init -y`
51+
- `npm install --no-audit --no-fund ...`
52+
53+
It removes the temporary project before returning the report.
54+
55+
## Report Workflow
56+
57+
1. Run the deterministic script from the repository root.
58+
2. Return or surface the exact formatted report produced by the script.
59+
3. If the script exits non-zero after printing a report, still use the printed report and treat the exit code as the failure signal.
60+
61+
Do not rewrite, summarize, or recompute the generated report.
62+
63+
Report delivery is outside this skill.
64+
65+
## Debugging
66+
67+
- Use `--json` to print structured report data.
68+
- Use `--timestamp <iso-utc>` only for deterministic verification.
69+
- Stop early only for environment-level problems, such as missing `npm`.

0 commit comments

Comments
 (0)