Situations where Agentic AI struggles
Agentic AI often performs poorly when requests require both high level design and low level implementation at the same time. When asked to build a complete system from a broad prompt, inconsistencies can appear across files and the resulting code may not align with established Drupal conventions.
A common example occurs when generating Drupal configuration.
For example, nested menu items in Drupal frequently expose limitations in generated output. In repeated attempts to generate nested menu definitions, the following issues often appear:
- Incorrect parent link references
- Menu items that appear in the wrong location
- Valid looking configuration that does not behave correctly at runtime
This happens because the Drupal menu system relies on an understanding of how routes, menu links, and hierarchy interact. Small configuration mistakes can produce subtle errors that are not obvious from reading the YAML files alone.
Similar issues can occur with other declarative Drupal systems:
- Menu configuration files
- Local task and action links
- Permission definitions
- Routing and controller mappings
These areas require familiarity with Drupal conventions rather than only correct syntax.
Situations where Agentic AI performs well
Agentic AI produces much stronger results when the task is narrowly defined and constrained. Smaller units of work reduce the likelihood of incorrect assumptions and make it easier to verify the output.
Typical examples include:
- Implementing a single plugin or service
- Extending an existing class following a known pattern
- Updating an isolated part of a module
- Completing implementation details after the architecture is defined
Another important factor is the presence of good reference code within the project. When the codebase contains consistent patterns, the AI can mirror those patterns effectively.
This is especially useful when extending contributed modules. Pointing the AI toward an existing implementation within a module often leads to more accurate results.