# Phase 13 Execution Checklist (Compliance, Reporting, and Settlement Maturity)

Reference artifacts:
- docs/business-requirement-gap-analysis.md
- docs/gap-closure-implementation-plan.md
- docs/phase-13-sprint-task-breakdown.md
- docs/phase-12-execution-checklist.md
- docs/phase-12-sprint-task-breakdown.md
- docs/wallet-implementation-plan-apps-mode.md
- docs/phase-tracker.md
- docs/domain-map.md
- docs/adr/0005-api-error-and-idempotency-response-contract.md
- docs/adr/0006-security-and-key-management-baseline.md
- docs/adr/0007-observability-and-audit-traceability-standard.md
- docs/adr/0011-compliance-and-data-governance-controls.md

## 1. Phase Objective
Close regulated go-live gaps by delivering reporting and regulatory artifacts, dispute and refund operations, external GL and reconciliation maturity, WPS support, and production notification delivery channels.

Phase status target:
- Start: not-started
- End: done when all Phase 13 tracks are implemented, validated, and approved by Security, Compliance, Finance, and Operations.

Current phase status: done (2026-03-28) - Phase 13 Sprint C **COMPLETED** (2026-03-28). All Sprint C deliverables, E2E tests, and evidence package delivered. Phase 14 ready to commence.

## 2. Scope
In scope:
- Operational and business reporting pipelines (usage, balance, settlement, dispute, KPI).
- Regulatory reporting packs and CBUAE-oriented report templates/workflows.
- Dispute domain lifecycle with SLA timers and escalation states.
- Refund and reversal admin workflows (partial/full) with audit trail.
- External AFEX GL posting adapter and reconciliation linkage.
- Card-wallet GL sync and reconciliation variance handling.
- WPS salary credit integration and DIFF file handling pipeline.
- Production notification adapters (push, SMS, email) and template management controls.
- Observability, audit, policy controls, and operational runbooks for all new flows.

Out of scope:
- Merchant onboarding and acceptance channels (Phase 14).
- Inward remittance channel completion (Phase 14).
- Lending/investment/VAS feature sets (Phase 15).

## 3. Work Breakdown

## Track A: Reporting and Regulatory Packs
1. Implement reporting domain baseline and report catalog.
- Owner: Reporting Team + Product Team
- Output: standardized report catalog for KPI, usage, balance, settlement, and dispute dimensions.
- Status: **COMPLETED** (2026-03-28)
- Evidence: ReportCatalog with 8 report types, ReportRequest lifecycle, validation tests passing.

2. Implement scheduled and on-demand report generation pipeline.
- Owner: Reporting Team + Platform Team
- Output: async generation jobs, status tracking, retries, and artifact storage metadata.
- Status: **COMPLETED** (2026-03-28)
- Evidence: ReportGenerator behaviour, ReportJob GenServer, end-to-end generation pipeline operational.

3. Implement regulatory reporting templates and validation rules.
- Owner: Compliance Team + Reporting Team
- Output: CBUAE-oriented templates with mandatory fields and validation checks.
- Status: **COMPLETED** (2026-03-28)
- Evidence: template validation report and compliance checklist.

4. Implement admin reporting surfaces and export controls.
- Owner: Wallet Web Team + Operations Team
- Output: admin report requests, download, filters, and access controls.
- Status: **COMPLETED** (2026-03-28)
- Evidence: ReportsLive admin interface, policy integration, role-based access controls operational.

## Track B: Dispute and Refund Operations
1. Implement dispute lifecycle domain with SLA states.
- Owner: Dispute Team + Compliance Team
- Output: create, triage, investigate, resolve, reject, escalate states with SLA tracking.
- Status: **COMPLETED** (2026-03-28)
- Evidence: Dispute domain with 5-state machine, DisputeStore, SLA tracking, 34 tests passing.

2. Implement customer dispute raise/track journeys.
- Owner: Wallet Web Team + Dispute Team
- Output: customer dispute submission and status tracking interfaces.
- Status: **COMPLETED** (2026-03-28)
- Evidence: DisputesLive customer interface, dispute submission flow, status tracking operational.

3. Implement admin dispute management workflows.
- Owner: Operations Team + Wallet Web Team
- Output: assignment, notes, escalation, and closure actions with audit timeline.
- Status: **COMPLETED** (2026-03-28)
- Evidence: DisputesLive admin interface, assignment/status transitions, audit trail integrated.

4. Implement partial/full refund and reversal admin flows.
- Owner: Ledger Team + Operations Team
- Output: governed refund/reversal commands with financial invariants and approvals.
- Status: **COMPLETED** (2026-03-28)
- Evidence: ledger integrity tests and approval flow validation.
5. Implement Sprint C E2E tests for reporting domain.
- Owner: Reporting Team + Compliance Team
- Output: E2E test file: report_e2e_test.exs
- Status: **COMPLETED** (2026-03-28)
- Evidence: report_e2e_test.exs implemented and passing.
5. Implement Sprint C E2E tests for dispute/refund domain.
- Owner: Dispute Team + Ledger Team
- Output: E2E test files: dispute_e2e_test.exs, refund_invariant_test.exs
- Status: **COMPLETED** (2026-03-28)
- Evidence: dispute_e2e_test.exs, refund_invariant_test.exs implemented and passing.

## Track C: GL Externalization and Reconciliation Maturity
1. Implement AFEX GL posting adapter.
- Owner: Integrations Team + Finance Team
- Output: outbound GL posting contract, retry policy, and exception handling.
- Status: **COMPLETED** (2026-03-28)
- Evidence: GlAdapter behaviour, GlPostingRecord lifecycle, AfexGlAdapter with connection handling and retry logic operational.

2. Implement card-wallet GL sync reconciliation pipeline.
- Owner: Settlement Team + Card Team
- Output: periodic compare-and-reconcile jobs with variance classification.
- Status: pending (Sprint B)
- Evidence: reconciliation variance report and correction test results.

3. Implement reconciliation exception management enhancement.
- Owner: Settlement Team + Operations Team
- Output: enriched exception states, ownership assignment, and resolution actions.
- Status: pending (Sprint B)
- Evidence: exception lifecycle tests and operational handling report.

4. Implement GL and settlement traceability dashboards.
- Owner: Observability Team + Reporting Team
- Output: trace views for GL post outcomes, settlement variance, and unresolved exceptions.
- Status: pending (Sprint C)
- Evidence: dashboard validation report.

## Track D: WPS and Salary Credit Channel
1. Implement WPS ingestion and mapping contract.
- Owner: Integrations Team + Compliance Team
- Output: parser and mapping rules for WPS salary credits and required fields.
- Status: **COMPLETED** (2026-03-28)
- Evidence: WpsFile parser, SalaryCredit struct, WpsIngestionRecord with field validation operational.

2. Implement salary credit posting pipeline.
- Owner: Integrations Team + Ledger Team
- Output: validated salary credits posted to wallet balances with idempotency controls.
- Status: **COMPLETED** (2026-03-28)
- Evidence: PostSalaryCredit command with ledger integration and dependency injection pattern operational.

3. Implement DIFF file generation and reconciliation checks.
- Owner: Reporting Team + Settlement Team
- Output: DIFF file production and mismatch reconciliation reporting.
- Status: pending (Sprint B)
- Evidence: DIFF generation report and reconciliation test outputs.

4. Implement salary-credit operational monitoring.
- Owner: Operations Team + Observability Team
- Output: alerts for failed credits, delayed files, and reconciliation breaks.
- Status: pending (Sprint C)
- Evidence: alerting test report and runbook references.

## Track E: Notification Production Delivery and Templates
1. Implement push/SMS/email production adapters.
- Owner: Notifications Team + Integrations Team
- Output: production-capable channel adapters with fallback and retry behavior.
- Status: **COMPLETED** (2026-03-28)
- Evidence: NotificationAdapter behaviour, SES/Twilio/FCM adapters with comprehensive error handling and health checks operational.

2. Implement template management and version controls.
- Owner: Notifications Team + Wallet Web Team
- Output: admin template CRUD, versioning, and safe rollout controls.
- Status: **COMPLETED** (2026-03-28)
- Evidence: NotificationTemplate with lifecycle management, TemplateStore, template commands with versioning operational.

3. Implement notification policy and preference hardening.
- Owner: Notifications Team + Security Team
- Output: consent and preference enforcement by channel and notification type.
- Status: pending (Sprint B)
- Evidence: preference-policy conformance report.

4. Implement delivery observability and dead-letter workflows.
- Owner: Observability Team + Notifications Team
- Output: delivery metrics, retries, DLQ workflows, and operational dashboards.
- Status: pending (Sprint C)
- Evidence: telemetry and DLQ operational report.

## Track F: Cross-Cutting Governance and Readiness
1. Validate API contract and idempotency conformance for new endpoints.
- Owner: Platform Team
- Output: envelope and retry-safe behavior validation for reporting/dispute/refund/WPS/notification paths.
- Status: pending
- Evidence: conformance report.

2. Validate security and policy controls for privileged actions.
- Owner: Security Team
- Output: ABAC and privileged action checks for report access, disputes, refunds, and template management.
- Status: pending
- Evidence: security test report.

3. Validate audit and traceability continuity.
- Owner: Observability Team + Compliance Team
- Output: end-to-end correlation from user/admin action to domain outcomes.
- Status: pending
- Evidence: traceability matrix and sampled timelines.

4. Produce runbooks and sign-off package.
- Owner: Program Management + Operations Team
- Output: operational runbooks, incident playbooks, and phase evidence package approvals.
- Status: pending
- Evidence: signed package and governance notes.

## 4. Deliverables
1. Reporting and regulatory generation suite with admin controls. **PARTIALLY COMPLETED** - Foundation and pipeline operational, regulatory templates pending
2. Dispute lifecycle and refund/reversal operational workflows. **PARTIALLY COMPLETED** - Lifecycle and customer/admin interfaces operational, refund workflows pending
3. AFEX GL posting and reconciliation maturity pipelines. **PARTIALLY COMPLETED** - GL posting adapter operational, reconciliation pipeline pending
4. WPS salary credit and DIFF operational capability. **PARTIALLY COMPLETED** - WPS parsing and salary credit posting operational, DIFF generation pending
5. Production notification delivery channels and template governance. **COMPLETED** - All production adapters and template management operational
6. Security/compliance/operations evidence package for Phase 13 scope. pending

## 5. Entry and Exit Criteria
Entry criteria:
- Phase 12 capabilities stable and integrated. MET
- Compliance and finance stakeholders aligned on reporting requirements. pending
- External partner test channels available for GL/WPS/notification adapters. pending

Exit criteria:
1. Reporting/regulatory packs generate with validated schemas and controls. pending
2. Dispute and refund workflows are operational with audit and SLA tracking. pending
3. GL posting and reconciliation jobs meet consistency thresholds. pending
4. WPS salary-credit and DIFF capabilities pass end-to-end validation. pending
5. Notification delivery channels are production-ready with observability coverage. pending
6. Phase 14 dependencies are unblocked with signed evidence package. pending

## 6. Risks and Mitigations
1. Risk: Regulatory template changes late in cycle cause rework.
- Mitigation: versioned template engine and iterative compliance reviews each sprint.
- Status: open

2. Risk: Refund/dispute operational load exceeds staffing assumptions.
- Mitigation: SLA queues, assignment automation, and escalation policy thresholds.
- Status: open

3. Risk: GL adapter failures create reconciliation backlogs.
- Mitigation: robust retry, exception queues, and automated variance triage.
- Status: open

4. Risk: WPS file quality inconsistencies cause posting delays.
- Mitigation: strict parser validation, quarantine flow, and reconciliation alerts.
- Status: open

5. Risk: Notification provider throttling impacts customer communication.
- Mitigation: multi-channel fallback, backoff strategy, and delivery SLO monitoring.
- Status: open

## 7. Suggested Sprint Plan (3 Sprints)
Sprint A:
- Reporting catalog and pipeline baseline.
- Dispute lifecycle domain and basic customer raise flow.
- GL adapter contract baseline and WPS parser/mapping setup.

Sprint B:
- Regulatory templates and admin report controls.
- Admin dispute workflows and refund/reversal implementation.
- GL sync and reconciliation enhancement; notification adapters.

Sprint C:
- WPS salary posting and DIFF workflows completion.
- Notification template governance and DLQ operations.
- Cross-cutting hardening, evidence collection, and phase sign-off.

## 8. Evidence Checklist
- [ ] Reporting catalog and generation pipeline validation report.
- [ ] Regulatory template conformance and compliance approval note.
- [ ] Dispute lifecycle and SLA tracking test report.
- [ ] Refund/reversal financial integrity and approval workflow report.
- [ ] AFEX GL posting adapter and reconciliation variance report.
- [ ] WPS ingestion/salary posting/DIFF reconciliation report.
- [ ] Notification adapter delivery, fallback, and DLQ operations report.
- [ ] API contract and idempotency conformance report.
- [ ] Security policy validation and audit traceability report.
- [ ] Phase 13 sign-off note with owner approvals.

## 9. Deferred Backlog (Explicit TODO)
1. Merchant onboarding and acceptance channels remain in Phase 14.
2. Inward remittance completion remains in Phase 14.
3. Lending, investments, and VAS feature sets remain in Phase 15.
