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 WIP Routing and Tooling Bottleneck Dispatch Coordinator
Format
Code-aware
Lines
91
Sections
11
Linked challenge
Build a WIP Routing and Tooling Bottleneck Dispatch Coordinator
Prompt source
Original prompt text with formatting preserved for inspection.
91 lines
11 sections
No variables
1 code block
## Build
Evaluate machine tooling wear and work-in-progress queue accumulation across simulated manufacturing cells. Synthesize dynamic lot rerouting proposals to bypass impending tooling changes.
## User
Production Shift Coordinator
## Workflow
1. Extract tooling life counters and buffer wait queues from simulated open62541 server endpoints.
2. Predict upcoming tooling change lockouts that will interrupt line flow within two hours.
3. Evaluate alternative routing lines against current work-in-progress queue depths.
4. Generate an optimized lot dispatch schedule that minimizes line idle time during tooling swaps.
## Interface
Production dispatch dashboard highlighting machine tool life countdowns, buffer bottlenecks, and re-routing suggestions.
## Data
JSON streams detailing CNC tool wear percentages, remaining cycle life, and queue counts from open62541 servers.
Starter examples below are synthetic. They are not downloaded records.
## Source
[open62541 OPC UA](https://raw.githubusercontent.com/open62541/open62541/master/README.md)
Extracts tool usage indices and queue attributes from open62541 server information models.
## Tools
anthropic-claude, pandas, fastapi.
Claude Sonnet provides rapid and nuanced multi-constraint scheduling trade-off evaluation via hosted API.
Hosted Claude API using Anthropic Python SDK to reason over shop floor schedules and tooling constraints.
## 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
- Identifies machines within 10% of mandatory tooling replacement lockouts.
- Proposes lot dispatches that divert high-volume parts away from impending changeovers.
- Produces a validated dispatch table ready for shift supervisor review.
## Starter Examples
```json
[
{
"input": {
"machines": [
{
"machine_id": "CNC-01",
"tool_life_remaining_cycles": 12,
"wip_queue": 15,
"cycle_time_min": 3
},
{
"machine_id": "CNC-02",
"tool_life_remaining_cycles": 150,
"wip_queue": 2,
"cycle_time_min": 3.2
}
],
"incoming_batch": {
"batch_id": "BATCH-707",
"lot_count": 8
}
},
"expected_output": {
"critical_machine": "CNC-01",
"recommended_action": "DIVERT_TO_CNC-02",
"dispatch_explanation": "CNC-01 will reach tool lockout in 12 cycles, causing WIP blockage; CNC-02 has capacity and tool life.",
"projected_downtime_avoided_min": 25.6
}
},
{
"input": {
"machines": [
{
"machine_id": "CNC-01",
"tool_life_remaining_cycles": 200,
"wip_queue": 1,
"cycle_time_min": 3
},
{
"machine_id": "CNC-02",
"tool_life_remaining_cycles": 180,
"wip_queue": 1,
"cycle_time_min": 3.2
}
],
"incoming_batch": {
"batch_id": "BATCH-708",
"lot_count": 4
}
},
"expected_output": {
"critical_machine": "NONE",
"recommended_action": "ROUTE_TO_CNC-01",
"dispatch_explanation": "CNC-01 provides faster cycle time and ample tool life remaining.",
"projected_downtime_avoided_min": 0
}
}
]
```
## Safety
Generates advisory routing proposals; actual machine dispatch commands are executed solely by human operators.
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.