Skip to content

[PB-017] AI Economy Analytics #18

Description

@ma7moudalysalem

PB-017 — AI Economy Analytics

Owner: @ma7moudalysalemPriority: High • Iteration: 3 • Est: 21 pts

Spec folder: .specify/specs/PB-017-ai-economy/
SRS section: docs/SRS.md section 8.4 + FR-246..FR-258
Architecture: docs/ANALYTICS.md — section 6 (redaction) + figures 130, 131, 136

Goal

Turn every row already being written to AiInteractions into a FinOps + quality dashboard. Cost split by feature + provider, budget-alert automation, recommendation click-through, token efficiency, monthly redaction audit.

User stories

  • US-174 AI cost dashboard (5 pts)
  • US-175 Budget alert automation (3 pts)
  • US-176 Recommendation CTR tracking (8 pts) — adds RecommendationClickEvent entity
  • US-177 Token efficiency metrics (3 pts)
  • US-178 PII redaction compliance audit (2 pts) — adds AiRedactionAuditSample entity

Data-model additions

Two new OLTP tables — see ERD context view 6:

  • RecommendationClickEvent — CTR source
  • AiRedactionAuditSample — monthly 50-prompt sample

Blocking dependencies

  • PB-008 AI Features (source of AiInteractions — already shipped)
  • PB-016 Gold layer (FactAiInteraction joins with RecommendationClickEvent)
  • PB-011 Admin portal (hosts the new dashboard pages)

Ready for review

Done when the five AI Economy widgets are live, clicks are logged end-to-end, monthly redaction audit runs automatically, target CTR ≥ 15% and miss rate < 1% are trackable.

Metadata

Metadata

Labels

epicTracks a PB-xxx module epic

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions