Work Package Prompt: WP03 – Intelligence - AI Merging & Gap Identification
Objectives & Success Criteria
- Integrate Gemini for content analysis.
- Unify Drupal.org and Drupal CMS documentation.
- Detect documentation gaps for D11.
Context & Constraints
- Depends on infrastructure in WP01 and WP02.
- Uses Gemini API (as decided in planning).
- Must adhere to the “Unified” consolidation strategy.
Subtasks & Detailed Guidance
Subtask T010 – Integrate Gemini API Client
- Purpose: Provide AI capabilities to the transformer.
- Steps:
- Set up
google-generativeaipackage. - Implement utility to send content for analysis/rewrite.
- Set up
- Files:
/crawler/ai_client.py.
Subtask T011 – Implement AI Merger logic
- Purpose: Consolidate disparate documentation sources.
- Steps:
- Detect overlapping topics between d.o and Drupal CMS.
- Prompt Gemini to merge them into a single, high-fidelity Markdown page.
- Files:
/crawler/transformers/ai_merger.py.
Subtask T012 – Implement Gap Analysis logic
- Purpose: Identifying what’s missing for Drupal 11.
- Steps:
- Compare existing documentation against AI’s knowledge of D11.
- Generate a JSON report of “missing sections” or “outdated D7 guidance”.
- Files:
/crawler/transformers/gap_analyzer.py.
Risks & Mitigations
- Risk: AI Hallucinations in merged documentation.
- Mitigation: Mandatory human review via the “Confirmed” workflow (WP04).
Activity Log
- 2026-03-04T12:15:00Z – system – lane=planned – Prompt created.