feat: M2-M4 完成,添加 AI 增强、设计系统、App Store 准备

新增功能:
- AI 超分辨率模块 (Real-ESRGAN Core ML)
- Soft UI 设计系统 (DesignSystem.swift)
- 设置页、隐私政策页、引导页
- 最近作品管理器

App Store 准备:
- 完善截图 (iPhone 6.7"/6.5", iPad 12.9")
- App Store 元数据文档
- 修复应用图标 alpha 通道
- 更新显示名称为 Live Photo Studio

工程配置:
- 配置 Git LFS 跟踪 mlmodel 文件
- 添加 Claude skill 开发指南
- 更新 .gitignore 规则

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
empty
2025-12-16 10:24:31 +08:00
parent 64cdb82459
commit 5aba93e967
46 changed files with 5279 additions and 421 deletions

View File

@@ -0,0 +1,108 @@
---
name: live-photo-studio
description: Live Photo Studio 开发指南。将视频转换为 Live Photo 并设置为动态壁纸。SwiftUI + Core ML + Soft UI。
---
# Live Photo Studio
## 项目信息
| 属性 | 值 |
|-----|-----|
| **Bundle ID** | `xyz.let5see.livephotomaker` |
| **App Store 名称** | Live Photo Studio |
| **最低支持** | iOS/iPadOS 18.0 |
| **技术栈** | SwiftUI + Swift Concurrency + Core ML |
## 项目结构
```
to-live-photo/
├── Sources/LivePhotoCore/ # 核心库Swift Package
│ ├── LivePhotoCore.swift # WorkItem, ExportParams, Builder
│ ├── AIEnhancer/ # AI 超分辨率
│ └── Resources/ # Core ML 模型
├── to-live-photo/to-live-photo/ # 主应用
│ ├── Views/ # HomeView → EditorView → ProcessingView → ResultView → WallpaperGuideView
│ ├── AppState.swift # 全局状态
│ ├── DesignSystem.swift # Soft UI 设计系统
│ └── Analytics.swift # 埋点
└── docs/ # APP_STORE_METADATA.md, TEST_MATRIX.md
```
## 设计令牌DesignSystem.swift
```swift
//
DesignTokens.Spacing.sm // 8pt
DesignTokens.Spacing.md // 12pt
DesignTokens.Spacing.lg // 16pt
DesignTokens.Spacing.xl // 20pt
//
DesignTokens.Radius.md // 12pt
DesignTokens.Radius.lg // 16pt
DesignTokens.Radius.xl // 24pt
//
Color.softBackground //
Color.softCard //
Color.textPrimary //
Color.textSecondary //
Color.accentPurple // #6366F1
Color.gradientPrimary //
```
## 核心 APILivePhotoCore
```swift
//
struct ExportParams {
var duration: Double = 0.917 //
var keyFrameTime: Double = 0.5 //
var aspectRatio: AspectRatio //
var hdrPolicy: HDRPolicy = .toneMapToSDR
var codecPolicy: CodecPolicy = .fallbackH264
var aiEnhanceConfig: AIEnhanceConfig?
}
//
enum LivePhotoBuildStage {
case normalize, aiEnhance, extractKeyFrame
case writePhotoMetadata, writeVideoMetadata
case saveToAlbum, validate
}
```
## 错误码
| 错误码 | 含义 | 建议 |
|-------|------|------|
| LPB-001 | 导入失败 | 检查格式 |
| LPB-101 | 标准化失败 | 开启兼容模式 |
| LPB-401 | 保存失败 | 检查权限 |
| LPB-501 | AI 增强失败 | 静默降级 |
## 开发检查清单
**新增 View**
- [ ] 状态机loading/error/content
- [ ] 触控目标 ≥ 44pt
- [ ] accessibilityLabel
- [ ] iPad 适配
- [ ] 深色模式
**发布前:**
- [ ] 图标无 alpha 通道
- [ ] 版本号更新
- [ ] 截图尺寸正确
## 常用命令
```bash
# 构建
xcodebuild -scheme to-live-photo -destination 'platform=iOS Simulator,name=iPhone 16 Pro' build
# Archive
xcodebuild -scheme to-live-photo -configuration Release -destination 'generic/platform=iOS' -archivePath build/to-live-photo.xcarchive archive
```