Actions
WhiteBoard Party #117
closedEngineering Audit - Database Entities vs Documentation
Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
01/12/2026
Due date:
% Done:
0%
Estimated time:
Description
Design vs Implementation Gap Analysis¶
Summary¶
| Entity Group | Alignment | Effort to Fix |
|---|---|---|
| Commitments, Timeframes, Checkins | ~95% | Minor |
| Tags and Principles | ~90% | Minor |
| Calendars, Routines, Sessions | ~85% | Small |
| Tasks and Projects | ~70% | Medium |
| Reports | ~20% | Large |
Tasks and Projects¶
Alignment: ~70%
| Design | Implementation | Gap |
|---|---|---|
status field (open, waiting, deferred, declined, stale) |
Not implemented | Need to add status field to both models |
active boolean on Tasks |
Only Projects have it | Need to add active to Task model |
completed_at auto-set on completion |
Unknown | May need service logic |
| Project completion blocks if incomplete subtasks | Unknown | May need service logic |
Calendars, Routines, and Sessions¶
Alignment: ~85%
| Design | Implementation | Gap |
|---|---|---|
| Calendars taggable/principled | No mixins on Calendar model | Need to add TaggableMixin and PrincipledMixin |
| Sessions principled | Only has TaggableMixin | Need to add PrincipledMixin |
Session status field (scheduled, completed, skipped, cancelled) |
Not implemented | Need to add status field |
| Session auto-creates Commitment | Unknown | May need service logic |
| Routine deactivation deletes future sessions (optional) | Unknown | May need service logic |
Commitments, Timeframes, and Checkins¶
Alignment: ~95%
| Design | Implementation | Gap |
|---|---|---|
| Core functionality | Fully implemented | — |
| Checkin target_types include report/tag/principle | Service only validates task/project/routine/session | Need to expand ALLOWED_TARGET_TYPES |
Tags and Principles¶
Alignment: ~90%
| Design | Implementation | Gap |
|---|---|---|
| Core CRUD + attach/detach | Fully implemented | — |
| Calendars taggable/principled | Calendar model lacks mixins | Need to add mixins |
| Sessions principled | Session model lacks PrincipledMixin | Need to add mixin |
Reports¶
Alignment: ~20%
| Design | Implementation | Gap |
|---|---|---|
| Single Report model linked to Timeframe | Five separate models (DayReport, WeekReport, etc.) | Full redesign needed |
| MetricType (user-defined metrics) | Not implemented | New model needed |
| MetricValue (metric measurements per report) | Not implemented | New model needed |
| ReportTemplate (metric configurations per timeframe kind) | Not implemented | New model needed |
| ReportTemplateMetric (join table) | Not implemented | New model needed |
| Unified text fields (plan, reason, pre_notes, post_notes) | Inconsistent fields across report types | Consolidate into unified structure |
| 1:1 Timeframe link via timeframe_id | Reports store their own date fields | Need to add timeframe_id FK |
| Remove gratitudes field | Currently on BaseReport | Remove field |
Implementation Priority¶
Priority 1: Minor fixes¶
- Expand checkin target types to include report, tag, principle
- Add TaggableMixin and PrincipledMixin to Calendar model
- Add PrincipledMixin to Session model
Priority 2: Small additions¶
- Add
statusfield to Session model - Implement session auto-creates commitment logic
- Implement routine deactivation option to delete future sessions
Priority 3: Medium changes¶
- Add
statusfield to Task and Project models - Add
activefield to Task model - Implement
completed_atauto-set logic in services - Implement project completion validation (block if incomplete subtasks)
Priority 4: Large redesign¶
- Design and implement new Report model with timeframe_id FK
- Design and implement MetricType model
- Design and implement MetricValue model
- Design and implement ReportTemplate model
- Design and implement ReportTemplateMetric join table
- Migrate existing report data (if needed) or start fresh
- Update report services and API routes
Actions