6. Runtime¶
This section will contain sequence diagrams and narrative for the key runtime scenarios. Until those diagrams are authored, refer to the relevant existing content:
| Scenario | Where it is documented today |
|---|---|
| User login + MFA | stories/STORY-F-006.md (implementation in flight as of Sprint 2) |
| Clock in → timesheet → payroll | architecture/architecture.md §Runtime |
| AI agent query (conversational tier) | architecture/agents.md |
| Compliance auto-block on roster write | ADR-011-F |
| Event emission → cross-domain consumption | ADR-005-F |
| Strangler-Fig read of ASG Central v2 | ADR-010-F, architecture/data.md |
| Mobile offline → sync | architecture/mobile.md |
Planned sequence diagrams (authored in Mermaid):
- Login + TOTP — worker logs in on mobile, server issues session, TOTP challenge, LiveView mount
- Roster write with compliance gate — HR creates shift,
Compliance.check/2synchronous, event emitted on success - AI agent query — user types in Cmd+K, MCP registry lookup, tool invocation, streamed response
- Payroll run — Oban job triggers award interpretation, reads timesheets, emits
payroll.calculatedevent - Timesheet sync from mobile — offline SQLite queue → connectivity → server ingest → conflict resolution