plugins/lobbi-compliance-guard/skills/data-retention/SKILL.md
Design data retention and deletion policies with regulatory basis for each data type. Use when a client needs to define how long different data categories are kept, when they are deleted, and what the regulatory or business justification is.
npx skillsauth add markus41/claude plugins/lobbi-compliance-guard/skills/data-retentionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Design a complete data retention and deletion policy covering inventory, regulatory minimums, retention schedule, legal hold procedures, deletion runbook, and technical implementation guidance.
Identify and classify all data types the client holds. For each, document:
| Data Category | Subcategory | Format | Storage Location | Contains PII? | Regulatory Category | |--------------|-------------|--------|-----------------|--------------|---------------------| | Customer PII | Contact info | DB records | CRM, AMS, LOS | Yes | GLBA, state privacy | | Customer PII | SSN/Tax ID | Encrypted DB | Core system | Yes — sensitive | GLBA, FCRA | | Transactions | Policy premiums | DB records | AMS | Yes | State DOI | | Transactions | Loan origination | DB + documents | LOS + file storage | Yes | RESPA, TRID | | Communications | Email correspondence | Email archive | Exchange/O365 | Maybe | FINRA 4511, state | | Communications | Recorded calls | Audio files | Call recording platform | Maybe | State recording law | | Audit logs | System access | Log files | SIEM | Partial | SOX, SOC 2 | | Financial records | Ledger entries | DB records | Accounting system | No | SOX, tax | | Documents | Applications | PDF/scanned | Document management | Yes | Varies by type | | Documents | Policy/loan docs | PDF | Document management | Yes | State DOI, RESPA | | Documents | Adverse action notices | PDF | Document management | Yes | ECOA, FCRA | | Claims records | FNOL and adjuster notes | DB + docs | Claims system | Yes | State DOI | | Marketing | Prospect data | CRM | CRM | Yes | CCPA, CAN-SPAM | | HR | Employee records | HR system | HRIS | Yes | State labor law |
| Record Type | Minimum Retention | Clock Starts | Citation | |-------------|------------------|--------------|---------| | Policy files (all lines) | 5 years | Policy expiration | Most state DOI regulations | | Policy files (life insurance) | 6 years | Policy expiration | Many states — use most restrictive | | Claims files | 5 years | Claim closure | State DOI (varies; verify per state) | | Agent licensing records | 3 years | License termination | NAIC Producer Licensing Model Act | | Market conduct records | 5 years | Record creation | State DOI market conduct exams | | Premium tax records | 4 years | Tax filing | State DOI / state revenue dept | | Complaint records | 5 years | Complaint closure | Most state DOI regulations | | Advertising/marketing materials | 3 years | Last use | State DOI unfair trade practices | | Surplus lines affidavits | 3–5 years | Filing date | State surplus lines law (varies) |
| Record Type | Minimum Retention | Clock Starts | Citation | |-------------|------------------|--------------|---------| | Loan application and disclosures | 3 years | Consummation or action taken | Reg Z § 1026.25 | | TRID Loan Estimates and CDs | 3 years | Consummation | Reg Z § 1026.25(c) | | RESPA servicing records | 2 years | Date of action | Reg X § 1024.38 | | HMDA Loan Application Register | 3 years | LAR submission | Reg C § 1003.5(b) | | ECOA adverse action notices | 25 months | Date notice given | Reg B § 1002.12 | | FCRA adverse action notices | 5 years | Date notice given | FCRA § 1681p | | BSA/AML Currency Transaction Reports | 5 years | Filing date | 31 CFR 1010.430 | | BSA/AML Suspicious Activity Reports | 5 years | Filing date | 31 CFR 1020.320 | | BSA Customer Identification records | 5 years | Account closure | 31 CFR 1020.220 | | QM/ATR income/asset documentation | 3 years | Consummation | Reg Z § 1026.43(e)(4) | | MERS registration records | Life of loan + 7 years | Payoff/transfer | MERS operating procedures |
| Record Type | Minimum Retention | Clock Starts | Citation | |-------------|------------------|--------------|---------| | FINRA customer account records | 6 years | Account closure | FINRA Rule 4511 | | FINRA communications (general) | 3 years | Creation (first 2 years easily accessible) | FINRA Rule 4511 | | FINRA order tickets | 3 years | Order date | FINRA Rule 4511 | | SEC investment advisor records | 5 years | Creation | 17 CFR 275.204-2 | | SOX financial records | 7 years | Fiscal year end | SOX § 802 | | Tax records | 7 years | Tax filing | IRS general guidance | | GLBA privacy notices | 6 years | Issuance | 16 CFR Part 314 | | Employment records | 4–7 years | Employment end | State labor law (varies) |
Build the master retention schedule combining regulatory minimums with business requirements. Apply the most restrictive applicable period.
Retention period table format:
| Data Category | Business Minimum | Regulatory Minimum | Regulatory Citation | Approved Maximum | Active Storage | Archive Storage | Delete Action | |--------------|-----------------|-------------------|---------------------|-----------------|----------------|-----------------|---------------| | [Category] | [N years] | [N years] | [Citation] | [N years] | [N years] | [N years after archive] | [Auto-delete / Manual review / Anonymize] |
Approved maximum = the point at which data must be deleted absent a legal hold. Typically regulatory minimum + 1–2 years buffer for litigation.
When litigation, regulatory investigation, or government inquiry begins, standard retention schedules are suspended for affected data.
Legal hold process:
For each data category at end of retention period:
Automated deletion (preferred for structured data):
1. Automated job runs [daily / weekly / monthly]
2. Query: SELECT records WHERE retention_expiry_date <= TODAY() AND legal_hold_flag = FALSE
3. For PII: overwrite with zeros or cryptographically erase encryption key (key deletion)
4. For non-PII: standard delete + transaction log purge
5. Generate deletion certificate: timestamp, record count, data category, deletion method, operator
6. Log deletion certificate to immutable audit log
7. Alert to compliance officer if deletion count exceeds threshold (potential pipeline issue)
Manual review deletion (for complex or high-value records):
Backup and archive purge:
Anonymization (alternative to deletion where operational data is needed):
Database:
retention_expiry_date column to all tables containing regulated datalegal_hold_flag boolean column(retention_expiry_date, legal_hold_flag) for efficient scansDocument management:
Email/communications archive:
Cloud storage:
Deliver three artifacts:
tools
Build Teams-native agents with the Teams SDK (formerly Teams AI Library v2) — App class, activity routing, adaptive cards, streaming, AI-generated labels, feedback, message extensions, Teams-as-MCP-server, and the bring-your-own-AI pattern with Agent Framework.
tools
Run agents on Microsoft Foundry (formerly Azure AI Foundry) Agent Service — prompt agents vs hosted agents, threads/runs and the Responses API, built-in tools (Bing grounding, code interpreter, file search, MCP, OpenAPI, A2A), connected agents, Entra agent identity, SDKs, and observability/evaluations.
tools
Build and host custom engine agents with the Microsoft 365 Agents SDK — AgentApplication, the Activity protocol, channel reach via Azure Bot Service, hosting Agent Framework or Semantic Kernel engines, and the Agents Toolkit/Playground workflow. Successor to the Bot Framework SDK.
tools
Design, govern, and extend Microsoft Copilot Studio agents — topics, generative orchestration, knowledge, tools and MCP, agent flows, autonomous triggers, publishing channels, Copilot Credits pricing, and solution-based ALM on Power Platform.