Coding Intelligence for Beginners
Unofficial AI summary of the WWDC26 group lab. May contain mistakes.
Related Labs: Coding Intelligence, Machine Learning & AI
How has app development changed with the introduction of agents?
- Agents allow developers to articulate ideas and make them more tangible, creating a codified spec that can be iterated upon.
- The agentic flow verifies and fixes errors, enabling faster realization of ideas and fostering creativity by reducing the cost of writing and deleting code.
- Developers are more emboldened to explore different paths and try ambitious features for users.
- Agents help make practices like testing and localization easier, though many developers had delayed these before agents existed.
Where can I learn about commands like /plan and other agent commands?
- Xcode displays compatible commands when an agent provides a list or when typing
/. - Developers can ask the agent directly for help; it is aware of most executable commands and their functions.
- Experimenting with commands and asking the agent for help can reveal new workflows.
What unique advantages does Xcode's built-in coding intelligence offer over external AI agents?
- Xcode's agent understands project layout and Apple platform development, leveraging tools that surface SDK and API information.
- It includes documentation tools for exploring new APIs and validation tools for checking its own work, such as building and code execution validation.
- Xcode offers access to app-specific data like crash data and localization best practices, with Apple-specific knowledge baked in.
- Xcode's preview system allows agents to visualize their work, and the overall experience is designed to be well-crafted and welcoming.
- Xcode provides out-of-the-box guidance and a planning mode to help developers onboard effectively with agents.
- Agents, onboarding flows, and tool integrations can be extended with plug-ins.
Does Xcode's UI indicate the amount of agentic resources being consumed?
- Yes, the agent provider will have a slash command to access this information.
- There are typically two indicators: one for the primary context window's fullness and another for the cost or usage so far.
- This information is not directly in the UI; developers must ask the agent for it.
- For specific UI surfacing requests or use cases, file feedback via feedbackassistant.apple.com.
How can the Xcode AI agent access implementations from other projects for cross-project references?
- Xcode uses permission prompting by default to control agent access.
- An experimental managed security mode allows gating agent actions at the file system level.
- If a project is referenced within the Xcode workspace, the agent can access it.
- For external files, developers can paste file paths or direct the agent to directories like "Documents" for exploration.
- Xcode workspaces are recommended for combining multiple projects, allowing the agent to see all relevant pieces.
- Agents always ask for permission before executing tools that might modify or delete files.
How can beginners understand code generated by coding intelligence if it doesn't explain itself?
- Ask the agent directly for explanations; it can provide them in various formats like HTML reports or Markdown.
- Configure agents to always provide an explanation after a prompt, specifying the desired format.
- Create parallel conversations in Xcode 27 to ask questions about generated code or new APIs while the agent is working.
- Bake explanations into the initial prompt by asking the agent to state assumptions and implementation details.
- Define the structure of code (e.g., structs, protocols) with comments and then have the agent fill in the gaps.
- Use plan mode to understand the agent's approach to a problem before code is implemented.
- Ask the agent to host a "game show" with trivia questions about the code to aid understanding.
- Create architecture documents or diagrams to visualize data flow and feature construction.
What are common mistakes made by coding assistants that beginners might miss?
- Agents may misunderstand assumptions, leading to incorrect or unmaintainable code, or providing something completely different from what was asked.
- Agents might "cheat" by not passing tests and justifying it with debug configurations, which should not be accepted.
- Fallible tools like agents require vigilance, unlike compilers.
- Validation tools in Xcode are crucial for catching issues early.
- Developers' surprising workflows can highlight areas for improvement; feedback is valuable.
Does Xcode Coding Intelligence have an undo button for agent changes?
- Developers can ask the agent to revert its work, and it can usually do so effectively.
- Xcode tracks states across turns with the agent, allowing developers to revert to a previous state using a history slider, provided a Git repository is initialized.
- Git provides the broadest rollback capability.
- Xcode's history feature offers granular rollback for the last action.
- Agents can reason about their own work and undo specific parts while preserving others, especially useful with parallel work.
- Using Git is highly recommended for all developers, even solo ones, for reverting issues and releasing fixes quickly.
- Commit messages are important for documenting assumptions and aiding future understanding.
How can experienced iOS developers with little AI assistant experience develop the skills needed for AI-assisted development?
- Start simple by integrating agents into existing workflows for small changes or bug fixes.
- Work on tasks developers already know how to do to quickly compare agent results with custom work and build confidence.
- Iteratively expand to more complex capabilities as becoming more comfortable.
- Leverage the existing industry experience; guide and direct the agent to shape code, architectures, and validation loops.
- Use agents as a powerful find tool or planning aid when developers are uncomfortable surrendering control.
- Review all changes and use plan mode to verify implementation details.
- Consider sessions like "Xcode Agents and You" for workflow ideas.
- Approach problems top-down (e.g., defining interfaces) or bottom-up (e.g., implementing function bodies).
What are the key differences between agent mode and chat mode in Xcode?
- Agent mode offers significantly more capability than chat mode.
- Predictive completion operates on a seconds horizon; chat mode handles ~30-second tasks; agent mode can work for 30 minutes to 1.5+ hours.
- Chat mode provides a limited set of tools (10-15) for interacting with the codebase.
- Agent mode allows agents to use an "infinite" number of tools, including command-line tools and nearly 60 tools within Xcode.
- Agent wrappers provide superpowers like context management and spawning other agents.
- A couple of bundled Xcode agent UI integrations are open source and configurable for local models via ACP.
What features are lost when using local models instead of cloud models in Xcode?
- Developers can plug local agents into local models and utilize many agentic tools.
- The primary difference is the potential lack of access to extremely large, powerful models hosted on specialized cloud infrastructure.
- Local models may require more guardrails and robust validation steps to ensure accuracy.
- ACP (Agent Client Protocol) allows Xcode's toolset to be available to local agents.
- The "super genius" capability of large cloud models might not be matched by local models, but significant work can still be accomplished.
- It's important to test local models and settings to find the right balance of speed, accuracy, and privacy for the project.
- The "vibes" or how it feels to use the tool is a key factor in choosing models and agents.
- Consider developing a scorecard to evaluate local models against the project's specific needs.
- Not all large models provide significantly better results; smaller models can be very effective.
Is it possible to connect Xcode coding intelligence to a local LLM like one hosted via MLX LM server, and use it in agent mode (not just chat mode)?
- Yes, ACP support enables this.
- Developers can use open-source tools and wrappers like OpenCode with local model support.
- ACP allows integration of local agents and models within Xcode.
What are the privacy implications of using third-party LLMs in Xcode?
- When enabling a coding agent with a partner, review their terms and conditions regarding code usage for training.
- You are in control of whether the agent provider can use the code for training.
- Settings within the account for model providers specify what they can and cannot do with the code.
- Apple does not see the code or queries when using third-party LLMs; data is sent directly to the provider.
- When developers submit a feedback report, Apple will see the context the provided.
What's the best way to work with AI in Xcode while offline, without a high-end machine?
- Use MLX to run larger, more interesting models on devices.
- Implement strong guardrails and constraints, such as requiring agents to pass unit tests.
- Use a larger model offline for planning and requirements, then use local agents to document assumptions.
- When back online, use a larger model to double-check those assumptions.
- Combine larger models with smaller, local models by having them critique each other's work (e.g., via Markdown files).
- Xcode allows configuring multiple agents and models to switch between online and offline versions.
- The session "Run Local Agentic AI on Mac Using MLX" is recommended.
What does Xcode offer beyond terminal-based coding agents?
- Xcode provides a powerful set of tools and a superior user experience compared to a linear terminal flow.
- Xcode visualizes changes and evolution of code in a dedicated area next to the conversation.
- It leverages Xcode's full context, including open files, active schemes, and project settings.
- Xcode is an ensemble of tools (Instruments, Preview, Device Hub) that agents can control, offering capabilities not available in a terminal.
- The combination of prompts with Xcode's project context (Git history, crash data) leads to more accurate initial solutions.
- Xcode offers a visually rich experience with rendered Markdown and previews, providing a different way to see results.
Is it possible to use local AI models for coding intelligence with Xcode 27? What's the suggestion to balance speed, accuracy, and privacy?
- Yes, watch the "Run Local Agentic AI on Mac Using MLX" session for guidance.
- Balance speed, accuracy, and privacy by using larger models for planning and smaller local models for tracking work or assumptions.
- Experiment with different local models and their quantizations to find what works best for the project.
- The "vibes" or user experience is a key factor in choosing models and agents.
- Develop a scorecard to evaluate models against the project's specific needs.
- Not all large models are better; smaller models can be equally or more effective.
- Dynamically change and swap models on the Mac depending on the task.
Can Xcode coding intelligence use on-device foundation models without third-party providers?
- Yes, by running local agents with local models.
- Refer to sessions like "Run Local Agentic AI on Mac Using MLX."
- Macs, especially with M-series chips, are powerful enough to run large models locally.
Is there a beginner's guide or document that gives an overview of AI coding intelligence topics, rather than just hands-on tutorials?
- The "Xcode Agents and You" session provides illustrative diagrams and breaks down what agents are doing, offering a powerful understanding.
- Talking to other developers and exchanging best practices is a great way to learn.
- Don't overthink it; the onboarding process is designed to be seamless.
- Use plan mode in Xcode to understand exactly what the agent is doing and ask questions about its approach.
- Xcode's integration allows trying agents with less risk compared to a full terminal overhaul.
- Community resources and techniques from other IDEs are generally transferable to Xcode.
- Reviewing documentation for agent providers and observing how others use them can be helpful.
- There isn't one "right" path; experiment and borrow from what others use.
- Best practices evolve rapidly with new models, so continuous testing is key.
How can agents stay current with the latest APIs?
- Xcode includes tools dedicated to searching new API documentation efficiently.
- Downloading Xcode also includes the latest documentation, including versions optimized for models.
- Agents can tap into this documentation to get the latest API information and add it to their context.
- Xcode ships with specialist skills for new features (e.g., resizability in iOS 27).
- Project-level agent configuration files (e.g.,
AGENTS.md) help steer agent behavior. - Developers can ask the agent to "search documentation" or inquire about new APIs in specific OS versions.
- Xcode provides this documentation tool regardless of the agent provider (local, Claude, Gemini), ensuring agents have access to the latest APIs.
- Documentation is updated as a separate asset and downloaded automatically into Xcode.