Digest Generation Services
Last Updated: 2026-03-09 Version: 2.0 (Consolidated)
The Digest services are responsible for distilling the recent knowledge capture into readable, role-specific reports.
🏛️ Service Components
🔄 DigestService
The primary orchestrator.
- Responsibility: Filtering
Knowledgeitems by date range and audience, then initiating the generation process. - Key Logic: Resolves "Natural Language" date ranges (e.g., "7 days") into absolute timestamps.
📝 DigestGenerationService
The content producer.
- Responsibility: Grouping items by category and attaching the correct
AiSummaryfor the requested role. - Output: Returns a structured data array ready for formatting.
🎨 DigestFormatterService
The presentation layer.
- Responsibility: Formatting metadata and statistics. It ensures that counts for "Total Items" and "Tags" are accurate for the specific report scope.
⚖️ Core Business Logic
Role-Specific Aggregation
A digest is always generated for a specific Role. The system ensures that only knowledge items marked for that role (or with "All" access) are included. It then picks the version of the AI summary that was generated specifically for that audience.
Thematic Grouping
Knowledge items are grouped under their respective Categories (Thematic Lists). If a category icon is available (e.g., :computer:), it is prepended to the category header in the report.
Date Range Handling
The service supports several semantic filters:
- Relative: "laatste week", "laatste maand".
- Quantitative: "14 dagen", "30 days".
Technical Details
- Namespace:
App\Service\Digest - Location:
src/Service/Digest/
IMPORTANT
A Digest itself is not persistent in the database. It is a "snapshot" view generated on-the-fly, which can then be persisted as a Page in Notion or sent to a Slack channel.