Score and improve your Drupal node content's quality and AI-readiness — powered by the Drupal AI module.
⚠ Pre-release notice —
0.0.1/ not yet on drupal.orgThis module is under active development. The
0.0.1release is a pre-release version. Public APIs, hook signatures, configuration schema, and entity structures may change without a deprecation period until1.0.0is tagged. Pin to a specific git tag in production and review the changelog before upgrading.
AI Content Auditor assesses Drupal node content against a configurable rubric and returns a quality score (0–100) plus structured improvement suggestions. It integrates with the Drupal AI module abstraction layer so it works with any compatible LLM backend (OpenAI, Ollama, Anthropic, etc.) without vendor lock-in. Results are stored as a custom content entity so score history is preserved per node over time.
| Requirement | Version |
|---|---|
| Drupal core | ^10.3 || ^11 |
| PHP | ^8.1 |
| Composer | ^2.0 |
| drupal/ai | ^1.0 (must be configured with at least one provider) |
An AI provider sub-module must also be enabled and configured — for example
drupal/ai_provider_openai, drupal/ai_provider_ollama, or another
drupal/ai-compatible integration.
Because this module is not yet listed on drupal.org, the standard
composer require drupal/ai_content_audit workflow is not available yet.
Use one of the three methods below.
Step 1. Add a repositories entry to your site's root composer.json.
Replace the placeholder URL with your actual git repository URL.
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ednark/drupal_ai_content_audit.git"
}
],
"require": {
"drupal/ai_content_audit": "0.0.1"
}
}Replace
https://github.com/ednark/drupal_ai_content_audit.gitwith the real repository URL before running Composer.
Step 2. Install:
composer require drupal/ai_content_audit:0.0.1Composer will resolve the 0.0.1 git tag, download the module into
web/modules/contrib/ai_content_audit/ (or wherever drupal-module type
packages are mapped in your composer.json extra.installer-paths), and add
it to composer.lock.
Use the same repositories entry as Method A, then require the development
branch:
composer require drupal/ai_content_audit:dev-mainOr, if your site already has minimum-stability: stable, append the @dev
flag to bypass the stability gate without changing your global stability:
composer require "drupal/ai_content_audit:dev-main@dev"If you track 1.0.x-dev instead of main:
composer require "drupal/ai_content_audit:1.0.x-dev@dev"Note: Dev-branch installs do not get a pinned version in
composer.lock. Everycomposer update drupal/ai_content_auditwill pull the latest commit from that branch. Use this only in development or staging environments.
-
Clone or download the repository:
git clone https://github.com/ednark/drupal_ai_content_audit.git \ web/modules/custom/ai_content_audit
Or download a ZIP/tarball and extract it to
web/modules/custom/ai_content_audit/. -
Ensure
drupal/aiand its dependencies are already installed via Composer (they will not be pulled automatically without Composer):composer require drupal/ai
-
Enable the module (see Enabling the Module below).
Caveat: Manual installs bypass Composer's autoloader registration and dependency resolution. If
drupal/aior other dependencies are missing, Drupal will throw class-not-found errors. Prefer Method A or B in any environment where Composer is available.
Via Drush (recommended):
drush en ai_content_audit
drush crVia the admin UI: navigate to /admin/modules, search for AI Content
Auditor, tick the checkbox, and click Install.
-
Configure an AI provider at
/admin/config/ai/providers. At least one provider (e.g. OpenAI) must be set up and tested before the auditor can generate assessments. -
Configure the module at
/admin/config/ai/content-audit(ai_content_audit.settingsroute). Options include selecting which node types to audit, default provider/model, on-save assessment behaviour, and score display settings.
| Permission | Intended for |
|---|---|
view ai content assessment |
Editors — read-only access to results |
run ai content assessment |
Editors — trigger assessments |
administer ai content audit |
Admins — full settings access |
- Open any existing node's edit form.
- Click the "AI Assessment" sidebar tab (AIRO panel).
- Click "Assess Now".
- View the score and suggestions live.
- See full history at
/node/{nid}/ai-assessment.
# Assess a single node synchronously
drush ai_content_audit:assess --nid=42
# Enqueue all configured node types for background assessment
drush ai_content_audit:assess --all
# Enqueue only article nodes
drush ai_content_audit:assess --all --type=article
# Process the assessment queue
drush queue:run ai_content_audit_assessmentNote: The deprecated
drush ai_content_audit:site-auditcommand has been removed. Usedrush ai_content_audit:assess --allto enqueue bulk assessments.
drush pmu ai_content_audit
drush crOr navigate to /admin/modules/uninstall and uninstall AI Content Auditor.
After uninstalling, clean up your composer.json if you used Method A or B:
- Remove the
repositoriesentry pointing at the git URL. - Remove
"drupal/ai_content_audit"from therequireblock. - Run
composer remove drupal/ai_content_auditif it wasn't removed automatically, thencomposer update --lock.
Data note: Uninstalling the module will delete all stored
ai_content_assessmententities and drop the associated database tables. Export or back up any assessment data you want to keep before uninstalling.
- AI Readiness Score (0–100) for any node
- Structured assessment covering readability, SEO signals, content completeness, tone, and improvement suggestions
- Assessment history per node accessible via a dedicated tab (
/node/{nid}/ai-assessment) - AIRO panel — AJAX-driven sidebar panel on node edit forms with score, action items, technical audit, and preview tabs
- Inline score widget — lightweight score badge embeddable on node view pages
- Block plugin for displaying the latest score on node view pages
- On-save background assessment via Drupal Queue API (optional, disabled by default)
- Drush command for bulk and targeted assessment
- Provider-agnostic — works with any
drupal/ai-compatible LLM backend - Sub-module included:
ai_site_audit— site-wide content type rollup dashboard
FieldExtractor → reads all displayable text fields from a node
AiAssessmentService → calls ai.provider chat(), parses JSON response, saves entity
AiContentAssessment → custom content entity storing scores, JSON result, raw output
AiResponseSubscriber → subscribes to ai.post_generate_response for logging
AiAssessmentBlock → displays latest score on node view pages
AiAssessmentController → history tab on node canonical
AiroPanelController → AIRO sidebar panel (open, assess, status, widget-refresh)
AiAssessmentQueueWorker → background cron processing
SettingsForm → /admin/config/ai/content-audit configuration
AiContentAuditCommands → drush aca command
AuditCheckManager → plugin manager for technical and filesystem audit checks
TechnicalAuditService → runs Technical AuditCheck plugins against a node's site context
FilesystemAuditService → runs Filesystem AuditCheck plugins (site-wide checks)
- All AI calls go through
drupal/ai'sProviderProxy— pre/post events fire automatically. - JSON recovery: 3-stage parse (direct → strip markdown fences → regex extract).
- Cache invalidation:
ai_content_assessment_list:node:{nid}custom cache tag. - On-save queueing is off by default to avoid unexpected API costs.
- Technical and filesystem checks are implemented as
AuditCheckannotated plugins undersrc/Plugin/AuditCheck/.
This module follows Semantic Versioning. Versions
below 1.0.0 are pre-release and may include breaking changes to APIs,
configuration schema, or entity structure without a formal deprecation cycle.
Once the module stabilises, tagged stable releases will be made on the
1.0.x branch. Breaking changes after 1.0.0 will be accompanied by a major
version bump and a migration path.
Once this module is reviewed, approved, and published on drupal.org, the VCS
repositories entry in your composer.json can be removed and installation
will switch to the standard Composer workflow:
composer require drupal/ai_content_auditAt that point the git-based repositories entry is no longer needed and can
be deleted from your site's composer.json.
Issues & contributions: Please open issues and pull requests on the project
repository at https://github.com/ednark/drupal_ai_content_audit/issues.
License: GPL-2.0-or-later