Module Possession Trend Charts — Schema Approval Follow-up
Problem
Static module possession counts are now public-safe, but trend charts require historical aggregate data that does not exist yet.
Goals
- Decide whether daily aggregate snapshots are the right historical data model.
- Get explicit human approval before any Supabase schema, migration, scheduled function, RLS, or generated-type work.
- After approval, render a lightweight collapsed trend surface on module detail pages.
Assumptions
- Option B from the completed static-count plan remains preferred: daily aggregate snapshots avoid per-user event history.
- Agents may inspect and draft proposals, but must not apply migrations/RLS/policies without explicit approval.
MVP / Structural / Polish layers
MVP
Structural
Polish
File-level checklist
Acceptance criteria
- No autonomous schema/RLS/migration work happens before explicit human approval.
- Approved trend data is aggregate-only and does not expose per-user history.
- Trend charts are hidden or collapsed by default and do not overwhelm module details.
Validation strategy
- Approved schema work:
pnpm updateBackendTypes.
- Targeted module detail/backend tests.
node scripts/checks/check-docs.cjs.
pnpm lint.
Decision log
- 2026-06-18T10:40+02:00 — Split from the completed static-count loop because historical trend snapshots require explicit schema/migration approval.
Source: internaldocs/workflow/plans/module-possession-trend-charts-schema-followup.md
Migration status: migrated from local documentation
Module Possession Trend Charts — Schema Approval Follow-up
Problem
Static module possession counts are now public-safe, but trend charts require historical aggregate data that does not exist yet.
Goals
Assumptions
MVP / Structural / Polish layers
MVP
module_possession_snapshotsschema and scheduled snapshot strategy.Structural
internaldocs/patterns/BACKEND_METHODS.md.pnpm updateBackendTypes.SupabaseServiceread methods and cache keys for trend snapshots.Polish
File-level checklist
internaldocs/patterns/BACKEND_METHODS.md— read schema-change preflight before SQL.src/backend/database.types.ts— refresh only after approved schema work.src/app/features/backend/DatabaseStrings.ts/supabase-queries.ts— add approved read path.Acceptance criteria
Validation strategy
pnpm updateBackendTypes.node scripts/checks/check-docs.cjs.pnpm lint.Decision log
Source: internaldocs/workflow/plans/module-possession-trend-charts-schema-followup.md
Migration status: migrated from local documentation