Back to Prompt Library
implementation
Build the application
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: Build a Sparkplug B Industrial Subnet Outage Rehearsal Simulator
Format
Code-aware
Lines
96
Sections
11
Linked challenge
Build a Sparkplug B Industrial Subnet Outage Rehearsal Simulator
Prompt source
Original prompt text with formatting preserved for inspection.
96 lines
11 sections
No variables
1 code block
## Build
Analyze simulated Sparkplug B edge node state transitions during network partitions using a real protocol parser. Formulate offline restoration drills and report sequence gaps without disrupting plant operations or sending live commands.
## User
Industrial Automation Network and OT Engineer
## Workflow
1. Ingest simulated Sparkplug B message payload sequences, utilizing a versioned protocol parser to extract and structure payload sequence numbers.
2. Identify edge node disconnections, buffered historical metric bursts, and timestamp gaps during simulated link loss.
3. Synthesize an offline network recovery rehearsal playbook detailing edge broker failover observations and sequential node re-announcement.
4. Generate a data integrity audit reporting observed sequence gaps and unknown birth states, without asserting full standard compliance.
## Interface
Timeline console mapping broker connection states, message sequence counters, packet gap alerts, and rehearsal drill export buttons.
## Data
Create 350 simulated Sparkplug B payload sequences including birth certificates, death events, and historical sequence numbers.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Eclipse Sparkplug](https://raw.githubusercontent.com/eclipse-sparkplug/sparkplug/master/README.md)
Uses Sparkplug B device lifecycle specifications including NBIRTH, NDEATH, sequence numbers, and historical data payloads.
## Tools
ray-serve, pydantic, paho-mqtt.
Ray Serve provides scalable distributed serving to process high-throughput simulated message sequences across partitioned industrial subnets.
Requires code and logical reasoning model for protocol sequence auditing via hosted API or local deployment.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Employs a real versioned protocol parser to extract and validate Sparkplug B payloads.
- Reports observed sequence gaps and flags out-of-order metric transmissions as unknown states rather than declaring full protocol compliance.
- Outputs a complete structured outage drill report with concrete technician verification steps.
## Starter Examples
```json
[
{
"input": {
"subnet_id": "OT-SUBNET-NORTH",
"simplified_synthetic_events": [
{
"seq": 10,
"type": "DDATA",
"timestamp": "2025-07-01T12:00:00Z"
},
{
"seq": 11,
"type": "NDEATH",
"timestamp": "2025-07-01T12:00:05Z"
},
{
"seq": 0,
"type": "NBIRTH",
"timestamp": "2025-07-01T12:01:00Z"
}
]
},
"expected_output": {
"subnet_id": "OT-SUBNET-NORTH",
"partition_detected": true,
"sequence_analysis": "OBSERVED_BIRTH_AFTER_DEATH",
"observed_gaps": [],
"recovery_steps": [
"Verify broker acknowledgment of NBIRTH seq 0"
]
}
},
{
"input": {
"subnet_id": "OT-SUBNET-SOUTH",
"simplified_synthetic_events": [
{
"seq": 45,
"type": "DDATA",
"timestamp": "2025-07-01T13:00:00Z"
},
{
"seq": 48,
"type": "DDATA",
"timestamp": "2025-07-01T13:00:10Z"
}
]
},
"expected_output": {
"subnet_id": "OT-SUBNET-SOUTH",
"partition_detected": false,
"sequence_analysis": "UNKNOWN_STATE",
"observed_gaps": [
46,
47
],
"recovery_steps": [
"Investigate missing sequence numbers [46, 47]",
"Check historical metric buffer flush completeness"
]
}
}
]
```
## Safety
Strictly an offline rehearsal and telemetry sequence validator; no network switch reconfigurations or live broker commands.
Use mock external writes. Require human review before any real deployment.Adaptation plan
Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.
Keep stable
Hold the task contract and output shape stable so generated implementations remain comparable.
Tune next
Update libraries, interfaces, and environment assumptions to match the stack you actually run.
Verify after
Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.