agile-v-compliance

$npx mdskill add Agile-V/agile_v_skills/agile-v-compliance

Manages risk, CAPAs, human approvals, AI security, and periodic revalidation.

  • Tracks risk register with severity matrix and human gate approvals.
  • Depends on agile-v-core and append-only risk register file.
  • Triggers CAPA on critical findings, recurring NCs, or regression failures.
  • Outputs records to CAPA log and risk register for audit readiness.

SKILL.md

.github/skills/agile-v-complianceView on GitHub ↗
---
name: agile-v-compliance
description: Risk management, CAPA protocol, human gate approval records, AI agent security controls, and periodic revalidation. Load when running gates, handling CAPAs, or auditing compliance and security posture.
license: CC-BY-SA-4.0
metadata:
  version: "1.4"
  standard: "Agile V"
  compliance: "ISO 9001 6.1, ISO 13485 8.5, ISO 27001 A.5.23/A.8.3, 21 CFR Part 11, GxP/GAMP 5"
  author: agile-v.org
  sections_index: ["Risk Management", "CAPA Protocol", "Human Gate Approval Records", "AI Agent Security Controls", "Periodic Review & Revalidation"]
---

# Instructions

Compliance protocols for Agile V. Requires **agile-v-core** loaded first.

## Risk Management (ISO 9001 6.1 / AS9100D 8.1.1)

Append-only, cycle-tagged register in `.agile-v/RISK_REGISTER.md`: `RISK-ID | Cycle | Category | Description | Likelihood | Impact | Severity | Mitigation | Owner | Status`

**Categories:** Technical, Process, Compliance, Security. **Severity matrix:** High x High = Critical, High x Med = High, High x Low / Med x Med = Medium, rest = Low. Critical risks require Human resolution or documented acceptance before Gate 2.

**When:** Stage 1 = Req Architect identifies. Stage 2 = Logic Gatekeeper flags constraints. Stage 4 = Red Team finds residual. Cycle boundary = Compliance Auditor reviews.

## CAPA Protocol (ISO 13485 8.5 / ISO 9001 10.1-10.2)

**Triggers:** CRITICAL finding, recurring NC across cycles, regression FAIL with no CR, 3-attempt escalation.

Record in `.agile-v/CAPA_LOG.md`: `CAPA-XXXX` with Cycle, Trigger, Nonconformity, Root Cause (5-Whys), Corrective Action, Preventive Action, Effectiveness Verification, Status (open -> corrective-complete -> preventive-complete -> verified-effective -> closed), Owner.

**Workflow:** Detect -> Record -> Analyze -> Correct -> Prevent -> Verify effectiveness. Compliance Auditor tracks open CAPAs at Gate 2, flags overdue (>2 cycles).

## Human Gate Approval Records (21 CFR Part 11 / Annex 11)

Append-only in `.agile-v/APPROVALS.md`: `GATE-XXXX` with Gate type, Cycle, Scope, Decision (Approved/Conditional/Rejected), Conditions, Approver (full name), Role/Authority, Timestamp (ISO 8601), Signature Method, Evidence Reference (commit hash). **Durable HITL (Phase 2):** when closing a pending interrupt, include `resume_token=[value]` and `INTERRUPT-ID=[INT-XXXX]` matching `.agile-v/CHECKPOINTS.md`; Compliance Auditor verifies token pairing on Gate 2.

**Rules:** Name + role required (not just "Human"). Authority from matrix in config.json. Rejected = pipeline halts.

**Checkpoint SLA:** If `CHECKPOINTS.md` shows `due_at` passed with `PENDING`, escalate per project policy; append `ESCALATED` or `EXPIRED` row before forcing resume.

| Regulatory Context | Minimum Signature |
|---|---|
| Non-regulated | APPROVALS.md entry with name + timestamp |
| ISO 9001/27001 | + Git commit attribution |
| GxP / 21 CFR Part 11 | + Signed commit + authority verification |
| ISO 13485 | + Digital signature + authority matrix + retention |

## AI Agent Security Controls (ISO 27001 A.5.23 / A.8.3)

**LLM Provider Registry** in config.json: per provider record name, models, data_residency, retention, api_data_usage, approved_for classifications, review_date. Verify input classification vs provider approval before sending. Never send credentials/patient data unless provider approved. Least privilege per agent. Context sanitization on session end.

**File Integrity:** Git-tracked = verify clean status. Store hashes in STATE.md at Gates; verify before next stage. Flag unverifiable files to Human.

## Periodic Review & Revalidation (GxP / GAMP 5)

**Triggers:** LLM model change, runtime/platform major update, skill file change, >5 CRs since last revalidation, 12-month interval.

Record in `.agile-v/REVALIDATION_LOG.md`: `REVAL-XXXX` with Date, Trigger, Scope, Results, Decision, Reviewer. Regression failure = new cycle trigger.

**Model Tracking** in config.json: model_versions with tier IDs + last_validated + validated_by. Any change triggers revalidation.

More from Agile-V/agile_v_skills

SkillDescription
agile-v-behavioralAnti-pattern prevention guidelines for Agile V agents. Prevents common LLM coding mistakes while maintaining Agile V traceability. Use when implementing requirements to avoid overcomplication, silent assumptions, scope creep, and verification failures.
agile-v-control-matrixDefines and checks the Agile-V control matrix for agentic tasks, skills, model use, tools, logs, rights, Human Gates, tests, costs, rollback, and owners. Load when creating, reviewing, or enforcing `.agile-v/CONTROL_MATRIX.yaml` or runtime governance for agentic execution.
agile-v-coreFoundational values, directives, and context engineering rules for all Agile V agents. Load first in every Agile V session.
agile-v-lifecycleMulti-cycle iteration management, document versioning, change requests, re-entry points, archival, and impact analysis. Load when starting a new cycle (C2+), processing change requests, or managing cross-cycle traceability.
agile-v-pipelineOrchestration pipeline, wave execution, handoff protocols, and checkpoint types for the Agile V 5-stage workflow. Load when orchestrating multi-agent pipelines or managing stage transitions.
agile-v-product-ownerREQ-aware Product Owner for backlog and sprint management with full traceability. Use for sprint planning, backlog prioritization, or converting REQs to INVEST stories.
agile-v-quality-gatesQuality validation gates for Agile V agents. Adds interface validation, test quality checks, data type awareness, and time allocation guidance to prevent common failure patterns identified in comprehensive testing.
build-agentGenerates code, firmware, HDL, or other technical artifacts strictly derived from approved requirements. Language-agnostic. Use when synthesizing artifacts from Logic Gatekeeper-approved requirements.
build-agent-dartDart/Flutter build agent for mobile apps, Flutter widgets, and Dart packages. Extends build-agent with Dart-specific conventions. Use when building Flutter apps, Dart packages, or mobile (iOS/Android) features.
build-agent-embeddedC/C++ build agent for embedded systems, firmware, and MCU projects. Extends build-agent with embedded constraints. Use when building firmware, bare-metal code, or resource-constrained systems.