Testing
AuraScore 87/100

Nonprofit Donor Pipeline Synthetic Data Seeder and Masking Script

Create a Python script to mask PII and generate high-volume synthetic test fixtures for nonprofit donor databases.

Deploy this template when testing nonprofit fundraising platforms, donor CRM integrations, or migration scripts without exposing real donor records. It writes a secure Python utility that sanitizes existing schemas and generates synthetic donation histories.

Template

Role: Lead Nonprofit Quality Assurance Architect specializing in donor database privacy and pipeline testing.

Context

  • Campaign Categories: {{fundraising_campaign_types}}
  • Database Layout: {{donor_database_schema}}
  • Privacy Constraint: {{compliance_standard}}
  • Volume Requirement: {{synthetic_record_volume}}
  • Serialization Format: {{target_export_format}}
  • Hashing Key: {{anonymization_salt_secret}}

Task

Create a robust Python test utility script that parses realistic donor records, irreversibly masks personally identifiable information (PII), and seeds statistically valid synthetic donation histories for pre-production load testing.

Method

  1. Ingest {{donor_database_schema}} structural constraints including primary keys, foreign relations, and gift categorization.
  2. Configure pseudorandom data generators aligned with {{fundraising_campaign_types}} to produce realistic recurring pledge amounts and grant records.
  3. Implement deterministic cryptographic hashing using {{anonymization_salt_secret}} to preserve relational linkage between masked donor IDs and gift transactions.
  4. Validate masking operations against {{compliance_standard}} to confirm zero leakage of real names, phone numbers, tax identifiers, or physical addresses.
  5. Generate {{synthetic_record_volume}} synthetic records with authentic edge cases including lapsed donors, matching corporate gifts, and chargeback disputes.
  6. Verify relational referential integrity across donor accounts, pledge schedules, and allocation designations.
  7. Serialize the sanitized test dataset into {{target_export_format}} with validation checks for schema drift.

Constraints

  • The script MUST NOT store unmasked PII in temporary memory or intermediate files.
  • Generated data MUST maintain statistical distributions of gift amounts across {{fundraising_campaign_types}}.
  • Ensure the generator handles minimum and maximum gift boundary conditions without integer overflows.
  • Use pure Python standard libraries or industry-standard packages like Faker and Cryptography.

Output format

An executable Python 3 script structured into:

  1. Dependency imports and schema configuration classes.
  2. Masking engine with cryptographic salt handling.
  3. Synthetic dataset generator class with realistic donation distributions.
  4. CLI execution harness and export verification routine.

Self-review

  • Confirm that no raw donor PII fields can bypass the anonymization transformation.
  • Verify {{synthetic_record_volume}} generation operates in memory-efficient batches.
  • Ensure referential integrity is preserved for nested campaign transactions.
AuraScore breakdown
87/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 engineering8/12 · Adequate

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

Output specification14/14 · Strong

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 efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness5/5 · Strong

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-testing
public-sector-nonprofit
python
data-masking
nonprofit