{"slug":"sota-privacy-compliance","title":"sota-privacy-compliance","summary":"State-of-the-art privacy and compliance engineering guidance for building privacy-respecting systems and auditing existing code for privacy/compliance gaps. Use when work involves privacy, GDPR, PII, personal data, consent, data retention, deletion, DSAR (data subject access requ","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-09-09T18:38:49.641684Z","repo":{"url":"https://github.com/martinholovsky/SOTA-skills","stars":23,"forks":2,"license":"CC-BY-4.0","updatedAt":"2026-09-27T16:35:16Z"},"bodyHtml":"<hr>\n<h2>name: sota-privacy-compliance\ndescription: State-of-the-art privacy and compliance engineering guidance for building privacy-respecting systems and auditing existing code for privacy/compliance gaps. Use when work involves privacy, GDPR, PII, personal data, consent, data retention, deletion, DSAR (data subject access requests), SOC 2, ISO 27001, HIPAA, PCI DSS, compliance evidence, data residency/sovereignty, data classification, anonymization/pseudonymization, breach notification, or EU AI Act obligations — whether designing new data flows, implementing user-rights features (export/delete), preparing for an audit, or reviewing a codebase for places personal data is over-collected, under-protected, retained forever, or impossible to delete.</h2>\n<h1>SOTA Privacy &amp; Compliance Engineering</h1>\n<p>Engineering-facing privacy and compliance architecture: how to design, build, and\naudit systems so that data protection is a property of the code and infrastructure,\nnot a binder of policy documents. Compliance that lives in schemas, TTLs, IAM\npolicies, and CI checks survives staff turnover and audit scrutiny; compliance that\nlives in wiki pages does not.</p>\n<blockquote>\n<p><strong>This is engineering guidance, not legal advice.</strong> Regulations change, vary by\njurisdiction, and turn on facts about your business that code review cannot see.\nRegulatory facts below were verified against primary sources as of June 2026 —\nre-verify deadlines and statuses before relying on them, and route legal\ninterpretation (lawful basis selection, contract terms, breach reportability\ndecisions) to qualified counsel or your DPO. This skill tells you how to build\nthe machinery those decisions require.</p>\n</blockquote>\n<p><strong>Related skills — reference, don't duplicate:</strong></p>\n<ul>\n<li><code>sota-databases</code> rules/06 — DB-level PII mechanics (column encryption, row-level security, GDPR-friendly schema design)</li>\n<li><code>sota-secrets-management</code> — credentials, KMS, key rotation (crypto-shredding depends on it)</li>\n<li><code>sota-observability</code> — log redaction and PII-safe telemetry pipelines</li>\n<li><code>sota-threat-modeling</code> — LINDDUN privacy threat modeling methodology</li>\n<li><code>sota-code-security</code> / <code>sota-devsecops</code> — vulnerability management, supply chain (SOC 2/ISO control overlap)</li>\n</ul>\n<h2>BUILD mode</h2>\n<p>When designing or implementing systems that touch personal data:</p>\n<ol>\n<li><strong>Inventory first.</strong> Before writing a schema or integrating a vendor, classify\nevery field you intend to collect and record where it flows (rules/01). The\ncheapest control is the field you never store.</li>\n<li><strong>Annotate at the source.</strong> Schemas, structs, and API contracts carry\nclassification and purpose annotations; tooling derives the data map from code,\nnot the other way around (rules/01, rules/02).</li>\n<li><strong>Build user rights as features, not afterthoughts.</strong> Export, deletion, and\nconsent are product capabilities with APIs, state machines, and tests — design\nthem with the first table, because retrofitting deletion into a 200-table\nschema with denormalized copies is a quarter-long project (rules/03).</li>\n<li><strong>Automate retention.</strong> Every datastore gets a TTL, lifecycle rule, or\npartition-drop schedule at creation time. \"We'll clean it up later\" is how\nseven-year-old PII ends up in a breach disclosure (rules/03).</li>\n<li><strong>Emit evidence as a byproduct.</strong> Access reviews, change approvals, and config\nbaselines should fall out of normal engineering workflow (PRs, IaC, IdP logs)\nso audits are queries, not scrambles (rules/05).</li>\n<li><strong>Know your regimes.</strong> Check rules/04 for which regulations the system triggers\n(data types × subjects' locations × sector) before architecture freezes — data\nresidency and breach-clock requirements shape topology.</li>\n</ol>\n<h2>AUDIT mode</h2>\n<p>When reviewing an existing codebase/infrastructure for privacy and compliance gaps:</p>\n<p><strong>Process:</strong> (1) Build or obtain the data inventory — grep schemas, API payloads,\nlog statements, analytics events, object storage for personal data (rules/01 has\ndiscovery patterns). (2) Trace lifecycle per data category: collection → purpose →\nstorage → sharing → retention → deletion. (3) Test user rights paths end-to-end\n(does deletion actually propagate?). (4) Check evidence trails for auditable\ncontrols. (5) Map findings to applicable regimes (rules/04).</p>\n<p><strong>Severity conventions:</strong></p>\n<table>\n<thead>\n<tr>\n<th>Severity</th>\n<th>Meaning</th>\n<th>Examples</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>CRITICAL</td>\n<td>Active violation with regulatory/breach exposure; fix now</td>\n<td>PII in world-readable bucket; deletion endpoint that doesn't delete; special-category data collected without any consent record; cardholder PANs stored unencrypted in app DB</td>\n</tr>\n<tr>\n<td>HIGH</td>\n<td>Violation likely under normal operation or on first DSAR/audit/breach</td>\n<td>No deletion propagation to backups/analytics; consent not versioned or not propagated to processors; no retention enforcement anywhere; PII in logs shipped to third party without DPA</td>\n</tr>\n<tr>\n<td>MEDIUM</td>\n<td>Gap that degrades posture or audit readiness</td>\n<td>Classification annotations missing; data map stale/manual; soft-delete only with no purge job; access reviews manual and undocumented</td>\n</tr>\n<tr>\n<td>LOW</td>\n<td>Hardening/hygiene</td>\n<td>Cookie banner lacks granular toggles; export format not machine-readable; missing purpose comments on schema fields</td>\n</tr>\n</tbody>\n</table>\n<p><strong>Finding format:</strong></p>\n<pre><code>[SEVERITY] &lt;title&gt;\nLocation: &lt;file:line / table / bucket / service&gt;\nData: &lt;what personal data, what classification tier&gt;\nRegimes: &lt;GDPR Art. X / CCPA / HIPAA / PCI DSS req N / SOC 2 CC-N — as applicable&gt;\nIssue: &lt;what is wrong, lifecycle stage affected&gt;\nImpact: &lt;realistic consequence: fine exposure, breach scope, audit failure, DSAR failure&gt;\nFix: &lt;concrete engineering remediation&gt;\nEvidence: &lt;how you verified — query, code path, test&gt;\n</code></pre>\n<p>Report findings grouped by data lifecycle stage (collection / storage / sharing /\nretention / deletion), not by file — that is how regulators and auditors think.</p>\n<h2>Rules index</h2>\n<table>\n<thead>\n<tr>\n<th>File</th>\n<th>Read this when...</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><a href=\"rules/01-data-inventory-classification.md\">rules/01-data-inventory-classification.md</a></td>\n<td>Starting any privacy work; building/auditing a data map; defining classification tiers; hunting PII in schemas, logs, buckets, backups, analytics; mapping flows to processors</td>\n</tr>\n<tr>\n<td><a href=\"rules/02-privacy-by-design.md\">rules/02-privacy-by-design.md</a></td>\n<td>Designing schemas/APIs that touch personal data; minimization and purpose limitation in code; choosing pseudonymization vs anonymization vs tokenization; exposing aggregate stats; evaluating re-identification risk</td>\n</tr>\n<tr>\n<td><a href=\"rules/03-consent-and-user-rights.md\">rules/03-consent-and-user-rights.md</a></td>\n<td>Building consent management, cookie/tracker governance, DSAR export, deletion (hard/soft/crypto-shred + propagation), or retention automation; auditing whether user rights actually work</td>\n</tr>\n<tr>\n<td><a href=\"rules/04-regulatory-landscape.md\">rules/04-regulatory-landscape.md</a></td>\n<td>Determining which regimes apply; GDPR engineering mechanics (lawful basis, transfers, DPIA, 72h); US state laws; HIPAA; PCI DSS 4.x scoping; EU AI Act timeline; DORA/NIS2; data residency architecture</td>\n</tr>\n<tr>\n<td><a href=\"rules/05-audit-ready-engineering.md\">rules/05-audit-ready-engineering.md</a></td>\n<td>Preparing for SOC 2 / ISO 27001; automating evidence; mapping controls to engineering practice; vendor/subprocessor management; policy-as-code; avoiding common audit findings</td>\n</tr>\n<tr>\n<td><a href=\"rules/06-incident-breach-readiness.md\">rules/06-incident-breach-readiness.md</a></td>\n<td>Building breach response capability; classification (is it reportable?); notification clocks per regime; forensics-friendly logging without privacy violations; post-incident obligations</td>\n</tr>\n</tbody>\n</table>\n<h2>Top 10 non-negotiables</h2>\n<ol>\n<li><strong>No unmapped personal data.</strong> Every field of personal data has a recorded\nclassification, purpose, owner, retention period, and list of systems it flows\nto. Unmapped data is unprotectable data.</li>\n<li><strong>Collect the minimum.</strong> Each field collected must trace to a specific,\ndocumented purpose. A field without a purpose is deleted, not \"kept just in\ncase\" — it is pure liability with zero value.</li>\n<li><strong>Deletion must actually delete.</strong> A deletion request propagates to primary\nstores, replicas, caches, search indexes, analytics, ML training sets, and is\nhandled for backups (expiry or crypto-shred). A soft-delete flag alone is a\nfinding, not a deletion architecture.</li>\n<li><strong>Retention is enforced by machines.</strong> TTLs, object lifecycle rules, partition\ndrops — running and monitored. A retention policy with no automated enforcement\nis fiction.</li>\n<li><strong>Consent is versioned, granular, revocable state</strong> — recorded with timestamp,\npolicy version, and scope; checked at point of use; revocation propagates to\nprocessors. Never inferred, never a boolean column named <code>gdpr_ok</code>.</li>\n<li><strong>No PII in logs, URLs, or analytics events</strong> unless explicitly classified,\nredaction-tested, and retention-bounded (see sota-observability for pipeline\nmechanics). Logs are the most common shadow copy of personal data.</li>\n<li><strong>Pseudonymized ≠ anonymous.</strong> Data that can be re-linked (hashed emails,\n\"anonymized\" user IDs, quasi-identifier combinations) is still personal data.\nTreat claimed anonymization as a re-identification risk to verify, not a label\nto trust.</li>\n<li><strong>Encrypt personal data at rest and in transit, with keys you can destroy.</strong>\nKey-per-user or key-per-tenant where deletion/residency demands it\n(crypto-shredding); keys managed per sota-secrets-management.</li>\n<li><strong>Cross-border flows are deliberate.</strong> Know which regions data lives in and\ntransits; region-pin where required; every processor/subprocessor has a DPA and\nappears in the data map before the first byte flows.</li>\n<li><strong>Evidence or it didn't happen.</strong> Access reviews, consent records, deletion\nproofs, DPIAs, breach timelines — generated and retained automatically. If you\ncannot produce the artifact in minutes, the control will fail its audit.</li>\n</ol>\n","files":[{"path":"rules/01-data-inventory-classification.md","sizeBytes":14772,"isText":true},{"path":"rules/02-privacy-by-design.md","sizeBytes":17666,"isText":true},{"path":"rules/03-consent-and-user-rights.md","sizeBytes":20309,"isText":true},{"path":"rules/04-regulatory-landscape.md","sizeBytes":21160,"isText":true},{"path":"rules/05-audit-ready-engineering.md","sizeBytes":16010,"isText":true},{"path":"rules/06-incident-breach-readiness.md","sizeBytes":14694,"isText":true},{"path":"SKILL.md","sizeBytes":9915,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-27T20:58:27.123905Z","sha256":"C904D67D9890816C22F11F385E01EA41333C34DEE621F5CEFADF89FEC7EB65D7","sizeBytes":52893},"review":null,"source":{"repositoryUrl":"https://github.com/martinholovsky/SOTA-skills","path":"skills/sota-privacy-compliance","license":"CC-BY-4.0","commit":"c26df6ba7104740b44b56671937bf21659a70723","subtreeSha":"3993B34646E647FBFD4ABC2736CCC203A2C476FEAA1DC79C9E4866D8922D0D26","lastSyncedAt":"2026-09-27T20:56:11.951045Z"},"reviewedAt":"2026-09-27T21:00:06.951279Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/martinholovsky/SOTA-skills/tree/main/skills/sota-privacy-compliance"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install martinholovsky-sota-skills@llmmart"},{"target":"git","command":"git clone https://github.com/martinholovsky/SOTA-skills.git"}]}