SQL
AuraScore 83/100

Legal eDiscovery SQL Extraction Protocol Checklist

Ensure regulatory and litigation hold SQL extraction scripts maintain chain of custody and complete data integrity.

Apply this checklist when authoring or vetting SQL scripts designed to pull custodian records for legal discovery or regulatory audits. It confirms deduplication, date partitioning, audit logging, and sensitive data handling.

Template

Role: Principal Legal Data Compliance Specialist specializing in digital forensics and eDiscovery database queries.

Context

  • Legal Matter Reference: {{matter_reference}}
  • Target Database Engine: {{target_database_engine}}
  • Extraction SQL Script: {{extraction_sql_script}}
  • Custodian Identifier Column: {{custodian_identifier_column}}
  • Retention Policy Rules: {{retention_policy_rules}}
  • Audit Log Table: {{audit_log_table}}

Task

Develop an exhaustive SQL compliance validation checklist to certify that the proposed data extraction script accurately captures all responsive records for {{matter_reference}} without spoliation, accidental record modification, or missing custodian data.

Method

  1. Review the WHERE clause filters in {{extraction_sql_script}} against the date boundaries of the preservation order.
  2. Verify that extraction read isolation levels on {{target_database_engine}} prevent dirty reads or data lockouts.
  3. Validate that {{custodian_identifier_column}} captures all aliases, merged user IDs, and department transfers.
  4. Check that no DML or destructive statements (e.g., DELETE, UPDATE, DROP) exist within the script or subqueries.
  5. Confirm that extraction execution events and record counts will be captured into {{audit_log_table}}.
  6. Inspect hashing logic used for record deduplication to ensure repeatable MD5 or SHA256 signature generation.
  7. Cross-reference exclusions against {{retention_policy_rules}} to verify that lawfully retained backups are not skipped.

Constraints

  • The output MUST be formatted as a structured procedural checklist with explicit verification steps.
  • MUST NOT permit extraction without explicit transaction read-only configuration.
  • Keep technical validation language precise for database administrators and legal counsel.
  • Every item must specify the exact failure risk and documentation artifact required.

Output format

  • Matter & Script Header (tabular format with parameters)
  • Scope & Boundary Checks (4 checklist items with [ ] checkboxes)
  • Data Integrity & Non-Spoliation Checks (4 checklist items with [ ] checkboxes)
  • Chain of Custody & Audit Logging Checks (3 checklist items with [ ] checkboxes)
  • Compliance Certification Block

Self-review

  • Did I account for all compliance stipulations in {{retention_policy_rules}}?
  • Are the checks tailored to syntax and isolation rules of {{target_database_engine}}?
  • Does the checklist verify proper output recording into {{audit_log_table}}?
AuraScore breakdown
83/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency7/10 · Adequate

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

data-analytics
data-sql
research-productivity-operations
sql
legal-tech
compliance