decisions/2026-06-26-ci-data-model.md
ADR: CI Data Model v1
Date: 2026-06-26 Status: Accepted
Context
The current ledger stores sources, snapshots, signals, and synthesis_runs. That is enough to run daily and weekly reports, but not enough to power a dashboard, source repair queue, report archive, delivery audit, or stakeholder-safe action workflow.
Decision
Extend the CI ledger with four first-class concepts: source health events, report index, action items, and bot deliveries.
Schema
source_health_events
Tracks health history rather than only latest snapshot state.
Fields:
idsource_urlstatusfailure_reasonhttp_statuslast_success_atlast_failure_atfailure_streakreplacement_recommendationcreated_at
report_index
Dashboard archive index over generated Markdown, HTML, PDF, and delivery-ready summaries.
Fields:
idcadencedate_startdate_endmarkdown_pathhtml_pathpdf_pathquality_scoretop_signal_idstop_action_ownerssource_health_summarystatuscreated_at
action_items
Turns recommendations into trackable work.
Fields:
idreport_idtitleownerrecommendationevidence_signal_idsstatusprioritydue_dateathena_review_statuscreated_atupdated_at
Statuses: proposed, accepted, assigned, completed, rejected.
bot_deliveries
Separates report generation from delivery.
Fields:
idreport_idbot_profilechannelrecipientstatusdelivered_aterrorcreated_at
Rationale
The dashboard should be built on operational records, not filesystem scraping alone. Filesystem archive is useful, but it cannot answer "what failed?", "what was delivered?", "who owns the action?", or "is this stakeholder-safe?" without a data model.
Consequences
- CI v1 can index historical daily and weekly reports.
- CI bot delivery can be audited separately from Athena oversight.
- Source health becomes a product surface, not just a log line.
- Stakeholder access remains blocked until report and claim quality are explicit.