WhiteBoard Party #117
Updated by Sam Pearson 11 days ago
This Writeup tracks alignment between design documentation Tasks and current implementation. ===== Summary ===== | Entity Group | Alignment | Effort | Projects |--------------|-----------|--------| Status: ~70% aligned | Commitments, Timeframes, Checkins | ~95% | Minor | Design | Tags and Principles | ~90% | Minor | Implementation | Calendars, Routines, Sessions | ~85% | Small | Gap | Tasks and Projects | ~70% | Medium | status field (open, waiting, deferred, declined, stale) | Reports | ~20% | Large | ===== Commitments, Timeframes, and Checkins ===== **Status: ~95% aligned** Core functionality is fully Not implemented and matches design. ==== Gaps ==== | Design | Current State | Fix | |--------|---------------|-----| Need to add status field to both models | Checkin target_types include report, tag, principle | Service only validates task, project, routine, session | Expand ALLOWED_TARGET_TYPES in CheckinService | ===== Tags and Principles ===== **Status: ~90% aligned** Core CRUD and attach/detach functionality fully implemented. ==== Gaps ==== | Design | Current State | Fix | active boolean |--------|---------------|-----| Projects have it, Tasks don't | Calendars are taggable | Calendar model lacks TaggableMixin | Add mixin Need to Calendar model | add active to Tasks | Calendars are principled | Calendar model lacks PrincipledMixin | Add mixin completed_at auto-set on completion Unknown—need to Calendar model | check service | Sessions are principled | Session model lacks PrincipledMixin | Add mixin May need service logic Project completion blocks if incomplete subtasks Unknown—need to RoutineSession model | ===== check service May need service logic Calendars, Routines, and Sessions ===== **Status: Status: ~85% aligned** Core entity structure is solid. Missing some behavioral features. ==== Gaps ==== | aligned Design | Current State | Fix | |--------|---------------|-----| Implementation | Gap Calendars taggable/principled | No Not implemented (no mixins) Need to add mixins on Calendar model | Add TaggableMixin, PrincipledMixin | | Sessions taggable/principled | Only has Sessions have TaggableMixin | Add only Need to add PrincipledMixin | | Session status field | Not implemented | Add Need to add status column to RoutineSession | field | Session auto-creates Commitment | Unknown | Verify or add Unknown—need to session generation check service | | May need service logic Routine deactivation offers to delete deletes future sessions | (optional) Unknown | Verify or add to routine May need service | ===== Tasks logic Commitments, Timeframes, and Projects ===== **Status: ~70% aligned** Basic CRUD works. Missing status system and some behavioral logic. ==== Gaps ==== | Checkins Status: ~95% aligned Design | Current State | Fix | |--------|---------------|-----| Implementation | Task status field (open, waiting, deferred, declined, stale) | Not Gap Core functionality Fully implemented | Add status column — Checkin target_types include report/tag/principle Service only validates task/project/routine/session Need to Task model | expand allowed types | Task active boolean | Not This group is in good shape—the service code matches the design closely. Tags and Principles Status: ~90% aligned Design Implementation Gap Core CRUD + attach/detach Fully implemented | Add active column to Task — Calendars taggable/principled Calendar model | lacks mixins | Project status field | Not implemented | Add status column Need to Project add mixins to Calendar Sessions principled Session model | lacks PrincipledMixin | completed_at auto-set on completion | Unknown | Verify or add Need to service layer | | Project completion blocked by incomplete subtasks | Unknown | Verify or add to service layer | ===== mixin Reports ===== **Status: Status: ~20% aligned** Current implementation uses five separate hardcoded models. aligned Design calls for a flexible, template-based system. ==== Gaps ==== | Design | Current State | Fix | |--------|---------------|-----| Implementation | Gap Single Report model | linked to Timeframe Five separate models (DayReport, WeekReport, etc.) | Consolidate into single Report model | | Report links to Timeframe (1:1) | Reports store own date fields | Add timeframe_id FK, remove date columns | Full redesign needed | Unified text fields (plan, reason, pre_notes, post_notes) | Inconsistent fields across report types | Standardize fields | MetricType (user-defined) | MetricType (user-defined metrics) | Not implemented | Create new New model | needed | MetricValue (per-report measurements) | Hardcoded columns (sleep_hours, etc.) | Create new model, migrate data | | Not implemented New model needed ReportTemplate | Not implemented | Create new New model | needed | ReportTemplateMetric | Not implemented | Create new New model | needed | Remove gratitudes field | Exists on BaseReport | Remove column | ==== Migration Notes ==== Text fields (plan, reason, pre_notes, post_notes) * Partially there (notes, start_notes, end_notes vary by type) Consolidate into unified fields 1:1 Timeframe link Not implemented (reports store their own dates) Need to add timeframe_id FK This is the big one—essentially a significant refactor requiring data migration rewrite of the reports module. Summary * Existing report data will need Entity Group Alignment Effort to be mapped to new structure Fix * Consider: migrate existing column values into MetricValues, or start fresh? ===== Prioritized Backlog ===== ==== Quick Wins (Minor effort) ==== Commitments, Timeframes, Checkins 1. Expand ~95% Minor (expand checkin target_types to include report, tag, principle target types) 2. Add TaggableMixin Tags and PrincipledMixin to Calendar model Principles 3. Add PrincipledMixin to RoutineSession model ==== Small Effort ==== ~90% 4. Add status field Minor (add mixins to RoutineSession model Calendar, Session) 5. Verify/implement session auto-creates Calendars, Routines, Sessions ~85% Small (add status, mixins, commitment on generation auto-creation) 6. Verify/implement routine deactivation option to delete future sessions ==== Tasks and Projects ~70% Medium Effort ==== 7. Add (add status field to Task and Project models 8. Add field, active field to Task model flag, service logic) 9. Implement completed_at auto-set logic in task/project services Reports 10. Implement project completion validation (block if incomplete subtasks) ==== ~20% Large Effort ==== 11. Reports redesign: a. Create MetricType model b. Create MetricValue model c. Create ReportTemplate model d. Create ReportTemplateMetric model e. Create unified Report model with timeframe_id f. Migrate or deprecate existing report models g. Update services and API routes (new models, migration, service rewrite)