Event-Driven Shopfloor Execution System Transformation Blueprint
Formulate a modular event-driven architecture plan to replace rigid monolithic manufacturing execution systems (MES).
Apply this prompt when re-architecting legacy plant execution workflows into an asynchronous event mesh. It coordinates work-in-progress (WIP) tracking, tooling, and ERP synchronization with minimal line disruption.
Role: Lead Manufacturing Systems Software Architect specializing in distributed event meshes and discrete production line orchestration.
Context
- Monolithic MES Scope: {{mes_monolith_footprint}}
- Target Distributed Broker: {{target_event_mesh}}
- Production Line Changeover Cadence: {{line_changeover_frequency}}
- Top-Tier ERP Integration Model: {{erp_synchronization_model}}
- Fault Handling & Local Resilience Standard: {{fault_tolerance_protocol}}
- Shopfloor Client Interfaces: {{worker_terminal_interface}}
Task
Design an architectural overhaul plan that decomposes {{mes_monolith_footprint}} into autonomous, event-driven domain services communicating via {{target_event_mesh}}, enabling rapid changeovers and continuous synchronization with {{erp_synchronization_model}}.
Method
- Decompose {{mes_monolith_footprint}} into discrete bounded contexts (e.g., Work Order Scheduling, WIP Tracking, Material Consumption, Quality Inspection, Tooling Lifecycle).
- Define the core domain event catalog (schemas, schemas registry, versioning strategy) using CloudEvents or Avro specifications.
- Architect the event ingestion and state projection engines on {{target_event_mesh}} to maintain sub-second local state at production work centers.
- Design asynchronous outbox patterns and saga orchestrators to guarantee transactional consistency with {{erp_synchronization_model}}.
- Construct the operational resilience mechanism enforcing {{fault_tolerance_protocol}} when central broker brokers experience network degradation.
- Modernize UI event subscriptions to push instantaneous task state transitions to {{worker_terminal_interface}}.
- Detail event replay, dead-letter reprocessing, and audit trail retention architectures to satisfy regulatory compliance.
- Formulate a strangler-fig migration roadmap outlining service-by-service extraction while lines run under normal {{line_changeover_frequency}}.
Constraints
- MUST prevent partial or dual state commits during event routing failovers via {{fault_tolerance_protocol}}.
- MUST NOT block physical line operations or UI responsiveness on {{worker_terminal_interface}} during cloud/ERP network partitions.
- Event payload changes must adhere strictly to backward-compatible schema evolution policies.
- Core WIP state transition events must process in under 100 milliseconds locally.
Output format
Present the complete technical architecture plan organized into 5 parts:
- Bounded Context & Event Domain Catalog (250-300 words)
- Asynchronous Event Mesh & Outbox Architecture (200-250 words)
- ERP Saga Orchestration & Transactional Boundary Design (200-250 words)
- Edge Terminal State Projection & Offline Protocol (150-200 words)
- Strangler-Fig Migration & Decommissioning Plan (Phased checklist format)
Self-review
- Confirm that bounded context definitions avoid tight coupling or synchronous distributed locks.
- Verify that edge work centers maintain full operability when {{target_event_mesh}} disconnects from ERP.
- Ensure the event schema registry model supports high-frequency modifications aligned with {{line_changeover_frequency}}.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.