{
  "slug": "settings-module",
  "spec_file": "docs/specs/2026-05-30-settings-module.md",
  "findings": [
    {
      "id": "settings-module-001",
      "severity": "P0",
      "type": "broken",
      "summary": "/profile route and profile UI tabs not implemented",
      "spec_ref": "User Profile (/profile) — three tabs",
      "code_ref": "apps/zync-app/src/shell/UserMenu.tsx:79",
      "evidence": "Shell links to /profile; grep finds no profile route in modules/settings or routes/index (only /staff/profile). No features/profile directory.",
      "repro": "User menu → Profile → blank page at /profile."
    },
    {
      "id": "settings-module-002",
      "severity": "P1",
      "type": "missing",
      "summary": "GET/PATCH /api/settings/business not implemented",
      "spec_ref": "API Endpoints — GET/PATCH /api/settings/business",
      "code_ref": "NONE",
      "evidence": "grep apps/zync-api/src for settings/business returns no routes; account settings at /api/settings/account instead (settings/account.ts:3).",
      "repro": ""
    },
    {
      "id": "settings-module-003",
      "severity": "P1",
      "type": "missing",
      "summary": "Profile API surface (/api/profile/*) not implemented",
      "spec_ref": "API Endpoints — GET/PATCH /api/profile and related",
      "code_ref": "NONE",
      "evidence": "grep apps/zync-api/src for /api/profile and pending_email returns no matches.",
      "repro": ""
    },
    {
      "id": "settings-module-004",
      "severity": "P1",
      "type": "missing",
      "summary": "SettingsShell and SETTINGS_NAV manifest absent",
      "spec_ref": "Settings Navigation Manifest",
      "code_ref": "apps/zync-app/src/routes/settings/index.tsx:27",
      "evidence": "Settings index is emoji card hub (CATEGORIES array) not two-pane SettingsShell with canonical SETTINGS_NAV sidebar from spec.",
      "repro": ""
    },
    {
      "id": "settings-module-005",
      "severity": "P1",
      "type": "missing",
      "summary": "Change-email schema columns pending_email* not in users table",
      "spec_ref": "Change Email Flow — Schema delta",
      "code_ref": "packages/db/src/schema/users.ts:1",
      "evidence": "grep pending_email in packages/db/src/schema/users.ts returns no matches; spec requires three pending_email columns.",
      "repro": ""
    },
    {
      "id": "settings-module-006",
      "severity": "P2",
      "type": "divergent",
      "summary": "Business profile at /settings/account lacks spec business/org fields",
      "spec_ref": "Business Profile — Business Info and Organization Preferences",
      "code_ref": "apps/zync-api/src/routes/settings/account.ts:24",
      "evidence": "PATCH schema allows name, timezone, logo_url only; spec requires business_type, tax_id, address, org prefs (idle timer, billing type, VAT, currency, fiscal year).",
      "repro": ""
    },
    {
      "id": "settings-module-007",
      "severity": "P2",
      "type": "divergent",
      "summary": "Locale API is PATCH-only timezone using wrong permission",
      "spec_ref": "Locale & Internationalization — GET/PATCH /api/settings/locale",
      "code_ref": "apps/zync-api/src/routes/settings/locale.ts:26",
      "evidence": "Only PATCH / with timezone field and requirePermission('settings:modules:write'); no GET; spec expects language/date/currency/week_start in tenants.settings with settings:read/write.",
      "repro": ""
    },
    {
      "id": "settings-module-008",
      "severity": "P2",
      "type": "divergent",
      "summary": "Integrations hub API is GET list only; connect/sync/disconnect missing",
      "spec_ref": "API Endpoints — integrations connect/sync/disconnect/detail",
      "code_ref": "apps/zync-api/src/routes/settings/integrations.ts:8",
      "evidence": "File comment states GET-only; no POST connect, POST sync, DELETE disconnect, or GET :adapterId detail routes in settings integrations router.",
      "repro": ""
    },
    {
      "id": "settings-module-009",
      "severity": "P2",
      "type": "divergent",
      "summary": "Canonical route /settings/business replaced by /settings/account",
      "spec_ref": "Business Profile (/settings/business)",
      "code_ref": "apps/zync-app/src/routes/settings/index.tsx:34",
      "evidence": "Settings hub links to /settings/account; spec manifest lists /settings/business as canonical business profile route.",
      "repro": ""
    }
  ],
  "summary": { "P0": 1, "P1": 4, "P2": 4, "P3": 0, "total": 9 }
}
