This repository contains system prompts and documentation from Xcode 27 beta 4, providing insights into Apple's approach to AI-assisted coding and comprehensive guides for iOS 26/27 features and frameworks. You can also find them at Xcode.app/Contents/PlugIns/IDEIntelligenceChat.framework/Versions/A/Resources.
Core prompts that power Xcode's AI coding assistant in different modes and contexts:
BasicSystemPrompt.idechatprompttemplate- Foundation prompt for code analysis and suggestionsReasoningSystemPrompt.idechatprompttemplate- Enhanced reasoning for complex coding tasksVariantASystemPrompt.idechatprompttemplate/VariantBSystemPrompt.idechatprompttemplate- Alternative system prompt variants
IntegratorSystemPrompt.idechatprompttemplate- Precise code editing with specific instructionsNewCodeIntegratorSystemPrompt.idechatprompttemplate- Integration of entirely new codeFastApplyIntegratorSystemPrompt.idechatprompttemplate- Rapid code modificationsTextEditorToolSystemPrompt.idechatprompttemplate- Tool-assisted text editing modePlannerExecutorStylePlannerSystemPrompt.idechatprompttemplate- Planning-based coding approach
CurrentFile.idechatprompttemplate- Full current file contextCurrentFileAbbreviated.idechatprompttemplate- Condensed file contextCurrentFileName.idechatprompttemplate- File name only contextCurrentSelection.idechatprompttemplate- Selected code contextNoSelection.idechatprompttemplate- No selection contextOriginalFile.idechatprompttemplate- Original file state
ToolAssistedBasicSystemPrompt.idechatprompttemplate- Enhanced with search and editing toolsToolAssistedReasoningSystemPrompt.idechatprompttemplate- Reasoning with tool accessToolAssistedInQueryDetailedGuidelines.idechatprompttemplate- Detailed tool usage guidelines
AgentSystemPromptAddition.idechatprompttemplate- Xcode agent system prompt with MCP tools, documentation search, and code style guidelinesAgentAdditionalContext.idechatprompttemplate- Project structure and file context for agent modeAgentVersions.plist- Agent version configuration (Claude, Codex)
CodingToolTemplateDocument.idechatprompttemplate- Documentation generation via XcodeUpdate toolCodingToolTemplateExplain.idechatprompttemplate- Code explanation tool templateCodingToolTemplateGeneratePlayground.idechatprompttemplate- Swift#Playgroundgeneration tool templateCodingToolTemplateGeneratePreview.idechatprompttemplate- SwiftUI#Previewgeneration tool template
GenerateDocumentation.idechatprompttemplate- Code documentation generationGeneratePlayground.idechatprompttemplate- Swift Playground creationGeneratePreview.idechatprompttemplate- SwiftUI Preview generation with smart embedding rules
PromptSuggestionGenerator.idechatprompttemplate- Suggests 3 contextual prompts based on project, active file, branch, commits, and build diagnosticsChatTitleResolver.idechatprompttemplate- Chat session title generationQuery.idechatprompttemplate- Query processingSearchResults.idechatprompttemplate- Search result formattingIssues.idechatprompttemplate- Issue identification and resolutionSnippets.idechatprompttemplate- Code snippet management
On-demand skills that pair a system prompt with bundled *-ref-*.md.packaged reference docs (and helper scripts), loaded only when the task matches:
audit-xcode-security-settings.idechatprompttemplate- Audits and progressively enables security build settings: compiler warnings, static analyzer checkers, Enhanced Security, Pointer Authentication, hardware memory tagging, typed allocators, stack zero-init, etc. Reworked in beta 3 into a phased plan-and-approve workflow (editable plan file,XcodeUpdateedits, per-target task tracking) with a newuniversal-binaries-for-librariesreference. Ships withaudit-xcode-security-settings-script-filter_build_settings.pyadopt-c-bounds-safety.idechatprompttemplate- Guide for adopting, reviewing, and debugging the C-fbounds-safetylanguage extension (pointer annotations, build settings, runtime trap debugging). Renamed fromc-bounds-safetyin beta 3 with expanded trigger conditionsswiftui-specialist.idechatprompttemplate- SwiftUI best practices and idiomatic patterns: view structure, data flow, environment, modifiers, localization, animations,ForEachidentity, soft-deprecated APIsswiftui-whats-new-27.idechatprompttemplate- New SwiftUI APIs/behaviors for the 2027 OS releases:@Statemacro migration,reorderable(),AsyncImagecaching, toolbar overflow, item-binding alerts/dialogs, swipe actions, document-based apps,@ContentBuilder, deprecationsuikit-app-modernization.idechatprompttemplate- Modernizes UIKit apps for multi-window environments by replacing legacy shared-state APIs (UIScreen.main,interfaceOrientation, asymmetric safe areas) with scene-aware alternatives
Comprehensive guides for iOS 26 features and framework updates:
FoundationModels-Using-on-device-LLM-in-your-app.md- Apple's on-device LLM integrationFoundation-AttributedString-Updates.md- AttributedString enhancementsSwift-Concurrency-Updates.md- Latest Swift concurrency featuresSwift-InlineArray-Span.md- New Swift array typesSwiftData-Class-Inheritance.md- SwiftData inheritance support
SwiftUI-Implementing-Liquid-Glass-Design.md- New Liquid Glass visual materialUIKit-Implementing-Liquid-Glass-Design.md- Liquid Glass in UIKitAppKit-Implementing-Liquid-Glass-Design.md- Liquid Glass for macOSWidgetKit-Implementing-Liquid-Glass-Design.md- Liquid Glass in widgetsSwiftUI-New-Toolbar-Features.md- Enhanced toolbar capabilitiesSwiftUI-Styled-Text-Editing.md- Advanced text editing featuresSwiftUI-WebKit-Integration.md- Web content in SwiftUISwiftUI-AlarmKit-Integration.md- System alarm functionality
Implementing-Visual-Intelligence-in-iOS.md- Camera-based object recognitionImplementing-Assistive-Access-in-iOS.md- Accessibility enhancements
Widgets-for-visionOS.md- visionOS widget developmentSwift-Charts-3D-Visualization.md- 3D chart capabilitiesMapKit-GeoToolbox-PlaceDescriptors.md- Enhanced location services
StoreKit-Updates.md- StoreKit improvementsAppIntents-Updates.md- App Intents framework updates
IDEIntelligenceChat.xcplugindata- Plugin data for Xcode's AI chat featurebert-estimate.vocab- BERT model vocabulary for embeddings- Various embedding and search configuration templates
Based on analysis of the system prompts, Apple follows these key principles for AI coding assistance:
- Always favor Apple programming languages: Swift, Objective-C, C, C++
- Prefer Apple frameworks and APIs available on Apple devices
- Use official platform names: iOS, iPadOS, macOS, watchOS, visionOS
- Avoid recommending third-party packages unless already in use
- Detect platform context from code clues
- Avoid suggesting iOS-only APIs for macOS projects
- Respect platform-specific design patterns and conventions
- Swift Concurrency (async/await, actors) over Dispatch/Combine
- Swift Testing framework with
@Testand#expectmacros - #Preview macro instead of PreviewProvider protocol
- Stay current with latest language features
- Complete File Replacement: Never partial edits - always return entire file content
- Precise Instructions: Unambiguous, self-contained editing instructions
- Preserve Existing Style: Maintain formatting, indentation, and conventions
- Syntactic Validity: Ensure all edits maintain correct syntax
- Use project search tools extensively for understanding codebase
- Distinguish between explanation vs. code modification requests
- Provide concrete examples with code snippets
- Break complex tasks into sequential steps