Skip to main content
Loading navigation
Back to prompt library

Build a Coastal Port Breakwater Scour Inspection Dispatcher — implementation

Linked challenge: Build a Coastal Port Breakwater Scour Inspection Dispatcher

Prompt source

implementation74 lines11 sectionsNo variables1 code block
## Build
Correlate NOAA tidal station surge anomalies with maritime terminal breakwater assets. Construct prioritized underwater dive inspection work orders and defensive rock armoring plans.

## User
Port Infrastructure Inspector

## Workflow
1. Import port breakwater asset coordinates, armor rock specifications, and past inspection logs.
2. Fetch recorded water levels and surge anomalies from NOAA Access Data Service API endpoints.
3. Flag breakwater sections exposed to consecutive hours of extreme surge and wave drawdown.
4. Generate structured dive inspection orders and rock replacement quantity specifications for port engineers.

## Interface
Terminal GIS dashboard depicting breakwater alignment, storm surge hydrographs, and scheduled inspection manifests.

## Data
Query NOAA Access Data Service (https://www.ncei.noaa.gov/access/services/data/v1) for water level and surge datasets, backed by fixture files.
Starter examples below are synthetic. They are not downloaded records.

## Source
[NOAA climate services API](https://www.ncei.noaa.gov/support/access-data-service-api-user-documentation)
Consumes NOAA Access Data Service API v1 parameters including stations, startDate, endDate, and dataTypes.

## Tools
mastra-ai, requests, pydantic.
Provides structured TypeScript/Python workflow orchestration with schema-validated outputs for maintenance dispatch.
Local or hosted LLM with consistent adherence to maintenance dispatch schemas.

## 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
- Ingests NOAA station surge data and calculates cumulative wave drag exposure hours.
- Triggers dive inspection work orders when cumulative surge exceedance surpasses operational tolerance.
- Formats inspection work orders with specific breakwater chainage markers and safety precautions.

## Starter Examples
```json
[
  {
    "input": {
      "terminal_id": "PORT-SOUTH-JETTY",
      "station_id": "8771450",
      "peak_surge_m": 2.4,
      "duration_above_2m_hours": 14,
      "threshold_hours": 8,
      "chainage_start_km": 1.2,
      "chainage_end_km": 2
    },
    "expected_output": {
      "terminal_id": "PORT-SOUTH-JETTY",
      "dispatch_dive_inspection": true,
      "inspection_priority": "urgent",
      "target_zone": {
        "start_km": 1.2,
        "end_km": 2
      },
      "inspection_focus": "toe_berm_scour_and_armor_displacement"
    }
  },
  {
    "input": {
      "terminal_id": "PORT-NORTH-DOCK",
      "station_id": "8771450",
      "peak_surge_m": 1.1,
      "duration_above_2m_hours": 0,
      "threshold_hours": 8,
      "chainage_start_km": 0,
      "chainage_end_km": 0.8
    },
    "expected_output": {
      "terminal_id": "PORT-NORTH-DOCK",
      "dispatch_dive_inspection": false,
      "inspection_priority": "routine_monitoring",
      "target_zone": null,
      "inspection_focus": "none"
    }
  }
]
```

## Safety
Maintenance work orders require sign-off by a licensed civil or marine engineer prior to physical mobilization.
Use mock external writes. Require human review before any real deployment.