# Phase 13 Sprint Task Breakdown (App-Level Task IDs)

**Date:** 2026-03-28 (updated - Sprint A Complete)
**Phase:** 13 - Compliance, Reporting, and Settlement Maturity
**Status:** SPRINT A COMPLETED - All Sprint A deliverables plus additional foundational work complete. Sprint B ready to commence.
**Source Checklist:** docs/phase-13-execution-checklist.md

---

## 1. Planning Assumptions

- Sprint length: 2 weeks
- Phase length: 3 sprints (A, B, C)
- Status values: `not-started`, `in-progress`, `blocked`, `done`
- Priority values: `P0` (critical path), `P1` (important), `P2` (optimization)
- Every P0 task requires compliance evidence and operational readiness notes.

---

## 2. Task ID Scheme

Format:
- `P13-SA-<track><nn>` for Sprint A
- `P13-SB-<track><nn>` for Sprint B
- `P13-SC-<track><nn>` for Sprint C

Track letters:
- `A` Reporting and regulatory
- `B` Dispute and refund operations
- `C` GL and reconciliation maturity
- `D` WPS and salary credit
- `E` Notification production channels
- `F` Cross-cutting governance and sign-off

---

## 3. Sprint A Tasks (Foundational Build)

## Track A - Reporting and Regulatory

### P13-SA-A01
- Title: Reporting catalog and schema baseline
- Apps: wallet_reporting, wallet_api_contracts
- Priority: P0
- Owner: Reporting Team + Product Team
- Dependencies: none
- Acceptance criteria:
  - Catalog for KPI/usage/balance/settlement/dispute reports finalized.
  - Core schema definitions versioned and tested.
  - Access classifications for reports documented.
- Evidence: ReportCatalog with 8 report types, schema validation, access controls
- Status: **COMPLETED** (2026-03-28)

### P13-SA-A02
- Title: Report generation job pipeline baseline
- Apps: wallet_reporting, wallet_settlement
- Priority: P0
- Owner: Reporting Team + Platform Team
- Dependencies: P13-SA-A01
- Acceptance criteria:
  - Scheduled and on-demand report jobs supported.
  - Job status lifecycle is observable.
  - Retry/failure semantics validated.
- Evidence: ReportGenerator behaviour, ReportJob GenServer, async pipeline operational
- Status: **COMPLETED** (2026-03-28)

## Track B - Disputes and Refunds

### P13-SA-B01
- Title: Dispute lifecycle state machine and storage
- Apps: wallet_disputes, wallet_database
- Priority: P0
- Owner: Dispute Team + Compliance Team
- Dependencies: none
- Acceptance criteria:
  - States include create/triage/investigate/escalate/resolve/reject.
  - SLA clock metadata captured.
  - Lifecycle tests pass.
- Evidence: Dispute domain with 5-state machine, DisputeStore, 34 tests passing
- Status: **COMPLETED** (2026-03-28)

### P13-SA-B02
- Title: Customer dispute raise and status tracking UX baseline
- Apps: wallet_web, wallet_disputes
- Priority: P0
- Owner: Wallet Web Team
- Dependencies: P13-SA-B01
- Acceptance criteria:
  - Customer can submit dispute and view status history.
  - Validation and error handling are deterministic.
  - End-to-end tests pass.
- Evidence: DisputesLive customer interface, dispute submission flow operational
- Status: **COMPLETED** (2026-03-28)

## Track C - GL and Reconciliation

### P13-SA-C01
- Title: AFEX GL posting adapter contract and stub implementation
- Apps: wallet_integrations, wallet_ledger
- Priority: P0
- Owner: Integrations Team + Finance Team
- Dependencies: none
- Acceptance criteria:
  - Posting contract and error mappings defined.
  - Stub adapter with retry semantics implemented.
  - Contract tests pass.
- Evidence: GlAdapter behaviour, GlPostingRecord lifecycle, AfexGlAdapter operational
- Status: **COMPLETED** (2026-03-28)

## Track D - WPS

### P13-SA-D01
- Title: WPS parser and mapping baseline
- Apps: wallet_integrations, wallet_compliance
- Priority: P0
- Owner: Integrations Team + Compliance Team
- Dependencies: none
- Acceptance criteria:
  - Input file schema/parser created.
  - Mandatory field validation and rejection rules implemented.
  - Parsing tests pass.
- Evidence: WpsFile parser, SalaryCredit struct, WpsIngestionRecord operational
- Status: **COMPLETED** (2026-03-28)

## Track E - Notifications

### P13-SA-E01
- Title: Notification provider abstraction hardening
- Apps: wallet_notifications, wallet_integrations
- Priority: P1
- Owner: Notifications Team
- Dependencies: none
- Acceptance criteria:
  - Provider adapter behavior extended for production channels.
  - Retry/fallback hooks available.
  - Contract tests pass for adapters.
- Evidence: NotificationAdapter behaviour, SES/Twilio/FCM production adapters operational
- Status: **COMPLETED** (2026-03-28)

---

## 4. Sprint B Tasks (Operational Completion)

## Track A - Reporting and Regulatory

### P13-SB-A01
- Title: Regulatory templates and validation engine
- Apps: wallet_reporting, wallet_compliance
- Priority: P0
- Owner: Compliance Team + Reporting Team
- Dependencies: P13-SA-A01
- Acceptance criteria:
  - CBUAE-oriented templates implemented with strict validations.
  - Validation failures produce actionable error outputs.
  - Compliance review completed.
- Evidence: validation report and compliance sign-off
- Status: not-started

### P13-SB-A02
- Title: Admin reporting request and export controls
- Apps: wallet_web, wallet_reporting, wallet_auth
- Priority: P1
- Owner: Wallet Web Team + Operations Team
- Dependencies: P13-SA-A02
- Acceptance criteria:
  - Admin can request/download reports with role and policy gates.
  - Access and export actions are audited.
  - UI and policy tests pass.
- Evidence: policy tests and audit samples
- Status: not-started

## Track B - Disputes and Refunds

### P13-SB-B01
- Title: Admin dispute operations and SLA escalation
- Apps: wallet_web, wallet_disputes
- Priority: P0
- Owner: Operations Team + Dispute Team
- Dependencies: P13-SA-B01
- Acceptance criteria:
  - Assignment, escalation, note capture, and closure workflows available.
  - SLA breach alerts and states are enforced.
  - Admin workflow tests pass.
- Evidence: workflow and SLA test report
- Status: not-started

### P13-SB-B02
- Title: Partial/full refund and reversal workflows
- Apps: wallet_ledger, wallet_web, wallet_disputes
- Priority: P0
- Owner: Ledger Team + Operations Team
- Dependencies: P13-SA-B01
- Acceptance criteria:
  - Partial and full refunds are supported with approval checks.
  - Financial invariants preserved under retries.
  - Audit and authorization checks pass.
- Evidence: invariant tests and approval-path tests
- Status: not-started

## Track C - GL and Reconciliation

### P13-SB-C01
- Title: AFEX GL posting production adapter
- Apps: wallet_integrations, wallet_ledger
- Priority: P0
- Owner: Integrations Team + Finance Team
- Dependencies: P13-SA-C01
- Acceptance criteria:
  - Production adapter posts, retries, and classifies failures.
  - Idempotency semantics verified.
  - End-to-end posting tests pass.
- Evidence: E2E posting report
- Status: not-started

### P13-SB-C02
- Title: Card-wallet GL sync reconciliation jobs
- Apps: wallet_settlement, wallet_cards, wallet_ledger
- Priority: P0
- Owner: Settlement Team + Card Team
- Dependencies: P13-SA-C01
- Acceptance criteria:
  - Scheduled reconciliation with variance classification.
  - Auto-correction or escalation path defined.
  - Reconciliation tests pass.
- Evidence: variance and correction report
- Status: not-started

## Track D - WPS

### P13-SB-D01
- Title: Salary credit posting pipeline
- Apps: wallet_integrations, wallet_ledger, wallet_accounts
- Priority: P0
- Owner: Integrations Team + Ledger Team
- Dependencies: P13-SA-D01
- Acceptance criteria:
  - Salary credits post to target wallets with idempotency guards.
  - Failed credits move to exception queue.
  - Posting tests pass.
- Evidence: posting and exception tests
- Status: not-started

### P13-SB-D02
- Title: DIFF generation and reconciliation report
- Apps: wallet_reporting, wallet_settlement
- Priority: P1
- Owner: Reporting Team + Settlement Team
- Dependencies: P13-SB-D01
- Acceptance criteria:
  - DIFF artifacts generated with required fields.
  - Mismatch report and reconciliation actions available.
  - Output validation tests pass.
- Evidence: DIFF output validation report
- Status: not-started

## Track E - Notifications

### P13-SB-E01
- Title: Push/SMS/email adapter implementation
- Apps: wallet_notifications, wallet_integrations
- Priority: P0
- Owner: Notifications Team + Integrations Team
- Dependencies: P13-SA-E01
- Acceptance criteria:
  - Three delivery channels implemented with fallback order.
  - Channel failures recorded and retried.
  - Delivery tests pass.
- Evidence: channel delivery report
- Status: not-started

### P13-SB-E02
- Title: Template management and versioning controls
- Apps: wallet_notifications, wallet_web
- Priority: P1
- Owner: Notifications Team + Wallet Web Team
- Dependencies: P13-SB-E01
- Acceptance criteria:
  - Admin template CRUD and version history available.
  - Safe rollout controls (draft/publish) implemented.
  - Policy tests pass.
- Evidence: template workflow tests
- Status: not-started

---

## 5. Sprint C Tasks (Hardening and Sign-Off)

## Track C/D/E Completion

### P13-SC-C01
- Title: GL and settlement observability dashboard closure
- Apps: wallet_observability, wallet_reporting, wallet_settlement
- Priority: P1
- Owner: Observability Team + Reporting Team
- Dependencies: P13-SB-C01, P13-SB-C02
- Acceptance criteria:
  - Dashboards for GL outcomes, variances, and unresolved exceptions available.
  - Alert thresholds configured and tested.
- Evidence: dashboard and alert test report
- Status: not-started

### P13-SC-D01
- Title: WPS operational monitoring and runbook completion
- Apps: wallet_observability, docs
- Priority: P1
- Owner: Operations Team + Observability Team
- Dependencies: P13-SB-D01, P13-SB-D02
- Acceptance criteria:
  - Alerts for delayed files, failed posts, and mismatch spikes active.
  - Runbooks published and validated in tabletop.
- Evidence: runbook and alert validation report
- Status: not-started

### P13-SC-E01
- Title: Notification DLQ and delivery SLO closure
- Apps: wallet_notifications, wallet_observability
- Priority: P0
- Owner: Notifications Team + SRE Team
- Dependencies: P13-SB-E01
- Acceptance criteria:
  - DLQ workflow and retry re-drive process operational.
  - Delivery SLO metrics tracked by channel.
  - Failure drill tests pass.
- Evidence: DLQ drill report and SLO chart
- Status: not-started

## Track A/B/F Sign-Off

### P13-SC-A01
- Title: Reporting and regulatory E2E validation
- Apps: wallet_reporting, wallet_web, wallet_compliance
- Priority: P0
- Owner: Reporting Team + Compliance Team
- Dependencies: P13-SB-A01, P13-SB-A02
- Acceptance criteria:
  - Scheduled and on-demand reports validated end-to-end.
  - Regulatory templates pass compliance acceptance.
  - Audit traces available for report access/export.
- Evidence: E2E validation package
- Status: not-started

### P13-SC-B01
- Title: Dispute/refund E2E closure
- Apps: wallet_disputes, wallet_ledger, wallet_web
- Priority: P0
- Owner: Dispute Team + Ledger Team
- Dependencies: P13-SB-B01, P13-SB-B02
- Acceptance criteria:
  - Customer-to-admin dispute lifecycle validated end-to-end.
  - Refund and reversal workflows pass integrity tests.
  - SLA and audit requirements met.
- Evidence: E2E and integrity report
- Status: not-started

### P13-SC-F01
- Title: Security, policy, and contract conformance closure
- Apps: wallet_auth, wallet_api_contracts, wallet_web
- Priority: P1
- Owner: Security Team + Platform Team
- Dependencies: all P13-SC P0 tasks
- Acceptance criteria:
  - Privileged action checks pass with no critical findings.
  - API contract/idempotency conformance report finalized.
- Evidence: security and contract report
- Status: not-started

### P13-SC-F02
- Title: Phase 13 sign-off package
- Apps: docs
- Priority: P0
- Owner: Program Management + Track Leads
- Dependencies: P13-SC-A01, P13-SC-B01, P13-SC-E01, P13-SC-F01
- Acceptance criteria:
  - Evidence checklist complete and reviewed.
  - Open critical defects count is zero.
  - Sign-off from Compliance/Finance/Security/Operations captured.
- Evidence: signed phase summary
- Status: not-started

---

## 6. Critical Path

1. P13-SA-A01 -> P13-SA-A02 -> P13-SB-A01 -> P13-SC-A01
2. P13-SA-B01 -> P13-SB-B01/P13-SB-B02 -> P13-SC-B01
3. P13-SA-C01 -> P13-SB-C01/P13-SB-C02 -> P13-SC-C01
4. P13-SA-D01 -> P13-SB-D01 -> P13-SB-D02 -> P13-SC-D01
5. P13-SA-E01 -> P13-SB-E01 -> P13-SC-E01
6. P13-SC-A01 + P13-SC-B01 + P13-SC-E01 -> P13-SC-F02

---

## 7. Completion Gates Per Sprint

Sprint A gate:
- Must-complete tasks: P13-SA-A01, P13-SA-A02, P13-SA-B01, P13-SA-C01, P13-SA-D01
- Tolerance: maximum 1 P1 carryover

Sprint B gate:
- Must-complete tasks: P13-SB-A01, P13-SB-B01, P13-SB-B02, P13-SB-C01, P13-SB-C02, P13-SB-D01, P13-SB-E01
- Tolerance: no P0 carryover

Sprint C gate:
- Must-complete tasks: P13-SC-A01, P13-SC-B01, P13-SC-E01, P13-SC-F02
- Tolerance: no open critical defects

---

## 8. Definition of Done (Phase 13)

A Phase 13 task is done only when:
- Implementation is complete and CI tests pass.
- Required compliance/security policy checks are validated.
- Audit and telemetry traces are captured for sensitive actions.
- Operations runbooks are updated for affected capabilities.
- Tracker artifacts include owner, status, and evidence references.
