aia
Security covered
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
- Paragraph Type Generation: Create Paragraphs paragraph types with fields and display configuration (requires Paragraphs module)
- Natural Language Routing: Type a free-form goal and let the AI pick the right action — or select manually
- Pipeline Execution: Multi-step requests are planned and executed as a single session with shared rollback
- Natural Language Prompts: Describe what you want in plain English via
--promptflag or the web UI - Dry-Run Mode: Preview all changes with a structured 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, session grouping, and rollback links
- Drush Integration: Full CLI interface with
--promptflag and--auto-approve - Web UI: Admin form with intent textarea, AI routing, pipeline preview, and apply button
- Categorised Error Messages: Errors are classified (provider, schema, validation, conflict) with actionable suggestions
Example Usage
# Let the AI choose — type a free-form goal in the web UI or use the router 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" # Generate a paragraph type (requires drupal/paragraphs) drush aia:execute generate_paragraph_type \ --prompt="A card paragraph with heading, body text, and an image" # 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, timestamp, and pipeline session grouping
- Permission Control: Granular Drupal permissions for each action type
Quality & Testing
AIA is built to enterprise standards:
- 199 automated tests with 865 assertions
- 100% PHPCS compliant with Drupal and DrupalPractice coding standards
- Zero PHPStan errors at level 6
- Unit + Kernel test coverage across all 7 action plugins, all validators, all services, and the router/pipeline layer
Requirements
- Drupal 10.2+ or Drupal 11
- AI module 1.2.8+ with a configured provider
- PHP 8.1+
menu_link_contentDrupal core module (for menu generation; enabled by default)- Paragraphs module (optional — required only for
generate_paragraph_type)
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 - Type your goal, click Analyse & Plan, 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