What problem does it solve?
Creating a new AI operation type in a Drupal AI module is repetitive and error-prone because it requires matching interfaces, data transfer objects, tests, provider wiring, and documentation.
Core Features & Use Cases
- Generates complete operation type scaffolding: creates the operation interface, input, output, and optional item/response data class under the correct
src/OperationType/{OperationName}/ structure.
- Produces unit tests automatically: creates PHPUnit unit tests for the generated input, output, and item/response classes to ensure the scaffolding behaves as expected.
- Ensures end-to-end integration with a test provider: updates the EchoAI test provider and adds a kernel test to validate the new interface call path works.
- Validates generated code before finishing: runs a verification script to confirm required files exist, signatures and attribute metadata match conventions, and provider support is registered.
Quick Start
Ask for the operation name, labels, method signature details, and normalized output/item needs, then run the create-operation-type workflow to scaffold and verify the full operation type.