Skip to content

Add version-sentinel: dependency-version guardrail (agent + prompts + skill) 🤖🤖🤖 - #2477

Open
KSEGIT wants to merge 1 commit into
github:mainfrom
KSEGIT:add-version-sentinel
Open

Add version-sentinel: dependency-version guardrail (agent + prompts + skill) 🤖🤖🤖#2477
KSEGIT wants to merge 1 commit into
github:mainfrom
KSEGIT:add-version-sentinel

Conversation

@KSEGIT

@KSEGIT KSEGIT commented Jul 29, 2026

Copy link
Copy Markdown

What it is

version-sentinel is a dependency-version guardrail for AI coding agents. Before any dependency is added, bumped, downgraded, or installed, the intended version is verified against its upstream registry (npm, PyPI, crates.io, NuGet) and the check is recorded in a .version-sentinel/checks.json sidecar (24h freshness window). Deliberate pins are recorded as intentional:<reason> so audits can tell them apart from accidental drift.

Why it fits

Dependency/version verification is a top Copilot customization use-case: models routinely suggest package versions that are outdated, hallucinated, or yanked. This contribution turns "the model said so" into "verified against the registry within the last 24 hours", complementing existing verification entries like doublecheck and agent-supply-chain with a pre-install enforcement workflow.

What's included

File Type Description
agents/version-reviewer.agent.md Agent Read-only release-audit reviewer: runs the drift check across all repo manifests, groups results into DRIFT / intentional-pin / lookup-failed, ends with a release-readiness verdict
skills/version-sentinel/SKILL.md Skill The registry-verification workflow: how to satisfy a BLOCKED: version-sentinel hook, record checks via vs-record.sh, handle intentional pins, and audit drift before a release
plugins/version-sentinel/ Plugin Curated plugin bundling the agent + skill

The blocking PreToolUse hooks, guardrail scripts, and the two prompt files (vs-record.prompt.md, check-versions.prompt.md) live in the upstream repository and are linked from the plugin README and skill rather than vendored here (the upstream repo ships a GitHub Copilot–ready .github/hooks/version-sentinel.json).

Validation performed

  • npm run plugin:validate — ✅ all plugins valid
  • npm run skill:validate — ✅ all skills valid
  • npx @microsoft/vally-cli lint skills/version-sentinel — ✅ 2/2 checks passed
  • npm run build — ✅ README index tables and marketplace.json regenerated (included in this PR)

License

Upstream project is MIT licensed; contributions here are offered under this repo's MIT license per CONTRIBUTING.md.

Upstream: https://github.com/KSEGIT/Version-Sentinel (v0.4.0)

…lugin)

Contributes the version-sentinel guardrail from https://github.com/KSEGIT/Version-Sentinel (MIT):
- agents/version-reviewer.agent.md: read-only release-audit reviewer
- skills/version-sentinel/: registry-verification workflow skill
- plugins/version-sentinel/: curated plugin bundling both

README index tables and marketplace.json regenerated via npm run build.
@KSEGIT
KSEGIT requested a review from aaronpowell as a code owner July 29, 2026 10:39
Copilot AI review requested due to automatic review settings July 29, 2026 10:39
@github-actions github-actions Bot added agent PR touches agents new-submission PR adds at least one new contribution plugin PR touches plugins skills PR touches skills labels Jul 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 5 changed file(s).

Severity Count
🔴 High 0
🟠 Medium 0
ℹ️ Info 0

✅ No matching risk patterns were detected in changed files.

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Vally Lint Results

⚠️ Warnings or advisories found

Scope Checked
Skills 1
Agents 1
Total 2
Severity Count
❌ Errors 0
⚠️ Warnings 0
ℹ️ Advisories 1

Summary

Level Finding
ℹ️ Vally currently lints SKILL.md content. Agent files were detected but skipped:
Full linter output
### Linting skills/version-sentinel
✅ version-sentinel (2/2 checks passed)
    ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
        ✓ spec-compliance: All spec checks passed.
    ✓ [valid-refs] All file references across 1 skill(s) are valid.
        ✓ valid-refs: All file references resolve to existing files within the skill directory.

1 skill(s) linted, 1 passed

### Agent files detected (not linted by vally)
ℹ️ Vally currently lints SKILL.md content. Agent files were detected but skipped:
agents/version-reviewer.agent.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Version Sentinel dependency-version verification guidance and release auditing to the repository.

Changes:

  • Adds a dependency audit agent and verification skill.
  • Bundles both resources as a curated plugin.
  • Updates generated agent, skill, plugin, and marketplace catalogs.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
agents/version-reviewer.agent.md Adds the release-audit agent.
skills/version-sentinel/SKILL.md Documents the verification workflow.
plugins/version-sentinel/README.md Describes plugin usage and prerequisites.
plugins/version-sentinel/.github/plugin/plugin.json Defines plugin metadata and resources.
docs/README.agents.md Adds the agent catalog entry.
docs/README.skills.md Adds the skill catalog entry.
docs/README.plugins.md Adds the plugin catalog entry.
.github/plugin/marketplace.json Adds marketplace metadata.

Comment on lines +3 to +9
description: |
Verify dependency versions against upstream registries before adding, bumping, or changing them in package.json, requirements*.txt, constraints*.txt, pyproject.toml, Cargo.toml, *.csproj, *.fsproj, or *.vbproj. Use this skill when:
- A version-sentinel PreToolUse hook blocks a manifest edit or install command with `BLOCKED: version-sentinel`
- Adding or upgrading any third-party dependency and you need to confirm the version actually exists upstream
- Recording a deliberate version pin (CVE lock, compatibility constraint) so audits don't flag it as drift
- Auditing dependency freshness before tagging a release
- Any request like "verify this package version", "is this the latest lodash", or "check dependency drift"
Comment on lines +22 to +26
1. **Look up the latest version** on the upstream registry via web search or fetch:
- npm: `https://www.npmjs.com/package/<pkg>`
- pip / pyproject: `https://pypi.org/project/<pkg>/`
- cargo: `https://crates.io/crates/<pkg>`
- csproj (NuGet): `https://www.nuget.org/packages/<pkg>`

# Version Sentinel — Dependency-Version Guardrail Workflow

`version-sentinel` blocks dependency changes until you have verified the package version against its upstream registry. This prevents stale, hallucinated, or compromised versions from reaching your manifests. Checks are recorded in a `.version-sentinel/checks.json` sidecar and expire after a freshness window (default 24h).
@@ -0,0 +1,25 @@
{
"name": "version-sentinel",
"description": "Dependency-version guardrail for AI coding agents. Verifies every added or bumped package version against its upstream registry (npm, PyPI, crates.io, NuGet) so stale, hallucinated, or compromised versions never reach your manifests.",
@@ -0,0 +1,28 @@
# Version Sentinel

A dependency-version guardrail for AI coding agents. Before any dependency is added, bumped, downgraded, or installed, the intended version is verified against its upstream registry (npm, PyPI, crates.io, NuGet) and the check is recorded — so stale, hallucinated, or compromised package versions never reach your manifests.

- **DRIFT** — rows where current ≠ latest and no `intentional:` record. For each: ecosystem, pkg, current, latest, registry link, and the suggested `bash scripts/vs-record.sh ...` command to run before bumping.
- **intentional-pin** — rows the user has deliberately pinned. List with the recorded reason (pulled from the sidecar `.version-sentinel/checks.json`). Flag any pins older than 30 days as "re-review recommended".
- **lookup-failed** — registry fetch failed. List with the registry URL the user can check manually.

## Prerequisites

This agent expects the version-sentinel scripts to be present in the workspace (`scripts/check-versions.sh`, `scripts/vs-record.sh`). They ship with the upstream project at [KSEGIT/Version-Sentinel](https://github.com/KSEGIT/Version-Sentinel) (MIT). If the scripts are missing, tell the user where to get them and stop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent PR touches agents new-submission PR adds at least one new contribution plugin PR touches plugins skills PR touches skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants