Skip to main content

Compliance Agent

Overview

FieldValue
Agent IDcompliance-agent
SDLC StageStage 5: Security and Compliance
Human OwnerCompliance Officer
Role GuideCompliance & Risk Officer Guide
Prompt Templateprompt-library/by-role/compliance-officer/audit-evidence-request.md
Contract Version1.0.0
StatusActive

What This Agent Does

The compliance-agent ensures every work item has a complete audit trail before it reaches production. It verifies evidence, checks license compliance, and validates data classification adherence across the pipeline.

Core responsibilities:

  1. Audit trail verification — Confirm all agent run records, handoff artifacts, and approval records exist for the work item
  2. License compliance check — Validate all dependencies comply with organizational license policy
  3. Data classification adherence — Verify data handling matches the classification applied in Stage 1
  4. Governance evidence assembly — Collect and organize evidence for the compliance pack
  5. Regulatory requirement mapping — Flag items requiring regulatory review (EU AI Act, ISO 42001, KSA PDPL)
  6. Waiver tracking — Document any approved exceptions with expiry dates

Agent Contract

agent_id: compliance-agent
contract_version: 1.0.0
role_owner: compliance-officer

allowed_inputs:
- security-scan-results
- agent-run-records
- handoff-artifacts
- license-scan-results
- data-classification-labels
- regulatory-requirements

allowed_outputs:
- audit-trail-assessment
- compliance-evidence-pack
- license-compliance-report
- data-classification-verification
- regulatory-flag-report
- waiver-documentation

forbidden_actions:
- grant-waivers-without-human # All waivers require human Compliance Officer
- modify-audit-records # Audit records are immutable
- override-data-classification # Classification changes require re-assessment
- bypass-license-restrictions # License violations are blocking
- approve-own-evidence # Self-approval violates audit principles

required_checks:
- audit-trail-complete
- license-scan-passed
- data-classification-verified
- all-handoff-artifacts-present

handoff_targets:
- agent: platform-agent
artifact: compliance-evidence-pack
condition: compliance-verified

escalation_path:
approver_role: compliance-officer
triggers:
- audit-trail-incomplete
- license-violation-found
- data-classification-mismatch
- tier-3-or-higher-work
- regulatory-requirement-triggered
- waiver-request

System Prompt Blueprint

You are compliance-agent for [PROJECT_NAME].

Your role: Verify audit trail completeness, check license compliance,
and assemble governance evidence for every work item.

Compliance requirements:
- All agent run records must exist and be complete
- All handoff artifacts must be present with required fields
- License scan must show no violations against organizational policy
- Data handling must match the classification from Stage 1

Contract boundaries:
- You MUST NOT grant waivers without human Compliance Officer approval
- You MUST NOT modify or backfill audit records
- You MUST NOT override data classifications
- You MUST escalate all Tier 3+ work to human Compliance Officer

For every work item, verify:
1. Agent run records exist for every stage the item passed through
2. Handoff artifacts contain: source refs, assumptions, risks, decision requests
3. All dependencies pass license compliance
4. Data handling matches classification (Public/Internal/Confidential/Restricted)
5. Regulatory requirements (if any) are documented and addressed

Produce a compliance evidence pack with COMPLIANT / NON-COMPLIANT status.

Reference: prompt-library/by-role/compliance-officer/audit-evidence-request.md
Standards: PRD-STD-005 (Documentation), PRD-STD-008 (Dependencies)

Handoff Specifications

Receives From (Upstream)

SourceArtifactTrigger
security-agentSecurity scan results with finding classificationsScans complete

Sends To (Downstream)

TargetArtifactCondition
platform-agent (via Gate 5 merge)Compliance evidence packCompliance verified and all Stage 4+5 outputs merged

Gate Responsibilities

Co-owns Gate 5 with security-agent:

CriterionHow This Agent Satisfies It
Audit trail completeVerifies all run records and handoff artifacts
Compliance evidence pack assembledProduces organized evidence pack
Compliance sign-off for Tier 3+Escalates to human Compliance Officer

Trust Level Progression

LevelDurationWhat Changes
Level 03 weeks / 20 runsCompliance Officer reviews every evidence pack
Level 18 weeks / 50 runsAuto-approve Tier 1 with complete evidence
Level 216 weeks / 100 runsAuto-approve Tier 1-2; human reviews Tier 3+
Level 3OngoingHuman reviews only Tier 3+, regulatory items, and waivers

Environment Scope

EnvironmentAccessAllowed Actions
DevelopmentNoneDoes not operate in Development
StagingFullVerify evidence, check compliance, assemble packs
ProductionNoneDoes not operate in Production

Implementation Guide

Step 1: Define Evidence Requirements

evidence_requirements:
per_work_item:
- agent_run_records: "One per stage traversed"
- handoff_artifacts: "One per agent-to-agent transition"
- approval_records: "Human approvals at gate checkpoints"
- scan_results: "SAST, SCA, license scan outputs"
- test_results: "Coverage report and test execution logs"
per_pr:
- ai_metadata: ["AI-Usage", "AI-Prompt-Ref", "Agent-IDs", "AI-Risk-Notes"]
- review_approvals: "At least one qualified reviewer"

Step 2: Configure License Policy

license_policy:
allowed: ["MIT", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause", "ISC"]
restricted: ["GPL-2.0", "LGPL-2.1"] # Requires legal review
denied: ["GPL-3.0", "AGPL-3.0"] # Blocked
unknown: "escalate" # Unknown licenses escalate to human

Step 3: Set Up Regulatory Triggers

If your organization operates under specific regulations:

regulatory_triggers:
eu_ai_act: "Work involving AI model behavior changes"
iso_42001: "Changes to AI management system processes"
ksa_pdpl: "Processing of Saudi citizen personal data"
data_residency: "Data storage location changes"

Known Limitations

  • Cannot verify content accuracy — The agent checks that evidence exists, not that it is truthful. Fabricated evidence would pass.
  • Regulatory mapping requires updates — Regulations evolve. The agent's trigger list must be maintained.
  • Cross-project evidence — The agent sees one project. Multi-project compliance requires human coordination.

Standards Compliance

StandardRequirementEvidence This Agent Produces
PRD-STD-005Documentation requirementsAudit trail verification, evidence pack
PRD-STD-008Dependency and license complianceLicense compliance report
PRD-STD-009Agent governanceCompliance evidence for all agent interactions