Create AI Validations Recipe
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3585699. --> Reported by: [breidert](https://www.drupal.org/user/135619) >>> <p>[Tracker]<br> <strong>Update Summary: </strong>[One-line status update for stakeholders]<br> <strong>Check-in Date: </strong>MM/DD/YYYY<br> <strong>Additional Collaborators: </strong><br> <em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br> [/Tracker]</p> <h3>Description</h3> <p>We want to create a new Drupal AI recipe in a separate project <code>ai_recipe_validations</code>, that provides a turnkey configuration for the <a href="https://www.drupal.org/project/ai_validations">AI Validations module</a>.</p> <p>This recipe is intended to be used in the Drupal AI Demo and must be fully compatible with <a href="https://www.drupal.org/project/ai_validations">Drupal CMS (Starshot)</a>. Instead of creating new content types, the recipe should extend existing Drupal CMS types (such as the "Page" content type or "Image" media type) to demonstrate how AI can enforce business logic and content quality during the editorial process.</p> <h3>Todo</h3> <ul> <li>Create the ai_recipe_validations recipe structure.</li> <li>Add dependencies: ai, ai_validations, and field_validation.</li> <li>Configure AI validation rules for existing Drupal CMS types: <ul> <li>Text Validation: Apply a rule to the body field of the page content type (e.g., checking for specific tone of voice or ensuring no PII is included).</li> <li> Image Validation: Apply a Vision-based rule to the image media type (e.g., ensuring uploaded images are "Alt-text friendly" or meet brand safety guidelines). </li> </ul> </li> <li>Ensure the recipe includes the necessary ai_validations configuration entities.</li> <li>Test the recipe within a Drupal CMS installation to ensure compatibility with the standard field names and structures.</li> </ul> <p><strong>Note:</strong> In a <a href="https://www.drupal.org/project/ai_initiative/issues/3585696">related issue</a> image safety is handled. Therefore, this recipe should only handle a basic image validation use case (or require the other recipe).</p> <h3>Accept</h3> <ul> <li>The recipe applies successfully to a standard Drupal CMS installation.</li> <li>The "Page" content type body field is extended with an AI-powered validation rule.</li> <li>The "Image" media type includes a vision-based validation rule that blocks non-compliant uploads.</li> <li>The validation rules provide clear, user-friendly error messages in the UI when AI validation fails.</li> </ul> <h3 id="summary-ai-usage">AI usage (if applicable)</h3> <p>[x ] AI Assisted Issue<br> This issue was generated with AI assistance, but was reviewed and refined by the creator.</p>
issue