ios-architect
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseiOS Architect
iOS架构师
Keep token usage low by loading only the references needed for the current request.
通过仅加载当前请求所需的参考内容,降低Token使用量。
Load Strategy
加载策略
- Always read first.
references/intake.md - Read only the references relevant to the build type:
- 始终先阅读。
references/intake.md - 仅读取与构建类型相关的参考内容:
New app from scratch
从零开始创建新应用
references/new-app-scaffold.mdreferences/feature-scaffold.mdreferences/database-and-migrations.mdreferences/design-system.mdreferences/testing-concurrency-di.mdreferences/privacy-and-compliance.md- Optional: — when the app has API-backed features
references/networking.md - Optional: — when deep linking or iPad/multi-column is required
references/navigation.md - Optional: — for on-device AI features
references/foundation-models.md - Optional: — when iOS 26+ Liquid Glass styling is requested
references/liquid-glass.md
references/new-app-scaffold.mdreferences/feature-scaffold.mdreferences/database-and-migrations.mdreferences/design-system.mdreferences/testing-concurrency-di.mdreferences/privacy-and-compliance.md- 可选:— 当应用包含基于API的功能时
references/networking.md - 可选:— 当需要深度链接或iPad多列布局时
references/navigation.md - 可选:— 用于设备端AI功能
references/foundation-models.md - 可选:— 当需要iOS 26+的Liquid Glass样式时
references/liquid-glass.md
New feature
新增功能
references/feature-scaffold.md- If persistence changes:
references/database-and-migrations.md - If custom UI components:
references/design-system.md - If tests/concurrency concerns:
references/testing-concurrency-di.md - If API-backed:
references/networking.md - If navigation/deep linking changes:
references/navigation.md - If on-device AI generation/streaming:
references/foundation-models.md - If Liquid Glass styling:
references/liquid-glass.md
references/feature-scaffold.md- 如果涉及持久化变更:
references/database-and-migrations.md - 如果涉及自定义UI组件:
references/design-system.md - 如果涉及测试/并发相关问题:
references/testing-concurrency-di.md - 如果是基于API的功能:
references/networking.md - 如果涉及导航/深度链接变更:
references/navigation.md - 如果涉及设备端AI生成/流处理:
references/foundation-models.md - 如果使用Liquid Glass样式:
references/liquid-glass.md
New cross-domain shared service or model
新增跨领域共享服务或模型
references/testing-concurrency-di.md- If DB-backed:
references/database-and-migrations.md - If API-backed:
references/networking.md - If Apple Foundation Models:
references/foundation-models.md
references/testing-concurrency-di.md- 如果基于数据库:
references/database-and-migrations.md - 如果基于API:
references/networking.md - 如果使用Apple Foundation Models:
references/foundation-models.md
New design system component
新增设计系统组件
references/design-system.md- If Liquid Glass:
references/liquid-glass.md
references/design-system.md- 如果使用Liquid Glass:
references/liquid-glass.md
New database migration
新增数据库迁移
references/database-and-migrations.md
references/database-and-migrations.md
New local SPM package
新增本地SPM包
references/new-app-scaffold.mdreferences/testing-concurrency-di.md
Do not bulk-load all references when the task is narrow.
references/new-app-scaffold.mdreferences/testing-concurrency-di.md
当任务范围较窄时,请勿批量加载所有参考内容。
Shared Placement Rule
共享放置规则
- Default all model/repository/view-model ownership to the feature that uses it.
- Use only for true cross-domain capabilities consumed by at least two domains/features (e.g. Settings).
Shared - Keep shared capabilities domain-scoped () with their own Domain/Data/Presentation split.
Shared/Settings/... - Never create catch-all buckets such as or
Shared/Models.Shared/Data
- 默认将所有模型/仓库/视图模型归属于使用它们的功能模块。
- 仅当存在至少两个领域/功能(如设置)需要使用的真正跨领域能力时,才使用模块。
Shared - 保持共享能力的领域范围限定(),并各自实现领域/数据/展示层分离。
Shared/Settings/... - 切勿创建如或
Shared/Models这类包罗万象的目录。Shared/Data
Execution Contract
执行约定
- Run intake first (build type, name, flow, fields, data source, integrations, test scope).
- Generate complete, compile-ready files with concrete names.
- Keep Clean Architecture boundaries strict:
- Domain — models and protocols only
- Data — repository implementations and records
- Presentation — SwiftUI views, view models, feature UI components
- Keep each layer in the owning feature by default; only promote to shared for proven cross-domain reuse.
- Use modern APIs (,
@Observable, Swift Concurrency, Swift Testing). If AI is included, enforce runtime availability checks and deterministic fallback.@MainActor - Validate generated output:
- New Tuist app: + one build
tuist generate - Feature/module changes: targeted build/tests
- New Tuist app:
- Report created files, validations run, and assumptions.
- 首先执行需求收集(构建类型、名称、流程、字段、数据源、集成项、测试范围)。
- 生成完整、可直接编译的文件,并使用具体的名称。
- 严格遵循Clean Architecture的边界:
- 领域层 — 仅包含模型与协议
- 数据层 — 仓库实现与记录
- 展示层 — SwiftUI视图、视图模型、功能UI组件
- 默认将每个层级归属于对应的功能模块;仅当已验证存在跨领域复用需求时,才升级为共享模块。
- 使用现代化API(、
@Observable、Swift Concurrency、Swift Testing)。 如果集成了AI功能,需强制执行运行时可用性检查与确定性降级方案。@MainActor - 验证生成的输出:
- 新Tuist应用:执行+ 一次构建
tuist generate - 功能/模块变更:执行针对性构建/测试
- 新Tuist应用:执行
- 报告已创建的文件、执行的验证操作以及做出的假设。