koh / content-intelligence
Content quality and governance analysis for TYPO3 — AI-Readiness scoring, Brand Voice consistency, freshness analysis, and audit trail for AI-generated content.
Package info
github.com/ohartwig/content-intelligence
Type:typo3-cms-extension
pkg:composer/koh/content-intelligence
Requires
- php: ^8.3
- koh/ai-workflows: ^0.8
- typo3/cms-backend: ^14.0
- typo3/cms-core: ^14.0
- typo3/cms-extbase: ^14.0
- typo3/cms-fluid: ^14.0
- typo3/cms-scheduler: ^14.0
Requires (Dev)
- koh/dev-typo3: ^1.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Content quality analysis extension for TYPO3 that provides AI-Readiness scoring, brand voice consistency checks, freshness analysis, and a compliance dashboard for AI-generated content.
Features
- AI-Readiness Scoring — Evaluate how well content is structured for AI consumption
- Brand Voice Analysis — Check content consistency against defined brand voice guidelines
- Freshness Analysis — Track content age and flag stale or outdated content
- Audit Trail — Records AI-generated and AI-assisted writes that other extensions report through
AuditService::track(): one entry per call with page uid, record uid, table, field, origin (human,ai_generated,ai_assisted), AI provider, model and time. This extension writes no content itself, so it records nothing on its own: every producer must call the API (see Audit trail). An empty log means no producer reported a write, not that no AI content exists. - Compliance Dashboard — Backend module for content quality oversight, limited to the pages a user may show within their web mounts; the audit log is a separate administrators-only module
- Analyzer Pipeline — Extensible analysis chain for custom quality checks
- DDD 4-Layer Architecture — Strict layer separation enforced by deptrac
Installation
composer require koh/content-intelligence
Requirements
- PHP 8.3+
- TYPO3 14.0
koh/ai-workflows(required — workflow engine)
Architecture
Classes/
├── Domain/ # Analysis models, scoring value objects, contracts
├── Application/ # Analysis orchestration services
├── Infrastructure/ # Analyzers, persistence, HTTP clients
└── Presentation/ # Dashboard controllers, event listeners
Database Tables
| Table | Purpose |
|---|---|
tx_contentintelligence_analysis_result |
Analysis results and scores |
tx_contentintelligence_audit_entry |
Audit trail entries |
pages (extended) |
Additional fields for content intelligence metadata |
tt_content (extended) |
Additional fields for content intelligence metadata |
How analysis runs
- On save, a DataHandler hook marks the changed page (
pages.tx_contentintelligence_analysis_requested). It does not analyse and does not call the AI provider. - The scheduler task Content Intelligence: analyse content analyses the marked pages, then sweeps standard pages whose last analysis is older than the configured number of days (
0= marked pages only, default7). - Only public live content is analysed: live workspace, not hidden, inside start/end time, no frontend-group restriction, standard page type, and no ancestor that extends a restriction to its subpages. Everything else is skipped and never sent to the AI provider. The same rule applies to every analyzer.
After installing or upgrading
- Run the database schema update (adds
pages.tx_contentintelligence_analysis_requested). - Create the task Content Intelligence: analyse content in the Scheduler module and give it a schedule. Without it nothing is analysed.
- The analyzers that use AI call the provider configured in
koh/ai-workflowsonce per page and analyzer. Record that data flow in your processor register before you schedule the task.
Audit trail
Koh\ContentIntelligence\Application\Service\AuditService::track() is the public API. Call it right after your extension writes AI-generated or AI-assisted text into a record:
$this->auditService->track( pageUid: $pid, contentUid: $uid, tableName: 'tt_content', fieldName: 'bodytext', origin: ContentOrigin::AiGenerated, aiProvider: 'anthropic', aiModel: $model, );
Each call writes one row to tx_contentintelligence_audit_entry and dispatches the PSR-14 event AuditEntryCreatedEvent. Neither the prompt nor the generated text is stored. The review columns stay empty; there is no review workflow yet.
Configuration
Configure analysis rules and thresholds through the TYPO3 backend. Brand voice definitions set the baseline for consistency checks. Scoring weights can be adjusted per content type.
Development
composer install composer test # Unit tests composer test:functional # Functional tests (SQLite locally) composer phpstan # Static analysis (level 8) composer deptrac # DDD layer enforcement vendor/bin/php-cs-fixer fix # Code style (PER-CS3x0)
Dependencies
| Package | Type | Purpose |
|---|---|---|
koh/ai-workflows |
Required | Workflow orchestration engine |
koh/dev |
Dev | Shared QA tooling |
License
GPL-2.0-or-later — see LICENSE for details.