Review: Drupal CMS (Starshot) Recipe System for AI-Driven Site Building
· 2 min read
The Hook Drupal CMS recipes are the most practical building block for AI-driven site assembly: they translate a plan into installable modules and configuration with one apply step.
Why I Built It I wanted a compact, repeatable recipe starter that mirrors how Drupal CMS expects recipes to be packaged and applied, plus a tiny helper that lets AI tools emit a recipe YAML from structured inputs.
The Solution
I built a small recipe package and a PHP blueprint helper. The recipe installs a baseline site-building stack and creates an AI Builder role, while the helper turns a JSON brief into a valid recipe.yml.
The Code View Code
What I Learned
- Recipes are Composer packages of type
drupal-recipemeant to be unpacked and applied, not kept as runtime dependencies. - Applying a recipe happens from the webroot via
drush recipe(Drush 13+) orphp core/scripts/drupal recipe, and the core recipe-unpack workflow can place recipes in a/recipesdirectory. - Recipe configuration actions live in
recipe.ymland are expressed as config entity IDs plus actions likecreateIfNotExists,grantPermissions, andsimpleConfigUpdate. - The Recipes initiative APIs are available in core as experimental in Drupal 10.3+ and Drupal 11.
References
- https://api.drupal.org/api/drupal/composer%21Plugin%21RecipeUnpack%21README.md/11.x
- https://www.drupal.org/docs/extending-drupal/drupal-recipes/how-to-download-and-apply-drupal-recipes
- https://project.pages.drupalcode.org/distributions_recipes/config_actions.html
- https://project.pages.drupalcode.org/distributions_recipes/recipe_author_guide.html
- https://www.drupal.org/project/distributions_recipes
