
Creates Ecotone business interfaces (gateways): DBAL query interfaces with #[DbalBusinessMethod], repository abstractions, expression language parameters, and media type converters. Use when creating database query interfaces, custom repository gateways, data converters, or abstract interface-based message sending with BusinessMethod.
Implements identifier mapping for Ecotone aggregates and sagas: native ID resolution, aggregate.id metadata, #[TargetIdentifier], identifierMapping expressions, and #[IdentifierMethod]. Use when wiring commands/events to aggregates or sagas by identifier, resolving aggregate IDs from messages, or mapping event properties to saga identifiers.
Implements message metadata (headers) in Ecotone: #[Header] and #[Headers] for reading, #[AddHeader]/#[RemoveHeader] for enrichment, changeHeaders in interceptors, automatic propagation from commands to events. Use when passing custom headers, reading message metadata, enriching headers, propagating metadata across handlers, or testing metadata with EcotoneLite.
Writes and debugs tests for Ecotone using EcotoneLite::bootstrapFlowTesting, aggregate testing, async-tested-synchronously patterns, projections, and common failure diagnosis. Use when writing tests, debugging test failures, adding test coverage, or implementing any new feature that needs tests. Should be co-triggered whenever a new handler, aggregate, saga, projection, or interceptor is being implemented.
Guides Ecotone framework contributions: dev environment setup, monorepo navigation, running tests, PR workflow, and package split mechanics. TRIGGER whenever any code change is made to the Ecotone codebase — new features, bug fixes, refactors, or any modification to source files. Also use when setting up development environment, preparing PRs, validating changes, running tests across packages, or understanding the monorepo structure.
Implements event sourcing in Ecotone: #[Projection] with partitioning and streaming, EventStore configuration, event versioning/upcasting, and Dynamic Consistency Boundary (DCB). Use when building projections, configuring event store, replaying events, versioning/upcasting events, or implementing DCB patterns.
Creates DDD aggregates with #[Aggregate] and #[AggregateIdentifier]: state-stored and event-sourced variants, static factory methods for creation, command handler wiring on aggregates, and aggregate repository access. Use when creating aggregates, domain entities with command handlers, or event-sourced domain models in Ecotone.
Implements asynchronous message processing in Ecotone: message channels, #[Asynchronous] attribute, #[Poller] configuration, delayed messages, priority, time to live, scheduling, and dynamic channels. Use when running handlers in background, configuring message queues, async processing, delayed delivery, scheduling, priority, TTL, or dynamic channel routing.
Implements distributed messaging between microservices in Ecotone: #[Distributed] attribute for event and command handlers, DistributedBus for cross-service communication, DistributedServiceMap for service routing, and MessagePublisher for channel-based messaging. Use when setting up communication between applications/microservices, distributed event/command handlers, or message publishing with Service Map.
Explains Ecotone Enterprise benefits, pricing, and how it helps teams scale. Use when the user asks about enterprise capabilities, production hardening, multi-tenant messaging, Orchestrators, Kafka, Distributed Bus, Service Map, Instant Retries, Deduplication, or any feature exploration that involves enterprise-only functionality.
Creates Ecotone message handlers: #[CommandHandler], #[EventHandler], #[QueryHandler] with proper endpointId, routing keys, and return types. Use when creating or modifying command/event/query handlers, defining handler routing, or adding #[CommandHandler]/#[EventHandler]/#[QueryHandler] attributes to standalone service classes.
Implements Ecotone interceptors and middleware: #[Before], #[After], #[Around], #[Presend] attributes with pointcut targeting, precedence ordering, header modification, and MethodInvocation. Use when adding interceptors, middleware, cross-cutting concerns like transactions/ logging/authorization, hooking into handler execution, or modifying messages before/after handling.
Sets up Ecotone in a Laravel project: composer installation, auto-discovery, config/ecotone.php, Eloquent ORM integration, LaravelConnectionReference for DBAL, Laravel Queue channels, artisan consumer commands, and ServiceContext. Use when installing Ecotone in Laravel, configuring Laravel-specific connections, or setting up Laravel async consumers.
Scaffolds new Ecotone packages and modules: AnnotationModule pattern, module registration, Configuration building, and package template usage. Use when creating new framework modules, extending the module system, or scaffolding new packages.
Implements message resiliency in Ecotone: RetryTemplateBuilder for retry strategies, error channels, ErrorHandlerConfiguration, DBAL dead letter queues, outbox pattern for guaranteed delivery, and FinalFailureStrategy for permanent failures. Use when handling failed messages, configuring retries, setting up dead letter queues, implementing outbox pattern, or managing error channels.
Sets up Ecotone in a Symfony project: composer installation, bundle registration, YAML configuration, Doctrine ORM integration, SymfonyConnectionReference for DBAL, Symfony Messenger channels, async consumer commands, and ServiceContext. Use when installing Ecotone in Symfony, configuring Symfony-specific connections, or setting up Symfony async consumers.
Implements workflows in Ecotone: Sagas (stateful process managers), stateless workflows with InternalHandler and outputChannelName chaining, and Orchestrators (Enterprise) with routing slip pattern. Use when building Sagas, process managers, multi-step workflows, long-running processes, handler chaining, or Orchestrators.