buildanything 1.7.0 → 1.8.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.
Files changed (222) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +55 -0
  4. package/README.md +71 -61
  5. package/agents/ios-app-review-guardian.md +49 -0
  6. package/agents/ios-foundation-models-specialist.md +46 -0
  7. package/agents/ios-storekit-specialist.md +52 -0
  8. package/agents/ios-swift-architect.md +102 -0
  9. package/agents/ios-swift-search.md +130 -0
  10. package/agents/ios-swift-ui-design.md +104 -0
  11. package/commands/build.md +80 -176
  12. package/commands/fix.md +65 -0
  13. package/commands/setup.md +73 -0
  14. package/commands/ux-review.md +63 -0
  15. package/commands/verify.md +72 -0
  16. package/hooks/session-start +18 -1
  17. package/package.json +5 -2
  18. package/protocols/brainstorm.md +99 -0
  19. package/protocols/build-fix.md +52 -0
  20. package/protocols/cleanup.md +54 -0
  21. package/protocols/design.md +269 -0
  22. package/protocols/eval-harness.md +61 -0
  23. package/protocols/fake-data-detector.md +64 -0
  24. package/protocols/ios-context.md +235 -0
  25. package/protocols/ios-frameworks-map.md +323 -0
  26. package/protocols/ios-phase-branches.md +162 -0
  27. package/protocols/ios-preflight.md +27 -0
  28. package/protocols/metric-loop.md +93 -0
  29. package/protocols/planning.md +87 -0
  30. package/protocols/smoke-test.md +110 -0
  31. package/protocols/verify.md +67 -0
  32. package/protocols/web-phase-branches.md +201 -0
  33. package/skills/ios/_VENDORED.md +60 -0
  34. package/skills/ios/activitykit/LICENSE +131 -0
  35. package/skills/ios/activitykit/SKILL.md +505 -0
  36. package/skills/ios/activitykit/references/activitykit-patterns.md +868 -0
  37. package/skills/ios/app-intents/LICENSE +131 -0
  38. package/skills/ios/app-intents/SKILL.md +494 -0
  39. package/skills/ios/app-intents/references/appintents-advanced.md +1076 -0
  40. package/skills/ios/apple-on-device-ai/LICENSE +131 -0
  41. package/skills/ios/apple-on-device-ai/SKILL.md +505 -0
  42. package/skills/ios/apple-on-device-ai/references/coreml-conversion.md +425 -0
  43. package/skills/ios/apple-on-device-ai/references/coreml-optimization.md +344 -0
  44. package/skills/ios/apple-on-device-ai/references/foundation-models.md +508 -0
  45. package/skills/ios/apple-on-device-ai/references/mlx-swift.md +285 -0
  46. package/skills/ios/ios-26-platform/SKILL.md +53 -0
  47. package/skills/ios/ios-26-platform/references/automatic-adoption.md +161 -0
  48. package/skills/ios/ios-26-platform/references/backward-compat.md +238 -0
  49. package/skills/ios/ios-26-platform/references/liquid-glass.md +255 -0
  50. package/skills/ios/ios-26-platform/references/swiftui-apis.md +277 -0
  51. package/skills/ios/ios-26-platform/references/toolbar-navigation.md +250 -0
  52. package/skills/ios/ios-bootstrap/SKILL.md +98 -0
  53. package/skills/ios/ios-bootstrap/references/apple-docs-mcp-config.md +28 -0
  54. package/skills/ios/ios-bootstrap/references/new-project-dialog.md +41 -0
  55. package/skills/ios/ios-bootstrap/references/xcode-mcp-config.md +29 -0
  56. package/skills/ios/ios-debugger-agent/LICENSE +21 -0
  57. package/skills/ios/ios-debugger-agent/SKILL.md +58 -0
  58. package/skills/ios/ios-debugger-agent/agents/openai.yaml +4 -0
  59. package/skills/ios/ios-entitlements-generator/SKILL.md +47 -0
  60. package/skills/ios/ios-hig/SKILL.md +41 -0
  61. package/skills/ios/ios-hig/references/accessibility.md +81 -0
  62. package/skills/ios/ios-hig/references/content.md +142 -0
  63. package/skills/ios/ios-hig/references/feedback.md +123 -0
  64. package/skills/ios/ios-hig/references/interaction.md +199 -0
  65. package/skills/ios/ios-hig/references/performance-platform.md +129 -0
  66. package/skills/ios/ios-hig/references/privacy-permissions.md +181 -0
  67. package/skills/ios/ios-hig/references/visual-design.md +84 -0
  68. package/skills/ios/ios-info-plist-hardening/SKILL.md +130 -0
  69. package/skills/ios/ios-maestro-flow-author/SKILL.md +68 -0
  70. package/skills/ios/ios-maestro-flow-author/references/input-and-scroll.yaml +17 -0
  71. package/skills/ios/ios-maestro-flow-author/references/modal-and-dismiss.yaml +14 -0
  72. package/skills/ios/ios-maestro-flow-author/references/onboarding-flow.yaml +16 -0
  73. package/skills/ios/ios-maestro-flow-author/references/tab-navigation.yaml +13 -0
  74. package/skills/ios/ios-maestro-flow-author/references/tap-and-assert.yaml +9 -0
  75. package/skills/ios/swift-accessibility/LICENSE +21 -0
  76. package/skills/ios/swift-accessibility/SKILL.md +371 -0
  77. package/skills/ios/swift-accessibility/examples/before-after-appkit.md +446 -0
  78. package/skills/ios/swift-accessibility/examples/before-after-swiftui.md +441 -0
  79. package/skills/ios/swift-accessibility/examples/before-after-uikit.md +464 -0
  80. package/skills/ios/swift-accessibility/references/assistive-access.md +441 -0
  81. package/skills/ios/swift-accessibility/references/display-settings.md +491 -0
  82. package/skills/ios/swift-accessibility/references/dynamic-type.md +420 -0
  83. package/skills/ios/swift-accessibility/references/media-accessibility.md +421 -0
  84. package/skills/ios/swift-accessibility/references/motor-input.md +393 -0
  85. package/skills/ios/swift-accessibility/references/nutrition-labels.md +362 -0
  86. package/skills/ios/swift-accessibility/references/platform-specifics.md +515 -0
  87. package/skills/ios/swift-accessibility/references/semantic-structure.md +585 -0
  88. package/skills/ios/swift-accessibility/references/testing-auditing.md +507 -0
  89. package/skills/ios/swift-accessibility/references/voice-control.md +317 -0
  90. package/skills/ios/swift-accessibility/references/voiceover-swiftui.md +584 -0
  91. package/skills/ios/swift-accessibility/references/voiceover-uikit.md +519 -0
  92. package/skills/ios/swift-accessibility/references/wcag-mapping.md +167 -0
  93. package/skills/ios/swift-accessibility/resources/audit-template.swift +128 -0
  94. package/skills/ios/swift-accessibility/resources/qa-checklist.md +258 -0
  95. package/skills/ios/swift-concurrency/LICENSE +21 -0
  96. package/skills/ios/swift-concurrency/SKILL.md +171 -0
  97. package/skills/ios/swift-concurrency/references/_index.md +50 -0
  98. package/skills/ios/swift-concurrency/references/actors.md +660 -0
  99. package/skills/ios/swift-concurrency/references/async-algorithms.md +847 -0
  100. package/skills/ios/swift-concurrency/references/async-await-basics.md +266 -0
  101. package/skills/ios/swift-concurrency/references/async-sequences.md +710 -0
  102. package/skills/ios/swift-concurrency/references/core-data.md +560 -0
  103. package/skills/ios/swift-concurrency/references/glossary.md +135 -0
  104. package/skills/ios/swift-concurrency/references/linting.md +155 -0
  105. package/skills/ios/swift-concurrency/references/memory-management.md +569 -0
  106. package/skills/ios/swift-concurrency/references/migration.md +1104 -0
  107. package/skills/ios/swift-concurrency/references/performance.md +593 -0
  108. package/skills/ios/swift-concurrency/references/sendable.md +598 -0
  109. package/skills/ios/swift-concurrency/references/tasks.md +636 -0
  110. package/skills/ios/swift-concurrency/references/testing.md +592 -0
  111. package/skills/ios/swift-concurrency/references/threading.md +495 -0
  112. package/skills/ios/swift-security-expert/LICENSE +21 -0
  113. package/skills/ios/swift-security-expert/SKILL.md +470 -0
  114. package/skills/ios/swift-security-expert/references/biometric-authentication.md +565 -0
  115. package/skills/ios/swift-security-expert/references/certificate-trust.md +592 -0
  116. package/skills/ios/swift-security-expert/references/common-anti-patterns.md +690 -0
  117. package/skills/ios/swift-security-expert/references/compliance-owasp-mapping.md +537 -0
  118. package/skills/ios/swift-security-expert/references/credential-storage-patterns.md +721 -0
  119. package/skills/ios/swift-security-expert/references/cryptokit-public-key.md +505 -0
  120. package/skills/ios/swift-security-expert/references/cryptokit-symmetric.md +497 -0
  121. package/skills/ios/swift-security-expert/references/keychain-access-control.md +508 -0
  122. package/skills/ios/swift-security-expert/references/keychain-fundamentals.md +596 -0
  123. package/skills/ios/swift-security-expert/references/keychain-item-classes.md +476 -0
  124. package/skills/ios/swift-security-expert/references/keychain-sharing.md +458 -0
  125. package/skills/ios/swift-security-expert/references/migration-legacy-stores.md +727 -0
  126. package/skills/ios/swift-security-expert/references/secure-enclave.md +539 -0
  127. package/skills/ios/swift-security-expert/references/testing-security-code.md +781 -0
  128. package/skills/ios/swift-testing-expert/LICENSE +21 -0
  129. package/skills/ios/swift-testing-expert/SKILL.md +79 -0
  130. package/skills/ios/swift-testing-expert/references/_index.md +12 -0
  131. package/skills/ios/swift-testing-expert/references/async-testing-and-waiting.md +127 -0
  132. package/skills/ios/swift-testing-expert/references/expectations.md +145 -0
  133. package/skills/ios/swift-testing-expert/references/fundamentals.md +141 -0
  134. package/skills/ios/swift-testing-expert/references/migration-from-xctest.md +127 -0
  135. package/skills/ios/swift-testing-expert/references/parallelization-and-isolation.md +95 -0
  136. package/skills/ios/swift-testing-expert/references/parameterized-testing.md +284 -0
  137. package/skills/ios/swift-testing-expert/references/performance-and-best-practices.md +187 -0
  138. package/skills/ios/swift-testing-expert/references/traits-and-tags.md +114 -0
  139. package/skills/ios/swift-testing-expert/references/xcode-workflows.md +70 -0
  140. package/skills/ios/swiftdata-pro/LICENSE +21 -0
  141. package/skills/ios/swiftdata-pro/SKILL.md +102 -0
  142. package/skills/ios/swiftdata-pro/agents/openai.yaml +10 -0
  143. package/skills/ios/swiftdata-pro/assets/swiftdata-pro-icon.png +0 -0
  144. package/skills/ios/swiftdata-pro/assets/swiftdata-pro-icon.svg +29 -0
  145. package/skills/ios/swiftdata-pro/references/class-inheritance.md +104 -0
  146. package/skills/ios/swiftdata-pro/references/cloudkit.md +10 -0
  147. package/skills/ios/swiftdata-pro/references/core-rules.md +20 -0
  148. package/skills/ios/swiftdata-pro/references/indexing.md +27 -0
  149. package/skills/ios/swiftdata-pro/references/predicates.md +73 -0
  150. package/skills/ios/swiftui-design-principles/AGENTS.md +21 -0
  151. package/skills/ios/swiftui-design-principles/LICENSE +21 -0
  152. package/skills/ios/swiftui-design-principles/README.md +41 -0
  153. package/skills/ios/swiftui-design-principles/SKILL.md +605 -0
  154. package/skills/ios/swiftui-design-principles/metadata.json +10 -0
  155. package/skills/ios/swiftui-liquid-glass/LICENSE +21 -0
  156. package/skills/ios/swiftui-liquid-glass/SKILL.md +95 -0
  157. package/skills/ios/swiftui-liquid-glass/agents/openai.yaml +4 -0
  158. package/skills/ios/swiftui-liquid-glass/references/liquid-glass.md +280 -0
  159. package/skills/ios/swiftui-performance-audit/LICENSE +21 -0
  160. package/skills/ios/swiftui-performance-audit/SKILL.md +111 -0
  161. package/skills/ios/swiftui-performance-audit/agents/openai.yaml +4 -0
  162. package/skills/ios/swiftui-performance-audit/references/code-smells.md +150 -0
  163. package/skills/ios/swiftui-performance-audit/references/demystify-swiftui-performance-wwdc23.md +46 -0
  164. package/skills/ios/swiftui-performance-audit/references/optimizing-swiftui-performance-instruments.md +29 -0
  165. package/skills/ios/swiftui-performance-audit/references/profiling-intake.md +44 -0
  166. package/skills/ios/swiftui-performance-audit/references/report-template.md +47 -0
  167. package/skills/ios/swiftui-performance-audit/references/understanding-hangs-in-your-app.md +33 -0
  168. package/skills/ios/swiftui-performance-audit/references/understanding-improving-swiftui-performance.md +52 -0
  169. package/skills/ios/swiftui-pro/LICENSE +21 -0
  170. package/skills/ios/swiftui-pro/SKILL.md +108 -0
  171. package/skills/ios/swiftui-pro/agents/openai.yaml +10 -0
  172. package/skills/ios/swiftui-pro/assets/swiftui-pro-icon.png +0 -0
  173. package/skills/ios/swiftui-pro/assets/swiftui-pro-icon.svg +29 -0
  174. package/skills/ios/swiftui-pro/references/accessibility.md +13 -0
  175. package/skills/ios/swiftui-pro/references/api.md +39 -0
  176. package/skills/ios/swiftui-pro/references/data.md +43 -0
  177. package/skills/ios/swiftui-pro/references/design.md +31 -0
  178. package/skills/ios/swiftui-pro/references/hygiene.md +9 -0
  179. package/skills/ios/swiftui-pro/references/navigation.md +14 -0
  180. package/skills/ios/swiftui-pro/references/performance.md +46 -0
  181. package/skills/ios/swiftui-pro/references/swift.md +56 -0
  182. package/skills/ios/swiftui-pro/references/views.md +35 -0
  183. package/skills/ios/swiftui-ui-patterns/LICENSE +21 -0
  184. package/skills/ios/swiftui-ui-patterns/SKILL.md +100 -0
  185. package/skills/ios/swiftui-ui-patterns/agents/openai.yaml +4 -0
  186. package/skills/ios/swiftui-ui-patterns/references/app-wiring.md +201 -0
  187. package/skills/ios/swiftui-ui-patterns/references/async-state.md +96 -0
  188. package/skills/ios/swiftui-ui-patterns/references/components-index.md +50 -0
  189. package/skills/ios/swiftui-ui-patterns/references/controls.md +57 -0
  190. package/skills/ios/swiftui-ui-patterns/references/deeplinks.md +66 -0
  191. package/skills/ios/swiftui-ui-patterns/references/focus.md +90 -0
  192. package/skills/ios/swiftui-ui-patterns/references/form.md +97 -0
  193. package/skills/ios/swiftui-ui-patterns/references/grids.md +71 -0
  194. package/skills/ios/swiftui-ui-patterns/references/haptics.md +71 -0
  195. package/skills/ios/swiftui-ui-patterns/references/input-toolbar.md +51 -0
  196. package/skills/ios/swiftui-ui-patterns/references/lightweight-clients.md +93 -0
  197. package/skills/ios/swiftui-ui-patterns/references/list.md +86 -0
  198. package/skills/ios/swiftui-ui-patterns/references/loading-placeholders.md +38 -0
  199. package/skills/ios/swiftui-ui-patterns/references/macos-settings.md +71 -0
  200. package/skills/ios/swiftui-ui-patterns/references/matched-transitions.md +59 -0
  201. package/skills/ios/swiftui-ui-patterns/references/media.md +73 -0
  202. package/skills/ios/swiftui-ui-patterns/references/menu-bar.md +101 -0
  203. package/skills/ios/swiftui-ui-patterns/references/navigationstack.md +159 -0
  204. package/skills/ios/swiftui-ui-patterns/references/overlay.md +45 -0
  205. package/skills/ios/swiftui-ui-patterns/references/performance.md +62 -0
  206. package/skills/ios/swiftui-ui-patterns/references/previews.md +48 -0
  207. package/skills/ios/swiftui-ui-patterns/references/scroll-reveal.md +133 -0
  208. package/skills/ios/swiftui-ui-patterns/references/scrollview.md +87 -0
  209. package/skills/ios/swiftui-ui-patterns/references/searchable.md +71 -0
  210. package/skills/ios/swiftui-ui-patterns/references/sheets.md +155 -0
  211. package/skills/ios/swiftui-ui-patterns/references/split-views.md +72 -0
  212. package/skills/ios/swiftui-ui-patterns/references/tabview.md +114 -0
  213. package/skills/ios/swiftui-ui-patterns/references/theming.md +71 -0
  214. package/skills/ios/swiftui-ui-patterns/references/title-menus.md +93 -0
  215. package/skills/ios/swiftui-ui-patterns/references/top-bar.md +49 -0
  216. package/skills/ios/swiftui-view-refactor/LICENSE +21 -0
  217. package/skills/ios/swiftui-view-refactor/SKILL.md +207 -0
  218. package/skills/ios/swiftui-view-refactor/agents/openai.yaml +4 -0
  219. package/skills/ios/swiftui-view-refactor/references/mv-patterns.md +161 -0
  220. package/skills/ios/widgetkit/LICENSE +131 -0
  221. package/skills/ios/widgetkit/SKILL.md +502 -0
  222. package/skills/ios/widgetkit/references/widgetkit-advanced.md +871 -0
@@ -0,0 +1,131 @@
1
+ Required Notice: Copyright (c) 2025 dpearson2699 (https://github.com/dpearson2699)
2
+
3
+ # PolyForm Perimeter License 1.0.0
4
+
5
+ <https://polyformproject.org/licenses/perimeter/1.0.0>
6
+
7
+ ## Acceptance
8
+
9
+ In order to get any license under these terms, you must agree
10
+ to them as both strict obligations and conditions to all
11
+ your licenses.
12
+
13
+ ## Copyright License
14
+
15
+ The licensor grants you a copyright license for the
16
+ software to do everything you might do with the software
17
+ that would otherwise infringe the licensor's copyright
18
+ in it for any permitted purpose. However, you may
19
+ only distribute the software according to [Distribution
20
+ License](#distribution-license) and make changes or new works
21
+ based on the software according to [Changes and New Works
22
+ License](#changes-and-new-works-license).
23
+
24
+ ## Distribution License
25
+
26
+ The licensor grants you an additional copyright license
27
+ to distribute copies of the software. Your license
28
+ to distribute covers distributing the software with
29
+ changes and new works permitted by [Changes and New Works
30
+ License](#changes-and-new-works-license).
31
+
32
+ ## Notices
33
+
34
+ You must ensure that anyone who gets a copy of any part of
35
+ the software from you also gets a copy of these terms or the
36
+ URL for them above, as well as copies of any plain-text lines
37
+ beginning with `Required Notice:` that the licensor provided
38
+ with the software. For example:
39
+
40
+ > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
41
+
42
+ ## Changes and New Works License
43
+
44
+ The licensor grants you an additional copyright license to
45
+ make changes and new works based on the software for any
46
+ permitted purpose.
47
+
48
+ ## Patent License
49
+
50
+ The licensor grants you a patent license for the software that
51
+ covers patent claims the licensor can license, or becomes able
52
+ to license, that you would infringe by using the software.
53
+
54
+ ## Noncompete
55
+
56
+ Any purpose is a permitted purpose, except for providing to
57
+ others any product that competes with the software.
58
+
59
+ ## Competition
60
+
61
+ If you use this software to market a product as a substitute
62
+ for the functionality or value of the software, it competes
63
+ with the software. A product may compete regardless how it is
64
+ designed or deployed. For example, a product may compete even
65
+ if it provides its functionality via any kind of interface
66
+ (including services, libraries or plug-ins), even if it is
67
+ ported to a different platforms or programming languages,
68
+ and even if it is provided free of charge.
69
+
70
+ ## Fair Use
71
+
72
+ You may have "fair use" rights for the software under the
73
+ law. These terms do not limit them.
74
+
75
+ ## No Other Rights
76
+
77
+ These terms do not allow you to sublicense or transfer any of
78
+ your licenses to anyone else, or prevent the licensor from
79
+ granting licenses to anyone else. These terms do not imply
80
+ any other licenses.
81
+
82
+ ## Patent Defense
83
+
84
+ If you make any written claim that the software infringes or
85
+ contributes to infringement of any patent, your patent license
86
+ for the software granted under these terms ends immediately. If
87
+ your company makes such a claim, your patent license ends
88
+ immediately for work on behalf of your company.
89
+
90
+ ## Violations
91
+
92
+ The first time you are notified in writing that you have
93
+ violated any of these terms, or done anything with the software
94
+ not covered by your licenses, your licenses can nonetheless
95
+ continue if you come into full compliance with these terms,
96
+ and take practical steps to correct past violations, within
97
+ 32 days of receiving notice. Otherwise, all your licenses
98
+ end immediately.
99
+
100
+ ## No Liability
101
+
102
+ ***As far as the law allows, the software comes as is, without
103
+ any warranty or condition, and the licensor will not be liable
104
+ to you for any damages arising out of these terms or the use
105
+ or nature of the software, under any kind of legal claim.***
106
+
107
+ ## Definitions
108
+
109
+ The **licensor** is the individual or entity offering these
110
+ terms, and the **software** is the software the licensor makes
111
+ available under these terms.
112
+
113
+ A **product** can be a good or service, or a combination
114
+ of them.
115
+
116
+ **You** refers to the individual or entity agreeing to these
117
+ terms.
118
+
119
+ **Your company** is any legal entity, sole proprietorship,
120
+ or other kind of organization that you work for, plus all
121
+ organizations that have control over, are under the control of,
122
+ or are under common control with that organization. **Control**
123
+ means ownership of substantially all the assets of an entity,
124
+ or the power to direct its management and policies by vote,
125
+ contract, or otherwise. Control can be direct or indirect.
126
+
127
+ **Your licenses** are all the licenses granted to you for the
128
+ software under these terms.
129
+
130
+ **Use** means anything you do with the software requiring one
131
+ of your licenses.
@@ -0,0 +1,494 @@
1
+ ---
2
+ name: app-intents
3
+ description: "Implement App Intents for Siri, Shortcuts, Spotlight, widgets, Control Center, and Apple Intelligence on iOS. Covers AppIntent actions, AppEntity and EntityQuery models, AppShortcutsProvider phrases, IndexedEntity Spotlight indexing, WidgetConfigurationIntent, SnippetIntent, and assistant schemas. Use when exposing app actions or entities to system surfaces."
4
+ ---
5
+
6
+ # App Intents (iOS 26+)
7
+
8
+ Implement, review, and extend App Intents to expose app functionality to Siri,
9
+ Shortcuts, Spotlight, widgets, Control Center, and Apple Intelligence.
10
+
11
+ ## Contents
12
+
13
+ - [Triage Workflow](#triage-workflow)
14
+ - [AppIntent Protocol](#appintent-protocol)
15
+ - [@Parameter](#parameter)
16
+ - [AppEntity](#appentity)
17
+ - [EntityQuery (4 Variants)](#entityquery-4-variants)
18
+ - [AppEnum](#appenum)
19
+ - [AppShortcutsProvider](#appshortcutsprovider)
20
+ - [Siri Integration](#siri-integration)
21
+ - [Interactive Widget Intents](#interactive-widget-intents)
22
+ - [Control Center Widgets (iOS 18+)](#control-center-widgets-ios-18)
23
+ - [Spotlight and IndexedEntity (iOS 18+)](#spotlight-and-indexedentity-ios-18)
24
+ - [iOS 26 Additions](#ios-26-additions)
25
+ - [Common Mistakes](#common-mistakes)
26
+ - [Review Checklist](#review-checklist)
27
+ - [References](#references)
28
+
29
+ ## Triage Workflow
30
+
31
+ ### Step 1: Identify the integration surface
32
+
33
+ Determine which system feature the intent targets:
34
+
35
+ | Surface | Protocol | Since |
36
+ |---|---|---|
37
+ | Siri / Shortcuts | `AppIntent` | iOS 16 |
38
+ | Configurable widget | `WidgetConfigurationIntent` | iOS 17 |
39
+ | Control Center | `ControlConfigurationIntent` | iOS 18 |
40
+ | Spotlight search | `IndexedEntity` | iOS 18 |
41
+ | Apple Intelligence | `@AppIntent(schema:)` | iOS 18 |
42
+ | Interactive snippets | `SnippetIntent` | iOS 26 |
43
+ | Visual Intelligence | `IntentValueQuery` | iOS 26 |
44
+
45
+ ### Step 2: Define the data model
46
+
47
+ - Create `AppEntity` shadow models (do NOT conform core data models directly).
48
+ - Create `AppEnum` types for fixed parameter choices.
49
+ - Choose the right `EntityQuery` variant for resolution.
50
+ - Mark searchable entities with `IndexedEntity` and `@Property(indexingKey:)`.
51
+
52
+ ### Step 3: Implement the intent
53
+
54
+ - Conform to `AppIntent` (or a specialized sub-protocol).
55
+ - Declare `@Parameter` properties for all user-facing inputs.
56
+ - Implement `perform() async throws -> some IntentResult`.
57
+ - Add `parameterSummary` for Shortcuts UI.
58
+ - Register phrases via `AppShortcutsProvider`.
59
+
60
+ ### Step 4: Verify
61
+
62
+ - Build and run in Shortcuts app to confirm parameter resolution.
63
+ - Test Siri phrases with the intent preview in Xcode.
64
+ - Confirm Spotlight results for `IndexedEntity` types.
65
+ - Check widget configuration for `WidgetConfigurationIntent` intents.
66
+
67
+ ## AppIntent Protocol
68
+
69
+ The system instantiates the struct via `init()`, sets parameters, then calls
70
+ `perform()`. Declare a `title` and `parameterSummary` for Shortcuts UI.
71
+
72
+ ```swift
73
+ struct OrderSoupIntent: AppIntent {
74
+ static var title: LocalizedStringResource = "Order Soup"
75
+ static var description = IntentDescription("Place a soup order.")
76
+
77
+ @Parameter(title: "Soup") var soup: SoupEntity
78
+ @Parameter(title: "Quantity", default: 1) var quantity: Int
79
+
80
+ static var parameterSummary: some ParameterSummary {
81
+ Summary("Order \(\.$soup)") { \.$quantity }
82
+ }
83
+
84
+ func perform() async throws -> some IntentResult {
85
+ try await OrderService.shared.place(soup: soup.id, quantity: quantity)
86
+ return .result(dialog: "Ordered \(quantity) \(soup.name).")
87
+ }
88
+ }
89
+ ```
90
+
91
+ Optional members: `description` (`IntentDescription`), `openAppWhenRun` (`Bool`),
92
+ `isDiscoverable` (`Bool`), `authenticationPolicy` (`IntentAuthenticationPolicy`).
93
+
94
+ ## @Parameter
95
+
96
+ Declare each user-facing input with `@Parameter`. Optional parameters are not
97
+ required; non-optional parameters with a `default` are pre-filled.
98
+
99
+ ```swift
100
+ // WRONG: Non-optional parameter without default -- system cannot preview
101
+ @Parameter(title: "Count")
102
+ var count: Int
103
+
104
+ // CORRECT: Provide a default or make optional
105
+ @Parameter(title: "Count", default: 1)
106
+ var count: Int
107
+
108
+ @Parameter(title: "Count")
109
+ var count: Int?
110
+ ```
111
+
112
+ ### Supported value types
113
+
114
+ Primitives: `Int`, `Double`, `Bool`, `String`, `URL`, `Date`, `DateComponents`.
115
+ Framework: `Currency`, `Person`, `IntentFile`. Measurements: `Measurement<UnitLength>`,
116
+ `Measurement<UnitTemperature>`, and others. Custom: any `AppEntity` or `AppEnum`.
117
+
118
+ ### Common initializer patterns
119
+
120
+ ```swift
121
+ // Basic
122
+ @Parameter(title: "Name")
123
+ var name: String
124
+
125
+ // With default
126
+ @Parameter(title: "Count", default: 5)
127
+ var count: Int
128
+
129
+ // Numeric slider
130
+ @Parameter(title: "Volume", controlStyle: .slider, inclusiveRange: (0, 100))
131
+ var volume: Int
132
+
133
+ // Options provider (dynamic list)
134
+ @Parameter(title: "Category", optionsProvider: CategoryOptionsProvider())
135
+ var category: Category
136
+
137
+ // File with content types
138
+ @Parameter(title: "Document", supportedContentTypes: [.pdf, .plainText])
139
+ var document: IntentFile
140
+
141
+ // Measurement with unit
142
+ @Parameter(title: "Distance", defaultUnit: .miles, supportsNegativeNumbers: false)
143
+ var distance: Measurement<UnitLength>
144
+ ```
145
+
146
+ See [references/appintents-advanced.md](references/appintents-advanced.md) for all initializer variants.
147
+
148
+ ## AppEntity
149
+
150
+ Create shadow models that mirror app data -- never conform core data model
151
+ types directly.
152
+
153
+ ```swift
154
+ struct SoupEntity: AppEntity {
155
+ static let defaultQuery = SoupEntityQuery()
156
+ static var typeDisplayRepresentation: TypeDisplayRepresentation = "Soup"
157
+ var id: String
158
+
159
+ @Property(title: "Name") var name: String
160
+ @Property(title: "Price") var price: Double
161
+
162
+ var displayRepresentation: DisplayRepresentation {
163
+ DisplayRepresentation(title: "\(name)", subtitle: "$\(String(format: "%.2f", price))")
164
+ }
165
+
166
+ init(from soup: Soup) {
167
+ self.id = soup.id; self.name = soup.name; self.price = soup.price
168
+ }
169
+ }
170
+ ```
171
+
172
+ Required: `id`, `defaultQuery` (static), `displayRepresentation`,
173
+ `typeDisplayRepresentation` (static). Mark properties with `@Property(title:)`
174
+ to expose for filtering/sorting. Properties without `@Property` remain internal.
175
+
176
+ ## EntityQuery (4 Variants)
177
+
178
+ ### 1. EntityQuery (base -- resolve by ID)
179
+
180
+ ```swift
181
+ struct SoupEntityQuery: EntityQuery {
182
+ func entities(for identifiers: [String]) async throws -> [SoupEntity] {
183
+ SoupStore.shared.soups.filter { identifiers.contains($0.id) }.map { SoupEntity(from: $0) }
184
+ }
185
+ func suggestedEntities() async throws -> [SoupEntity] {
186
+ SoupStore.shared.featured.map { SoupEntity(from: $0) }
187
+ }
188
+ }
189
+ ```
190
+
191
+ ### 2. EntityStringQuery (free-text search)
192
+
193
+ ```swift
194
+ struct SoupStringQuery: EntityStringQuery {
195
+ func entities(matching string: String) async throws -> [SoupEntity] {
196
+ SoupStore.shared.search(string).map { SoupEntity(from: $0) }
197
+ }
198
+ func entities(for identifiers: [String]) async throws -> [SoupEntity] {
199
+ SoupStore.shared.soups.filter { identifiers.contains($0.id) }.map { SoupEntity(from: $0) }
200
+ }
201
+ }
202
+ ```
203
+
204
+ ### 3. EnumerableEntityQuery (finite set)
205
+
206
+ ```swift
207
+ struct AllSoupsQuery: EnumerableEntityQuery {
208
+ func allEntities() async throws -> [SoupEntity] {
209
+ SoupStore.shared.allSoups.map { SoupEntity(from: $0) }
210
+ }
211
+ func entities(for identifiers: [String]) async throws -> [SoupEntity] {
212
+ SoupStore.shared.soups.filter { identifiers.contains($0.id) }.map { SoupEntity(from: $0) }
213
+ }
214
+ }
215
+ ```
216
+
217
+ ### 4. UniqueAppEntityQuery (singleton, iOS 18+)
218
+
219
+ Use for single-instance entities like app settings.
220
+
221
+ ```swift
222
+ struct AppSettingsEntity: UniqueAppEntity {
223
+ static let defaultQuery = AppSettingsQuery()
224
+ static var typeDisplayRepresentation: TypeDisplayRepresentation = "Settings"
225
+ var displayRepresentation: DisplayRepresentation { "App Settings" }
226
+
227
+ var id: String { "app-settings" }
228
+ }
229
+
230
+ struct AppSettingsQuery: UniqueAppEntityQuery {
231
+ func entity() async throws -> AppSettingsEntity {
232
+ AppSettingsEntity()
233
+ }
234
+ }
235
+ ```
236
+
237
+ See [references/appintents-advanced.md](references/appintents-advanced.md) for `EntityPropertyQuery` with
238
+ filter/sort support.
239
+
240
+ ## AppEnum
241
+
242
+ Define fixed sets of selectable values. Must be backed by a
243
+ `LosslessStringConvertible` raw value (use `String`).
244
+
245
+ ```swift
246
+ enum SoupSize: String, AppEnum {
247
+ case small, medium, large
248
+
249
+ static var typeDisplayRepresentation: TypeDisplayRepresentation = "Size"
250
+
251
+ static var caseDisplayRepresentations: [SoupSize: DisplayRepresentation] = [
252
+ .small: "Small",
253
+ .medium: "Medium",
254
+ .large: "Large"
255
+ ]
256
+ }
257
+ ```
258
+
259
+ ```swift
260
+ // WRONG: Using Int raw value
261
+ enum Priority: Int, AppEnum { // Compiler error -- Int is not LosslessStringConvertible
262
+ case low = 1, medium = 2, high = 3
263
+ }
264
+
265
+ // CORRECT: Use String raw value
266
+ enum Priority: String, AppEnum {
267
+ case low, medium, high
268
+ // ...
269
+ }
270
+ ```
271
+
272
+ ## AppShortcutsProvider
273
+
274
+ Register pre-built shortcuts that appear in Siri and the Shortcuts app without
275
+ user configuration.
276
+
277
+ ```swift
278
+ struct MyAppShortcuts: AppShortcutsProvider {
279
+ static var appShortcuts: [AppShortcut] {
280
+ AppShortcut(
281
+ intent: OrderSoupIntent(),
282
+ phrases: [
283
+ "Order \(\.$soup) in \(.applicationName)",
284
+ "Get soup from \(.applicationName)"
285
+ ],
286
+ shortTitle: "Order Soup",
287
+ systemImageName: "cup.and.saucer"
288
+ )
289
+ }
290
+
291
+ static var shortcutTileColor: ShortcutTileColor = .navy
292
+ }
293
+ ```
294
+
295
+ ### Phrase rules
296
+
297
+ - Every phrase MUST include `\(.applicationName)`.
298
+ - Phrases can reference parameters: `\(\.$soup)`.
299
+ - Call `updateAppShortcutParameters()` when dynamic option values change.
300
+ - Use `negativePhrases` to prevent false Siri activations.
301
+
302
+ ## Siri Integration
303
+
304
+ ### Donating intents
305
+
306
+ Donate intents so the system learns user patterns and suggests them in Spotlight:
307
+
308
+ ```swift
309
+ let intent = OrderSoupIntent()
310
+ intent.soup = favoriteSoupEntity
311
+ try await intent.donate()
312
+ ```
313
+
314
+ ### Predictable intents
315
+
316
+ Conform to `PredictableIntent` for Siri prediction of upcoming actions.
317
+
318
+ ## Interactive Widget Intents
319
+
320
+ Use `AppIntent` with `Button`/`Toggle` in widgets. Use
321
+ `WidgetConfigurationIntent` for configurable widget parameters.
322
+
323
+ ```swift
324
+ struct ToggleFavoriteIntent: AppIntent {
325
+ static var title: LocalizedStringResource = "Toggle Favorite"
326
+ @Parameter(title: "Item ID") var itemID: String
327
+
328
+ func perform() async throws -> some IntentResult {
329
+ FavoriteStore.shared.toggle(itemID)
330
+ return .result()
331
+ }
332
+ }
333
+
334
+ // In widget view:
335
+ Button(intent: ToggleFavoriteIntent(itemID: entry.id)) {
336
+ Image(systemName: entry.isFavorite ? "heart.fill" : "heart")
337
+ }
338
+ ```
339
+
340
+ ### WidgetConfigurationIntent
341
+
342
+ ```swift
343
+ struct BookWidgetConfig: WidgetConfigurationIntent {
344
+ static var title: LocalizedStringResource = "Favorite Book"
345
+ @Parameter(title: "Book", default: "The Swift Programming Language") var bookTitle: String
346
+ }
347
+
348
+ // Connect to WidgetKit:
349
+ struct MyWidget: Widget {
350
+ var body: some WidgetConfiguration {
351
+ AppIntentConfiguration(kind: "FavoriteBook", intent: BookWidgetConfig.self, provider: MyTimelineProvider()) { entry in
352
+ BookWidgetView(entry: entry)
353
+ }
354
+ }
355
+ }
356
+ ```
357
+
358
+ ## Control Center Widgets (iOS 18+)
359
+
360
+ Expose controls in Control Center and Lock Screen with
361
+ `ControlConfigurationIntent` and `ControlWidget`.
362
+
363
+ ```swift
364
+ struct LightControlConfig: ControlConfigurationIntent {
365
+ static var title: LocalizedStringResource = "Light Control"
366
+ @Parameter(title: "Light", default: .livingRoom) var light: LightEntity
367
+ }
368
+
369
+ struct ToggleLightIntent: AppIntent {
370
+ static var title: LocalizedStringResource = "Toggle Light"
371
+ @Parameter(title: "Light") var light: LightEntity
372
+ func perform() async throws -> some IntentResult {
373
+ try await LightService.shared.toggle(light.id)
374
+ return .result()
375
+ }
376
+ }
377
+
378
+ struct LightControl: ControlWidget {
379
+ var body: some ControlWidgetConfiguration {
380
+ AppIntentControlConfiguration(kind: "LightControl", intent: LightControlConfig.self) { config in
381
+ ControlWidgetToggle(config.light.name, isOn: config.light.isOn, action: ToggleLightIntent(light: config.light))
382
+ }
383
+ }
384
+ }
385
+ ```
386
+
387
+ ## Spotlight and IndexedEntity (iOS 18+)
388
+
389
+ Conform to `IndexedEntity` for Spotlight search. On iOS 26+, use `indexingKey`
390
+ for structured metadata:
391
+
392
+ ```swift
393
+ struct RecipeEntity: IndexedEntity {
394
+ static let defaultQuery = RecipeQuery()
395
+ static var typeDisplayRepresentation: TypeDisplayRepresentation = "Recipe"
396
+ var id: String
397
+
398
+ @Property(title: "Name", indexingKey: .title) var name: String // iOS 26+
399
+ @ComputedProperty(indexingKey: .description) // iOS 26+
400
+ var summary: String { "\(name) -- a delicious recipe" }
401
+
402
+ var displayRepresentation: DisplayRepresentation {
403
+ DisplayRepresentation(title: "\(name)")
404
+ }
405
+ }
406
+ ```
407
+
408
+ ## iOS 26 Additions
409
+
410
+ ### SnippetIntent
411
+
412
+ Display interactive snippets in system UI:
413
+
414
+ ```swift
415
+ struct OrderStatusSnippet: SnippetIntent {
416
+ static var title: LocalizedStringResource = "Order Status"
417
+ func perform() async throws -> some IntentResult & ShowsSnippetView {
418
+ let status = await OrderTracker.currentStatus()
419
+ return .result(view: OrderStatusSnippetView(status: status))
420
+ }
421
+ static func reload() { /* notify system to refresh */ }
422
+ }
423
+
424
+ // A calling intent can display this snippet via:
425
+ // return .result(snippetIntent: OrderStatusSnippet())
426
+ ```
427
+
428
+ ### IntentValueQuery (Visual Intelligence)
429
+
430
+ ```swift
431
+ struct ProductValueQuery: IntentValueQuery {
432
+ typealias Input = String
433
+ typealias Result = ProductEntity
434
+ func values(for input: String) async throws -> [ProductEntity] {
435
+ ProductStore.shared.search(input).map { ProductEntity(from: $0) }
436
+ }
437
+ }
438
+ ```
439
+
440
+ ## Common Mistakes
441
+
442
+ 1. **Conforming core data models to AppEntity.** Create dedicated shadow models
443
+ instead. Core models carry persistence logic that conflicts with intent
444
+ lifecycle.
445
+
446
+ 2. **Missing `\(.applicationName)` in phrases.** Every `AppShortcut` phrase
447
+ MUST include the application name token. Siri uses it for disambiguation.
448
+
449
+ 3. **Non-optional @Parameter without default.** The system cannot preview or
450
+ pre-fill such parameters. Make non-optional parameters have a `default`, or
451
+ mark them optional.
452
+
453
+ ```swift
454
+ // WRONG
455
+ @Parameter(title: "Count")
456
+ var count: Int
457
+
458
+ // CORRECT
459
+ @Parameter(title: "Count", default: 1)
460
+ var count: Int
461
+ ```
462
+
463
+ 4. **Using Int raw value for AppEnum.** `AppEnum` requires `RawRepresentable`
464
+ where `RawValue: LosslessStringConvertible`. Use `String`.
465
+
466
+ 5. **Forgetting `suggestedEntities()`.** Without it, the Shortcuts picker shows no defaults.
467
+ 6. **Throwing for missing entities in `entities(for:)`.** Omit missing entities instead.
468
+ 7. **Stale Spotlight index.** Call `updateAppShortcutParameters()` when entity data changes.
469
+ 8. **Missing `typeDisplayRepresentation`.** Both `AppEntity` and `AppEnum` require it.
470
+ 9. **Using deprecated `@AssistantEntity(schema:)` / `@AssistantEnum(schema:)`.** Use `@AppEntity(schema:)` and `@AppEnum(schema:)` instead. Note: `@AssistantIntent(schema:)` is still active.
471
+ 10. **Blocking perform().** `perform()` is async -- use `await` for I/O.
472
+
473
+ ## Review Checklist
474
+
475
+ - [ ] Every `AppIntent` has a descriptive `title` (verb + noun, title case)
476
+ - [ ] `@Parameter` types are optional or have defaults for system preview
477
+ - [ ] `AppEntity` types are shadow models, not core data model conformances
478
+ - [ ] `AppEntity` has `displayRepresentation` and `typeDisplayRepresentation`
479
+ - [ ] `EntityQuery.entities(for:)` omits missing IDs; `suggestedEntities()` implemented
480
+ - [ ] `AppEnum` uses `String` raw value with `caseDisplayRepresentations`
481
+ - [ ] `AppShortcutsProvider` phrases include `\(.applicationName)`; `parameterSummary` defined
482
+ - [ ] `IndexedEntity` properties use `@Property(indexingKey:)` on iOS 26+
483
+ - [ ] Control Center intents conform to `ControlConfigurationIntent`; widget intents to `WidgetConfigurationIntent`
484
+ - [ ] No deprecated `@AssistantEntity` / `@AssistantEnum` macros (note: `@AssistantIntent(schema:)` is still active)
485
+ - [ ] `perform()` uses async/await (no blocking); runs in expected isolation context; intent types are `Sendable`
486
+
487
+ ## References
488
+
489
+ - See [references/appintents-advanced.md](references/appintents-advanced.md) for @Parameter variants, EntityPropertyQuery, assistant schemas, focus filters, SiriKit migration, error handling, confirmation flows, authentication, URL-representable types, and Spotlight indexing details.
490
+
491
+
492
+ ---
493
+
494
+ Vendored from: https://github.com/dpearson2699/swift-ios-skills/tree/main/skills/app-intents