hig-project-context

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Apple HIG: Project Context

Apple HIG:项目上下文

Create and maintain
.claude/apple-design-context.md
so other HIG skills can skip redundant questions.
Check for
.claude/apple-design-context.md
before asking questions. Use existing context and only ask for information not already covered.
创建并维护
.claude/apple-design-context.md
文件,让其他HIG技能可以跳过重复提问。
在提问前先检查是否存在
.claude/apple-design-context.md
文件。使用现有上下文信息,仅询问尚未涵盖的内容。

Gathering Context

收集上下文信息

Before asking questions, auto-discover context from:
  1. README.md -- Product description, platform targets
  2. Package.swift / .xcodeproj -- Supported platforms, minimum OS versions, dependencies
  3. Info.plist -- App category, required capabilities, supported orientations
  4. Existing code -- Import statements reveal frameworks (SwiftUI vs UIKit, HealthKit, etc.)
  5. Assets.xcassets -- Color assets, icon sets, dark mode variants
  6. Accessibility audit -- Grep for accessibility modifiers/attributes
Present findings and ask the user to confirm or correct. Then gather anything still missing:
提问前,自动从以下来源发现上下文信息:
  1. README.md -- 产品描述、目标平台
  2. Package.swift / .xcodeproj -- 支持的平台、最低OS版本、依赖项
  3. Info.plist -- 应用类别、所需功能、支持的屏幕方向
  4. 现有代码 -- 导入语句可揭示所用框架(SwiftUI vs UIKit、HealthKit等)
  5. Assets.xcassets -- 颜色资源、图标集、深色模式变体
  6. 无障碍审计 -- 搜索无障碍修饰符/属性
呈现发现的信息并请用户确认或修正,然后收集仍缺失的内容:

1. Product Overview

1. 产品概述

  • What does the app do? (one sentence)
  • Category (productivity, social, health, game, utility, etc.)
  • Stage (concept, development, shipped, redesign)
  • 这款应用的功能是什么?(一句话描述)
  • 类别(生产力、社交、健康、游戏、工具等)
  • 阶段(概念、开发、已发布、重设计)

2. Target Platforms

2. 目标平台

  • Which Apple platforms? (iOS, iPadOS, macOS, tvOS, watchOS, visionOS)
  • Minimum OS versions
  • Universal or platform-specific?
  • 面向哪些Apple平台?(iOS、iPadOS、macOS、tvOS、watchOS、visionOS)
  • 最低OS版本
  • 通用型还是特定平台型?

3. Technology Stack

3. 技术栈

  • UI framework: SwiftUI, UIKit, AppKit, or mixed?
  • Architecture: single-window, multi-window, document-based?
  • Apple technologies in use? (HealthKit, CloudKit, ARKit, etc.)
  • UI框架:SwiftUI、UIKit、AppKit,还是混合使用?
  • 架构:单窗口、多窗口、基于文档?
  • 使用的Apple技术?(HealthKit、CloudKit、ARKit等)

4. Design System

4. 设计系统

  • System defaults or custom design system?
  • Brand colors, fonts, icon style?
  • Dark mode and Dynamic Type support status
  • 采用系统默认还是自定义设计系统?
  • 品牌色、字体、图标风格?
  • 深色模式和动态字体(Dynamic Type)支持状态

5. Accessibility Requirements

5. 无障碍需求

  • Target level (baseline, enhanced, comprehensive)
  • Specific considerations (VoiceOver, Switch Control, etc.)
  • Regulatory requirements (WCAG, Section 508)
  • 目标级别(基础、增强、全面)
  • 特定考量(VoiceOver、切换控制等)
  • 合规要求(WCAG、Section 508)

6. User Context

6. 用户上下文

  • Primary personas (1-3)
  • Key use cases and environments (desk, on-the-go, glanceable, immersive)
  • Known pain points or design challenges
  • 核心用户角色(1-3个)
  • 关键使用场景与环境(桌面、移动途中、快速浏览、沉浸式)
  • 已知痛点或设计挑战

7. Existing Design Assets

7. 现有设计资产

  • Figma/Sketch files?
  • Apple Design Resources in use?
  • Existing component library?
  • 有无Figma/Sketch文件?
  • 是否使用Apple设计资源?
  • 现有组件库情况?

Context Document Template

上下文文档模板

Generate
.claude/apple-design-context.md
using this structure:
markdown
undefined
使用以下结构生成
.claude/apple-design-context.md
文件:
markdown
undefined

Apple Design Context

Apple Design Context

Product

Product

  • Name: [App name]
  • Description: [One sentence]
  • Category: [Category]
  • Stage: [Concept / Development / Shipped / Redesign]
  • Name: [App name]
  • Description: [One sentence]
  • Category: [Category]
  • Stage: [Concept / Development / Shipped / Redesign]

Platforms

Platforms

PlatformSupportedMin OSNotes
iOSYes/No
iPadOSYes/No
macOSYes/No
tvOSYes/No
watchOSYes/No
visionOSYes/No
PlatformSupportedMin OSNotes
iOSYes/No
iPadOSYes/No
macOSYes/No
tvOSYes/No
watchOSYes/No
visionOSYes/No

Technology

Technology

  • UI Framework: [SwiftUI / UIKit / AppKit / Mixed]
  • Architecture: [Single-window / Multi-window / Document-based]
  • Apple Technologies: [List any: HealthKit, CloudKit, ARKit, etc.]
  • UI Framework: [SwiftUI / UIKit / AppKit / Mixed]
  • Architecture: [Single-window / Multi-window / Document-based]
  • Apple Technologies: [List any: HealthKit, CloudKit, ARKit, etc.]

Design System

Design System

  • Base: [System defaults / Custom design system]
  • Brand Colors: [List or reference]
  • Typography: [System fonts / Custom fonts]
  • Dark Mode: [Supported / Not yet / N/A]
  • Dynamic Type: [Supported / Not yet / N/A]
  • Base: [System defaults / Custom design system]
  • Brand Colors: [List or reference]
  • Typography: [System fonts / Custom fonts]
  • Dark Mode: [Supported / Not yet / N/A]
  • Dynamic Type: [Supported / Not yet / N/A]

Accessibility

Accessibility

  • Target Level: [Baseline / Enhanced / Comprehensive]
  • Key Considerations: [List any specific needs]
  • Target Level: [Baseline / Enhanced / Comprehensive]
  • Key Considerations: [List any specific needs]

Users

Users

  • Primary Persona: [Description]
  • Key Use Cases: [List]
  • Known Challenges: [List]
undefined
  • Primary Persona: [Description]
  • Key Use Cases: [List]
  • Known Challenges: [List]
undefined

Updating Context

更新上下文

When updating an existing context document:
  1. Read the current
    .claude/apple-design-context.md
  2. Ask what has changed
  3. Update only the changed sections
  4. Preserve all unchanged information
更新现有上下文文档时:
  1. 读取当前的
    .claude/apple-design-context.md
    文件
  2. 询问用户哪些内容发生了变化
  3. 仅更新已变更的部分
  4. 保留所有未变更的信息

Related Skills

相关技能

  • hig-platforms -- Platform-specific guidance
  • hig-foundations -- Color, typography, layout decisions
  • hig-patterns -- UX pattern recommendations
  • hig-components-* -- Component recommendations
  • hig-inputs -- Input method coverage
  • hig-technologies -- Apple technology relevance

  • hig-platforms -- 平台特定指导
  • hig-foundations -- 颜色、排版、布局决策
  • hig-patterns -- UX模式推荐
  • hig-components-* -- 组件推荐
  • hig-inputs -- 输入方式覆盖
  • hig-technologies -- Apple技术适用性