@dtt_siye/atool 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION +1 -1
- package/hooks/doc-sync-reminder +4 -4
- package/hooks/hooks-cursor.json +20 -0
- package/hooks/hooks.json +21 -1
- package/hooks/pre-commit +191 -0
- package/hooks/prompt-guard +84 -35
- package/hooks/session-start +34 -12
- package/hooks/task-state-tracker +145 -0
- package/lib/common.sh +36 -23
- package/lib/compute-importance.sh +73 -0
- package/lib/install-cursor.sh +2 -2
- package/lib/install-hooks.sh +64 -0
- package/lib/install-skills.sh +19 -0
- package/lib/knowledge-graph.sh +483 -81
- package/lib/pre-scan.sh +81 -6
- package/package.json +1 -1
- package/skills/agent-audit/SKILL.md +180 -0
- package/skills/architecture-guard/SKILL.md +164 -0
- package/skills/architecture-guard/rules/violation-detection.md +90 -0
- package/skills/ci-feedback/SKILL.md +165 -0
- package/skills/project-analyze/SKILL.md +131 -23
- package/skills/project-analyze/phases/phase1-setup.md +15 -1
- package/skills/project-analyze/phases/phase2-understand.md +17 -2
- package/skills/project-analyze/phases/phase2.5-refine.md +293 -0
- package/skills/project-analyze/phases/phase3-graph.md +7 -1
- package/skills/project-analyze/phases/phase4-synthesize.md +117 -120
- package/skills/project-analyze/phases/phase5-export.md +117 -33
- package/skills/project-analyze/prompts/understand-agent.md +17 -0
- package/skills/project-analyze/rules/android.md +61 -260
- package/skills/project-analyze/rules/devops.md +61 -421
- package/skills/project-analyze/rules/generic.md +53 -221
- package/skills/project-analyze/rules/go.md +60 -275
- package/skills/project-analyze/rules/harmony.md +64 -237
- package/skills/project-analyze/rules/java.md +47 -485
- package/skills/project-analyze/rules/mobile-flutter.md +57 -292
- package/skills/project-analyze/rules/mobile-react-native.md +65 -262
- package/skills/project-analyze/rules/mobile-swift.md +58 -303
- package/skills/project-analyze/rules/python.md +50 -296
- package/skills/project-analyze/rules/rust-tauri.md +51 -217
- package/skills/project-analyze/rules/rust.md +50 -274
- package/skills/project-analyze/rules/web-nextjs.md +61 -335
- package/skills/project-analyze/rules/web-react.md +50 -272
- package/skills/project-analyze/rules/web-vue.md +58 -352
- package/skills/project-analyze/rules/web.md +55 -347
- package/skills/project-query/SKILL.md +681 -120
- package/skills/requirements-writer/SKILL.md +48 -1
- package/skills/software-architecture/SKILL.md +73 -3
|
@@ -1,323 +1,78 @@
|
|
|
1
1
|
# iOS / Swift 项目分析规则
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **编码规范**:本规则不包含编码规范内容。Phase 2.5 精炼阶段会自动加载 `swift-conventions` skill 作为规范约束。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 模块发现策略
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
App Entry Point
|
|
9
|
-
↓
|
|
10
|
-
Coordinator / Router(导航)
|
|
11
|
-
↓
|
|
12
|
-
ViewController / SwiftUI View(视图)
|
|
13
|
-
↓
|
|
14
|
-
ViewModel / ObservableObject(逻辑)
|
|
15
|
-
↓
|
|
16
|
-
Model / Entity(数据)
|
|
17
|
-
↓
|
|
18
|
-
Service / Repository(网络/持久化)
|
|
19
|
-
↓
|
|
20
|
-
Extensions / Utils(工具)
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## 目录扫描策略
|
|
24
|
-
|
|
25
|
-
### 1. 识别项目类型
|
|
26
|
-
|
|
27
|
-
**信号文件检测:**
|
|
28
|
-
- `.xcodeproj` / `.xcworkspace` → Xcode 项目
|
|
29
|
-
- `Package.swift` → Swift Package
|
|
30
|
-
- 依赖管理:SPM(Package Dependencies)、CocoaPods(`Podfile`)、Carthage(`Cartfile`)
|
|
31
|
-
|
|
32
|
-
### 2. 识别架构模式
|
|
33
|
-
|
|
34
|
-
- **MVVM**: ViewModels 目录 + Bindings / Combine
|
|
35
|
-
- **MVC**: Controllers 目录,无 ViewModel
|
|
36
|
-
- **VIPER**: View / Interactor / Presenter / Entity / Router 目录
|
|
37
|
-
- **Clean Architecture**: Domain / Data / Presentation 分层
|
|
38
|
-
- **SwiftUI + TCA**: Reducers / Effects / Store 模式
|
|
39
|
-
|
|
40
|
-
### 3. 识别 UI 框架
|
|
41
|
-
|
|
42
|
-
- **UIKit**: `import UIKit`, `.storyboard`, `.xib`, `ViewController`
|
|
43
|
-
- **SwiftUI**: `import SwiftUI`, `ContentView: View`, `@StateObject`
|
|
44
|
-
- **混合**: 两者并存(`UIHostingController` 桥接)
|
|
45
|
-
|
|
46
|
-
### 4. 依赖提取
|
|
47
|
-
|
|
48
|
-
从 `Package.swift` / `Podfile` / `Cartfile` 提取:
|
|
49
|
-
|
|
50
|
-
| 类别 | 常见依赖 |
|
|
51
|
-
|------|----------|
|
|
52
|
-
| 网络 | Alamofire, Moya, URLSession |
|
|
53
|
-
| 响应式 | RxSwift, Combine |
|
|
54
|
-
| DI | Swinject, Kodein, Factory |
|
|
55
|
-
| 存储 | CoreData, Realm, SwiftData, UserDefaults |
|
|
56
|
-
| 导航 | RxFlow, Coordinator Pattern |
|
|
57
|
-
| UI | SnapKit, Kingfisher, Lottie |
|
|
58
|
-
| 测试 | XCTest, Quick/Nimble, OHHTTPStubs |
|
|
59
|
-
|
|
60
|
-
### 5. 按层扫描路径
|
|
61
|
-
|
|
62
|
-
- **View 层**: `*/Views/`, `*/Screens/`, `*/UI/`, `*/Scenes/`
|
|
63
|
-
- **ViewModel 层**: `*/ViewModels/`, `*/Presenters/`, `*/Reducers/`
|
|
64
|
-
- **Model 层**: `*/Models/`, `*/Entities/`, `*/DTOs/`
|
|
65
|
-
- **Coordinator/Router 层**: `*/Coordinators/`, `*/Routers/`, `*/Navigation/`
|
|
66
|
-
- **Service 层**: `*/Services/`, `*/Network/`, `*/API/`, `*/Repositories/`
|
|
67
|
-
- **Extensions**: `*/Extensions/`, `*/+Extensions/`
|
|
68
|
-
- **Resources**: `*/Resources/`, `*/Assets.xcassets/`
|
|
69
|
-
|
|
70
|
-
## 各层提取规则
|
|
71
|
-
|
|
72
|
-
### 层 1: Coordinator / Router 导航层
|
|
73
|
-
|
|
74
|
-
**扫描文件**: `*Coordinator.swift`, `*Router.swift`, `*Navigator.swift`
|
|
75
|
-
|
|
76
|
-
**提取内容**:
|
|
77
|
-
- Coordinator 类名 + 管理的页面列表
|
|
78
|
-
- 导航方法(方法签名 + 目标页面 + 传递的参数)
|
|
79
|
-
- 导航模式(push / present / modal / sheet)
|
|
80
|
-
- Deep Link 处理
|
|
81
|
-
|
|
82
|
-
**输出示例**:
|
|
83
|
-
```
|
|
84
|
-
### AppCoordinator
|
|
85
|
-
- **路径**: `Coordinators/AppCoordinator.swift`
|
|
86
|
-
- **管理的页面**: LoginFlow → MainTabBar → (Home, Profile, Settings)
|
|
87
|
-
- **导航方法**:
|
|
88
|
-
| 方法 | 目标 | 参数 | 导航方式 |
|
|
89
|
-
|------|------|------|----------|
|
|
90
|
-
| start() | LoginViewController | - | window.rootViewController |
|
|
91
|
-
| showMain() | MainTabBarController | UserSession | rootViewController 替换 |
|
|
92
|
-
| showProfile(userId:) | ProfileViewController | userId: String | push |
|
|
93
|
-
| showSettings() | SettingsViewController | - | present (modal) |
|
|
94
|
-
| showEditProfile() | EditProfileViewController | - | present (fullScreen) |
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### 层 2: ViewController / SwiftUI View 层
|
|
98
|
-
|
|
99
|
-
**扫描文件**: `*ViewController.swift`, `*View.swift`(SwiftUI)
|
|
100
|
-
|
|
101
|
-
#### UIKit ViewController
|
|
102
|
-
|
|
103
|
-
**提取内容**:
|
|
104
|
-
- 类名 + 继承关系
|
|
105
|
-
- IBOutlet 列表(属性名 + 类型)
|
|
106
|
-
- IBAction 列表(方法名 + 关联事件)
|
|
107
|
-
- 生命周期方法(viewDidLoad, viewWillAppear 等)
|
|
108
|
-
- 使用的 ViewModel
|
|
109
|
-
- UI 配置逻辑(UITableView 代理/数据源、UICollectionView 等)
|
|
110
|
-
|
|
111
|
-
**输出示例**:
|
|
112
|
-
```
|
|
113
|
-
### UserListViewController
|
|
114
|
-
- **路径**: `Scenes/User/UserListViewController.swift`
|
|
115
|
-
- **继承**: UIViewController
|
|
116
|
-
- **ViewModel**: UserListViewModel
|
|
117
|
-
- **IBOutlet**:
|
|
118
|
-
| 属性 | 类型 | 关联 UI |
|
|
119
|
-
|------|------|---------|
|
|
120
|
-
| tableView | UITableView | 用户列表 |
|
|
121
|
-
| searchController | UISearchController | 搜索栏 |
|
|
122
|
-
| activityIndicator | UIActivityIndicatorView | 加载指示器 |
|
|
123
|
-
- **IBAction**:
|
|
124
|
-
| 方法 | 关联事件 | 说明 |
|
|
125
|
-
|------|----------|------|
|
|
126
|
-
| @IBAction addButtonTapped | UIBarButtonItem.tap | 新增用户 |
|
|
127
|
-
- **生命周期**:
|
|
128
|
-
| 方法 | 行为 |
|
|
129
|
-
|------|------|
|
|
130
|
-
| viewDidLoad() | 绑定 ViewModel、配置 tableView、触发初始加载 |
|
|
131
|
-
| viewWillAppear() | 刷新数据 |
|
|
132
|
-
- **UITableView 配置**:
|
|
133
|
-
- Cell: UserTableViewCell (register nib)
|
|
134
|
-
- 高度: 80pt (自动布局)
|
|
135
|
-
- 下拉刷新: UIRefreshControl → viewModel.reload()
|
|
136
|
-
```
|
|
7
|
+
从构建文件识别模块边界:
|
|
137
8
|
|
|
138
|
-
|
|
9
|
+
- `.xcodeproj` / `.xcworkspace` → 扫描 Targets 和 Schemes
|
|
10
|
+
- `Package.swift` → 解析 `.target()` / `.product()` 声明
|
|
11
|
+
- `Podfile` → 解析 `pod` 依赖列表,识别 CocoaPods 模块
|
|
12
|
+
- `Cartfile` → 识别 Carthage 依赖模块
|
|
13
|
+
- 多 Target 项目:每个 Target 视为独立模块
|
|
14
|
+
- Swift Package Manager 本地 package:`dependencies:` 中的 `.package(path:)` 引用
|
|
139
15
|
|
|
140
|
-
|
|
141
|
-
- View 结构体名
|
|
142
|
-
- `@State` / `@Binding` / `@ObservedObject` / `@EnvironmentObject` 属性
|
|
143
|
-
- `body` 中的主要子视图(1-2 层)
|
|
144
|
-
- `.modifier()` 链(导航、样式修饰)
|
|
145
|
-
- `.sheet()` / `.fullScreenCover()` / `.navigationDestination()` 修饰
|
|
16
|
+
**不视为独立模块**:单文件入口(`App.swift`, `main.swift`)、`Utils/`/`Helpers/` 合并为一个模块、`*.generated.swift` 跳过。
|
|
146
17
|
|
|
147
|
-
|
|
148
|
-
```
|
|
149
|
-
### UserProfileView
|
|
150
|
-
- **路径**: `Views/Profile/UserProfileView.swift`
|
|
151
|
-
- **属性**:
|
|
152
|
-
| 属性 | 包装器 | 类型 | 说明 |
|
|
153
|
-
|------|--------|------|------|
|
|
154
|
-
| viewModel | @StateObject | UserProfileViewModel | 页面 VM |
|
|
155
|
-
| isEditing | @State | Bool | 编辑模式 |
|
|
156
|
-
| router | @EnvironmentObject | AppRouter | 导航 |
|
|
157
|
-
- **body 主要结构**:
|
|
158
|
-
ScrollView {
|
|
159
|
-
VStack {
|
|
160
|
-
ProfileHeaderView(viewModel: viewModel)
|
|
161
|
-
.sheet(isPresented: $isEditing) { EditProfileView() }
|
|
162
|
-
StatsGridView(stats: viewModel.stats)
|
|
163
|
-
SettingsListView(items: viewModel.settings)
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
.navigationTitle(viewModel.userName)
|
|
167
|
-
.task { await viewModel.loadProfile() }
|
|
168
|
-
```
|
|
18
|
+
## 入口识别
|
|
169
19
|
|
|
170
|
-
|
|
20
|
+
| 类型 | 识别特征 | 文件 |
|
|
21
|
+
|------|---------|------|
|
|
22
|
+
| UIKit App | `@UIApplicationMain` / `@main` + `AppDelegate: UIResponder` | `AppDelegate.swift` |
|
|
23
|
+
| Scene-based UIKit | `UIWindowSceneDelegate` + `SceneDelegate.swift` | `SceneDelegate.swift` |
|
|
24
|
+
| SwiftUI App | `@main struct XXXApp: App` + `WindowGroup` | `XXXApp.swift` |
|
|
25
|
+
| Swift Package | `Package.swift` 中的 executable target | `main.swift` |
|
|
171
26
|
|
|
172
|
-
|
|
27
|
+
页面入口:`*Coordinator.swift` / `*Router.swift`(导航层)→ `*ViewController.swift` / `*View.swift`(视图层)。
|
|
173
28
|
|
|
174
|
-
|
|
175
|
-
- 类名 + 遵循的协议(ObservableObject, Observable)
|
|
176
|
-
- Published / @Observable 属性(名称 + 类型 + 说明)
|
|
177
|
-
- Input / Action(用户操作触发的动作)
|
|
178
|
-
- Output / State 变化
|
|
179
|
-
- 依赖的 Service / Repository
|
|
29
|
+
## 架构模式识别
|
|
180
30
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
| users | [UserVO] | [] | 用户列表 |
|
|
190
|
-
| isLoading | Bool | false | 加载状态 |
|
|
191
|
-
| errorMessage | String? | nil | 错误信息 |
|
|
192
|
-
| searchText | String | "" | 搜索关键词 |
|
|
193
|
-
- **方法**:
|
|
194
|
-
| 方法 | 参数 | 返回值 | 说明 |
|
|
195
|
-
|------|------|--------|------|
|
|
196
|
-
| loadUsers() | - | async | 加载用户列表 |
|
|
197
|
-
| deleteUser(_:) | UserVO | async | 删除用户 |
|
|
198
|
-
| searchUsers(_:) | String | - | 搜索过滤 |
|
|
199
|
-
- **依赖**: UserRepository(网络请求), UserCacheService(本地缓存)
|
|
200
|
-
```
|
|
31
|
+
| 架构 | 识别特征 |
|
|
32
|
+
|------|---------|
|
|
33
|
+
| MVVM | `ViewModels/` 目录 + `ObservableObject` / `@Observable` 协议 |
|
|
34
|
+
| MVC | `Controllers/` 目录,无 ViewModel |
|
|
35
|
+
| VIPER | `View/Interactor/Presenter/Entity/Router` 五个目录或文件后缀 |
|
|
36
|
+
| Clean Architecture | `Domain/Data/Presentation` 三层目录 |
|
|
37
|
+
| TCA (The Composable Architecture) | `Reducers/`、`Effects/`、`Store` 模式 |
|
|
38
|
+
| SwiftUI + TCA | `@Reducer`、`ComposableArchitecture` import |
|
|
201
39
|
|
|
202
|
-
|
|
40
|
+
UI 框架检测:`import UIKit` + `.storyboard`/`.xib` → UIKit;`import SwiftUI` + `: View` → SwiftUI;两者并存(`UIHostingController`)→ 混合。
|
|
203
41
|
|
|
204
|
-
|
|
42
|
+
## 数据流模式
|
|
205
43
|
|
|
206
|
-
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
210
|
-
|
|
211
|
-
**输出示例**:
|
|
212
|
-
```
|
|
213
|
-
### User
|
|
214
|
-
- **路径**: `Models/User.swift`
|
|
215
|
-
- **类型**: struct, Codable, Identifiable
|
|
216
|
-
- **属性**:
|
|
217
|
-
| 属性 | 类型 | CodingKey | 说明 |
|
|
218
|
-
|------|------|-----------|------|
|
|
219
|
-
| id | String | "id" | 唯一标识 |
|
|
220
|
-
| name | String | "name" | 用户名 |
|
|
221
|
-
| email | String | "email" | 邮箱 |
|
|
222
|
-
| avatar | URL? | "avatar_url" | 头像 |
|
|
223
|
-
| createdAt | Date | "created_at" | 注册时间 |
|
|
224
|
-
```
|
|
44
|
+
- **Combine**:`@Published`、`PassthroughSubject`、`AnyPublisher` → 响应式数据流
|
|
45
|
+
- **RxSwift**:`Observable`、`Driver`、`Signal`、`DisposeBag`
|
|
46
|
+
- **async/await**:`async func` + `await` + `Task { }` → 结构化并发
|
|
47
|
+
- **状态管理**:`@StateObject`(所有者)/ `@ObservedObject`(借用)/ `@EnvironmentObject`(全局)
|
|
225
48
|
|
|
226
|
-
|
|
49
|
+
## 分析关注点
|
|
227
50
|
|
|
228
|
-
|
|
51
|
+
- **Target/Scheme 发现**:多 Target 项目需枚举所有 Target,区分 App/Framework/Test Target
|
|
52
|
+
- **UIKit vs SwiftUI 混合**:检测 `UIHostingController` 和 `UIViewRepresentable` 桥接点
|
|
53
|
+
- **App Delegate vs Scene Delegate**:iOS 13+ 迁移到 Scene-based lifecycle,需识别两种入口
|
|
54
|
+
- **SPM 本地模块**:`Package.swift` 中 `.package(path: "../")` 引用的本地 package 视为独立模块
|
|
55
|
+
- **Coordinator/Router 层**:是导航逻辑的核心,需完整提取页面跳转关系图
|
|
56
|
+
- **依赖注入**:Swinject / Factory / 手动 DI → 影响模块间耦合分析
|
|
229
57
|
|
|
230
|
-
|
|
231
|
-
- 协议定义(方法签名)
|
|
232
|
-
- 实现类(网络层使用 Alamofire / URLSession)
|
|
233
|
-
- API 端点映射
|
|
234
|
-
- 请求/响应模型
|
|
235
|
-
- 错误处理策略
|
|
58
|
+
## 输出示例
|
|
236
59
|
|
|
237
|
-
**输出示例**:
|
|
238
60
|
```
|
|
239
|
-
###
|
|
240
|
-
-
|
|
241
|
-
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
-
|
|
256
|
-
- 操作符链(map, flatMapLatest, filter, debounce 等)
|
|
257
|
-
- 线程调度(MainScheduler, DispatchQueue.main)
|
|
258
|
-
- DisposeBag / cancel 管理
|
|
259
|
-
|
|
260
|
-
## 输出模板
|
|
261
|
-
|
|
262
|
-
### README.md 章节结构
|
|
263
|
-
|
|
264
|
-
```markdown
|
|
265
|
-
# {项目名}
|
|
266
|
-
|
|
267
|
-
## 项目概述
|
|
268
|
-
App 功能描述 + 目标用户 + 核心价值
|
|
269
|
-
|
|
270
|
-
## 技术栈
|
|
271
|
-
| 技术 | 版本 | 用途 |
|
|
272
|
-
|------|------|------|
|
|
273
|
-
| Swift | 5.9 | 开发语言 |
|
|
274
|
-
| UIKit + SwiftUI | iOS 17+ | UI 框架 |
|
|
275
|
-
| Combine | - | 响应式 |
|
|
276
|
-
|
|
277
|
-
## 架构设计
|
|
278
|
-
### 架构图(ASCII)
|
|
279
|
-
### 数据流图
|
|
280
|
-
用户操作 → ViewController → ViewModel → Repository → API → 解码 → Model → ViewModel → UI 更新
|
|
281
|
-
|
|
282
|
-
## 目录结构
|
|
283
|
-
按 Feature 模块组织的文件树
|
|
284
|
-
|
|
285
|
-
## 导航结构
|
|
286
|
-
Coordinator 层级 + 页面流转图
|
|
287
|
-
|
|
288
|
-
## 模块详解
|
|
289
|
-
按 Feature 分组,每个包含 View/ViewModel/Model/Service
|
|
290
|
-
|
|
291
|
-
## 依赖管理
|
|
292
|
-
SPM / CocoaPods 依赖列表
|
|
293
|
-
|
|
294
|
-
## 构建 & 部署
|
|
295
|
-
Xcode 版本 + Certificate + Scheme
|
|
61
|
+
### 模块结构(SPM)
|
|
62
|
+
- Package.swift Targets: AppCore, AppUI, NetworkKit, StorageKit
|
|
63
|
+
- 本地依赖: AppUI → AppCore → NetworkKit
|
|
64
|
+
|
|
65
|
+
### 导航结构(Coordinator)
|
|
66
|
+
AppCoordinator
|
|
67
|
+
├── LoginCoordinator → LoginViewController
|
|
68
|
+
└── MainCoordinator
|
|
69
|
+
├── HomeViewController
|
|
70
|
+
├── ProfileCoordinator → ProfileViewController → EditProfileViewController
|
|
71
|
+
└── SettingsViewController
|
|
72
|
+
|
|
73
|
+
### 架构模式
|
|
74
|
+
- UI 框架: SwiftUI + UIKit 混合(UIHostingController 桥接)
|
|
75
|
+
- 架构: MVVM + Coordinator
|
|
76
|
+
- 响应式: Combine (@Published + sink)
|
|
77
|
+
- DI: Factory 框架
|
|
296
78
|
```
|
|
297
|
-
|
|
298
|
-
## 模块边界识别
|
|
299
|
-
|
|
300
|
-
以下目录模式下的每个子目录视为独立模块(L2+ 分析时生成 MODULE-DOC.md):
|
|
301
|
-
|
|
302
|
-
| 层 | 扫描路径 | 模块判定规则 | MODULE-DOC slug 来源 |
|
|
303
|
-
|----|----------|-------------|---------------------|
|
|
304
|
-
| 页面/视图层 | `Sources/{Module}/`, `Screens/` | 每个子目录 | 目录名 kebab-case |
|
|
305
|
-
| API/服务层 | `Services/`, `Network/` | 每个子目录 | 目录名 kebab-case |
|
|
306
|
-
| 状态管理层 | `ViewModels/`, `Stores/` | 每个子目录或文件 | 名称 kebab-case |
|
|
307
|
-
| 组件层 | `Views/`, `UIComponents/` | 3+ 文件的子目录 | 目录名 kebab-case |
|
|
308
|
-
| 扩展层 | `Extensions/` | 所有文件合并 | extensions |
|
|
309
|
-
|
|
310
|
-
**不视为独立模块的情况**:
|
|
311
|
-
- 单文件入口(如 `App.swift`, `main.swift`)
|
|
312
|
-
- 纯导出桶文件(仅有 re-export)
|
|
313
|
-
- 工具函数目录(`Utils/`, `Helpers/`)— 合并为一个模块
|
|
314
|
-
- 生成文件(`*.generated.swift`)跳过
|
|
315
|
-
|
|
316
|
-
## Token 管理
|
|
317
|
-
|
|
318
|
-
- 大模块(>20 文件)拆分为子任务
|
|
319
|
-
- 每个子任务分析 ≤10 文件
|
|
320
|
-
- Storyboard / XIB 文件跳过(二进制格式)
|
|
321
|
-
- Assets.xcassets 只分析目录结构,不分析图片内容
|
|
322
|
-
- Package.swift / Podfile 依赖分析单独一个子任务
|
|
323
|
-
- 生成的文件(`*.generated.swift`, `*.xcassets` 详情)跳过
|