本文へ移動
cccskills
無料GitHub で公開

saas-lgpd-retention-erasure

Define retention rules and erasure mechanisms (LGPD Arts. 15-16) reconciling subject's right to erasure (Art. 18, VI) with legal retention obligations (fiscal, labor, banking). Use when user asks 'retenção LGPD', 'quanto tempo guardar', 'eliminação de dados', 'soft delete vs hard delete', 'crypto-shredding', 'right to be forgotten'.

日本語の概要は準備中です。原文の説明を表示しています。

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Retention & Erasure

Interaction Localization Rule: When locale: pt-BR (or user speaks Portuguese), ALL questions (AskUserQuestion / sk_question), confirmation prompts, and selectable options MUST be translated and presented in Brazilian Portuguese (PT-BR). Any English question text or options in this skill are illustrative examples — NEVER display English questions or options to a Portuguese developer. Internal reasoning, code synthesis, tests, and technical documentation MUST remain in English (except Brazilian statutory compliance documents under .lgpd/).

Arts. 15-16 LGPD definem o término do tratamento. Art. 18, VI dá direito à eliminação. A tensão prática é com retenções legais obrigatórias.

Hierarquia de obrigações

Retenção legal obrigatória > Retenção contratual > Vontade do titular (Art. 18, VI)

Quando há obrigação legal de manter (fiscal, trabalhista, bancário, Marco Civil), o tratamento continua bloqueado (não usado para finalidade original) até o fim do prazo legal, depois é eliminado.

Prazos comuns no Brasil

CategoriaPrazoFonte
Fiscal (notas, impostos)5 anosCTN Art. 173-174
Trabalhista (contratos, folha)5 anosCLT Art. 11
Previdenciária10 anosLei 8.212/91
Bancário10 anosCMN
Marco Civil — logs de conexão1 anoLei 12.965/2014 Art. 13
Marco Civil — logs de acesso a apps6 mesesLei 12.965/2014 Art. 15
CDC — relação de consumo5 anosCDC Art. 27 (prescrição)

Estratégias de eliminação

1. Hard delete

Quando não há retenção legal. Cascata bem definida em todas as tabelas + replicas + backups quando possível.

2. Soft delete + bloqueio

Quando há retenção legal de alguns campos. Marcar deletedAt, mascarar campos não-essenciais, manter apenas o estritamente necessário.

3. Crypto-shredding

Quando há volume e dificuldade de varrer storage. Dados cifrados por chave do titular; eliminação = destrói a chave.

4. Anonimização

Substituto à eliminação. Após anonimizar (irreversivelmente), dado sai do escopo da LGPD (Art. 12).

Schema Prisma

model RetentionRule {
  id              String   @id @default(cuid())
  entity          String   // "User", "Order", "Message"
  purpose         String   // "marketing", "billing"
  retentionMonths Int
  legalBasis      String
  postAction      PostRetentionAction
  triggeredBy     String   // "consent_revoked", "contract_end", "ttl"
  active          Boolean  @default(true)
}

enum PostRetentionAction {
  HARD_DELETE
  ANONYMIZE
  CRYPTO_SHRED
  BLOCK_AND_RETAIN
}

Job de eliminação automática

Cron job diário:

  1. Identifica registros que ultrapassaram retenção
  2. Aplica postAction conforme RetentionRule
  3. Loga em AuditLogEntry
  4. Notifica relatório semanal ao Encarregado

Workflow para Art. 18, VI

Ver detalhes no skill saas-lgpd-dsar. Resumo:

  1. Recebe pedido
  2. Verifica retenção legal
  3. Se ZERO retenção → hard delete
  4. Se PARCIAL → soft delete + crypto-shred dos campos elimináveis
  5. Loga
  6. Responde titular informando o que foi eliminado e o que foi bloqueado (com prazo)

Status update

## F8 — Retention ✓
- RetentionRules configuradas: {N}
- Job diário ativo
- Eliminação automatizada validada em ambiente staging
- {M} registros já em fila para eliminação
- Próximo: saas-lgpd-incident-response

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Turn your AI session into an autonomous SaaS and software engineering studio with 49 specialized agents, 74 workflow skills (/saas-*), 28 director gates, and complete architecture across Next.js, FastAPI, Supabase, Tailwind, and Stripe.

日本語の概要は準備中です。原文の説明を表示しています。

Basinfy/Basinfy-SaaS-Studio32026年10月24日 更新

Brownfield audit — do existing artifacts actually work? Numbered migration plan. Unlike /saas-project-stage-detect, checks compliance not existence.

日本語の概要は準備中です。原文の説明を表示しています。

Basinfy/Basinfy-SaaS-Studio32026年10月24日 更新

Create an ADR documenting a technical decision: context, alternatives considered, consequences.

日本語の概要は準備中です。原文の説明を表示しています。

Basinfy/Basinfy-SaaS-Studio32026年10月24日 更新

Traceability matrix mapping PRD requirements to ADRs. Finds gaps, cross-ADR conflicts, stack compatibility. PASS/CONCERNS/NOT ASSESSED/FAIL.

日本語の概要は準備中です。原文の説明を表示しています。

Basinfy/Basinfy-SaaS-Studio32026年10月24日 更新

Audit assets against naming conventions, file size budgets, format standards. Finds orphaned assets, missing references.

日本語の概要は準備中です。原文の説明を表示しています。

Basinfy/Basinfy-SaaS-Studio32026年10月24日 更新

Author per-asset visual specs, SVG dimensions, and generation prompts from PRDs and design tokens. After design tokens.

日本語の概要は準備中です。原文の説明を表示しています。

Basinfy/Basinfy-SaaS-Studio32026年10月24日 更新

Basinfy のスキルをすべて見る

このスキルの問題を報告する