General engineering
AuraScore 81/100

Distributed Generator Failover Validation Script Builder

Create an automated health-check and dry-run failover verification script for backup generation.

Use this template to generate robust automation scripts for validating electrical backup generators and microgrid assets. The output provides automated pre-flight diagnostics and readiness testing.

Template

Role: Lead Electrical Reliability Automation Engineer with expertise in microgrids and emergency backup power assets.

Context

  • Primary facility / substation: {{substation_identifier}}
  • Controller telemetry interface: {{generator_telemetry_endpoint}}
  • Compliance / firmware standard: {{firmware_standard}}
  • Minimum fuel reserve level: {{minimum_fuel_threshold}}
  • Incident paging channel: {{notification_channel}}
  • Audit trail log retention: {{audit_retention_days}}

Task

Author an automated Bash/Python validation script that queries {{generator_telemetry_endpoint}} at {{substation_identifier}}, validates generator readiness against {{firmware_standard}} and {{minimum_fuel_threshold}}, performs a non-interrupted simulated transfer switch test, and writes an audit log preserved for {{audit_retention_days}} while notifying {{notification_channel}} on degraded readiness.

Method

  1. Establish secure programmatic connection to {{generator_telemetry_endpoint}} using local control network protocols.
  2. Query battery cranking voltage, coolant jacket temperature, oil pressure, and fuel percentage.
  3. Validate that current fuel level exceeds {{minimum_fuel_threshold}} and battery charging circuit is active.
  4. Inspect controller software versions against {{firmware_standard}} to flag uncertified firmware builds.
  5. Initiate a dry-run transfer switch diagnostic command to confirm transfer readiness without load drop.
  6. Evaluate breaker closure latency times against utility safety standards.
  7. Generate a cryptographically hashed execution log and save to local disk configured for {{audit_retention_days}} retention.
  8. Dispatch an alert to {{notification_channel}} containing readiness score, component flags, and maintenance notices.

Constraints

  • MUST NOT initiate an actual electrical open-transition breaker trip during automated testing cycles.
  • MUST enforce connection timeouts to prevent script hanging if the controller fails to respond.
  • Code MUST exit with standard operational exit codes (0 for healthy, 1 for degraded, 2 for critical failure).
  • All diagnostic messages MUST include local ISO timestamps and {{substation_identifier}} in the header.

Output format

1. Script Header and Variable Definitions

  • Shell environment declarations and parameter definitions matching context (15-25 lines).

2. Validation and Diagnostic Script

  • Complete, runnable automation script with diagnostic subroutines and error handling (90-160 lines).

3. Crontab / Scheduler Definition

  • Single crontab or systemd timer snippet demonstrating periodic execution (5-10 lines).

Self-review

  • Ensure no test routine causes unintended phase synchronization errors or grid islanding.
  • Verify all context variables appear explicitly within the script logic.
  • Confirm that log rotation logic cleanly accounts for {{audit_retention_days}}.
AuraScore breakdown
81/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 efficiency5/10 · Thin

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.

developers
developers-general
energy-utilities
microgrid
failover
reliability