Skip to content

feat(examples): add compliance-lint GitHub Action reference (Phase 3 of #1172)#1180

Merged
christso merged 1 commit intomainfrom
feat/1172-p3-compliance-action
Apr 27, 2026
Merged

feat(examples): add compliance-lint GitHub Action reference (Phase 3 of #1172)#1180
christso merged 1 commit intomainfrom
feat/1172-p3-compliance-action

Conversation

@christso
Copy link
Copy Markdown
Collaborator

Summary

Phase 3 of #1172 — additive, no core changes.

Ships a reference GitHub Action that uses the agentv-compliance skill (landed in Phase 1, #1178) to lint governance: blocks in changed *.eval.yaml files on pull_request events.

Files:

  • examples/governance/compliance-lint/compliance-lint.yml — reusable workflow; triggers on **/*.eval.yaml path changes; posts PR comment; exits non-zero on violations
  • examples/governance/compliance-lint/script/lint.py — extracts governance blocks, calls claude-haiku-4-5 with the skill loaded, returns { pass, violations[] } JSON
  • examples/governance/compliance-lint/README.md — adoption guide (5-minute setup, cost estimate, mandatory-gate instructions, customization)

Design choices:

  • Python + anthropic SDK: lightest CI setup, no Bun/Node dependency on CI runners
  • claude-haiku-4-5: ~$0.03 per 10-file PR (well under the 5¢ target documented in README)
  • Skill loaded once per run, passed as system prompt to all block lints in that run
  • PR comment is best-effort (skipped if GITHUB_TOKEN/PR_NUMBER/REPO are absent)
  • Not wired into agentv's own CI (opt-in only, as specified in issue non-goals)

Test plan

  • Pre-push hook passed: Build ✓ Typecheck ✓ Lint ✓ Test ✓ Validate eval YAML ✓
  • Manually verified lint.py against llm01-prompt-injection.eval.yaml (passes with no violations)
  • Verified malformed block produces clear violation report (risk_tier super_highrisk_tier_value violation with suggestion)
  • README documents adoption in under 5 minutes, cost estimate included
  • No mandatory CI gate added to agentv repo itself (non-goal per issue)

Closes #1172 (Phase 3, final)

#1172)

Reference workflow at examples/governance/compliance-lint/ that loads the
agentv-compliance skill and lints governance: blocks in changed *.eval.yaml
files on pull_request events. Posts violations as PR comments; exits non-zero
on pass: false. Uses claude-haiku-4-5 (~3c/10-file PR).

Closes #1172 (Phase 3)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@christso christso merged commit 4ef8d25 into main Apr 27, 2026
3 of 4 checks passed
@christso christso deleted the feat/1172-p3-compliance-action branch April 27, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: move governance metadata from typed core schema to agentv-compliance skill

1 participant