aia
AI-Powered Drupal Configuration Generator
Generate Drupal configurations using natural language prompts.
The AI Architect (AIA) module enables site builders to create complex Drupal
configurations by simply describing what they need in plain English. Powered by
leading AI providers (Anthropic Claude, Google Gemini, and more via the
AI module), AIA translates your
intent into production-ready Drupal configurations — with a mandatory dry-run
preview and full rollback on every operation.
Key Features
- Content Type Generation: Create complete content types with all fields defined in one prompt
- Field Creation: Add custom fields to any existing content type
- Taxonomy Building: Generate vocabularies with pre-populated terms
- Block Creation: Create custom blocks with content and settings
- View Generation: Build views with multiple displays, fields, and filters
- Menu Generation: Generate menus with nested navigation links
- Natural Language Prompts: Describe what you want in plain English via
--promptflag or the web UI textarea - Dry-Run Mode: Preview all changes with a unified diff before applying
- Conflict Resolution: When a name already exists, choose to stop or auto-increment to the next available name
- Full Rollback: Undo any AI-generated configuration by task ID
- Audit Trail: Complete task history with timestamps and rollback links
- Drush Integration: Full CLI interface with
--promptflag - Web UI: Admin form with intent textarea, dry-run preview, and apply button
- Categorised Error Messages: Errors are classified (provider, schema, validation, conflict) with actionable suggestions
Example Usage
# Generate a content type drush aia:execute generate_content_type \ --prompt="A product catalog type with title, SKU, price, and product images" # Create a taxonomy drush aia:execute generate_taxonomy \ --prompt="Categories with terms: News, Reviews, Tutorials, How-To Guides" # Build a view drush aia:execute generate_view \ --prompt="Recent blog posts with a page at /blog and sidebar block showing 5 latest" # Generate a menu drush aia:execute generate_menu \ --prompt="Footer menu with Privacy Policy, Terms of Service, and Accessibility links" # Preview without applying drush aia:dry-run generate_menu \ --prompt="Main navigation with Home, About, and Contact"
Safety First
- Dry-Run Always First: See exactly what will change before anything is written to Drupal
- Strict Validation: All AI responses validated against schemas and business rules before application
- Conflict Detection: Naming conflicts are surfaced clearly — you choose to stop or proceed with an incremented name
- Full Rollback: Every applied change is reversible via task ID
- Audit Trail: Complete history of all AI-generated changes with user and timestamp
- Permission Control: Granular Drupal permissions for each action type
Quality & Testing
AIA is built to enterprise standards:
- 175 automated tests with 810 assertions
- 100% PHPCS compliant with Drupal and DrupalPractice coding standards
- Unit + Kernel test coverage across all 6 action plugins, all validators, and all services
- Zero violations across the entire codebase
Requirements
- Drupal 11.3+
- AI module 1.2.8+ with a configured provider
- PHP 8.1+
menu_link_contentDrupal core module (for menu generation; enabled by default)
Quick Start
- Install:
composer require drupal/aia - Enable:
drush en aia -y - Configure an AI provider at
/admin/config/ai - Navigate to
/admin/config/development/aia/executeor use Drush - Select an action, describe your intent, preview, and apply
Use Cases
- Rapid Prototyping: Scaffold a full content model in minutes
- Client Demonstrations: Generate realistic site structures on demand
- Training: Help new developers learn Drupal configuration by example
- Migration: Describe a legacy system and generate Drupal equivalents
- Documentation: Turn written specifications directly into Drupal configuration
Beta Status
This is a Beta 3 release. The module is fully functional, well-tested,
and used in real development workflows. We are gathering community feedback before
the stable 1.0 release. Please report any issues in the
issue queue.
Roadmap
Completed: Content types, fields, taxonomies, blocks, views, menus,
natural language prompts, conflict resolution, categorised error messages
Planned for Beta 4+: User role management, workflow configuration,
paragraph type generation (requires paragraphs module), batch/multi-action
execution, real AI settings UI toggle, stable 1.0 security and accessibility review