I suppose this is a bug in compiler. Xcode 16.0 (16A242d) - AppStore release version
When building a project from Xcode 15 in Xcode 16, an error occurs:
appintentsmetadataprocessor[12633:13677489] error: At least one halting error produced during export. No AppIntents metadata have been exported and this target is not usable with AppIntents until errors are resolved.
AppShortcut phrases may have at most one parameter, but found phrase, "Set Dark Mode ${darkMode} for Widget ${widget}" with more than one parameter: darkMode, widget
Apparently this is an Xcode bug because I have a production app with this AppShortcut and it works fine in Apple Shortcuts.
Everything is made according to the official WWDC video about AppShortcuts https://developer.apple.com/videos/play/wwdc2022/10170