# Phase 1 - Discovery and Gap Mapping

Reference artifacts:
- docs/multiwallet_suggested.md
- docs/business-requirement-gap-analysis.md
- docs/domain-map.md
- docs/wallet-implementation-plan-apps-mode.md
- docs/multi-wallet/multi-wallet-phase-tracker.md

## 1. Phase Objective
Map suggested multi-wallet requirements to current repository structures and identify compatibility-safe implementation paths.

Phase status target:
- Start: 2026-03-30
- End: **done** (2026-03-30) — all gaps mapped, implementation decisions captured, no unresolved P0 ambiguity.

## 2. Scope
In scope:
- Requirement decomposition for multi-wallet, sub-wallet, and multi-currency.
- Mapping from suggested tables to existing schemas and apps.
- Identification of reuse vs new implementation for each capability.
- Definition of non-goals for this delivery wave.

Out of scope:
- Schema migration implementation.
- Production code changes.

## 3. Work Breakdown
## Track A: Requirement Decomposition
1. Break suggested document into atomic capabilities.
- Owner: Product + Architecture
- Output: capability list with acceptance criteria.

2. Classify each capability as P0/P1/P2.
- Owner: Product
- Output: priority matrix.

## Track B: Repository Mapping
1. Identify current modules that own each capability.
- Owner: Architecture
- Output: ownership map by OTP app.

2. Detect model mismatches between suggested tables and current schemas.
- Owner: Database Team
- Output: mismatch matrix (compatible/partial/incompatible).

## Track C: Delivery Boundaries
1. Define implementation boundaries for first increment.
- Owner: Architecture + Product
- Output: first-wave scope and non-goals.

2. Confirm dependencies and external blockers.
- Owner: Program Lead
- Output: dependency register.

## 4. Execution Checklist
- [x] Capability list documented with acceptance criteria. → `docs/multi-wallet/deliverables/capability-matrix.md`
- [x] Priority matrix approved (P0/P1/P2). → `docs/multi-wallet/deliverables/capability-matrix.md` (30 P0, 11 P1, 4 P2)
- [x] Existing app ownership map documented. → `docs/multi-wallet/deliverables/repository-ownership-map.md`
- [x] Data model mismatch matrix documented. → `docs/multi-wallet/deliverables/repository-ownership-map.md` Section 2.3
- [x] First-wave scope and non-goals approved. → `docs/multi-wallet/deliverables/first-wave-scope.md`
- [x] Blocker/dependency register created. → `docs/multi-wallet/deliverables/first-wave-scope.md` Section 3
- [x] Tracker updated with Phase 1 progress. → `docs/multi-wallet/multi-wallet-phase-tracker.md`

## 5. Verification Checklist
- [x] Every P0 requirement maps to exactly one owning team. → Verified in ownership map.
- [x] Every mismatch has a proposed resolution path. → All 11 gaps have resolution paths (Section 2.3).
- [x] No unresolved critical ambiguity remains. → Canonical spec populated in `docs/multiwallet_suggested.md`.
- [ ] Stakeholder review meeting completed and minutes captured. → Pending human sign-off.

## 6. Exit Criteria
Phase completes only when:
- P0 scope is frozen.
- Mapping baseline is approved by Architecture + Product.
- Phase 2 inputs are complete and versioned.

## 7. Deliverables
- [x] Gap mapping report → `docs/multi-wallet/deliverables/repository-ownership-map.md`
- [x] Ownership matrix → `docs/multi-wallet/deliverables/repository-ownership-map.md`
- [x] Scope/non-goal statement → `docs/multi-wallet/deliverables/first-wave-scope.md`
- [x] Updated tracker entry → `docs/multi-wallet/multi-wallet-phase-tracker.md`
- [x] Requirements spec → `docs/multi-wallet/deliverables/multiwallet-requirements-spec.md`
- [x] Capability matrix → `docs/multi-wallet/deliverables/capability-matrix.md`
