Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions examples/governance/compliance-lint/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Governance Compliance Lint Action

A reference GitHub Action that lints `governance:` blocks in changed `*.eval.yaml` files
using the `agentv-compliance` skill. The same skill that powers AI authoring also powers
using the `agentv-governance` skill. The same skill that powers AI authoring also powers
CI enforcement — no separate runtime package needed.

## How it works

1. On every PR touching `*.eval.yaml` files, the Action extracts `governance:` blocks from
each changed file (suite-level and per-case).
2. Each block is passed to Claude with the `agentv-compliance` skill loaded.
3. Claude applies the rules in `plugins/agentv-dev/skills/agentv-compliance/references/lint-rules.md`
2. Each block is passed to Claude with the `agentv-governance` skill loaded.
3. Claude applies the rules in `plugins/agentv-dev/skills/agentv-governance/references/lint-rules.md`
and returns a structured JSON report (`{ pass: bool, violations: [...] }`).
4. The Action posts a summary as a PR comment and exits non-zero on any `pass: false` result.

Expand All @@ -29,12 +29,12 @@ Name: `ANTHROPIC_API_KEY`, value: your key from console.anthropic.com.
### 3. Point at your skill location (optional)

By default the workflow looks for the skill at
`plugins/agentv-dev/skills/agentv-compliance/` relative to the repo root.
`plugins/agentv-dev/skills/agentv-governance/` relative to the repo root.
If your skill lives elsewhere, set `SKILL_PATH` in the workflow env:

```yaml
env:
SKILL_PATH: path/to/your/agentv-compliance
SKILL_PATH: path/to/your/agentv-governance
```

### 4. Push a PR with a `*.eval.yaml` change
Expand Down Expand Up @@ -83,7 +83,7 @@ This Action is **opt-in** by default. To make it mandatory:

## Customising the rules

Edit `plugins/agentv-dev/skills/agentv-compliance/references/lint-rules.md` to add, remove,
Edit `plugins/agentv-dev/skills/agentv-governance/references/lint-rules.md` to add, remove,
or adjust rules. The Action picks up changes automatically on the next run — no code change needed.

## Files
Expand All @@ -98,7 +98,7 @@ examples/governance/compliance-lint/

The skill lives at:
```
plugins/agentv-dev/skills/agentv-compliance/
plugins/agentv-dev/skills/agentv-governance/
├── SKILL.md
└── references/
├── governance-yaml-shape.md
Expand Down
6 changes: 3 additions & 3 deletions examples/governance/compliance-lint/compliance-lint.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Governance Compliance Lint

# Lints governance: blocks in changed *.eval.yaml files using the agentv-compliance skill.
# Lints governance: blocks in changed *.eval.yaml files using the agentv-governance skill.
# Posts violations as PR comments and exits non-zero on any failure.
#
# Adoption: copy this file to .github/workflows/compliance-lint.yml in your repo.
# Required secret: ANTHROPIC_API_KEY
# Optional: point SKILL_PATH at a fork of plugins/agentv-dev/skills/agentv-compliance/
# Optional: point SKILL_PATH at a fork of plugins/agentv-dev/skills/agentv-governance/

on:
pull_request:
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
CHANGED_FILES: ${{ steps.changed.outputs.files }}
SKILL_PATH: ${{ github.workspace }}/plugins/agentv-dev/skills/agentv-compliance
SKILL_PATH: ${{ github.workspace }}/plugins/agentv-dev/skills/agentv-governance
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
Expand Down
8 changes: 4 additions & 4 deletions examples/governance/compliance-lint/script/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
Governance compliance lint script.

Reads each changed *.eval.yaml file, extracts governance: blocks, and calls
the Claude API with the agentv-compliance skill loaded to lint them.
the Claude API with the agentv-governance skill loaded to lint them.
Posts violations as a PR comment and exits non-zero on any failure.

Environment variables:
ANTHROPIC_API_KEY - required
CHANGED_FILES - space-separated list of changed eval file paths
SKILL_PATH - path to the agentv-compliance skill directory
SKILL_PATH - path to the agentv-governance skill directory
GITHUB_TOKEN - for posting PR comments (optional; skipped if absent)
PR_NUMBER - GitHub PR number (optional)
REPO - GitHub repo in "owner/repo" form (optional)
Expand All @@ -32,7 +32,7 @@
# ---------------------------------------------------------------------------

MODEL = "claude-haiku-4-5-20251001"
SKILL_PATH = Path(os.environ.get("SKILL_PATH", "plugins/agentv-dev/skills/agentv-compliance"))
SKILL_PATH = Path(os.environ.get("SKILL_PATH", "plugins/agentv-dev/skills/agentv-governance"))
CHANGED_FILES = os.environ.get("CHANGED_FILES", "").split()


Expand All @@ -42,7 +42,7 @@ def load_skill_content() -> str:

skill_md = SKILL_PATH / "SKILL.md"
if skill_md.exists():
parts.append(f"# Skill: agentv-compliance\n\n{skill_md.read_text()}")
parts.append(f"# Skill: agentv-governance\n\n{skill_md.read_text()}")

refs_dir = SKILL_PATH / "references"
if refs_dir.is_dir():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: agentv-compliance
name: agentv-governance
description: >-
Author, edit, and lint `governance:` blocks in `*.eval.yaml` files.
Use when creating or updating evaluation suites that carry AI-governance metadata
Expand Down
Loading