# Progress

> Completed work only. Future → [roadmap.md](roadmap.md). Next milestone → [next-steps.md](next-steps.md).

## Phase 1 — Core Platform ✅

### Infrastructure & structure
- [x] Full project structure with mandatory `backend/` / `frontend/` separation
- [x] Shared library `backend/shared-lib`
- [x] Architecture section: Frontend & Backend Separation

### Core service
- [x] Config, database, cache, logging, base security
- [x] Models, APIs, Entitlement, Celery, Outbox
- [x] Tests and documentation

### Frontend
- [x] Independent Next.js, API client, white-label theme baseline

---

## Phase 2 — Identity & Access + SSO ✅

- [x] `shared/auth/jwt.py`, `shared/auth/roles.py`, Identity events in `shared/events.py`
- [x] Identity service + `identity_access_db`
- [x] Keycloak realm/clients/theme import
- [x] Core API protection (`AUTH_REQUIRED`, role deps)
- [x] Frontend SSO flow (`/login`, `/auth/callback`, `/dashboard`)
- [x] Compose services Identity + Frontend; Postgres init for identity DB

---

## Phase 3 — OTP Login + Tenant Management ✅

- [x] Core `users` + OTP request/verify + Payamak
- [x] Local JWT (HS256) for OTP users
- [x] Admin tenant CRUD + owner filtering
- [x] Frontend admin OTP/tenant UI (later aligned to central SSO)
- [x] `test_otp_auth.py`

---

## Phase 4 — Tenant Onboarding & Workspace Activation ✅

> Brief alias: sometimes called “Phase 3” externally — see [phase-numbering decision](decisions/technical/phase-numbering.md).

- [x] Core `tenant_memberships`, tenant lifecycle, branding columns, domain primary/verification fields
- [x] `users.current_tenant_id`, FREE/STARTER plan seed, onboarding APIs
- [x] `UserService` / `MembershipService` / `OnboardingService` / `TenantContextService`
- [x] Frontend onboarding wizard, tenant dashboard, tenant switcher
- [x] `test_onboarding.py` + regression suite
- [x] JIT Core user from Keycloak JWT (`UserService.resolve_current`)
- [x] Automatic tenant subdomain SSL (Celery → SSH → `provision_ssl.py`)
- [x] Reverse proxy (Nginx) + base TLS + tenant SSL automation

### Intentionally incomplete after Phase 4 (tracked in roadmap, not claimed done)
Payment gateway · real DNS/TXT custom-domain verify · legacy `POST /admin/tenants` auto membership/plan · first business module

---

## Phase D — Documentation Architecture Consolidation ✅

- [x] Target `docs/` tree (architecture, adr, development, reference, deployment, templates, phases, decisions)
- [x] Moved canonical docs with git history where possible
- [x] Deprecated stubs for old paths
- [x] ADR system initialized (ADR-001 … ADR-010)
- [x] Project principles, coding standards, testing/branching/release strategies
- [x] Module registry + provider registry + glossary
- [x] Deployment runbooks (production, SSL, monitoring, backup, restore, DR)
- [x] Roadmap / next-steps separation from progress
- [x] Phase area docs for Accounting, CRM, Restaurant, Marketplace, Automation, AI, Future
- [x] Cross-links updated in root and package READMEs

---

## Phase 5.1–5.11 — Accounting Module ✅

- [x] Phases 5.1–5.6: Foundation through Sales Integration (see prior entry)
- [x] Phase 5.7: Purchase & Inventory accounting, InventoryValuationEngine
- [x] Phase 5.8: Fixed Assets, DepreciationEngine, asset lifecycle
- [x] Phase 5.9: HCM/Payroll, PayrollEngine, payroll accounting
- [x] Phase 5.10: Financial Reporting Engine, dashboards, export framework
- [x] Phase 5.11: Compliance, Audit Framework, Governance, SoD
- [x] Alembic migration `0002_phases_57_511`
- [x] 21 tests passing

---

## Accounting Enterprise Frontend (in SuperApp) ✅ baseline

- [x] Design system tokens (light/dark) + DS components (`components/ds`)
- [x] TanStack Query providers, Sonner toasts, ColorMode
- [x] Typed `accounting-api` client (JWT + `X-Tenant-ID`, no mocks)
- [x] Accounting shell + routes: dashboard, COA, fiscal, currencies, cost centers, projects, ledger, setup, suppliers
- [x] Vouchers list/create/detail with validate/post/reverse/cancel + draft edit (ADR-010)
- [x] Foundation masters: edit/archive drawers, fiscal year/period actions, COA template import wizard
- [x] Setup checklist + completion scoreboard on dashboard
- [x] Treasury, customers, assets, payroll, reports, audit, settings pages (real APIs)
- [x] Catalog tile available → `/accounting`
- [x] Frontend docs under `docs/frontend/`

Remaining: Phase 5.12 AI UI blocked on AI provider; optional richer PDF export file delivery.

---

## Accounting Frontend Integration (FE ↔ BE 5.1–5.11) ✅

- [x] Full route/menu scan vs `/api/v1` routers; gap matrix executed
- [x] Domain rewires: payroll employees, compliance policies/risks, settlements, sales-accounting post, purchase GR + valuation, asset schedule, monitoring health
- [x] FE client: settlements, salesAccounting, purchaseInventory, compliance approvals/risks, ops PATCH
- [x] Ops documents: detail + edit; treasury receipt/payment cash/bank binding; voucher list pagination
- [x] BE list endpoints for settlements, risks, purchase posting-profiles (integration completeness)
- [x] Report: [accounting-frontend-integration-report.md](accounting-frontend-integration-report.md)
- [x] Scoreboard honesty for partial/ops-backed modules; AI remains blocked

---

## Accounting Frontend Completion Loop (business workflows) ✅

- [x] Full sidebar/submenu audit (118 routes); generic BusinessDocs stubs replaced
- [x] Thin BE APIs on existing models: asset transfer/dispose/revaluation; payroll contracts/components/payrolls; compliance workflows/approvals list/SoD/controls/violations
- [x] Domain screens: `WorkflowScreens.tsx` + typed `SpecializedOpsPage` for budget/integration/documents/settings
- [x] Money thousand-separators + party/item AJAX across operational forms
- [x] Audit report: [audits/accounting-frontend-completion-report.md](audits/accounting-frontend-completion-report.md)
- [x] Menu QA tracker: [frontend/accounting-menu-qa.md](frontend/accounting-menu-qa.md)

Remaining (honest): Phase 5.12 AI blocked; budget/DMS/integration still typed-ops interim until dedicated engines exist.

---

## Phase 6.0 — CRM Service Foundation ✅

- [x] `backend/services/crm` service scaffold (API / services / repositories / models)
- [x] Base aggregates: Lead, Contact, Organization, Opportunity, Pipeline, PipelineStage, SalesActivity, Quote
- [x] Publish-only event contracts (`crm.lead.*`, `crm.opportunity.*`, …)
- [x] CRM APIs only (`/api/v1/leads|contacts|organizations|pipelines|opportunities|activities|quotes`)
- [x] Platform provider contracts only (Automation, Customer360, Notification, Analytics, AI, Communication, Helpdesk)
- [x] Permissions `crm.*` trees; tenant isolation via `X-Tenant-ID`
- [x] Alembic `0001_initial` + `crm_db` wiring (compose port 8003)
- [x] Architecture / dependency / repository / migration / API / permission / tenant / docs tests
- [x] Docs: [crm-phase-6-0.md](crm-phase-6-0.md), module registry, phase area README

---

## Phase 6.1 — Enterprise CRM Core Business Entities ✅

- [x] Expanded Lead / Contact / Organization (numbers, multi-contact, soft delete, audit actors)
- [x] Lookups: lead_sources, lead_statuses, contact_types, organization_types, organization_industries
- [x] Lead assignments, tag engine, reusable addresses, custom fields + values
- [x] Versioned notes, attachment file-storage references (no binary), CRM audit log
- [x] Services / repositories / validators / permissions / events for Phase 6.1
- [x] Alembic `0002_phase_61_entities`
- [x] API coverage under `/api/v1` for entities + lookups
- [x] Tests: model, repository, service, API, permission, migration, validation, audit, tenant, docs
- [x] Docs: [crm-phase-6-1.md](crm-phase-6-1.md)

---

## Phase 6.2 — Enterprise Sales Process Engine ✅

- [x] Opportunity engine (number, title, revenue, probability, priority, close dates, soft delete, actors)
- [x] Unlimited pipelines + pipeline stages (start/won/lost/closed flags, required fields, exit validation)
- [x] Stage history, opportunity products (product_ref only), contact roles, competitors
- [x] Sales playbooks (versioned) + steps + assignments + completion tracking
- [x] Win/loss categories, reasons, immutable opportunity_win_loss snapshot
- [x] Rule-based forecasts (pipeline / weighted / committed; monthly/quarterly/annual)
- [x] Sales goals + targets with achievement %
- [x] Sales process definitions + sales_audit trail
- [x] Services / validators / events / permissions (`crm.pipelines|playbooks|forecasts|goals|targets.*`)
- [x] Alembic `0003_phase_62_sales_engine`; version `0.6.2.0`
- [x] API coverage for sales engine under `/api/v1`
- [x] Tests: pipeline, stage, playbook, forecast, win/loss, business rules, migration, permission, tenant, docs
- [x] Docs: [crm-phase-6-2.md](crm-phase-6-2.md)

---

## Phase 6.3 — Enterprise Sales Collaboration Platform ✅

- [x] Expanded sales activities (types, priority, CRM entity links, participants, reminders)
- [x] Tasks + checklists + completion tracking
- [x] Meetings + attendees + finish/outcome
- [x] Call logs (opportunity-linked) + call outcomes
- [x] Email threads/messages metadata only (no delivery)
- [x] Immutable sales timeline + timeline event links
- [x] Threaded/versioned comments, mentions, bookmarks, favorites
- [x] Sales team roles/members/assignments + notification preferences
- [x] Collaboration audit; events `crm.task|meeting|call|timeline|comment|mention.*`
- [x] Permissions `crm.tasks|meetings|calls|timeline|comments|mentions|team.*`
- [x] Alembic `0004_phase_63_collaboration`; version `0.6.3.0`
- [x] Tests + docs: [crm-phase-6-3.md](crm-phase-6-3.md)

### CRM Core Platform

- [x] Phases 6.0–6.3 complete (Foundation, Master Data, Sales Engine, Collaboration)

---

## Phase 7.0 — Loyalty Service Foundation ✅

- [x] `backend/services/loyalty` service scaffold (API / services / repositories / models)
- [x] Foundation aggregates: LoyaltyProgram, MembershipTier, Member, PointAccount, Reward, Campaign, LoyaltyAuditLog, OutboxEvent
- [x] No mutable balance on PointAccount — direct balance mutation forbidden (`extra=forbid`)
- [x] Optimistic locking on Program / Member / PointAccount; campaign `rule_version`
- [x] Publish-only events via transactional outbox (`loyalty.program|tier|member|point_account|reward|campaign.*`)
- [x] Loyalty APIs only (`/api/v1/programs|tiers|members|point-accounts|rewards|campaigns|audit`)
- [x] Platform provider contracts only (Notification, Analytics, Customer360, AI, ModuleIntegration, CRM, Communication, FileStorage)
- [x] Permissions `loyalty.*` trees with manage/view inheritance; tenant isolation via `X-Tenant-ID`
- [x] Alembic `0001_initial` + `loyalty_db` wiring (compose port 8004)
- [x] Soft-delete unique reclaim; IntegrityError → 409; null required-field → 422; production config guards
- [x] Enterprise validation & self-heal (incl. removal of incomplete 7.1 residue) — **52 tests passed**
- [x] Docs: [loyalty-phase-7-0.md](loyalty-phase-7-0.md), [loyalty-phase-7-0-audit.md](loyalty-phase-7-0-audit.md), ADR-011, module registry, phase area README

## Phase 7.1 — Membership Engine ✅

- [x] Lifecycle state machine (activate / renew / freeze / resume / cancel / expire / transfer)
- [x] Member lifecycle fields + `MembershipLifecycleEvent` append-only history
- [x] Program soft-delete cascade policy: reject when blocking members exist
- [x] Permissions `loyalty.members.{activate,renew,freeze,resume,cancel,expire,transfer,lifecycle.view}`
- [x] Events `loyalty.member.{activated,renewed,frozen,resumed,cancelled,expired,transferred}`
- [x] Alembic `0002_phase_71_membership`; version `0.7.1.0`
- [x] Tests green (59) including `test_phase71.py`
- [x] Docs: [loyalty-phase-7-1.md](loyalty-phase-7-1.md), [phase-handover/phase-7-1.md](phase-handover/phase-7-1.md), manifests, registry

## Phase 7.2 — Point Engine ✅

- [x] Immutable `PointLedgerEntry` append-only ledger; balance = SUM(signed amounts)
- [x] No mutable balance on `PointAccount`
- [x] Earn / redeem / adjust / expire APIs with idempotency + insufficient-balance checks
- [x] Permissions `loyalty.points.{view,earn,redeem,adjust,expire,manage}`
- [x] Events `loyalty.points.{earned,redeemed,adjusted,expired}`
- [x] Alembic `0003_phase_72_points`; version `0.7.2.0`
- [x] Tests green (61) including `test_phase72.py`
- [x] Docs: [loyalty-phase-7-2.md](loyalty-phase-7-2.md), [phase-handover/phase-7-2.md](phase-handover/phase-7-2.md), [service-snapshots/loyalty.yaml](service-snapshots/loyalty.yaml), manifests, registry

## Phase 7.3 — Rewards Engine ✅

- [x] Reward inventory fields + `RewardRedemption` lifecycle (pending/fulfilled/cancelled)
- [x] Redeem / fulfill / cancel; points via PointEngine only (`auto_commit` composition)
- [x] Permissions `loyalty.rewards.{redeem,fulfill,cancel}`, `loyalty.redemptions.view`
- [x] Events `loyalty.reward.{redeemed,fulfilled,redemption_cancelled}`
- [x] Alembic `0004_phase_73_rewards`; version `0.7.3.0`
- [x] Tests green (72) including `test_phase73.py`
- [x] Docs: [loyalty-phase-7-3.md](loyalty-phase-7-3.md), [phase-handover/phase-7-3.md](phase-handover/phase-7-3.md), snapshot, manifests

## Phase 7.4 — Campaign Engine ✅

- [x] Campaign lifecycle + versioned rules + apply grants via PointEngine
- [x] `CampaignApplication` tracking; Alembic `0005_phase_74_campaigns`; version `0.7.4.0`
- [x] Tests green; docs [loyalty-phase-7-4.md](loyalty-phase-7-4.md), [phase-handover/phase-7-4.md](phase-handover/phase-7-4.md)

## Phase 7.5 — Referral Engine ✅

- [x] ReferralProgram / ReferralCode / ReferralAttribution lifecycle
- [x] Dual-sided bonuses via PointEngine; Alembic `0006_phase_75_referral`; version `0.7.5.0`
- [x] Tests green (103); docs [loyalty-phase-7-5.md](loyalty-phase-7-5.md), [phase-handover/phase-7-5.md](phase-handover/phase-7-5.md)

## Phase 7.6 — Wallet ✅

- [x] `WalletAccount` shell + immutable `WalletLedgerEntry` (no mutable balance)
- [x] Credit / debit / adjust / transfer APIs with idempotency + insufficient-funds checks
- [x] Permissions `loyalty.wallets.{view,create,credit,debit,adjust,transfer,delete,manage}`
- [x] Events `loyalty.wallet.{opened,credited,debited,adjusted,transferred,closed}`
- [x] Alembic `0007_phase_76_wallet`; version `0.7.6.0`
- [x] Tests green (114) including `test_phase76.py`
- [x] Docs: [loyalty-phase-7-6.md](loyalty-phase-7-6.md), [phase-handover/phase-7-6.md](phase-handover/phase-7-6.md), snapshot, manifests

---

## Phase 8.0–8.10 — Enterprise Communication Platform ✅ (Production Ready — SMS MVP)

- [x] Independent `communication-service` / `communication_db` (port 8005) — not owned by CRM/Loyalty/Restaurant
- [x] Provider framework + registry (mock, payamak; stubs for email/push/whatsapp/telegram/rubika/voice)
- [x] Communication router with priority, automatic failover, retry, circuit breaker
- [x] SMS platform: sender numbers, balance, rate limits, provider logs
- [x] Template engine: variables, locale, versioning, approval, preview, rendering
- [x] Dynamic contact sources (manual, CSV, CRM/Loyalty/Restaurant/Marketplace/Accounting/Website/External REST) — resolve only, no duplication
- [x] Queue engine: async queue, scheduling, priority, backoff retry, DLQ, batch
- [x] Delivery tracking: queued/sent/delivered/failed/expired/cancelled + timeline
- [x] OTP platform: generate/verify/expire, rate limit, brute-force lock, multi-channel path
- [x] Incoming provider webhooks with signature verification
- [x] Health `/health`, Capability `/capabilities`, providers status, monitoring stats
- [x] Permissions `communication.*`; events `communication.*`; audit on every send
- [x] Alembic `0001_initial`, `0002_validation_hardening`; version `0.8.10.1`
- [x] Tests: architecture, health/security, providers/SMS/failover/queue, templates/contacts/OTP/webhooks, validators (42 passing)
- [x] **Production Ready (SMS MVP)** — feature-complete for current scope; future channels in [communication-roadmap.md](communication-roadmap.md) only
- [x] Docs: [communication-phase-8.md](communication-phase-8.md), [phase-handover/phase-8.md](phase-handover/phase-8.md), [service-snapshots/communication.yaml](service-snapshots/communication.yaml), ADR-012, module/provider registry, progress
- [x] Frontend: [frontend/modules/communication/](../frontend/modules/communication/) — SMS connected; future modules Feature Lock ([frontend/docs/communication-frontend-architecture.md](../frontend/docs/communication-frontend-architecture.md))

---

## Phase AF — AI Development Framework ✅

> Documentation-only. No business functionality. No modifications to existing services, schemas, or APIs.

- [x] Permanent area [`docs/ai-framework/`](ai-framework/README.md)
- [x] Master prompt, development loop, phase handover, quality gates
- [x] Templates: phase, service, module, entity, repository, service-layer, API, event, testing, documentation
- [x] Manifests: [phase-manifest.yaml](ai-framework/phase-manifest.yaml), [service-manifest.yaml](ai-framework/service-manifest.yaml)
- [x] Prompt rules + Cursor guidelines
- [x] Docs index / module registry / progress integration
- [x] ADR-013 Accepted
- [x] Architecture, documentation, cross-reference, link, template, and manifest validation

---

## Phase AF-Enterprise — Enterprise Development Framework Upgrade ✅

> Documentation-only. Upgrades the AI Development Framework into an Enterprise Development Framework. No business feature code. No changes to completed business phases or implementations.

- [x] [Definition of Done](ai-framework/definition-of-done.md)
- [x] [Mandatory Phase Artifacts](ai-framework/mandatory-phase-artifacts.md)
- [x] [Enterprise Completeness](ai-framework/enterprise-completeness.md)
- [x] [Boundary Rules](ai-framework/boundary-rules.md)
- [x] Master prompt, development loop, quality gates, phase/handover/testing/documentation templates upgraded
- [x] Layer templates (service, module, entity, repository, service-layer, API, event) upgraded
- [x] Prompt rules + Cursor guidelines upgraded
- [x] Project principles, testing strategy, docs index, glossary updated
- [x] [ADR-018](architecture/adr/ADR-018.md) Accepted (extends ADR-013)
- [x] Phase registered: `ai-framework-enterprise` in [phase-manifest.yaml](ai-framework/phase-manifest.yaml)
- [x] Handover: [phase-handover/phase-af-enterprise.md](phase-handover/phase-af-enterprise.md)
- [x] Backward-compatible path `docs/ai-framework/` retained; no business services modified

---

## Phase AF-Discovery — Enterprise Phase Discovery Mandate ✅

> Documentation-only. Adds mandatory Enterprise Phase Discovery before every phase. No business feature code. No changes to completed business phases or implementations.

- [x] [Enterprise Phase Discovery](ai-framework/enterprise-phase-discovery.md)
- [x] Development loop stage 1 = Discovery; quality gates include Discovery
- [x] Phase template, handover, DoD, completeness, mandatory artifacts, prompt/cursor rules updated
- [x] Master prompt + project principles updated
- [x] [ADR-019](architecture/adr/ADR-019.md) Accepted (extends ADR-018)
- [x] Phase registered: `ai-framework-discovery` in [phase-manifest.yaml](ai-framework/phase-manifest.yaml)
- [x] Handover: [phase-handover/phase-af-discovery.md](phase-handover/phase-af-discovery.md)
- [x] No business services modified

---

## Phase SC-Reg — Sports Center Platform Registration ✅

> Documentation-only registration. No business code, models, APIs, migrations, or repositories.

- [x] Phase roadmap 9.0–9.10 registered in [phase-manifest.yaml](ai-framework/phase-manifest.yaml)
- [x] Service registered in [service-manifest.yaml](ai-framework/service-manifest.yaml)
- [x] Planned modules registered in [module-registry.md](module-registry.md#sports_center)
- [x] Sports terminology added to [glossary.md](glossary.md#sports-center)
- [x] Roadmap doc: [sports-center-roadmap.md](sports-center-roadmap.md)
- [x] ADR-014 Accepted — Independent Sports Center Platform
- [x] Module boundaries + phase area README updated
- [x] Manifest / cross-reference / documentation / module validation passed

---

## Phase 9.0 — Sports Center Platform Foundation ✅

- [x] `backend/services/sports_center` service scaffold (API / services / repositories / models)
- [x] Foundation aggregates: SportsCenter, Branch, Sport, MembershipType, Membership, Coach, SportsRole, SportsPermission, Facility, Court, Room, LockerRoom, Locker, DeviceProvider, Device, AttendanceGateway, SportsConfiguration, SportsEvent, SportsSetting, SportsAuditLog
- [x] Adapter-based connector framework (QR/RFID/Barcode/Fingerprint/Face/Turnstile/Door/Payment/Attendance) — interfaces only
- [x] Platform provider contracts only (Accounting, CRM, Loyalty, Communication, Notification, Storage, AI, Identity, Customer360)
- [x] Publish-only events (`sports_center.member|membership|coach|facility|device|attendance|locker.*`)
- [x] Sports APIs under `/api/v1` + device connect/disconnect + locker assign/release
- [x] Permissions `sports_center.*` trees; tenant isolation via `X-Tenant-ID`
- [x] Alembic `0001_initial` + `sports_center_db` wiring (compose port 8006)
- [x] Architecture / API / permissions / migration / dependency / connectors / docs tests
- [x] Docs: [sports-center-phase-9-0.md](sports-center-phase-9-0.md), [phase-handover/phase-9-0.md](phase-handover/phase-9-0.md), ADR-014, module registry
- [x] No business workflow engines (booking/attendance lifecycle deferred)

---

## Phase 9.1 — Sports Center Membership Catalog ✅

- [x] Catalog aggregates: SportCategory, AgeGroup, PricingModel, MembershipPackage, MembershipPlan, MembershipRule, RenewalPolicy, FreezingRule, ExpirationPolicy
- [x] MembershipType extended with catalog refs (package/plan/pricing/age/category/policies), transferability, sort order
- [x] Validators for age range, pricing/billing/rule kinds, money amounts, catalog ref integrity
- [x] Publish-only catalog events; permissions trees for catalog modules
- [x] APIs under `/api/v1/sport-categories|age-groups|pricing-models|membership-packages|membership-plans|membership-rules|renewal-policies|freezing-rules|expiration-policies`
- [x] `/capabilities` endpoint; version `0.9.1.0`
- [x] Alembic `0002_phase_91_membership_catalog`
- [x] Tests: catalog API, tenant isolation, age validation, architecture, docs
- [x] Docs: [sports-center-phase-9-1.md](sports-center-phase-9-1.md), [phase-handover/phase-9-1.md](phase-handover/phase-9-1.md)
- [x] No member enrollment / coach / attendance / booking engines

---

## Phase 9.2 — Sports Center Member Management ✅

- [x] Members aggregate + family members, emergency contacts, medical information shells
- [x] Membership assignment (`member_id`) consuming Phase 9.1 catalog types
- [x] Status management: activate / suspend / cancel / freeze / unfreeze
- [x] Membership cards (QR/physical/digital), digital membership passes, waivers (sign), member documents (Storage refs)
- [x] Validators, permissions (`sports_center.members.*` trees), publish-only events
- [x] Alembic `0003_phase_92_member_management`; version `0.9.2.0`
- [x] Tests: members API, tenant isolation, transitions, architecture, migration, docs
- [x] Docs: [sports-center-phase-9-2.md](sports-center-phase-9-2.md), [phase-handover/phase-9-2.md](phase-handover/phase-9-2.md)
- [x] No coach / attendance / booking engines

---

## Phase 9.3 — Sports Center Coach & Staff Management ✅

- [x] Extended Coach profile (staff_kind, bio, hire_date, payroll refs)
- [x] Staff certificates, skills, working hours, availability, assignments
- [x] Alembic `0004_phase_93_coach_staff`; version `0.9.3.0`
- [x] Docs + handover [phase-9-3.md](phase-handover/phase-9-3.md)

---

## Phase 9.4 — Sports Center Scheduling & Booking ✅

- [x] Sessions, bookings, waiting list, equipment, resource reservations
- [x] Capacity checks and session/resource conflict detection
- [x] Alembic `0005_phase_94_booking`; version `0.9.4.0`; `booking_engine: true`

---

## Phase 9.5 — Sports Center Attendance & Access Control ✅

- [x] Attendance records, access logs, check-in/check-out with membership validation
- [x] Alembic `0006_phase_95_attendance`; version `0.9.5.0`; `attendance_engine: true`

---

## Phase 9.6 — Sports Center Training Management ✅

- [x] Training programs, exercises, workout plans/assignments, goals, measurements, progress, nutrition, assessments, performance, body composition
- [x] Alembic `0007_phase_96_training`; version `0.9.6.0`; `training_management: true`
- [x] Docs + handover [phase-9-6.md](phase-handover/phase-9-6.md)

---

## Phase 9.7 — Sports Center Competition & Event Management ✅

- [x] Competitions, teams, groups, registrations, matches, results, rankings, medals, judges, certificates
- [x] Alembic `0008_phase_97_competitions`; version `0.9.7.0`; `competition_management: true`
- [x] Docs + handover [phase-9-7.md](phase-handover/phase-9-7.md)

---


## Phase DP-Reg — Delivery & Fleet Platform Registration ✅

> Documentation-only registration. No business code, models, APIs, migrations, or repositories.

- [x] Phase roadmap 10.0–10.10 registered in [phase-manifest.yaml](ai-framework/phase-manifest.yaml)
- [x] Service registered in [service-manifest.yaml](ai-framework/service-manifest.yaml) (`delivery`, `delivery_db`, port 8007)
- [x] Planned modules registered in [module-registry.md](module-registry.md#delivery)
- [x] Delivery terminology added to [glossary.md](glossary.md#delivery--fleet-platform)
- [x] Roadmap doc: [delivery-roadmap.md](delivery-roadmap.md)
- [x] ADR-015 Accepted — Independent Delivery & Fleet Platform
- [x] Module boundaries + phase area README updated
- [x] Handover: [phase-handover/phase-dp-reg.md](phase-handover/phase-dp-reg.md)
- [x] Manifest / cross-reference / documentation / module validation passed

---

## Phase XP-Reg — Experience Platform Registration ✅

> Documentation-only registration. No business code, models, APIs, migrations, or repositories.

- [x] Phase roadmap 11.0–11.10 registered in [phase-manifest.yaml](ai-framework/phase-manifest.yaml)
- [x] Service registered in [service-manifest.yaml](ai-framework/service-manifest.yaml) (`experience`, `experience_db`, port 8008)
- [x] Planned modules registered in [module-registry.md](module-registry.md#experience)
- [x] Experience terminology added to [glossary.md](glossary.md#experience-platform)
- [x] Roadmap doc: [experience-roadmap.md](experience-roadmap.md)
- [x] Phase doc: [experience-phase-xp-reg.md](experience-phase-xp-reg.md)
- [x] ADR-016 Accepted — Independent Enterprise Experience Platform (Torbat Pages)
- [x] Module boundaries + database architecture + schema notes + phase area README updated
- [x] Historical `website_builder` marked prefer-`experience` (ADR-016)
- [x] Handover: [phase-handover/phase-xp-reg.md](phase-handover/phase-xp-reg.md)
- [x] Manifest / cross-reference / documentation / module validation passed

---

## Phase 11.0 — Experience Platform Foundation ✅

- [x] Independent `backend/services/experience` (`experience_db`, port **8008**, version **0.11.0.0**, commercial product **Torbat Pages**)
- [x] Foundation aggregates: Workspace, LocaleProfile, ExternalProviderConfig, RenderEngineRegistration, Configuration, Setting, Role/Permission shells, AuditLog
- [x] `GET /health`, `/capabilities`, `/metrics`; permissions `experience.*`; publish-only events
- [x] Provider contracts only (Storage, CRM, Hospitality, Marketplace, Sports, Delivery, Communication, Loyalty, Accounting, AI, Automation, …)
- [x] Alembic `0001_initial`; compose + `.env.example` + `init-dbs.sql` wiring
- [x] Tests: architecture, API, tenant isolation, permissions, migration, dependency, security, docs
- [x] Docs: [experience-phase-11-0.md](experience-phase-11-0.md), [phase-handover/phase-11-0.md](phase-handover/phase-11-0.md)
- [x] No sites/pages/page-builder/theme/template/CMS/forms engines

---

## Phase 11.1 — Experience Sites & Page Resources ✅

- [x] Sites under workspaces (multiple sites); draft/publish/archive lifecycle
- [x] Pages-as-resources with page types (landing, menu, bio, portfolio, QR, blog, …)
- [x] Site domain/subdomain binding refs (`experience_site_domains`)
- [x] Permissions `experience.sites.*` / `experience.pages.*` / `experience.domains.*`
- [x] Events `experience.site.*` / `experience.page.*` / `experience.site_domain.*`
- [x] Alembic `0002_phase_111_sites_pages`; version `0.11.1.0`
- [x] Tests: sites API, tenant isolation, publish/archive rules, architecture, migration, docs
- [x] Docs: [experience-phase-11-1.md](experience-phase-11-1.md), [phase-handover/phase-11-1.md](phase-handover/phase-11-1.md)
- [x] No page builder / theme / template engines

---

## Phase 11.2 — Experience Component Library & Versioning ✅

- [x] Versioned component catalog (`ExperienceComponent`) with kinds + lifecycle
- [x] Immutable published component versions (`ExperienceComponentVersion`)
- [x] Page composition shells (`PageComponentPlacement` slot pins)
- [x] Policies, specifications, commands, queries; list filter/sort/search
- [x] Permissions `experience.components.*`; events `experience.component*` / `experience.page_component.*`
- [x] Alembic `0003_phase_112_components`; version `0.11.2.0`
- [x] Tests: policies, API flow, immutability, tenant isolation, architecture, migration, docs
- [x] Docs: [experience-phase-11-2.md](experience-phase-11-2.md), [phase-handover/phase-11-2.md](phase-handover/phase-11-2.md)
- [x] No theme / layout engines

---

## Phase 11.3 — Experience Theme & Layout Engine ✅

- [x] Replaceable theme packs (`ExperienceTheme`) with tokens + directionality
- [x] Dynamic layouts (`ExperienceLayout`) with regions/slots shells
- [x] Site theme + page layout assignments (swap without rewriting pages)
- [x] Policies, specifications, commands, queries; list filter/sort/search
- [x] Permissions `experience.themes.*` / `experience.layouts.*`
- [x] Events `experience.theme.*` / `experience.layout.*` / `experience.site_theme.*` / `experience.page_layout.*`
- [x] Alembic `0004_phase_113_themes_layouts`; version `0.11.3.0`
- [x] Tests: policies, API flow, tenant isolation, architecture, migration, docs
- [x] Docs: [experience-phase-11-3.md](experience-phase-11-3.md), [phase-handover/phase-11-3.md](phase-handover/phase-11-3.md)
- [x] No template catalog engine

---

## Phase 11.4 — Experience Template System ✅

- [x] Template catalog (`ExperienceTemplate`) — code, name, page_type, category, tags, starter-pack flag
- [x] Immutable published template versions (`ExperienceTemplateVersion`) with `blueprint_json`
- [x] Template instantiation (`TemplateInstantiation`) — audit trail from a published version to a created page
- [x] Lifecycle: draft → active → deprecated/archived; version draft → published (immutable) → retired
- [x] Policies, specifications, commands, queries; list filter/sort/search
- [x] Permissions `experience.templates.*` (full CRUD tree)
- [x] Events `experience.template.*` / `experience.template_version.*` / `experience.template.instantiated`
- [x] Alembic `0005_phase_114_templates`; version `0.11.4.0`
- [x] Tests: health, full lifecycle + instantiation flow, tenant isolation, immutable version update blocked, architecture, migration, permissions, docs
- [x] Docs: [experience-phase-11-4.md](experience-phase-11-4.md), [phase-handover/phase-11-4.md](phase-handover/phase-11-4.md)
- [x] No forms / surveys / locales / media / SEO engines

---

## Phase 11.5 — Experience Localization, RTL/LTR & Media ✅

- [x] Site locale bindings (`SiteLocaleBinding`) — locale profile + concrete RTL/LTR + default flag
- [x] Localization shells (`ExperienceLocalization`) — target/locale upsert with directionality
- [x] Media refs (`ExperienceMediaRef`) — `storage_file_ref` only; reject data-URI / binary metadata
- [x] Policies, specifications, commands, queries; list filter/sort/search
- [x] Permissions `experience.locales.*` / `experience.media_refs.*`
- [x] Events `experience.site_locale.*` / `experience.localization.*` / `experience.media_ref.*`
- [x] Alembic `0006_phase_115_localization_media`; version `0.11.5.0`
- [x] Tests: health, binding + localization lifecycle, media isolation, architecture, migration, permissions, docs
- [x] Docs: [experience-phase-11-5.md](experience-phase-11-5.md), [phase-handover/phase-11-5.md](phase-handover/phase-11-5.md)
- [x] No forms / surveys / appointments / SEO engines

---

## Phase 11.6 — Experience Forms, Surveys & Appointments ✅

- [x] Forms + form submissions (payload + CRM/Communication refs only)
- [x] Surveys + survey responses
- [x] Appointment pages + external booking refs (no scheduler ownership)
- [x] Policies/validators reject inactive intake and ownership JSON keys
- [x] Permissions `experience.forms.*` / `experience.surveys.*` / `experience.appointments.*`
- [x] Events for form/survey/appointment + submission/response/booking-ref lifecycle
- [x] Alembic `0007_phase_116_forms_surveys_appointments`; version `0.11.6.0`
- [x] Tests: health, form/submission, survey/appointment booking refs, architecture, migration, docs
- [x] Docs: [experience-phase-11-6.md](experience-phase-11-6.md), [phase-handover/phase-11-6.md](phase-handover/phase-11-6.md)
- [x] No SEO/PWA engines

---

## Phase 11.7 — Experience Publishing, Domains, SEO & PWA ✅

- [x] Publish releases and domain edge binding references
- [x] SEO metadata, sitemap and robots shells, and PWA manifests
- [x] Permissions `experience.publishing.*`, `experience.seo.*`, `experience.pwa.*`
- [x] Publish-only lifecycle events and optimistic versioning
- [x] Alembic `0008_phase_117_publishing_seo_pwa`; version `0.11.7.0`
- [x] DNS/SSL/edge/storage ownership remains external; PEM/private keys rejected
- [x] Docs: [experience-phase-11-7.md](experience-phase-11-7.md), [phase-handover/phase-11-7.md](phase-handover/phase-11-7.md)

---

## Phase 11.8 — Experience Bundles, Licensing & Feature Toggles ✅

- [x] Bundle definitions, tenant bundle assignments, Core entitlement refs, and feature toggles
- [x] Filtered/paginated CRUD APIs, audit, optimistic locking, soft delete, tenant isolation
- [x] Permissions `experience.bundles.*` and `experience.feature_toggles.*`; lifecycle events
- [x] Alembic `0009_phase_118_bundles_toggles`; version `0.11.8.0`
- [x] Core retains plan/subscription/billing ownership; forbidden ownership metadata rejected
- [x] Docs: [experience-phase-11-8.md](experience-phase-11-8.md), [phase-handover/phase-11-8.md](phase-handover/phase-11-8.md)

---

## Phase 11.9 — Experience Consumer Integrations & Widgets ✅

- [x] Consumer connector registrations/dispatches, widget definitions/instances, notify dispatches
- [x] Mock providers for connector execute and notify send; forbidden ownership keys rejected
- [x] Filtered/paginated CRUD APIs, execute/send actions, audit, optimistic locking, soft delete
- [x] Permissions `experience.consumer_connectors.*`, `experience.widgets.*`, `experience.notify.*`
- [x] Alembic `0010_phase_119_consumer_widgets`; version `0.11.9.0`
- [x] Docs: [experience-phase-11-9.md](experience-phase-11-9.md), [phase-handover/phase-11-9.md](phase-handover/phase-11-9.md)

---

## Phase 11.10 — Experience Analytics, AI Content & Enterprise Validation ✅

- [x] Analytics report definitions + snapshots (local COUNT on `experience_db` only)
- [x] AI content hook registrations + dispatches via `MockAIProvider.generate_content`
- [x] Forbidden ownership keys in config/metadata/payload; suspended registration → generate 409
- [x] Permissions `experience.analytics.*`, `experience.ai_hooks.*`
- [x] Alembic `0011_phase_1110_analytics_ai_hooks`; version `0.11.10.0`
- [x] Enterprise validation audit + service snapshot
- [x] Docs: [experience-phase-11-10.md](experience-phase-11-10.md), [phase-handover/phase-11-10.md](phase-handover/phase-11-10.md)
- [x] **Experience track 11.0–11.10 complete**

---

## Platform — Published Resource Architecture (docs only) ✅

- [x] [ADR-022](architecture/adr/ADR-022.md) Accepted — Platform Published Resource Architecture
- [x] [published-resource-architecture.md](architecture/published-resource-architecture.md) + [published-resource-contracts.md](reference/published-resource-contracts.md)
- [x] Standalone Form / Survey / Appointment publish rules; reserved public URL prefixes
- [x] Cross-service `publish_id` contracts (Payment, Communication, Short Link, QR, Analytics, verticals, future products)
- [x] Handovers: [phase-af-published-resource-arch.md](phase-handover/phase-af-published-resource-arch.md), [phase-experience-published-resource-arch.md](phase-handover/phase-experience-published-resource-arch.md)
- [x] Manifests / snapshot / project-index / boundaries updated — **no backend or frontend implementation**

---

## Platform — Experience Architecture Freeze (docs only) ✅

- [x] Published Actions — open Action Registry ([published-action-registry.md](reference/published-action-registry.md))
- [x] Public Access Model — open strategies; Experience never owns auth ([public-access-contract.md](reference/public-access-contract.md))
- [x] Universal Embed Architecture ([embed-contract.md](reference/embed-contract.md))
- [x] ADR-022 amended additively; architecture marked **ARCHITECTURE COMPLETE**
- [x] Handovers: [phase-af-experience-arch-freeze.md](phase-handover/phase-af-experience-arch-freeze.md), [phase-experience-arch-freeze.md](phase-handover/phase-experience-arch-freeze.md)
- [x] Fully backward compatible — **no backend/frontend/migrations**

---

## Experience Frontend FE-11.0 – FE-11.5 ✅ (STOP)

- [x] Module `frontend/modules/experience/` — PortalShell, ListCrudPage, BFF, design system (mirrors Delivery)
- [x] FE-11.0: hub, workspace switcher, permissions/capabilities, admin lists, locale-profiles, settings, audit, health
- [x] FE-11.1: executive dashboard (recharts, API counts, recent resources, audit)
- [x] FE-11.2: workspaces, sites, pages, domains, templates, publish-targets (provisional publish_id)
- [x] FE-11.3: page builder (placements, undo/redo, breakpoints, media); components/themes/layouts CRUD
- [x] FE-11.4: forms/surveys CRUD + builders — **no booking UI**
- [x] FE-11.5: publishing/SEO/PWA, public preview, analytics refresh, embed, published-actions
- [x] Apps catalog: تربت پیجز → `/experience/hub`
- [x] Seed: `backend/services/experience/scripts/seed_experience.py`
- [x] Docs: [experience-frontend-roadmap.md](experience-frontend-roadmap.md), [phase-experience-fe-11-5.md](phase-handover/phase-experience-fe-11-5.md)
- [x] **FE-11.6+ not started** (registry, payment, booking, QR, short links, cards, marketplace, checkout, ticketing, learning)

---

## Phase 12.0 — Hospitality Platform Foundation ✅

- [x] Independent `backend/services/hospitality` (`hospitality_db`, port **8009**, version **0.12.0.0**, commercial product **Torbat Food**)
- [x] Foundation aggregates: Venue, Branch, DiningArea, DiningTable, Menu, MenuCategory, MenuItem, BundleDefinition, TenantBundle, FeatureToggle, roles/permissions, configuration/settings/events/audit
- [x] Feature-based architecture: bundle licensing + feature toggles + `/capabilities` discovery
- [x] Venue formats catalog (cafe → catering) without hardcoded engines
- [x] Publish-only events `hospitality.*`; permissions `hospitality.*`
- [x] Provider contracts only (Accounting, CRM, Loyalty, Communication, Delivery, Experience/Website, AI, …)
- [x] Alembic `0001_initial`; compose + `.env.example` wiring
- [x] Tests: architecture, API, tenant isolation, permissions, bundles, migration, dependency, security, performance, docs
- [x] Docs: [hospitality-phase-12-0.md](hospitality-phase-12-0.md), [phase-handover/phase-12-0.md](phase-handover/phase-12-0.md), [hospitality-roadmap.md](hospitality-roadmap.md), ADR-017
- [x] Historical `restaurant-foundation` / restaurant scaffold superseded by hospitality
- [x] No POS / kitchen / ordering / reservation engines

---

## Phase 12.1 — Digital Menu Catalog ✅

- [x] Catalog aggregates: Allergen, ModifierGroup, ModifierOption, MenuItemModifier, MenuItemAllergen, AvailabilityWindow, MenuMediaRef, MenuLocalization
- [x] Additive MenuItem fields (prep time, calories, dietary flags, tags, primary_media_ref)
- [x] Catalog APIs + validators + permissions + publish-only events
- [x] Alembic `0002_phase_121_digital_menu_catalog`; version **0.12.1.0**; capabilities `digital_menu_catalog`
- [x] Tests: catalog happy path, tenant isolation, validation, architecture/migration/docs updates
- [x] Docs: [hospitality-phase-12-1.md](hospitality-phase-12-1.md), [phase-handover/phase-12-1.md](phase-handover/phase-12-1.md)
- [x] No POS / kitchen / QR ordering / reservation engines

---

## Phase 12.2 — QR Menu & QR Ordering ✅

- [x] Aggregates: QrCode, QrMenuSession, QrOrderingSession, Cart, CartLine
- [x] APIs + validators + permissions + publish-only events
- [x] Alembic `0003_phase_122_qr_menu_ordering`; version **0.12.2.0**; capabilities `qr_menu`, `qr_ordering`
- [x] Tests: QR happy path, tenant isolation, validation, architecture/migration/docs
- [x] Docs: [hospitality-phase-12-2.md](hospitality-phase-12-2.md), [phase-handover/phase-12-2.md](phase-handover/phase-12-2.md)
- [x] No POS / kitchen / payment / reservation engines

---

## Phase 12.3 — Table Service & Reservations ✅

- [x] Aggregates: Reservation, TableAssignment, ServiceRequest, WaitlistEntry
- [x] APIs + validators + permissions + publish-only events (status transitions with terminal-state guards)
- [x] Alembic `0004_phase_123_table_service_reservations`; version **0.12.3.0**; capabilities `table_service`, `reservation`
- [x] Tests: reservation/table-assignment/service-request/waitlist happy paths, tenant isolation, validation, architecture/migration/docs
- [x] Docs: [hospitality-phase-12-3.md](hospitality-phase-12-3.md), [phase-handover/phase-12-3.md](phase-handover/phase-12-3.md)
- [x] No POS / kitchen / payment engines

---

## Phase 12.4 — POS Lite ✅

- [x] Aggregates: PosRegister, PosShift, PosTicket, PosTicketLine
- [x] APIs + validators + permissions + publish-only events (shift open/close, ticket void)
- [x] Alembic `0005_phase_124_pos_lite`; version **0.12.4.0**; capabilities `pos_lite`
- [x] Tests: register/shift/ticket/line happy path, tenant isolation, quantity validation, architecture/migration/docs
- [x] Docs: [hospitality-phase-12-4.md](hospitality-phase-12-4.md), [phase-handover/phase-12-4.md](phase-handover/phase-12-4.md)
- [x] No POS Pro (payments/discounts/taxes) / kitchen engines

---

## Phase 12.5 — POS Pro ✅

- [x] Aggregates: PosPayment, PosDiscount, PosTaxLine, PosFloorPlan, PosStation
- [x] APIs + validators + permissions + publish-only events
- [x] Alembic `0006_phase_125_pos_pro`; version **0.12.5.0**; capabilities `pos_pro`
- [x] Tests: payment/discount/tax/floor-plan/station happy path, tenant isolation, discount percent + payment amount validation, architecture/migration/docs
- [x] Docs: [hospitality-phase-12-5.md](hospitality-phase-12-5.md), [phase-handover/phase-12-5.md](phase-handover/phase-12-5.md)
- [x] No accounting journal posting / real payment gateway / kitchen dispatch

---

## Phase 12.6 — Kitchen ✅

- [x] Aggregates: KitchenStation, KitchenTicket, KitchenTicketItem
- [x] APIs + validators + permissions + publish-only events (status transitions with terminal-state guards)
- [x] Alembic `0007_phase_126_kitchen`; version **0.12.6.0**; capabilities `kitchen`, `kitchen_engine`
- [x] Tests: station/ticket/item happy path, tenant isolation, quantity validation, architecture/migration/docs
- [x] Docs: [hospitality-phase-12-6.md](hospitality-phase-12-6.md), [phase-handover/phase-12-6.md](phase-handover/phase-12-6.md)
- [x] No connector integrations yet; kitchen tickets reference POS/QR sources by UUID only

---

## Phase 12.7 — Connectors ✅

- [x] Aggregates: ConnectorRegistration, ConnectorDispatch
- [x] `app/providers/mocks.py`: no-op mocks for Accounting/CRM/Loyalty/Communication/Delivery/WebsiteBuilder Protocols (no httpx, no cross-service imports)
- [x] APIs + validators + permissions + publish-only events (dispatch → `sent` if registration active, else `failed`)
- [x] Alembic `0008_phase_127_connectors`; version **0.12.7.0**; capabilities `delivery_integration`, `accounting_integration`, `crm_integration`, `loyalty_integration`, `communication_integration`, `website_integration`
- [x] Tests: registration/dispatch happy path, tenant isolation, code uniqueness, architecture/migration/docs
- [x] Docs: [hospitality-phase-12-7.md](hospitality-phase-12-7.md), [phase-handover/phase-12-7.md](phase-handover/phase-12-7.md)
- [x] No real connector SDK calls; all dispatch responses are locally mocked

---

## Phase 12.8 — Analytics ✅

- [x] Aggregates: AnalyticsReportDefinition, AnalyticsSnapshot
- [x] APIs + validators + permissions + publish-only events (`POST /analytics-snapshots/refresh` computes metrics via local `COUNT(*)` queries)
- [x] Alembic `0009_phase_128_analytics`; version **0.12.8.0**; capability `analytics`
- [x] Tests: report/snapshot happy path, tenant isolation, code uniqueness, unknown metric_key rejection, architecture/migration/docs
- [x] Docs: [hospitality-phase-12-8.md](hospitality-phase-12-8.md), [phase-handover/phase-12-8.md](phase-handover/phase-12-8.md)
- [x] No external analytics engine or cross-service reads; local table counts only

---


## Phase 10.0 — Delivery Platform Foundation ✅

- [x] `backend/services/delivery` service scaffold (API / services / repositories / models)
- [x] Foundation aggregates: DeliveryOrganization, DeliveryHub, DeliveryRole, DeliveryPermission, ExternalProviderConfig, RoutingEngineRegistration, DeliveryConfiguration, DeliverySetting, DeliveryAuditLog
- [x] Platform provider contracts (Accounting, CRM, Loyalty, Communication, Notification, Storage, AI, Identity, RoutingEngine, Fleet)
- [x] Publish-only events (`delivery.organization|hub|external_provider|routing_engine|configuration|setting.*`)
- [x] Health `/health`, Capabilities `/capabilities`, Metrics `/metrics`
- [x] APIs under `/api/v1` for organizations, hubs, external-providers, routing-engines, configurations, settings, audit
- [x] Permissions `delivery.*` trees; tenant isolation via `X-Tenant-ID`
- [x] Alembic `0001_initial` + `delivery_db` wiring (compose port 8007); version `0.10.0.0`
- [x] Architecture / API / tenant / permissions / migration / dependency / security / docs tests
- [x] Docs: [delivery-phase-10-0.md](delivery-phase-10-0.md), [phase-handover/phase-10-0.md](phase-handover/phase-10-0.md)
- [x] No driver/fleet/dispatch/routing/tracking engines (deferred)

---

## Phase 10.1 — Driver Management ✅

- [x] Aggregates: Driver, DriverCredential, DriverDocument, DriverLifecycleEvent, OutboxEvent
- [x] Lifecycle: activate / suspend / resume / deactivate / block / unblock / archive + append-only history
- [x] Soft delete + optimistic locking; list pagination / filter / sort / search
- [x] Commands, queries, policies, specifications, validators
- [x] APIs `/api/v1/drivers` + `/api/v1/permissions/catalog`; capabilities/metrics `phase: 10.1`
- [x] Permissions `delivery.drivers.*`; events `delivery.driver.*` via transactional outbox
- [x] Alembic `0002_phase_101_drivers`; version **0.10.1.0**
- [x] Tests: lifecycle, credentials/documents, tenant, architecture, migration, permissions, performance indexes, docs
- [x] Docs: [delivery-phase-10-1.md](delivery-phase-10-1.md), [phase-handover/phase-10-1.md](phase-handover/phase-10-1.md)
- [x] No fleet / dispatch / routing / tracking engines (deferred)

---

## Phases 10.2–10.8 — Delivery Backend (Fleet through Settlement) ✅

- [x] **10.2 Fleet & Vehicle Types** — Fleet, VehicleType, Vehicle, VehicleAssignment; APIs `/fleets`, `/vehicle-types`, `/vehicles`; Alembic `0003_phase_102_fleet`
- [x] **10.3 Availability, Shifts & Working Zones** — DriverAvailability, Shift, ShiftAssignment, WorkingZone; APIs `/drivers/{id}/availability`, `/shifts`, `/working-zones`; `0004_phase_103_availability`
- [x] **10.4 Pricing, Capabilities & Bundles** — PricingRule, CapabilityDefinition, CapabilityBundle; APIs `/pricing-rules`, `/capabilities`, `/bundles`; `0005_phase_104_pricing`
- [x] **10.5 Dispatch Engine** — DispatchJob, JobAssignment with state machine; APIs `/dispatch/jobs`, `/dispatch/assignments`; vertical `external_order_ref` only; `0006_phase_105_dispatch`
- [x] **10.6 Routing & Optimization** — RoutePlan, RouteStop, OptimizationRun; APIs `/routes`, `/optimization`; RoutingEngineProvider refs; `0007_phase_106_routing`
- [x] **10.7 Tracking & Proof of Delivery** — TrackingSession, TrackingPoint, ProofOfDelivery, CustomerTrackingToken; APIs `/tracking`, `/proof-of-delivery`, `/customer-tracking`; Storage file refs for POD
- [x] **10.8 Settlement** — SettlementIntent, SettlementLine; AccountingProvider refs only (no journal tables); APIs `/settlements`; `0008_phase_107_108_tracking_settlement`
- [x] Version **0.10.8.0**; capabilities/metrics `phase: 10.8`; 46 backend tests green
- [x] Docs: [service-snapshots/delivery.yaml](service-snapshots/delivery.yaml), [phase-handover/phase-10-8.md](phase-handover/phase-10-8.md)
- [x] **STOP** — 10.9 and 10.10 not started per execution scope

---

## Delivery Platform Frontend (Torbat Driver) ✅ baseline

- [x] Module scaffold `frontend/modules/delivery/` per frontend architecture migration
- [x] Thin App Router routes `app/delivery/` (56+ screens, loading/error per segment)
- [x] BFF proxy `/api/delivery/*` → delivery-service :8007
- [x] Typed `delivery-api` client — organizations, hubs, drivers (full lifecycle), providers, routing engines, configurations, settings, audit, permissions catalog, health/capabilities/metrics
- [x] Portal shell, CRUD factory, capability phase gates (no mock data for future APIs)
- [x] Driver detail: profile, lifecycle actions, credentials, documents
- [x] Executive dashboard with real tenant-scoped counts
- [x] Design tokens `--delivery-accent*`; apps catalog tile → `/delivery/hub`
- [x] `npm run validate:delivery`; ESLint + architecture boundary for delivery domain
- [x] Docs: `frontend/docs/delivery-*.md`

Remaining (honest): frontend phase gates for fleet/dispatch/tracking/settlement screens need wiring to new backend APIs (backend 10.2–10.8 complete); merchant connector and analytics remain 10.9–10.10.

---

## Phase HC-Reg — Healthcare Platform Registration ✅

> Documentation-only registration. No business code, models, APIs, migrations, or repositories.

- [x] Phase roadmap 13.0–13.7 documented in [healthcare-roadmap.md](healthcare-roadmap.md)
- [x] Planned modules registered in [module-registry.md](module-registry.md#healthcare)
- [x] Phase area README: [phases/Healthcare/README.md](phases/Healthcare/README.md)
- [x] Phase documents: 13.0 Foundation through 13.7 Delivery Integration
- [x] Roadmap / progress / next-steps integration
- [x] Port **8010** and `healthcare_db` reserved in registry
- [x] No business services modified at registration time

---

## Phase 13.0 — Healthcare Platform Foundation ✅

- [x] Independent `backend/services/healthcare` (`healthcare_db`, port **8010**, version **0.13.0.0**, commercial product **Torbat Health**)
- [x] Foundation aggregates: Clinic, Branch, Department, Doctor, Patient, HealthcareRole, HealthcarePermission, ExternalProviderConfig, HealthcareConfiguration, HealthcareSetting, HealthcareAuditLog, OutboxEvent
- [x] Provider contracts only (Communication, CRM, Loyalty, Accounting, Delivery, Storage, AI, Identity)
- [x] Publish-only events `healthcare.clinic.*`, `healthcare.doctor.*`, `healthcare.patient.*`, `healthcare.setting.*`
- [x] Permissions `healthcare.*`; APIs under `/api/v1/clinics|branches|departments|doctors|patients|settings|…`
- [x] Alembic `0001_initial`; compose + `.env.example` + postgres init wiring
- [x] Tests: architecture, API, tenant, permissions, migration, dependency, security, docs
- [x] Docs + handover: [phase-handover/phase-13-0.md](phase-handover/phase-13-0.md)
- [x] No appointment/clinical/pharmacy/delivery engines

---

## Phase 13.1 — Healthcare Appointment Engine ✅

- [x] Aggregates: Schedule, AvailabilityWindow, AppointmentType, Appointment, WaitingListEntry
- [x] Lifecycle: book, confirm, cancel, reschedule, no-show; conflict detection on overlapping slots
- [x] Communication reminder via provider mock
- [x] Alembic `0002_phase_131_appointments`; version **0.13.1.0**
- [x] Events `healthcare.appointment.*`, `healthcare.schedule.*`
- [x] Handover: [phase-handover/phase-13-1.md](phase-handover/phase-13-1.md)

---

## Phase 13.2 — Healthcare Doctor Panel ✅

- [x] VisitSession, VisitNote, doctor dashboard/queue APIs
- [x] Visit lifecycle: start, finish, defer, call-next; finish → appointment completed
- [x] Alembic `0003_phase_132_doctor_panel`; version **0.13.2.0**
- [x] Handover: [phase-handover/phase-13-2.md](phase-handover/phase-13-2.md)

---

## Phase 13.3 — Healthcare Clinic Management ✅

- [x] ClinicService catalog, StaffAssignment, ClinicPolicy, OperatingHoursPolicy
- [x] Policy validators (cancellation vs booking lead time)
- [x] Alembic `0004_phase_133_clinic_management`; version **0.13.3.0**
- [x] Handover: [phase-handover/phase-13-3.md](phase-handover/phase-13-3.md)

---

## Phase 13.4 — Healthcare Patient Portal ✅

- [x] Patient-scoped APIs under `/api/v1/patient-portal/*` (profile, appointments, documents, notification preferences)
- [x] Alembic `0005_phase_134_patient_portal`; version **0.13.4.0**
- [x] Handover: [phase-handover/phase-13-4.md](phase-handover/phase-13-4.md)

---

## Phase 13.5 — Healthcare Medical Record ✅

- [x] MedicalRecord, Encounter (finalize immutability), Condition, Allergy, MedicationStatement, ImmunizationRecord, access audit
- [x] Alembic `0006_phase_135_medical_record`; version **0.13.5.0**
- [x] Handover: [phase-handover/phase-13-5.md](phase-handover/phase-13-5.md)

---

## Phase 13.6 — Healthcare Pharmacy Network ✅

- [x] Pharmacy, PrescriptionOrder, PrescriptionLine, fulfillment lifecycle (accept → ready → picked_up / cancelled)
- [x] Alembic `0007_phase_136_pharmacy_network`; version **0.13.6.0**
- [x] Handover: [phase-handover/phase-13-6.md](phase-handover/phase-13-6.md)

---

## Phase 13.7 — Healthcare Delivery Integration ✅

- [x] DeliveryIntegrationRegistration, DeliveryJobIntent, DeliveryJobStatusSnapshot, webhook status ingest
- [x] Delivery provider mock (no cross-service imports); Communication notify on milestones
- [x] Alembic `0008_phase_137_delivery_integration`; version **0.13.7.0**
- [x] **57 backend tests passing**; frontend `/healthcare` shell + BFF + catalog tile
- [x] Handover: [phase-handover/phase-13-7.md](phase-handover/phase-13-7.md)
- [x] Snapshot: [service-snapshots/healthcare.yaml](service-snapshots/healthcare.yaml)

### Healthcare Platform

- [x] Phases 13.0–13.7 complete (Foundation through Delivery Integration)

---

## Phase BB-Reg — Beauty Business Platform Registration ✅

> Documentation-only registration. No business code, models, APIs, migrations, or repositories.

- [x] Phase roadmap 14.0–14.7 documented in [beauty-business-roadmap.md](beauty-business-roadmap.md)
- [x] Planned modules registered in [module-registry.md](module-registry.md#beauty_business)
- [x] Phase area README: [phases/BeautyBusiness/README.md](phases/BeautyBusiness/README.md)
- [x] Phase documents: 14.0 Foundation through 14.7 Marketing & Loyalty
- [x] Roadmap / progress / next-steps integration
- [x] Port **8011** and `beauty_business_db` reserved in registry (implementation deferred)
- [x] Documented independence from Healthcare module (separate docs, phases, frontend, permissions, branding)
- [x] No business services modified

---

## Phase 14.0 — Beauty Business Platform Foundation ✅

- [x] Independent `backend/services/beauty_business` (`beauty_business_db`, port **8011**, version **0.14.0.0** → **0.14.7.0**, commercial product **Torbat Beauty**)
- [x] Foundation aggregates: BeautyOrganization (incl. `business_format`), BeautyBranch, BeautyRole, BeautyPermission, ExternalProviderConfig, BookingEngineRegistration, BeautyConfiguration, BeautySetting, BeautyAuditLog, OutboxEvent
- [x] `BusinessFormat` enum: salon, barbershop, clinic, laser, skin_care, hair_treatment, spa
- [x] Provider contracts only (CRM, Accounting, Loyalty, Communication, Delivery, Experience, Storage, AI, Identity)
- [x] Publish-only events `beauty_business.*`; permissions `beauty_business.*`
- [x] Alembic `0001_initial`; compose + `.env.example` wiring
- [x] Tests: architecture, API, tenant, permissions, migration, dependency, security, docs
- [x] No booking/catalog/customer engines in 14.0 scope

---

## Phase 14.1 — Beauty Booking Engine ✅

- [x] Aggregates: StaffSchedule, StaffAvailability, ScheduleException, AppointmentType, Appointment, AppointmentStatusHistory, WaitingListEntry
- [x] Appointment lifecycle: confirm, check-in, complete, cancel, no-show
- [x] Alembic `0002_phase_141_booking`; APIs under `/staff-schedules`, `/appointments`, `/waiting-list`, …
- [x] Events `beauty_business.appointment.*`; permissions `beauty_business.appointments.*`, `beauty_business.schedules.*`

---

## Phase 14.2 — Beauty Salon Management ✅

- [x] Aggregates: TreatmentRoom, Station, BranchPolicy; optional `business_format` on branch
- [x] Alembic `0003_phase_142_salon`; APIs `/treatment-rooms`, `/stations`, `/branch-policies`
- [x] Events `beauty_business.room.*`, `beauty_business.station.*`

---

## Phase 14.3 — Beauty Service Catalog ✅

- [x] Aggregates: ServiceCategory, BeautyService (+ ServiceVariant, BranchServiceAssignment, ServiceMediaRef in schema)
- [x] Alembic `0004_phase_143_catalog`; APIs `/service-categories`, `/services`
- [x] Events `beauty_business.service.*`

---

## Phase 14.4 — Beauty Customer Management ✅

- [x] Aggregates: CustomerProfile (CRM ref), CustomerPreference, VisitHistoryEntry, CustomerDocumentRef
- [x] Alembic `0005_phase_144_customers`; API `/customers`
- [x] Events `beauty_business.customer.*`

---

## Phase 14.5 — Beauty Package & Membership ✅

- [x] Aggregates: PackageDefinition, CustomerPackage, MembershipPlan, CustomerMembership (+ lines/redemptions/lifecycle in schema)
- [x] Alembic `0006_phase_145_packages`; APIs `/package-definitions`, `/membership-plans`
- [x] Events `beauty_business.package.*`, `beauty_business.membership.*`

---

## Phase 14.6 — Beauty Staff & Commission ✅

- [x] Aggregates: StaffProfile, StaffSkill, StaffCertificate, CommissionRule, CommissionEntry
- [x] Alembic `0007_phase_146_staff`; APIs `/staff`, `/commission-rules`
- [x] Events `beauty_business.staff.*`, `beauty_business.commission.*`

---

## Phase 14.7 — Beauty Marketing & Loyalty Integration ✅

- [x] Aggregates: MarketingCampaignRef, LoyaltyIntegrationConfig, CommunicationIntegrationConfig, IntegrationDispatch
- [x] Provider mocks for CRM, Loyalty, Communication, Accounting, Delivery, Experience
- [x] Alembic `0008_phase_147_marketing`; APIs `/marketing-campaigns`, `/loyalty-integrations`, `/communication-integrations`, `/integration-dispatches`
- [x] **30 backend tests passing**; frontend `/beauty` shell + BFF + catalog tile
- [x] Handover: [phase-handover/phase-14-7.md](phase-handover/phase-14-7.md)
- [x] Snapshot: [service-snapshots/beauty-business.yaml](service-snapshots/beauty-business.yaml)
- [x] Independent from Healthcare (separate DB, port, frontend, permissions)

### Beauty Business Platform

- [x] Phases 14.0–14.7 complete (Foundation through Marketing & Loyalty Integration)

---

## Phase Pay-Reg — Payment Platform Registration ✅

> Documentation-only registration. No business code, models, APIs, migrations, or repositories. No existing services modified.

- [x] Phase roadmap payment-14.0–payment-14.10 documented in [payment-roadmap.md](payment-roadmap.md)
- [x] Planned modules registered in [module-registry.md](module-registry.md#payment)
- [x] Phase area README: [phases/Payment/README.md](phases/Payment/README.md)
- [x] Phase documents: 14.0 Foundation through 14.10 Enterprise Validation
- [x] ADR-020 Accepted — Independent Enterprise Payment Platform (Torbat Pay)
- [x] Service registered in [service-manifest.yaml](ai-framework/service-manifest.yaml) and [project-index.yaml](ai-framework/project-index.yaml)
- [x] Port **8012** and `payment_db` reserved in registry
- [x] Service snapshot: [service-snapshots/payment.yaml](service-snapshots/payment.yaml)
- [x] Handover: [phase-handover/phase-pay-reg.md](phase-handover/phase-pay-reg.md)
- [x] Phase 14.0 NOT implemented (by design)

---

## Phase Pay-Arch — Payment Architecture Prerequisites ✅

> Documentation-only. Finalizes contracts and licensing before implementation. No business code; no existing services modified.

- [x] [ADR-021](architecture/adr/ADR-021.md) Accepted — licensing, routing, integration contracts
- [x] [payment-contracts.md](reference/payment-contracts.md) — PaymentIntent, Checkout, Callback, Settlement + future Refund/Split/Subscription/Wallet/Installment v1 schemas
- [x] Three-layer model: Core L1 → Payment bundles L2 → feature toggles L3
- [x] Provider assignment + routing policy — change PSP without code changes
- [x] Compatibility verified: Core, Identity, Tenant, Accounting, CRM, Communication, Hospitality, Delivery, Sports Center, Marketplace
- [x] Updated: module-boundaries, event-catalog, services-contracts, authorization-architecture, payment-roadmap, phase-14-0
- [x] Service snapshot v2; handover [phase-pay-arch.md](phase-handover/phase-pay-arch.md)
- [x] Implementation started in payment-14.0 (see MVP section below)

---

## Phase Payment 14.0–14.5 — Torbat Pay MVP ✅

> Independent `payment-service` on port **8012**, database `payment_db`, version **0.14.5.0**. No other platform services modified.

### 14.0 Payment Foundation
- [x] Service scaffold `backend/services/payment` — API → commands/queries → repositories → models
- [x] Foundation aggregates: workspaces, bundles, toggles, provider assignments, PSP/credit registry shells, audit, outbox
- [x] Health, capabilities, metrics; permission tree `payment.*`
- [x] Alembic `0001_initial`; docker-compose `payment-service`
- [x] Tests: architecture, API, permissions, migration, dependency, security, docs

### 14.1 PSP Management
- [x] PspConnection, routing policies, health checks, MockPspAdapter
- [x] Bundle gate `payment.byo_psp.basic`; secret redaction
- [x] Alembic `0002_phase_141_psp`; `test_phase_141.py`

### 14.2 Merchant Accounts
- [x] MerchantAccount lifecycle (draft → pending_review → active → suspended → closed)
- [x] Bundle gate `payment.torbat_pay.merchant`
- [x] Alembic `0003_phase_142_merchant`; `test_phase_142.py`

### 14.3 Payment Requests
- [x] Idempotent payment requests; PaymentIntentContract v1 fields including credit refs (nullable)
- [x] Mock initiate → redirect_issued; rejects CREDIT_PROVIDER (422)
- [x] Alembic `0004_phase_143_requests`; `test_phase_143.py`

### 14.4 Callback & Verification
- [x] Callback ingress with signature verify + replay protection
- [x] Verify API; events `payment.request.paid` / `payment.request.failed`
- [x] Alembic `0005_phase_144_callbacks`; `test_phase_144.py`

### 14.5 Transaction Ledger
- [x] Immutable PaymentTransaction + append-only PaymentLedgerEntry on verified paid
- [x] Query APIs: transactions, by-source, ledger entries
- [x] Alembic `0006_phase_145_ledger`; `test_phase_145.py`
- [x] Handover: [phase-handover/phase-14-5.md](phase-handover/phase-14-5.md)
- [x] Snapshot v4: [service-snapshots/payment.yaml](service-snapshots/payment.yaml)

---

## Phase Payment Frontend — Torbat Pay Admin Portal ✅

> `frontend/modules/payment/` + `frontend/app/payment/**` — MVP UI for phases 14.0–14.5 only.

- [x] 26 feature screens (hub, dashboard, KPIs, transactions, ledger, PSP, merchants, requests, audit, bundles, toggles, capabilities, settings, metrics, monitoring, API explorer, OpenAPI)
- [x] BFF `/api/payment` → port 8012; Idempotency-Key forwarded
- [x] Checkout session = `PaymentRequest` detail (`/payment/requests/[id]`)
- [x] Apps catalog: Torbat Pay → `/payment/hub`
- [x] Validation: `npm run validate:payment`
- [x] Handover: [phase-handover/phase-payment-frontend.md](phase-handover/phase-payment-frontend.md)
- [x] Snapshot: [service-snapshots/payment-frontend.yaml](service-snapshots/payment-frontend.yaml)
- [x] **14.6+ UI not started** (refunds, splits — by design)

---

## Official Platform Deployment — 2026-07-27 ✅

Host: `192.168.10.162` · Branch: `cursor/communication-frontend-sms-mvp`

- [x] **Delivery backend 10.2–10.8** committed (`7207790`), pushed, deployed — v`0.10.8.0`, alembic `0008_phase_107_108_tracking_settlement` (head), `/health` + `/capabilities` + OpenAPI OK
- [x] **Experience frontend FE-11.0–11.5** committed (`0eec9f7`), pushed, deployed — `/experience/hub` HTTP 200
- [x] **Payment** (backend 14.0–14.5 + frontend) verified live — v`0.14.5.0`, alembic `0006_phase_145_ledger`, `/payment/hub` HTTP 200
- [x] Platform health sweep: Core, Identity, Accounting, CRM, Loyalty, Communication, Sports, Delivery, Experience, Hospitality, Healthcare, Beauty, Payment all `/health` 200
- [x] Status docs updated: `project-status.yaml`, snapshots, handovers, next-steps

---

## Product Integration Wave 1 — 2026-07-27 ✅

- [x] Scope lock from `project-status.yaml` (no future foundations)
- [x] Audit: [product-integration-audit.md](product-integration-audit.md)
- [x] Home → Business Onboarding (intent assessment + recommended bundles)
- [x] Onboarding → business intent select + bundle preview
- [x] Experience CRUD hardening (workspace-bound creates, readOnly child lists, error formatting)
- [x] Loyalty frontend_percent corrected (engage module exists)
- [ ] Full E2E restaurant/doctor/retail automated (blocked on connectors + future services)
- [ ] Accounting auto-invoice on bundle activate (requires dedicated phase)

---

## Commercial Platform Foundation — 2026-07-28 ✅

Architecture + contracts + admin specs only ([ADR-023](architecture/adr/ADR-023.md)).

- [x] Business Bundle architecture & contracts
- [x] Pricing Catalog contracts (pricing outside bundles)
- [x] Subscription / License / Entitlement contracts
- [x] Business Type catalog (17 types) + rule-based Recommendation contracts
- [x] Activation flow event contracts
- [x] Admin portal screen specifications
- [x] Canonical SoT: [business-bundles.md](reference/business-bundles.md) + YAML catalog
- [x] Cross-service compatibility matrix
- [x] Report: [commercial-platform-foundation-report.md](commercial-platform-foundation-report.md)
- [x] Handover: [phase-handover/phase-commercial-foundation.md](phase-handover/phase-commercial-foundation.md)
- [ ] Core commercial storage/APIs (future registered phase)
- [ ] FE catalog codegen from YAML (future)
- [ ] Admin React screens (future)

---

## Commercial Foundation Patch v1.1 — 2026-07-28 ✅

Permanently extensible commercial layer (`commercial.v1.1`) — docs only.

- [x] Platform Product Catalog + Dynamic Product Registry (open-ended)
- [x] Marketplace compatibility declarations (Marketplace independent)
- [x] Capability Registry (reusable; no duplicates)
- [x] Automation Catalog (not a product)
- [x] Extension Registry (open kinds; no ownership conflicts)
- [x] Commercial Dependency Graph
- [x] Bundle v1.1 refs: products, capabilities, automation packs, extensions, pricing, plan/license refs
- [x] Future Product Rules (register → declare capabilities → docs → optional bundle map)
- [x] Universal compatibility matrix vs services, bundles, subscriptions, licensing, recommendations, activation, Payment, ADR-022
- [x] ADR-023 append (decisions 12–20)
- [x] Report: [commercial-platform-foundation-v1.1-report.md](commercial-platform-foundation-v1.1-report.md)
- [x] Handover: [phase-handover/phase-commercial-foundation-v1.1.md](phase-handover/phase-commercial-foundation-v1.1.md)
- [ ] No product engines / roadmap phases authorized by this patch

---

## Commercial Foundation Patch v1.2 — 2026-07-28 ✅

Final commercial architecture layer (`commercial.v1.2`) — docs only. **ARCHITECTURE COMPLETE.**

- [x] Universal Asset Registry (open asset types; not products/bundles/capabilities)
- [x] Asset Lifecycle + Asset Marketplace contracts (no Marketplace implementation)
- [x] Metadata Registry (unlimited keys)
- [x] Policy Engine contracts + Policy Targets (no evaluation engine)
- [x] Registry Versioning + Universal Reference contracts
- [x] Compatibility validation vs Products, Bundles, Capabilities, Automation, Extensions, ADR-022, Payment, Experience, v1.1
- [x] ADR-023 append (decisions 21–29)
- [x] Report: [commercial-platform-foundation-v1.2-report.md](commercial-platform-foundation-v1.2-report.md)
- [x] Handover: [phase-handover/phase-commercial-foundation-v1.2.md](phase-handover/phase-commercial-foundation-v1.2.md)
- [ ] Implementation engines / storage / APIs (future registered phases only)

---

## Commercial Runtime Frontend Wave-2 — 2026-07-28 ✅

Metadata-driven commercial SaaS frontend (`frontend/modules/commercial`). No backend / Payment / Experience edits.

- [x] Landing → Assessment → Recommendations → Trial summary → Workspace → Commercial Dashboard
- [x] Adapters for products/bundles/pricing/capabilities/assessment/recommendations (no fake catalog data)
- [x] Commercial dashboard: trial, subscription, products, capabilities, checklist, upgrade
- [x] FeatureLock / UpgradePrompt / banners / cards / empty states
- [x] Domain policy: custom domain locked until active subscription
- [x] `/apps`, `/billing`; header commercial nav + dynamic sidebar
- [x] Handover: [phase-handover/phase-commercial-runtime-frontend-wave-2.md](phase-handover/phase-commercial-runtime-frontend-wave-2.md)
- [ ] Core commercial registry APIs (adapters show unavailable until shipped)

---

## Commercial Runtime Validation Wave-3 — 2026-07-28 ✅

Validation only — **CONDITIONALLY CERTIFIED**.

- [x] Report: [commercial-runtime-validation-report.md](commercial-runtime-validation-report.md)
- [x] Scores: Architecture 86 · Future-proof 72 · Automatic Discovery 68 · Flow 78
- [x] Confirmed: no fake catalogs; domain policy; ownership; pricing refs on bundles
- [x] Gaps documented: missing registry adapters; Core APIs; SERVICE_HUB_PATHS; Notifications coming-soon
- [x] Handover: [phase-handover/phase-commercial-runtime-validation-wave-3.md](phase-handover/phase-commercial-runtime-validation-wave-3.md)
- [x] Superseded by Completion Wave-3 → FULL CERTIFIED

---

## Commercial Runtime Completion Wave-3 — 2026-07-28 ✅

**Architecture status: COMMERCIAL RUNTIME COMPLETE.** Final FE wave — zero FE edits for future products/registries.

- [x] Generic adapters: products, bundles, pricing, capabilities, assets, extensions, automation, policies, metadata, notifications, usage, entitlements
- [x] Removed SERVICE_HUB_PATHS; launch via `default_route` / `launch_strategy` only
- [x] Policy-driven domain unlock; FeatureLock via entitlement API
- [x] Billing from commercial pricing catalog (no Core plans list as SoT)
- [x] Metadata-driven dashboard (pinned/recent/quick actions) + registry browsers
- [x] Notifications from commercial API (no coming-soon)
- [x] Final report: [commercial-runtime-final-report.md](commercial-runtime-final-report.md)
- [x] Validation: [commercial-runtime-validation.md](commercial-runtime-validation.md)
- [x] Handover: [phase-handover/phase-commercial-runtime-completion-wave-3.md](phase-handover/phase-commercial-runtime-completion-wave-3.md)
- [ ] Core commercial registry APIs (backend track — not FE)

---

## Commercial Runtime E2E Wave-3 — 2026-07-28 ✅

**Architecture status: COMMERCIAL RUNTIME COMPLETE.** Admin Commercial Portal + full tenant commercial OS.

- [x] Admin portal `/admin/commercial` — all registry managers (products…transactions)
- [x] Trial rules, subscriptions, billing invoices/transactions/coupons
- [x] Activation pipeline + checklist %
- [x] Domain policy DNS/SSL/verification
- [x] Tenant recommendations + feature locks with required plan/capability/bundle
- [x] Final report + validation + snapshot + handover
- [ ] Core commercial registry APIs (backend track)

---

## Platform UX Completion Wave-1 — 2026-07-28 ✅

Premium SaaS landing + connected commercial journey + PlatformShell OS.

- [x] Marketing landing `/` (hero, ecosystem, bundles, pricing teaser, FAQ, CTA)
- [x] Discover `/discover` + public `/pricing`
- [x] PlatformShell (dashboard, apps, billing, domains)
- [x] Category apps launcher + header search / notifications / dark mode
- [x] Domains experience + onboarding trial bridge
- [x] Reports: [platform-ux-final-report.md](platform-ux-final-report.md), [platform-ux-e2e-journey.md](platform-ux-e2e-journey.md)
- [x] Handover: [phase-handover/phase-platform-ux-completion-wave-1.md](phase-handover/phase-platform-ux-completion-wave-1.md)

---

## Platform UX Production Certification — 2026-07-28 ✅

Audit + polish wave to production UX quality (score ≥ 98).

- [x] Footer / SEO / help / search / notifications centers
- [x] Discover `rule_trace` + reason explanation
- [x] Apps favorites / pinned / recent; product setup wizards
- [x] Trial urgency/expiry; guided empty states; FeatureLock paths
- [x] Platform UX Score **98**; FE deployment readiness **READY**
- [x] Certification: [platform-ux-final-report.md](platform-ux-final-report.md)
- [x] Validation: [platform-ux-validation.md](platform-ux-validation.md)
- [x] Handover: [phase-handover/phase-platform-ux-production-certification.md](phase-handover/phase-platform-ux-production-certification.md)
- [x] Hospitality FE production validation (see below)

---

## Hospitality Frontend Production — 2026-07-28 ✅

Enterprise FE production completion for Torbat Food / Hospitality.

- [x] UX audit: [hospitality-frontend-audit.md](hospitality-frontend-audit.md)
- [x] Dual-layer FeatureLock (L2 + Commercial Runtime)
- [x] Marketplace CapabilityUnavailable; accounting + dispatches routes
- [x] Restaurant onboarding wizard + ops role dashboards
- [x] Commercial product branding adapter
- [x] Final reports + production checklist (score 96)
- [x] Handover: [phase-handover/phase-hospitality-frontend-production.md](phase-handover/phase-hospitality-frontend-production.md)
- [ ] hospitality-12.9 AI Assistant (backend)
- [ ] hospitality-12.10 Enterprise Validation (backend)

### Official deploy 2026-07-28 ✅

- [x] Commit `091b33a` pushed to `cursor/communication-frontend-sms-mvp`
- [x] Frontend-only rebuild on `192.168.10.162`
- [x] Routes + backend health + alembic heads verified
- [x] Report: [official-deployment-report-platform-fe.md](official-deployment-report-platform-fe.md)

---

## Hospitality Frontend Production Validation — 2026-07-28 ✅

**Status: CERTIFIED.** Score **98**. Backend unchanged at hospitality-12.8.

- [x] Full `/hospitality/**` route audit (63 routes)
- [x] Sidebar / CRUD / dashboard / commercial / integration validation
- [x] Surface honesty banners; brand matching; marketplace nav honesty; QR submit actions
- [x] Zero scaffold / placeholder / fake KPI / dead nav / dead button
- [x] Validation: [hospitality-production-validation.md](hospitality-production-validation.md)
- [x] Route audit: [hospitality-route-audit.md](hospitality-route-audit.md)
- [x] CRUD: [hospitality-crud-validation.md](hospitality-crud-validation.md)
- [x] Dashboards: [hospitality-dashboard-validation.md](hospitality-dashboard-validation.md)
- [x] Commercial: [hospitality-commercial-validation.md](hospitality-commercial-validation.md)
- [x] Integrations: [hospitality-integration-validation.md](hospitality-integration-validation.md)
- [x] Certification: [hospitality-final-certification.md](hospitality-final-certification.md)
- [x] Handover: [phase-handover/phase-hospitality-frontend-production-validation.md](phase-handover/phase-hospitality-frontend-production-validation.md)
- [ ] hospitality-12.9 / 12.10 (backend — separate track)

---

## Commercial Runtime Backend — 2026-07-28 ✅

**Architecture status: COMMERCIAL_RUNTIME_BACKEND_COMPLETE.** Single SoT for commercial metadata in Core Platform.

- [x] Universal `CommercialRegistryObject` + meta-registry kinds (unlimited future kinds)
- [x] Discovery `GET /api/v1/commercial/catalog` + builtin + generic CRUD/lifecycle
- [x] Recommendation / assessment / bundle / plan / license / policy engines
- [x] Notification templates registry; outbox events; OpenAPI
- [x] Migration `0007_commercial_runtime` + seed from docs catalogs
- [x] Tests: `test_commercial_runtime.py` — **9 passed**
- [x] Final report: [commercial-runtime-backend-final-report.md](commercial-runtime-backend-final-report.md)
- [x] Architecture report: [commercial-runtime-backend-architecture-report.md](commercial-runtime-backend-architecture-report.md)
- [x] Snapshot: [service-snapshots/commercial-runtime-backend.yaml](service-snapshots/commercial-runtime-backend.yaml)
- [x] Handover: [phase-handover/phase-commercial-runtime-backend.md](phase-handover/phase-commercial-runtime-backend.md)
- [ ] Marketplace / QR / Booking / Payment 14.6+ (registry rows later — not this phase)

---

## Commercial Runtime Adoption — 2026-07-28 ✅

**Architecture status: COMMERCIAL_RUNTIME_ADOPTED.** Platform Commercial Readiness Score **92**.

- [x] Removed FE `business-bundles.ts` / `apps-catalog.ts` / AppStoreGrid
- [x] Billing + workspace entitlements commercial-only (no Core bridge)
- [x] Admin plans/features redirect → Commercial Admin
- [x] Tenant subscription admin → commercial APIs
- [x] Admin hub discovers from `/catalog`
- [x] Onboarding no longer assigns legacy FREE plan
- [x] Tenant context reads commercial subscriptions
- [x] Payment entitlement client → commercial entitlements check
- [x] Legacy `/api/v1/plans` deprecated
- [x] Adoption report: [commercial-runtime-adoption-report.md](commercial-runtime-adoption-report.md)
- [x] Legacy removal: [commercial-runtime-legacy-removal-report.md](commercial-runtime-legacy-removal-report.md)
- [x] Follow-up cleanup: drop legacy Core plan/feature tables (`0008`) — see Cleanup section

---

## Commercial Runtime Cleanup — 2026-07-28 ✅

**Architecture status: COMMERCIAL_RUNTIME_SOLE_SOT.** Remaining Legacy **0**. Score **98**. **CERTIFIED.**

- [x] Deleted Core legacy plans/features/subscriptions APIs, services, repos, schemas, models
- [x] Migration `0008_drop_legacy_commercial`
- [x] Removed FE `api.plans` / `features` / `subscriptions`
- [x] Hospitality/Communication commercial leftovers cleared
- [x] Commercial tests green (9 passed)
- [x] Cleanup report: [commercial-runtime-cleanup-report.md](commercial-runtime-cleanup-report.md)
- [x] Final certification: [commercial-runtime-final-certification.md](commercial-runtime-final-certification.md)
- [x] SoT report: [commercial-source-of-truth-report.md](commercial-source-of-truth-report.md)
- [x] Legacy removal (final): [commercial-runtime-legacy-removal-report.md](commercial-runtime-legacy-removal-report.md)

---

## Related Documents

- [Next Steps](next-steps.md)
- [Roadmap](roadmap.md)
- [Frontend docs](frontend/README.md)
- [docs/README.md](README.md)
- [CRM Phase 6.0](crm-phase-6-0.md)
- [CRM Phase 6.1](crm-phase-6-1.md)
- [CRM Phase 6.2](crm-phase-6-2.md)
- [CRM Phase 6.3](crm-phase-6-3.md)
- [Loyalty Phase 7.0](loyalty-phase-7-0.md)
- [Loyalty Phase 7.1](loyalty-phase-7-1.md)
- [Loyalty Phase 7.2](loyalty-phase-7-2.md)
- [Loyalty Phase 7.3](loyalty-phase-7-3.md)
- [Loyalty Phase 7.4](loyalty-phase-7-4.md)
- [Loyalty Phase 7.5](loyalty-phase-7-5.md)
- [Loyalty Phase 7.6](loyalty-phase-7-6.md)
- [Communication Phase 8](communication-phase-8.md)
- [Communication Roadmap](communication-roadmap.md)
- [Phase Handover 8](phase-handover/phase-8.md)
- [Sports Center Phase 9.0](sports-center-phase-9-0.md)
- [Sports Center Phase 9.1](sports-center-phase-9-1.md)
- [Sports Center Phase 9.2](sports-center-phase-9-2.md)
- [Sports Center Phase 9.6](sports-center-phase-9-6.md)
- [Sports Center Phase 9.7](sports-center-phase-9-7.md)
- [Phase Handover 9.0](phase-handover/phase-9-0.md)
- [Phase Handover 9.1](phase-handover/phase-9-1.md)
- [Phase Handover 9.2](phase-handover/phase-9-2.md)
- [Phase Handover 9.6](phase-handover/phase-9-6.md)
- [Phase Handover 9.7](phase-handover/phase-9-7.md)
- [Sports Center Roadmap](sports-center-roadmap.md)
- [Sports Center Service Snapshot](service-snapshots/sports-center.yaml)
- [Delivery Roadmap](delivery-roadmap.md)
- [Delivery Phase 10.0](delivery-phase-10-0.md)
- [Delivery Phase 10.1](delivery-phase-10-1.md)
- [Phase Handover DP-Reg](phase-handover/phase-dp-reg.md)
- [Phase Handover 10.0](phase-handover/phase-10-0.md)
- [Phase Handover 10.1](phase-handover/phase-10-1.md)
- [Experience Roadmap](experience-roadmap.md)
- [Experience Phase XP-Reg](experience-phase-xp-reg.md)
- [Experience Phase 11.0](experience-phase-11-0.md)
- [Experience Phase 11.1](experience-phase-11-1.md)
- [Experience Phase 11.2](experience-phase-11-2.md)
- [Experience Phase 11.3](experience-phase-11-3.md)
- [Phase Handover XP-Reg](phase-handover/phase-xp-reg.md)
- [Phase Handover 11.0](phase-handover/phase-11-0.md)
- [Phase Handover 11.1](phase-handover/phase-11-1.md)
- [AI / Enterprise Development Framework](ai-framework/README.md)
- [Phase Handover AF-Enterprise](phase-handover/phase-af-enterprise.md)
- [Phase Handover AF-Discovery](phase-handover/phase-af-discovery.md)
- [ADR-013](architecture/adr/ADR-013.md)
- [ADR-018](architecture/adr/ADR-018.md)
- [ADR-019](architecture/adr/ADR-019.md)
- [ADR-014](architecture/adr/ADR-014.md)
- [ADR-015](architecture/adr/ADR-015.md)
- [ADR-016](architecture/adr/ADR-016.md)
- [ADR-017](architecture/adr/ADR-017.md)
- [Hospitality Phase 12.0](hospitality-phase-12-0.md)
- [Hospitality Phase 12.1](hospitality-phase-12-1.md)
- [Hospitality Phase 12.2](hospitality-phase-12-2.md)
- [Hospitality Phase 12.3](hospitality-phase-12-3.md)
- [Hospitality Roadmap](hospitality-roadmap.md)
- [Phase Handover 12.0](phase-handover/phase-12-0.md)
- [Phase Handover 12.1](phase-handover/phase-12-1.md)
- [Phase Handover 12.2](phase-handover/phase-12-2.md)
- [Phase Handover 12.3](phase-handover/phase-12-3.md)
- [Healthcare Roadmap](healthcare-roadmap.md)
- [Healthcare Snapshot](service-snapshots/healthcare.yaml)
- [Phase Handover 13.7](phase-handover/phase-13-7.md)
- [Healthcare Phase Area](phases/Healthcare/README.md)
- [Beauty Business Roadmap](beauty-business-roadmap.md)
- [Beauty Business Phase Area](phases/BeautyBusiness/README.md)
- [Beauty Business Snapshot](service-snapshots/beauty-business.yaml)
- [Phase Handover 14.7](phase-handover/phase-14-7.md)
- [Payment Roadmap](payment-roadmap.md)
- [Payment Snapshot](service-snapshots/payment.yaml)
- [Phase Handover Pay-Reg](phase-handover/phase-pay-reg.md)
- [Phase Handover Pay-Arch](phase-handover/phase-pay-arch.md)
- [Payment Phase Area](phases/Payment/README.md)

## Loyalty Frontend (2026-07-26)
- Added `frontend/modules/loyalty` engage portal + thin `app/loyalty` routes.
- BFF `/api/loyalty` → Loyalty service 8004; wired CRUD/workflows for phases 7.0–7.6.
- Docs: `frontend/docs/loyalty-*.md`.
