# Admin V2 - Agent Initialization

## Goal

You are implementing the new admin experience under `app/Filament/V2/*` while preserving full backward compatibility for current admin (now considered V1).

Read first:
1. `docs/AGENT_INIT.md`
2. `docs/implementation/admin-v2/00-MASTER-PLAN.md`
3. `docs/implementation/admin-v2/logs/PHASE-11-DONE.md` (latest structural sync)

---

## Locked Constraints

| Topic | Rule |
|---|---|
| Filament version | The project is on Filament v2. No Filament v3 panel migration in this scope. |
| V1 stability | Existing admin must remain functional during all V2 phases. |
| Domain logic reuse | Reuse existing actions/services for orders, payments, invoices, bookings. |
| API contracts | Do not break existing mobile or chatbot API contracts while building V2 admin. |
| Incremental rollout | V2 behind feature flag; no big-bang switch. |
| V2 URL | V2 runs under `/admin/v2/*` during transition. |
| V2 access roles | Initial access is limited to `super_admin` and `manager`. |
| Common/global switch | Deferred to later scope; place settings are in scope now. |
| Orderables in scope | All current orderable types must be supported in V2 order workstation. |
| Payments in scope | Wallet + Stripe + NowPayments + Cash + POS in the same V2 flow. |
| Coach availability | Recurring availability is mandatory in first V2 delivery wave. |
| Family wallet rule | Active payments use family wallet; member wallet remains historical context. |
| Cardex order | Navigation order is User -> Family -> Coach -> Employee. |

---

## Folder Strategy

- V1 code path: `app/Filament/V1/*`
- V2 code path: `app/Filament/V2/*`
- Shared logic for V2 read models: `app/Actions/AdminV2/*`, `app/Data/AdminV2/*`

---

## Execution Rules

- Each phase completion must produce a log file in:
  - `docs/implementation/admin-v2/logs/PHASE-{N}-DONE.md`
- Every phase must include:
  - created/modified files list
  - migrations (if any)
  - tests added
  - risks/deviations

---

## Quality Gate

Before marking a phase done:
- `./gitCheck.sh`
- targeted feature tests for the phase
- no route regressions on V1 admin critical paths
