Use when adding or reviewing Progressive Web App capabilities such as installability, manifest metadata, Service Worker registration, Workbox caching, offline fallback, app update prompts, maskable icons, or iOS PWA compatibility. Do not use for general API caching or non-installable performance tuning; Chinese triggers include PWA, 离线, Service Worker.
Load [references/manifest-and-icons.md](references/manifest-and-icons.md) for manifest fields, HTML links, icon requirements, screenshots, and iOS notes.
Load [references/service-worker-workbox.md](references/service-worker-workbox.md) for Service Worker registration, Workbox strategies, Vite integration, offline fallback, and update flow.
Constraints
Service Worker 仅在 HTTPS 下工作(localhost 除外)。
缓存策略必须区分页面、静态资源、API 与敏感操作;不要把登录、支付、权限接口缓存起来。
Service Worker 更新有生命周期延迟;用户可见刷新提示优先于强制刷新。
iOS PWA 能力弱于 Android,安装、推送和生命周期都要单独验证。
缓存有配额和逐出机制,必须设置 max entries / max age。
Expected Output
产出可安装的 Web 应用、离线 fallback、可见更新提示和明确缓存策略。验证 Lighthouse PWA、DevTools Application 面板、离线模式、更新发布和移动端安装流程。