# Change Commenting System Implementation Plan ## Core Requirements 1. Threaded comment conversations 2. @mention functionality 3. File/line anchoring 4. Notification system 5. Comment resolution tracking ## Technical Integration - **Model Relationships** Extend `HistoricalRecord` (line 31): ```python class HistoricalRecord(models.Model): comments = GenericRelation('CommentThread') # Enables change comments ``` - **Collaboration System** Enhance interface (line 85): ```typescript interface CollaborationSystem { createCommentThread( changeId: string, anchor: LineRange, initialComment: string ): Promise; } ``` - **UI Components** New `InlineCommentPanel` component: ```typescript interface CommentProps { thread: CommentThread; canResolve: boolean; onReply: (content: string) => void; onResolve: () => void; } ``` ## Notification Matrix | Event Type | Notification Channel | Escalation Path | |------------|----------------------|-----------------| | New comment | In-app, Email | After 24hrs → Slack DM | | @mention | Mobile push, Email | After 12hrs → SMS | | Resolution | In-app | None | ## Phase Plan 1. **Week 1**: Comment storage infrastructure 2. **Week 2**: Anchoring system & UI 3. **Week 3**: Notification pipeline 4. **Week 4**: Moderation tools & audit