How amulyaa-mohan/resolva-timecard-exception-resolution-agent works
Resolva is a deterministic-first, human-in-the-loop timecard exception resolution agent. Its principal workflow brings attendance evidence into the system, detects policy exceptions, drafts a cited correction proposal, validates it deterministically, and presents it for a manager’s approve, edit, or reject decision. Approved corrections remain separate from raw punches, with decisions recorded in an append-only audit trail. The graph includes the frontend review flow, attendance and policy stages, resolution state, and AI/retrieval internals. Some subsystem links are based on the README or source-index references; unsampled implementation details are not asserted as inspected.
Main entry points: main.py API application · ingest.py Attendance ingestion and detection · pipeline.py Proposal pipeline · main.tsx Web application
Components 22
Manager interface
- Web application
frontend/src/main.tsx - Resolution panel
frontend/src/components/ResolutionPanel.tsx - Secondary views
frontend/src/features/SecondaryViews.tsx - API client
frontend/src/lib/api.ts - UI contracts
frontend/src/types/contracts.ts
Attendance and policy
- API application
backend/app/main.py - Import routes
backend/app/attendance/imports_router.py - Attendance ingestion and detection
backend/app/attendance/ingest.py - Attendance evidence store
backend/app/attendance/postgres.py - Attendance queries
backend/app/attendance/queries.py - Policy registry
backend/app/policies/registry.py - Deterministic rules
backend/app/rules/engine.py - Attendance routes
backend/app/attendance/router.py
Resolution and audit
- Decision routes
backend/app/resolution/router.py - Resolution store
backend/app/resolution/store.py - Audit events
backend/app/audit/events.py
Proposal and retrieval
- Proposal pipeline
backend/app/ai/pipeline.py - Language assistant
backend/app/language/assistant.py - Hybrid retrieval
backend/app/retrieval/hybrid.py - LLM providers
backend/app/ai/providers/__init__.py
Other components
- Manager
- LLM service
Connections 23
- Manager → Web application: uses
README.md - Web application → Resolution panel: renders
frontend/src/main.tsx - Web application → Secondary views: renders
frontend/src/main.tsx - Resolution panel → API client: requests data
frontend/src/components/ResolutionPanel.tsx - Resolution panel → UI contracts: uses types
frontend/src/components/ResolutionPanel.tsx - Secondary views → UI contracts: uses types
frontend/src/features/SecondaryViews.tsx - API client → API application: calls API
- API application → Attendance routes: registers
backend/app/main.py - API application → Decision routes: registers
backend/app/main.py - API application → Import routes: registers
backend/app/main.py - Import routes → Attendance ingestion and detection: commits imports
backend/app/attendance/imports_router.py - Attendance ingestion and detection → Attendance evidence store: writes evidence
backend/app/attendance/ingest.py - Attendance ingestion and detection → Policy registry: resolves policy
backend/app/attendance/ingest.py - Attendance ingestion and detection → Deterministic rules: runs detection
backend/app/attendance/ingest.py - Attendance routes → Attendance queries: queries attendance
backend/app/attendance/router.py - Attendance routes → Language assistant: invokes assistant
backend/app/attendance/router.py - Decision routes → Resolution store: loads and decides
backend/app/resolution/router.py - Resolution store → Proposal pipeline: drafts proposal
backend/app/resolution/store.py - Resolution store → Audit events: records decisions
backend/app/resolution/store.py - Language assistant → Proposal pipeline: uses pipeline
backend/app/language/assistant.py - Proposal pipeline → Hybrid retrieval: retrieves evidence
backend/app/ai/pipeline.py - Proposal pipeline → LLM providers: requests completion
backend/app/ai/pipeline.py - LLM providers → LLM service: calls model