Saad Zoubir
6956f7bf95
fix: correct architecture doc drift and add withPivot gotchas
Architecture doc fixes:
- Replace `deadline` → `due_date` in all code examples (5 occurrences)
- Replace `Declaration::workspace($workspace)` → `Declaration::where('workspace_id', ...)`
(no such query scope exists; workspace() is a BelongsTo relationship)
- Add missing `mise_en_demeure` status to transition table and flow diagram
- Update transition rules: en_attente_client can transition to mise_en_demeure
Project context additions:
- Document WorkspaceUser pivot fields and withPivot requirement
- Document correct column name (due_date not deadline)
- Document Declaration scoping pattern (no workspace scope)
- Document all 6 declaration statuses including mise_en_demeure
Resolves Epic 2 retro action items A3, A4 (carried since Epic 1).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>