agentleFS
tethertotetherto/qvac/.agents/skills/qv-notice-generate/SKILL.md

qv-notice-generate

Skill697 starsChanged 18 days agoApache-2.0View on GitHub

Generate NOTICE files with third-party attributions for all packages in the monorepo.

  • Reads credentials
  • Installs packages

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 4 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Novel / unclassifiable licenses: When the gate blocks a High finding it cannot classify, run check-forbidden-licenses.js to investigate, …

    line 16
  2. Very specific:

    Before running, ensure .env is sourced and contains:

    line 30
  3. Very specific:

    Ask which package to generate NOTICE for (or --all for all packages)

    line 40
  4. Distinctive:

    Run the generator script — this writes NOTICE files directly

    line 42
  5. Very specific:

    If JS stdout is Found 0 JS dependencies while HEAD's NOTICE still has a JS section, restore that JS block from HEAD.

    line 43
  6. Very specific:

    Only use --dry-run if the user explicitly asks for it

    line 47
  7. Very specific:

    No files are written (NOTICE, NOTICE_LOG.txt, FORBIDDEN_LICENSES.txt)

    line 82
  8. Distinctive:

    All scans run fully (npm install, license-checker, pip-licenses, GitHub API, models)

    line 83
  9. Very specific:

    If violations are found, writes FORBIDDEN_LICENSES.txt to the repo root and exits with code 1.

    line 100
  10. Distinctive:

    Models (by engine): All addon packages, mapped by engine name

    line 133
  11. Very specific:

    JS: Every package with dependencies in package.json

    line 134
  12. Distinctive:

    All entries within every NOTICE file section are sorted deterministically using locale-independent collation.

    line 155

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

NOTICE File Generator

Generate deterministic, sorted NOTICE files for individual packages or all packages at once, covering model, JS, Python, and C++ dependency attributions.

Relationship to the CI license gate (this SKILL is the fallback)

As of QVAC-21554, license/compliance enforcement on Tier-1 PRs is primarily a CI gate — .github/workflows/license-compliance.yml, delegating to the org reusable workflow public-reusable-license.yml (design: tetherto/qvac-actions/docs/license-compliance-ci.md). The gate deterministically classifies newly added PR dependencies against the org policy (allow/deny/review), honours .github/license-allowlist.yml, and posts a PR comment.

This SKILL is now the human fallback for the long tail the gate cannot decide:

  • Novel / unclassifiable licenses. When the gate blocks a High finding it cannot classify, run check-forbidden-licenses.js to investigate, then record the decision in .github/license-allowlist.yml (CODEOWNERS-reviewed) or remove/replace the dependency. The gate is deterministic from then on.
  • Full transitive audit. The CI gate reads GitHub's dependency graph, which is manifest-only in this repo (package lockfiles are gitignored), so it does not resolve the full transitive tree. check-forbidden-licenses.js does a real npm install + license-checker (plus Python/C++/model scans) and is the tool for a complete audit — e.g. before a release, or when the gate's coverage is insufficient.
  • NOTICE authoring. The gate only verifies NOTICE presence (advisory). Generating/updating the NOTICE files themselves remains this SKILL's generate-notice.js job.

When to use this skill

Use when:

  • Generating or updating NOTICE files for any package
  • Adding new third-party dependencies that need attribution
  • Preparing a release that requires up-to-date NOTICE files
  • User invokes /qv-notice-generate

Prerequisites

Before running, ensure .env is sourced and contains:

  • GH_TOKEN -- GitHub token (access to private repos and GitHub API)
  • HF_TOKEN -- HuggingFace token (model license verification)
  • NPM_TOKEN -- npm registry token (private package resolution)

System requirements for Python scanning:

  • python3 and pip available in PATH (for pip-licenses)

Workflow

  1. Ask which package to generate NOTICE for (or --all for all packages)
  2. Source .env in the shell
  3. Run the generator script — this writes NOTICE files directly
  4. If JS stdout is Found 0 JS dependencies while HEAD's NOTICE still has a JS section, restore that JS block from HEAD. (npm install failed is written to gitignored NOTICE_LOG.txt, not stdout.) Keep successful model-scan additions. Do not commit a wiped JS section.
  5. Only use --dry-run if the user explicitly asks for it

Do NOT commit changes. The user will review and commit manually.

Running the scripts

Generate NOTICE for a specific package

source .env
node .agents/skills/qv-notice-generate/scripts/generate-notice.js <package-dir-name>

Example: node .agents/skills/qv-notice-generate/scripts/generate-notice.js sdk

For registry sub-packages use the full path:

  • registry-server/client
  • registry-server/shared

Generate NOTICE for all packages

source .env
node .agents/skills/qv-notice-generate/scripts/generate-notice.js --all

Dry-run (no file writes, safe for testing)

source .env
node .agents/skills/qv-notice-generate/scripts/generate-notice.js --all --dry-run
node .agents/skills/qv-notice-generate/scripts/generate-notice.js sdk --dry-run

In dry-run mode:

  • No files are written (NOTICE, NOTICE_LOG.txt, FORBIDDEN_LICENSES.txt)
  • All scans run fully (npm install, license-checker, pip-licenses, GitHub API, models)
  • NOTICE content is previewed in the console instead of written to disk

Check for disallowed licenses

source .env
node .agents/skills/qv-notice-generate/scripts/check-forbidden-licenses.js --all --dry-run
node .agents/skills/qv-notice-generate/scripts/check-forbidden-licenses.js --all

Uses an allowlist approach. The ALLOWED_LICENSES array in config.js controls which licenses pass:

  • Empty list (default) -- every license is allowed (open gate). Useful while you are still cataloguing your deps.
  • Populated list -- only those SPDX identifiers pass; anything else is a violation.

License strings from all sources (npm, PyPI, GitHub, models) are normalized to canonical SPDX ids before comparison, so adding apache-2.0 to the list automatically covers Apache 2.0, Apache Software License, Apache License 2.0, etc.

If violations are found, writes FORBIDDEN_LICENSES.txt to the repo root and exits with code 1.

Important: The agent should NOT edit ALLOWED_LICENSES directly. Present the scan results to the user and let them decide which licenses to allow. The allowlist and normalization map live in .agents/skills/qv-notice-generate/scripts/constants.js.

Generate license overview report

node .agents/skills/qv-notice-generate/scripts/generate-report.js

Reads existing NOTICE files across all packages (no scanning, no tokens needed) and produces NOTICE_FULL_REPORT.txt with:

  • Global license distribution with counts and percentages
  • Per-package breakdown by dependency type (models, JS, Python, C++)
  • Packages with no dependencies listed separately

What it produces

  1. Per-package NOTICE file inside each scanned package directory (from generate-notice.js)
  2. NOTICE_FULL_REPORT.txt license overview report (from generate-report.js, gitignored)
  3. NOTICE_LOG.txt at the repo root with errors/warnings (gitignored)

Scan types

TypeWhatTool
ModelsModel attributions from models.prod.jsonDirect JSON parsing
JSProduction npm dependencies (no peers / extraneous)npm install --omit=dev --omit=peer + license-checker, intersected with npm ls
PythonBenchmark/script Python depspip-licenses (auto-installed in temp virtualenv)
C++vcpkg native dependenciesGitHub API + local portfile parsing

Package coverage

  • Models (full list): sdk, inference, registry-server/client
  • Models (by engine): All addon packages, mapped by engine name
  • JS: Every package with dependencies in package.json
  • Python: Packages with requirements.txt or pyproject.toml in benchmarks/scripts
  • C++: Packages with vcpkg.json

Addon-to-engine mapping

Package directoryEngine
embed-llamacpp@qvac/embed-llamacpp
llm-llamacpp@qvac/llm-llamacpp
translation-nmtcpp@qvac/translation-nmtcpp
tts-onnx@qvac/tts-onnx
asr-ggml@qvac/transcription-whispercpp, @qvac/asr-ggml
diffusion-cpp@qvac/diffusion-cpp

asr-ggml carries two engine keys because the whisper + parakeet packages were unified: models.prod.json still names the retired @qvac/transcription-whispercpp engine until the SDK/registry repoint lands.

Sorting guarantee

All entries within every NOTICE file section are sorted deterministically using locale-independent collation. Re-runs on identical input always produce identical output, resulting in clean git diffs.

Related scripts

  • Model license verification: npm run verify:licenses in packages/registry-server -- verifies model licenses in models.prod.json against HuggingFace/GitHub APIs (dry-run only, console output, fails on unverifiable).

References

  • Constants (allowlist, normalization, copyright): .agents/skills/qv-notice-generate/scripts/constants.js
  • Package definitions & internal wiring: .agents/skills/qv-notice-generate/scripts/lib/config.js
  • SDK pod ownership: .github/teams/sdk.json

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.