ADR-003: DataSource Abstraction
Date: March 2026
Status: Accepted
Context
Headlines, poetry, and pipeline data all had different interfaces. Pipeline stages needed consistent access.
Decision
Abstract DataSource class with get_items():
Implementations:
- HeadlinesDataSource: Static RSS feed, cached
- PoetryDataSource: Static poetry feed, cached
- ListDataSource: Wraps pre-fetched items (testing)
- PipelineDataSource: Dynamic, re-fetches each cycle
Consequences
- Positive: Consistent interface across all source types
- Positive: SourceRegistry enables discovery
- Negative: Runtime overhead for dynamic sources
References
engine/data_sources/sources.py: DataSource, SourceRegistry
tests/test_data_sources.py: Comprehensive tests