{
  "schemaVersion": "1.0",
  "id": "today-empty",
  "title": "Một ngày nhẹ nhàng",
  "purpose": "Empty agenda giữ đường tạo tay và Nhờ AI.",
  "roles": [
    "adult"
  ],
  "group": "chores-spaces",
  "variantOf": "today",
  "layout": {
    "canvas": {
      "width": 390,
      "height": 844
    },
    "responsive": {
      "minimumWidth": 360,
      "maximumWidth": 430,
      "scroll": "vertical",
      "safeAreaBottom": true,
      "fontScale": "native dynamic type; reflow without clipping",
      "keyboard": "composer sticky within resized viewport; dialog scrolls; no fixed keyboard overlay"
    },
    "regions": [
      {
        "id": "header",
        "order": 0,
        "type": "safe-area/header",
        "height": "intrinsic"
      },
      {
        "id": "content",
        "order": 1,
        "type": "purpose-specific today",
        "componentIds": [
          "screen-header",
          "today-empty-0",
          "today-empty-1",
          "screen-actions",
          "primary-navigation"
        ]
      },
      {
        "id": "actions",
        "order": 2,
        "type": "one primary + secondary controls"
      },
      {
        "id": "navigation",
        "order": 3,
        "type": "adult-four-tabs"
      }
    ]
  },
  "components": [
    {
      "id": "screen-header",
      "type": "Header",
      "props": {
        "homeLabel": "Nhà Lá",
        "scopeGate": "A",
        "backTarget": "today",
        "settingsTarget": "settings"
      },
      "tokens": {
        "foreground": "{semantic.light.fg}",
        "darkForeground": "{semantic.dark.fg}"
      },
      "accessibility": {
        "label": "Thanh đầu màn hình",
        "readingOrder": 0,
        "focusOrder": "back then settings"
      }
    },
    {
      "id": "today-empty-0",
      "type": "RoomIllustration",
      "props": {
        "asset": "assets/quiet-room.svg",
        "aspectRatio": "400/290",
        "fit": "contain"
      },
      "tokens": {
        "background": "{semantic.light.surface}",
        "foreground": "{semantic.light.fg}",
        "darkBackground": "{semantic.dark.surface}",
        "darkForeground": "{semantic.dark.fg}",
        "bodySize": "{primitive.type.body}",
        "touchTarget": "{primitive.space.48}"
      },
      "accessibility": {
        "label": "Một ngày nhẹ nhàng · RoomIllustration",
        "readingOrder": 1,
        "colorOnly": false,
        "fontScaling": true,
        "minimumTouchTarget": 48,
        "instructions": "Đọc theo thứ tự; công bố nhãn trạng thái và lỗi, không chỉ màu."
      }
    },
    {
      "id": "today-empty-1",
      "type": "EmptyState",
      "props": {
        "title": "Chưa có việc đến hạn",
        "description": "Các việc đã lưu vẫn ở Không gian. Thêm việc khi bạn muốn bắt đầu."
      },
      "tokens": {
        "background": "{semantic.light.surface}",
        "foreground": "{semantic.light.fg}",
        "darkBackground": "{semantic.dark.surface}",
        "darkForeground": "{semantic.dark.fg}",
        "bodySize": "{primitive.type.body}",
        "touchTarget": "{primitive.space.48}"
      },
      "accessibility": {
        "label": "Một ngày nhẹ nhàng · EmptyState",
        "readingOrder": 2,
        "colorOnly": false,
        "fontScaling": true,
        "minimumTouchTarget": 48,
        "instructions": "Đọc theo thứ tự; công bố nhãn trạng thái và lỗi, không chỉ màu."
      }
    },
    {
      "id": "screen-actions",
      "type": "ActionGroup",
      "props": {
        "actions": [
          {
            "id": "navigate-0",
            "label": "Tạo việc đầu tiên",
            "kind": "navigate",
            "target": "task-create",
            "confirmationRequired": false
          },
          {
            "id": "navigate-1",
            "label": "Nhờ AI ghi việc",
            "kind": "navigate",
            "target": "ai-chat",
            "confirmationRequired": false
          },
          {
            "id": "navigate-2",
            "label": "Xem không gian",
            "kind": "navigate",
            "target": "spaces",
            "confirmationRequired": false
          },
          {
            "id": "link-today",
            "label": "Hôm nay",
            "kind": "navigate",
            "target": "today",
            "confirmationRequired": false
          },
          {
            "id": "link-settings",
            "label": "Cài đặt",
            "kind": "navigate",
            "target": "settings",
            "confirmationRequired": false
          },
          {
            "id": "link-calendar-list",
            "label": "Lịch chung",
            "kind": "navigate",
            "target": "calendar-list",
            "confirmationRequired": false
          },
          {
            "id": "link-members",
            "label": "Thành viên",
            "kind": "navigate",
            "target": "members",
            "confirmationRequired": false
          }
        ],
        "primaryCount": 1
      },
      "tokens": {
        "lightBackground": "{component.light.button.background}",
        "lightForeground": "{component.light.button.foreground}",
        "darkBackground": "{component.dark.button.background}",
        "darkForeground": "{component.dark.button.foreground}",
        "height": "{primitive.space.48}"
      },
      "accessibility": {
        "label": "Hành động của màn hình",
        "keyboard": true,
        "focusVisible": true,
        "disabledOnlyLowContrast": true
      }
    },
    {
      "id": "primary-navigation",
      "type": "Navigation",
      "props": {
        "items": [
          [
            "today",
            "Hôm nay",
            "home"
          ],
          [
            "spaces",
            "Không gian",
            "room"
          ],
          [
            "calendar-list",
            "Lịch",
            "calendar"
          ],
          [
            "members",
            "Thành viên",
            "users"
          ]
        ],
        "active": "today"
      },
      "tokens": {
        "activeBackground": "{semantic.light.sage}",
        "activeDarkBackground": "{semantic.dark.sage}",
        "foreground": "{semantic.light.fg}",
        "darkForeground": "{semantic.dark.fg}"
      },
      "accessibility": {
        "label": "Điều hướng chính",
        "ariaCurrent": "page",
        "touchTarget": 48,
        "noColorOnly": true
      }
    }
  ],
  "fields": [],
  "states": [
    {
      "id": "no-due",
      "when": "Không occurrence ở date/filter",
      "visibleUI": "Không coi chưa có việc là lỗi sync",
      "availableActions": [
        "navigate-0",
        "navigate-1",
        "navigate-2",
        "link-today",
        "link-settings",
        "link-calendar-list",
        "link-members"
      ],
      "mutationPolicy": "Actor, exact capability and current versions must still pass; this state never grants rights."
    },
    {
      "id": "filter-empty",
      "when": "Filter không có kết quả",
      "visibleUI": "Cho đổi sang cả nhà",
      "availableActions": [
        "navigate-0",
        "navigate-1",
        "navigate-2",
        "link-today",
        "link-settings",
        "link-calendar-list",
        "link-members"
      ],
      "mutationPolicy": "Actor, exact capability and current versions must still pass; this state never grants rights."
    }
  ],
  "actions": [
    {
      "id": "navigate-0",
      "label": "Tạo việc đầu tiên",
      "kind": "navigate",
      "targetScreenId": "task-create",
      "permission": "A",
      "confirmationRequired": false,
      "contractRef": "local navigation",
      "localBehavior": "Only validated draft/local domain where supported; remote adapters never report success.",
      "idempotency": null
    },
    {
      "id": "navigate-1",
      "label": "Nhờ AI ghi việc",
      "kind": "navigate",
      "targetScreenId": "ai-chat",
      "permission": "A",
      "confirmationRequired": false,
      "contractRef": "local navigation",
      "localBehavior": "Only validated draft/local domain where supported; remote adapters never report success.",
      "idempotency": null
    },
    {
      "id": "navigate-2",
      "label": "Xem không gian",
      "kind": "navigate",
      "targetScreenId": "spaces",
      "permission": "A",
      "confirmationRequired": false,
      "contractRef": "local navigation",
      "localBehavior": "Only validated draft/local domain where supported; remote adapters never report success.",
      "idempotency": null
    },
    {
      "id": "link-today",
      "label": "Hôm nay",
      "kind": "navigate",
      "targetScreenId": "today",
      "permission": "A",
      "confirmationRequired": false,
      "contractRef": "local navigation"
    },
    {
      "id": "link-settings",
      "label": "Cài đặt",
      "kind": "navigate",
      "targetScreenId": "settings",
      "permission": "A",
      "confirmationRequired": false,
      "contractRef": "local navigation"
    },
    {
      "id": "link-calendar-list",
      "label": "Lịch chung",
      "kind": "navigate",
      "targetScreenId": "calendar-list",
      "permission": "A",
      "confirmationRequired": false,
      "contractRef": "local navigation"
    },
    {
      "id": "link-members",
      "label": "Thành viên",
      "kind": "navigate",
      "targetScreenId": "members",
      "permission": "A",
      "confirmationRequired": false,
      "contractRef": "local navigation"
    }
  ],
  "dataBindings": [
    {
      "source": "GET /v1/households/{hid}/today",
      "shape": {
        "data": "TodayDto",
        "version": "integer",
        "household_revision": "integer",
        "replayed": "boolean"
      },
      "sample": {
        "data": {
          "local_date": "2026-10-14",
          "timezone": "Asia/Ho_Chi_Minh",
          "server_time": "2026-10-14T05:00:00Z",
          "occurrences": [],
          "points": []
        },
        "version": 1,
        "household_revision": 1,
        "replayed": false
      },
      "sampleOnly": true,
      "actorConstraint": "exact actor allowlist",
      "envelope": "API refs use CommandEnvelope; local review context is not an API property."
    }
  ],
  "copy": {
    "heading": "Một ngày nhẹ nhàng",
    "primary": "Tạo việc đầu tiên",
    "empty": {
      "title": "Chưa có việc đến hạn",
      "description": "Các việc đã lưu vẫn ở Không gian. Thêm việc khi bạn muốn bắt đầu."
    },
    "notices": [],
    "locale": "vi",
    "demoLabel": "Bản thiết kế · dữ liệu mẫu · không kết nối dịch vụ"
  },
  "implementation": {
    "nativeRoute": "/design/today-empty",
    "nativeRouteStatus": "proposed mapping, verify against implementing native navigator",
    "apiRefs": [
      "GET /v1/households/{hid}/today"
    ],
    "newContractRefs": [],
    "notes": [
      "Tất cả ví dụ là dữ liệu thiết kế, không bằng chứng native/API/store đã chạy.",
      "Native route dưới đây là đề xuất mapping cho agent, không tuyên bố route source đã tồn tại.",
      "Mọi mutation dùng envelope {data,version,household_revision,replayed}, stable Idempotency-Key và expected_version khi sửa.",
      "Accepted-day recurrence; occurrence due/effort snapshot bất biến; snooze không đổi anchor; pending không reassign; undo điều chỉnh ledger đúng một lần."
    ],
    "integrationStatus": "design complete; local static/draft interactions; native/API adapters pending",
    "sourceAuthority": [
      "docs/product-brief.md",
      "plans/261013-1409-sweepy-vietnam-mobile/mobile-flows.md",
      "plans/261013-1409-sweepy-vietnam-mobile/api-contracts.md",
      "packages/domain/src/contracts/phase2.ts",
      "packages/domain/src/index.ts",
      "packages/domain/src/contracts/phase3.ts",
      "packages/domain/src/contracts/billing.ts",
      "apps/mobile/src/lib/api.ts"
    ],
    "capability": "A",
    "errors": {
      "401": "Stop queue; adult login or child re-pair without parent account.",
      "403": "Do not retry lost capability. FEATURE_REQUIRED never grants Pro.",
      "409": "Fetch canonical scoped state; review/reconfirm new intent, do not rewrite old replay payload.",
      "422": "Field error with retained draft.",
      "429": "Respect Retry-After.",
      "503": "Backoff only retryable commands with original key."
    }
  }
}
