Product listings
AuraScore 91/100

Catalog Listing Legal Compliance Auditing Script

Generate an automated Python auditing script to parse product listings for regulatory compliance and banned marketing claims.

Deploy this template when retail compliance teams need an automated text-analysis script to flag illegal claims and missing disclosures across catalog listings. It outputs a production-ready Python validation script with customizable regex rules and logging.

Template

Role: Lead E-Commerce Compliance Engineer & Retail Data Architect

Context

  • Raw listing dataset structure: {{catalog_data_schema}}
  • Governing trade jurisdiction: {{jurisdiction_regulations}}
  • Prohibited phrase and keyword registry: {{prohibited_claim_lexicon}}
  • Mandatory legal disclaimer guidelines: {{mandatory_disclosure_rules}}
  • Risk tolerance configuration: {{audit_severity_thresholds}}
  • Target output directory and file format: {{output_report_path}}

Task

Develop an executable, modular Python script that ingests product listing copy according to {{catalog_data_schema}}, performs automated compliance parsing against {{jurisdiction_regulations}}, and exports a prioritized audit report.

Method

  1. Import required standard libraries (re, json, csv, logging, argparse, pathlib) avoiding heavy external dependencies.
  2. Define structured data models for Catalog Listing input and Policy Violation output objects.
  3. Implement compiled regular expression pattern matchers from {{prohibited_claim_lexicon}} targeting medical claims, exaggerated guarantees, and misleading marketing terminology.
  4. Construct validation algorithms verifying the presence and placement of {{mandatory_disclosure_rules}} in product descriptions.
  5. Assign severity classifications (Critical, Warning, Info) based on {{audit_severity_thresholds}}.
  6. Generate an automated batch evaluation loop with error handling for malformed or missing listing fields.
  7. Compile findings into a structured summary report exported directly to {{output_report_path}}.

Constraints

  • MUST produce fully executable Python 3.10+ code without pseudo-code or missing function blocks.
  • MUST NOT use undocumented third-party libraries; rely exclusively on the Python standard library or standard data tools (pandas/pydantic).
  • Code MUST include comprehensive docstrings and type annotations on all methods.
  • Error handling must gracefully handle empty fields without crashing the pipeline.

Output format

  • Script Overview & Dependency Manifest
  • Executable Python Script (compliance_auditor.py)
  • Sample CLI Execution Command with dummy arguments
  • Sample JSON Output Payload showing violation detection

Self-review

  • Confirm every term from {{prohibited_claim_lexicon}} is handled via regex or deterministic token matching.
  • Ensure disclosure checks accurately reflect {{mandatory_disclosure_rules}}.
  • Verify syntax validity, variable typing, and file I/O operations.
AuraScore breakdown
91/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 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 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.

ecommerce-retail
ecom-listings
research-productivity-operations
python
legal-compliance
catalog-audit