shortcuts-playground 1.2.1

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 (68) hide show
  1. package/README.md +54 -0
  2. package/agents/shortcut-builder.md +172 -0
  3. package/agents/shortcut-remixer.md +239 -0
  4. package/commands/build-shortcut.md +32 -0
  5. package/commands/remix-shortcut.md +34 -0
  6. package/opencode.json +30 -0
  7. package/package.json +47 -0
  8. package/plugin/validator.ts +179 -0
  9. package/skills/shortcuts-playground/ACTIONS.md +713 -0
  10. package/skills/shortcuts-playground/APPINTENTS.md +2760 -0
  11. package/skills/shortcuts-playground/AUTOMATION_TRIGGERS.md +133 -0
  12. package/skills/shortcuts-playground/BEST_PRACTICES.md +357 -0
  13. package/skills/shortcuts-playground/CHANGELOG.md +585 -0
  14. package/skills/shortcuts-playground/CONTROL_FLOW.md +777 -0
  15. package/skills/shortcuts-playground/DATE_TIME.md +75 -0
  16. package/skills/shortcuts-playground/EXAMPLES.md +738 -0
  17. package/skills/shortcuts-playground/FILTERS.md +697 -0
  18. package/skills/shortcuts-playground/HEALTHKIT.md +317 -0
  19. package/skills/shortcuts-playground/ICONS_AND_COLORS.md +89 -0
  20. package/skills/shortcuts-playground/JAVASCRIPT_WEBPAGE.md +51 -0
  21. package/skills/shortcuts-playground/PARAMETER_TYPES.md +1117 -0
  22. package/skills/shortcuts-playground/PLIST_FORMAT.md +296 -0
  23. package/skills/shortcuts-playground/README.md +77 -0
  24. package/skills/shortcuts-playground/SKILL.md +459 -0
  25. package/skills/shortcuts-playground/THIRD_PARTY_ACTIONS.md +77 -0
  26. package/skills/shortcuts-playground/TOOLKIT_SNAPSHOT.md +62 -0
  27. package/skills/shortcuts-playground/URL_SCHEMES.md +59 -0
  28. package/skills/shortcuts-playground/VARIABLES.md +569 -0
  29. package/skills/shortcuts-playground/assets/shortcuts-small.svg +14 -0
  30. package/skills/shortcuts-playground/assets/shortcuts.png +0 -0
  31. package/skills/shortcuts-playground/data/healthkit-ios26.2-reference.json +2603 -0
  32. package/skills/shortcuts-playground/data/macos27-shortpy-grounding.json +4085 -0
  33. package/skills/shortcuts-playground/data/macos27-workflow-trigger-samples.json +1 -0
  34. package/skills/shortcuts-playground/data/shortcuts-glyph-synonyms.json +5102 -0
  35. package/skills/shortcuts-playground/data/shortcuts-icon-colors.json +107 -0
  36. package/skills/shortcuts-playground/data/shortcuts-official-glyph-mapping.json +509 -0
  37. package/skills/shortcuts-playground/data/toolkit-v63-tool-ids.json +1806 -0
  38. package/skills/shortcuts-playground/data/toolkit-v78-first-party-enum-cases.json +1 -0
  39. package/skills/shortcuts-playground/data/toolkit-v78-first-party-parameter-keys.json +1 -0
  40. package/skills/shortcuts-playground/data/toolkit-v78-ios27-tool-ids.json +1222 -0
  41. package/skills/shortcuts-playground/data/toolkit-v78-tool-ids.json +2745 -0
  42. package/skills/shortcuts-playground/data/toolkit-v78-trigger-parameter-keys.json +1051 -0
  43. package/skills/shortcuts-playground/golden-shortcuts/index.jsonl +19 -0
  44. package/skills/shortcuts-playground/golden-shortcuts/xml/1be4dde95b794253bf82438e201b33e7.xml +174 -0
  45. package/skills/shortcuts-playground/golden-shortcuts/xml/2e0fb675e45948aaacee7e534f910492.xml +1016 -0
  46. package/skills/shortcuts-playground/golden-shortcuts/xml/332c12a0060043b388b22b806be7ab58.xml +1924 -0
  47. package/skills/shortcuts-playground/golden-shortcuts/xml/3dd4ee24e43f464f92adaa70a0311eaa.xml +1177 -0
  48. package/skills/shortcuts-playground/golden-shortcuts/xml/4d102301c6e646faa7a8a221f4f4ec98.xml +321 -0
  49. package/skills/shortcuts-playground/golden-shortcuts/xml/51cc4e26d1044893a0c3f2f3630cf2d2.xml +1933 -0
  50. package/skills/shortcuts-playground/golden-shortcuts/xml/623e7f1ca5f948e2bd53811fec63e544.xml +136 -0
  51. package/skills/shortcuts-playground/golden-shortcuts/xml/6a18b76843ac45c384ac3400f3740997.xml +1791 -0
  52. package/skills/shortcuts-playground/golden-shortcuts/xml/71f0cacb0f604b399b76c5dcb7286e7c.xml +2228 -0
  53. package/skills/shortcuts-playground/golden-shortcuts/xml/807525ed9f974829bc8494defac923a8.xml +259 -0
  54. package/skills/shortcuts-playground/golden-shortcuts/xml/8ab0d39826ab4249be58672763caa3ba.xml +420 -0
  55. package/skills/shortcuts-playground/golden-shortcuts/xml/91c45fd3fd3b427897d9ba485efb1227.xml +800 -0
  56. package/skills/shortcuts-playground/golden-shortcuts/xml/97be626bb25c41709d175646a7f6d8f2.xml +424 -0
  57. package/skills/shortcuts-playground/golden-shortcuts/xml/ae59e10d409348f9bd33894f03f9beb4.xml +568 -0
  58. package/skills/shortcuts-playground/golden-shortcuts/xml/afa83b6be811483b9c32189c41eb9312.xml +391 -0
  59. package/skills/shortcuts-playground/golden-shortcuts/xml/cfdb083b857e4ac189629fa386d27cdc.xml +193 -0
  60. package/skills/shortcuts-playground/golden-shortcuts/xml/e01cebe192d64b2fbca80204d03d92ab.xml +111 -0
  61. package/skills/shortcuts-playground/golden-shortcuts/xml/ef669bcf8bad489d9ef4b88bfaf5772f.xml +780 -0
  62. package/skills/shortcuts-playground/golden-shortcuts/xml/f44f5caf5e3e48d4817e73af450c4404.xml +570 -0
  63. package/skills/shortcuts-playground/scripts/generate_healthkit_reference.py +394 -0
  64. package/skills/shortcuts-playground/scripts/lookup_action_grounding.py +1164 -0
  65. package/skills/shortcuts-playground/scripts/select_shortcut_icon_color.py +597 -0
  66. package/skills/shortcuts-playground/scripts/test_random_mixed_shortcuts.py +1067 -0
  67. package/skills/shortcuts-playground/scripts/test_wiring_regressions.py +2247 -0
  68. package/skills/shortcuts-playground/scripts/validate_shortcut.py +4526 -0
@@ -0,0 +1,585 @@
1
+ # Autoresearch Loop Changelog
2
+
3
+ ## Date: June 15, 2026 - Mac-specific automation exports
4
+
5
+ ### Summary
6
+
7
+ Added exported OS 27 automation header research coverage for Mac-specific External Drive, File Modified, and Folder Changed triggers, and blocked lossy bare imports from validating as production shortcuts.
8
+
9
+ ### Fixes Applied
10
+
11
+ - Updated `data/macos27-workflow-trigger-samples.json` from 39 to 42 observed ToolKit trigger variants, leaving no ToolKit trigger variants without an exported sample.
12
+ - Recorded External Drive via `WFDiskMountTrigger` with an empty serialized-parameters dictionary from the exported Specific Drive Disconnected samples.
13
+ - Recorded File Modified via `WFFileTrigger` with an empty serialized-parameters dictionary from the exported File Modified sample.
14
+ - Recorded Folder Changed via `WFFolderTrigger` with an empty serialized-parameters dictionary from exported Item Added, Item Removed, and Item Modified folder samples.
15
+ - Verified in the macOS 27 Shortcuts editor that bare External Drive, File Modified, and Folder Changed imports render as invalid automations because required picker state is stored outside the portable `WFWorkflowTriggers` dictionary.
16
+ - Marked the three Mac picker triggers as `requires-user-values` and updated validator regression coverage so generated bare carriers fail before signing.
17
+
18
+ ## Date: June 15, 2026 - Display and Stage Manager automation exports
19
+
20
+ ### Summary
21
+
22
+ Added support for the newly exported Display and Stage Manager OS 27 automation headers and validated Apple's exported Set Multitasking Mode dictionary form.
23
+
24
+ ### Fixes Applied
25
+
26
+ - Updated `data/macos27-workflow-trigger-samples.json` from 37 to 39 observed ToolKit trigger variants, leaving only External Drive, File Modified, and Folder Changed sample-gated.
27
+ - Added Display automation support via `WFExternalDisplayTrigger` with `WFConnectionType` values `connect`, `disconnect`, and `both`.
28
+ - Added Stage Manager automation support via `WFStageManagerTrigger` with `WFStageManagerType` values `on`, `off`, and `both`.
29
+ - Documented the exported Display and Stage Manager trigger values in `AUTOMATION_TRIGGERS.md` for deterministic OS 27 authoring.
30
+ - Taught `validate_shortcut.py` to accept Apple's AppEnum-style `Set Multitasking Mode` `mode` dictionary shape (`identifier`/`value` plus localized title metadata), not just bare string literals.
31
+ - Documented the Stage Manager export evidence for `com.apple.ShortcutsActions.SetMultitaskingModeAction` in `APPINTENTS.md`.
32
+
33
+ ## Date: June 14, 2026 - macOS/iOS 27 exported automation headers
34
+
35
+ ### Summary
36
+
37
+ Mapped real OS 27 automation-bearing shortcut exports and packaged sanitized `WFWorkflowTriggers` samples as the portable authoring source for native automation headers.
38
+
39
+ ### Fixes Applied
40
+
41
+ - Added `data/macos27-workflow-trigger-samples.json` with sanitized exported `WFWorkflowTriggers` shapes for 37 of 42 ToolKit trigger variants.
42
+ - Documented the importable root plist shape: `WFWorkflowTriggers` array containing `WFTriggerIdentifier`, `WFTriggerUUID`, and `WFTriggerSerializedParameters`.
43
+ - Documented observed defaults: change-style triggers serialize as `both`, Wi-Fi connect can omit connection type while disconnect uses `disconnected`, and several picker/default fields are omitted when the default UI value is selected.
44
+ - Kept live database reads/writes out of normal shortcut generation; the new data is static authoring metadata and remains target-gated for OS 27 users.
45
+ - Updated `lookup_action_grounding.py` so trigger lookups expose `workflowTriggerSample` alongside ToolKit parameter keys and enum cases.
46
+ - Added validator checks for top-level `WFWorkflowTriggers`: OS 27 target gating, required keys, uppercase UUIDs, dictionary parameters, known trigger identifiers, known serialized keys, and rejection of catalog placeholders.
47
+ - Added regression coverage proving the workflow trigger catalog is packaged, redacted, mirrored between Codex and Claude, and surfaced by lookup.
48
+ - Left Display, External Drive, File Modified, Folder Changed, and Stage Manager marked sample-gated pending more exported XML samples.
49
+
50
+ ## Date: June 13, 2026 - AppIntent parameter schema validation
51
+
52
+ ### Summary
53
+
54
+ Started using the packaged Apple ToolKit v78 parameter catalog as an active validator source for first-party AppIntent-style actions.
55
+
56
+ ### Fixes Applied
57
+
58
+ - Added target-gated `toolkit-v78-first-party-parameter-keys.json` loading to `validate_shortcut.py`.
59
+ - Reject unknown top-level parameter keys for `com.apple.*` actions when the active target has a ToolKit v78 schema for that identifier.
60
+ - Keep regular `is.workflow.actions.*` payloads on the existing targeted validation path because legacy WF actions can include valid plist/UI state keys that are absent from ToolKit parameter metadata.
61
+ - Aligned `lookup_action_grounding.py` with validator target behavior by adding `--target-platform`, iOS/macOS target-platform availability notes, and the same macOS 26 fallback when host detection is unavailable.
62
+ - Added targeted validator support for OS 27 Stored Content actions: `Store Content` now requires explicit `WFInput`, all Stored Content actions require non-empty `WFStoredContentKey`, and `WFStoredContentGlobalValue` must be boolean when present.
63
+ - Added targeted validator support and documentation for OS 27 `Get What's On Screen`: scopes are limited to `All Visible` / `Focused App Only`, the limit-enabled flag must be boolean, and enabled limits require a positive `WFOnScreenContextLimit`.
64
+ - Added targeted validator support and documentation for OS 27 VPN actions: `Find VPNs` now checks sort/compound/limit values, `Set VPN` checks operation/VPN/on-demand fields, and Settings VPN AppIntent rows are documented.
65
+ - Added targeted validator support for the Automators OS 27 parameter deltas: markdown/web/route toggles must be booleans, Maps route modes are checked against ToolKit enums, Scan QR or Barcode requires a tokenized `imageFile`, Create Tab Group rejects empty `contents`, and Hide/Quit App modes are validated.
66
+ - Added the ToolKit v78 `Use Model` `FollowUp` toggle to the OS 27 target-gated parameter list and boolean validator.
67
+ - Added targeted validation and documentation for the linked OS 26.4 ToolKit deltas present in v78 metadata: New Reminder `WFUrgent` must be boolean, Find Places `WFSearchSortOrder` is limited to `Distance`/`Relevance`, Battery Charge Limit `setUntilTomorrow` must be boolean, and Set Multitasking Mode checks `mode`, `automaticallyShowAndHideDock`, and `showRecentApps`.
68
+ - Documented iOS/iPadOS 27-only `Start Workout` and `End Workout` ToolKit rows as target-platform-gated metadata pending exported iPhone/iPad samples.
69
+ - Added structural validation so first-party `com.apple.*` AppIntent actions must include an `AppIntentDescriptor` with an `AppIntentIdentifier`.
70
+ - Tightened OS 27 Store Content validation after UI/database verification: bare or wrapped `WFTextTokenAttachment` inputs sign and import but render as an empty `Content` parameter; Apple saves the manually fixed field as `WFTextTokenString`, and the signer wrappers now retry validator-clean XML format failures after binary plist conversion so that correct shape can be signed.
71
+ - Added `toolkit-v78-first-party-enum-cases.json`, a static enum-case catalog for v78 action and automation-trigger parameter types, and taught `lookup_action_grounding.py` to expose `enumCases` / `enumTypes` in JSON and Markdown output.
72
+ - Added target-gated validator checks for invalid simple literal enum values on first-party `com.apple.*` AppIntent parameters and classic `is.workflow.actions.*` parameters backed by a single ToolKit enum type.
73
+ - Added target-gated validator checks for first-party `com.apple.*` AppIntent and classic `is.workflow.actions.*` boolean parameters backed by ToolKit `bool` types, covering rows such as Set Motion Cues, Set Switch Control, Generate Hash, and Show Alert.
74
+ - Redacted dynamic user-local picker cases from the packaged enum catalog so local Reminders list names and Contacts groups are not shipped as static ToolKit metadata.
75
+ - Documented macOS 27 AppKit/Apple Intelligence runtime intents such as `FetchIntelligenceCommands`, `InsertIntelligenceText`, `RunIntelligenceCommand`, and the expanded Writing Tools transforms with observed parameters and app/window-context caveats.
76
+ - Documented and regression-tested `Set Appearance on Apple TV` (`com.apple.TVRemoteUIService.ToggleSystemAppearanceIntent`) with `appearanceToggle` enum values `light` / `dark` and boolean `ShowWhenRun`.
77
+ - Documented private `AccessibilityUtilities.framework` intentdefinition evidence for Automators-reported `ToggleVehicleMotionCues`, `ToggleHearingAidMute`, and `SetSwitchControlProfile` / **Set Switch Control Switch Set** while keeping authoring gated to confirmed ToolKit identifiers or exported shortcut samples.
78
+ - Added a regression guard that keeps those private Accessibility intent names out of the packaged ToolKit action catalogs, while confirming the shippable `Set Motion Cues`, `Set Switch Control`, and iOS Hearing App rows remain present.
79
+ - Documented the linked OS 26.4 `Choose from List` behavior: dictionary and named-text inputs are valid again, while contact email/phone-number list values remain macOS-only.
80
+ - Finished the linked Automators iOS 18 to OS 26.1 follow-up: documented Add Alarm `OpenWhenRun`, Create List `type`, Photos Open Person/Set Library View, macOS Background Sounds controls, Open App `WFWindowingFormat`, and left Search in Files marked unresolved pending an exported iOS shortcut because no literal row appears in local v78 ToolKit.
81
+ - Enriched `toolkit-v78-first-party-parameter-keys.json` with localized parameter names, sort order, flags, and boolean labels while still omitting Apple descriptions.
82
+ - Added targeted validation and documentation for Append to Note `operation`, limited to ToolKit values `append` and `prepend`.
83
+ - Added targeted validation and documentation for `Add Item to List` position/index fields and `Choose from List` multi-select booleans.
84
+ - Added validator and stress-suite coverage for Shortcuts' exact `WFMathOperation` encoding: addition omits the key, multiplication uses `×`, and division uses `÷`.
85
+ - Updated the wiring regression suite to opt into all packaged platform snapshots so iOS-only HealthKit fixtures remain covered after target-platform gating.
86
+ - Updated the random mixed-action stress suite signer to retry validator-clean XML after binary plist conversion, matching the production signing wrappers.
87
+ - Added an explicit OS 27 random mixed-action stress mode (`--target-macos 27 --include-os27-actions`) that inserts Stored Content, Add Item to List, Otherwise If, Get Selected Text, Get What's On Screen, and Get Current VPN into every generated shortcut.
88
+ - Added targeted validation and documentation for ToolKit v78 Get Distance unit/accuracy enums, Find VPNs library input source, and Quit App `WFAskToSaveChanges` boolean handling.
89
+ - Added explicit regression coverage for Automators follow-up AppIntent enum/boolean values: Add Alarm, Create List, Set Library View, and Background Sounds controls.
90
+ - Documented and validated platform-specific Safari/Photos AppIntent namespace splits: `com.apple.Safari.*` / `com.apple.Photos.*` on macOS and `com.apple.mobilesafari.*` / `com.apple.mobileslideshow.*` on iOS/iPadOS.
91
+ - Removed a Codex/Claude drift in the random mixed-action stress suite output-dir fallback order.
92
+ - Refreshed plugin README entry points so the OS 27 parameter and trigger catalogs are discoverable from the package overview.
93
+ - Clarified `lookup_action_grounding.py --identifier` help so it explicitly covers automation trigger identifiers, and added regression coverage for trigger lookup by identifier as well as Python name.
94
+ - Enriched the Automators OS 26 to 27 AppIntent notes with ToolKit enum/sort metadata for Messages, Photos, Mail, and Reminders rows while keeping entity-picker serialization sample-gated.
95
+ - Added issue-regression coverage proving typoed AppIntent keys are rejected, valid AppIntent keys pass the schema check, iOS-only schemas stay platform-gated, lookup target-platform notes behave correctly, Stored Content wiring is checked, and legacy WF UI keys such as `ShowHeaders` are not false-positive failures.
96
+ - Clarified signing failure guidance so each runtime reports the right unrestricted-shell or sandbox hint.
97
+
98
+ ## Date: June 13, 2026 - Platform-aware OS 27 validation
99
+
100
+ ### Summary
101
+
102
+ Tightened the early OS 27 validator support so macOS users do not accidentally validate iOS-only AppIntents from the iOS 27 Simulator snapshot.
103
+
104
+ ### Fixes Applied
105
+
106
+ - Added target-platform filtering to `validate_shortcut.py`: default validation targets `macos`, while `--target-platform ios` / `SHORTCUTS_PLAYGROUND_TARGET_PLATFORM=ios` opt into iPhone/iPad rows and `--target-platform all` is reserved for metadata audits.
107
+ - Changed `auto` OS targeting to fall back to macOS 26 when the host macOS version cannot be detected, instead of silently enabling every packaged snapshot.
108
+ - Kept `--target-macos latest` as the explicit escape hatch for validating every packaged OS snapshot.
109
+ - Added issue-regression coverage proving iOS-only Hearing AppIntents are rejected for Mac-targeted shortcuts but allowed when the platform target is `ios` or `all`.
110
+ - Updated plugin docs and Claude user config to document `target_platform`.
111
+
112
+ ## Date: June 13, 2026 - OS 27 trigger metadata audit
113
+
114
+ ### Summary
115
+
116
+ Reviewed the plugin's shipped AppIntent/ToolKit coverage against the local macOS 27 and iOS 27 Simulator ToolKit databases and closed the remaining structured metadata gap: automation triggers.
117
+
118
+ ### Fixes Applied
119
+
120
+ - Made the OS 26 to 27 updated-parameter table display the exact Automators action names alongside identifiers, including Scan QR or Barcode, Get Distance, Get Travel Time, Hide App, and Quit App.
121
+ - Verified the shipped macOS 27 and iOS 27 Simulator v78 action ID snapshots exactly match the local ToolKit databases, and verified the first-party parameter catalog has no missing, stale, or mismatched rows.
122
+ - Added `data/toolkit-v78-trigger-parameter-keys.json`, a compact static catalog of 42 ToolKit v78 automation triggers with identifiers, Apple Python names, parameter keys, platform labels, and output type identifiers.
123
+ - Added `AUTOMATION_TRIGGERS.md` so trigger metadata is discoverable without implying import-ready automation support.
124
+ - Updated `lookup_action_grounding.py` so trigger IDs, trigger Python names such as `when_app_opened`, and trigger searches resolve from packaged static metadata.
125
+ - Documented that trigger metadata is research-only until exported automation/shortcut samples prove the top-level Personal Automation or inline trigger serialization.
126
+ - Added issue-regression coverage for trigger catalog packaging, trigger lookup, and docs guardrails.
127
+
128
+ ## Date: June 13, 2026 - AppIntent validator gap audit
129
+
130
+ ### Summary
131
+
132
+ Reviewed the plugin against the newer AppIntent/ToolKit metadata path and closed two packaging/validation gaps that could weaken OS 27 authoring.
133
+
134
+ ### Fixes Applied
135
+
136
+ - Added `markdownContents` to the Notes create content-key validator so the runtime-correct `com.apple.Notes.CreateNoteFromMarkdownLinkAction` payload validates cleanly.
137
+ - Added OS 27 target-gated `imageFile` support for `is.workflow.actions.extracttextfromimage`, matching the local ToolKit v78 **Extract from Image** row while preserving older `WFImage`/`WFInput` compatibility.
138
+ - Removed stale guidance that treated Notes `markdownContents` as a known validator false positive.
139
+ - Updated ToolKit snapshot docs and Claude self-test coverage so the packaged `toolkit-v78-first-party-parameter-keys.json` AppIntent parameter catalog is explicitly checked.
140
+ - Updated Claude builder/remixer prompts so OS 27 AppIntent gaps can use the packaged `lookup_action_grounding.py` helper before escalating.
141
+ - Added issue-regression tests for Notes `markdownContents`, parameter-catalog documentation, and self-test packaging coverage.
142
+
143
+ ## Date: June 13, 2026 - OS 26 to 27 Automators action delta
144
+
145
+ ### Summary
146
+
147
+ Expanded OS 27-era action support after reviewing the Automators forum thread and cross-checking it against local macOS 27 and hydrated iOS 27 Simulator ToolKit v78 databases.
148
+
149
+ ### Fixes Applied
150
+
151
+ - Added `data/toolkit-v78-ios27-tool-ids.json` with 1,206 identifiers from the iOS 27.0 Simulator ToolKit database.
152
+ - Added `data/toolkit-v78-first-party-parameter-keys.json`, a compact first-party ToolKit v78 parameter-key snapshot used by `lookup_action_grounding.py` as a broad AppIntent fallback.
153
+ - Updated `lookup_action_grounding.py` to separate action availability, OS 27-era parameter metadata availability, and platform provenance, so one-sided macOS/iOS ToolKit rows are flagged before authoring.
154
+ - Added validator target gating for the Automators OS 26 to 27 parameter deltas, so OS 27-only keys are rejected on macOS 26 targets even when the action identifier predates OS 27.
155
+ - Clarified the source skill and ToolKit snapshot docs so agents know OS 27-era parameter keys are target-gated, not just v78 action identifiers.
156
+ - Updated validator snapshot loading so iOS 27 ToolKit identifiers are target-gated and report iOS-specific availability reasons.
157
+ - Documented the Automators action and parameter deltas in `ACTIONS.md` and `APPINTENTS.md`, including Messages, Photos, Reminders, Share/Collaborate, stored content, on-screen context, Notes markdown, Maps route options, and Hide/Quit Apps exclusion lists.
158
+ - Filled the Create Note markdown and Safari Create Tab Group contents parameter mappings from local macOS 27 ToolKit evidence.
159
+ - Documented iOS 27 hearing-device runtime metadata for Adjust Volume, Mute Volume, and Select Preset AppIntents.
160
+ - Mapped the reported Toggle Vehicle Motion Cues action to the confirmed macOS 27 `Set Motion Cues` ToolKit entry, documented the confirmed `Set Switch Control` on/off intent and `switchControlSwitches` settings-pane deep link target, and left Set Switch Control Switch Set marked as unresolved pending an exported shortcut or device ToolKit database.
161
+ - Added issue-regression coverage for the iOS 27 snapshot and the new reference entries.
162
+
163
+ ## Date: June 12, 2026 - macOS 27 Golden Gate ToolKit v78 review
164
+
165
+ ### Summary
166
+
167
+ Added early macOS 27 validation support after inspecting the local Shortcuts ToolKit v78 database on macOS 27.0 build 26A5353q.
168
+
169
+ ### Fixes Applied
170
+
171
+ - Added `data/toolkit-v78-tool-ids.json` with 2,731 identifiers from the local macOS 27 ToolKit database.
172
+ - Added `data/macos27-shortpy-grounding.json`, a reviewed static Apple-derived macOS 27 grounding catalog with ToolKit `pythonName`, Apple Shortpy keyword, ToolRenderer utility, and ShortcutsLanguage syntax evidence.
173
+ - Added `scripts/lookup_action_grounding.py` to inspect that static catalog without reading live Shortcuts databases or loading private Apple frameworks.
174
+ - Updated `validate_shortcut.py` to load packaged `toolkit-v*-tool-ids.json` snapshots by target macOS version instead of hard-coding v63. The default target is `auto`; `--target-macos 27` / `SHORTCUTS_PLAYGROUND_TARGET_MACOS=27` opt into Golden Gate-only IDs.
175
+ - Documented `SHORTCUTS_PLAYGROUND_TARGET_MACOS` for explicit macOS 27 validation opt-in on older hosts.
176
+ - Documented the eight v78-only classic Shortcuts actions found locally, including `is.workflow.actions.additemtolist` and `is.workflow.actions.getselectedtext`.
177
+ - Documented the verified macOS 27 `Otherwise If` control-flow shape and `Add Item to List` serialization from Federico's local samples.
178
+ - Added a validator guard and docs for the macOS 27 import bug where list `contains` conditionals lose the comparison value when they test a named list variable that has been repeatedly reassigned from List/Add to List outputs.
179
+ - Kept local compatibility-review notes outside the packaged plugin; only the portable metadata and validator behavior ship.
180
+ - Added issue-regression coverage proving v78-only actions are target-gated and the macOS 27 `Otherwise If` shape validates.
181
+
182
+ ## Date: June 8, 2026 — 1.1.0 public issue regression release
183
+
184
+ ### Summary
185
+
186
+ Released the public 1.1.0 package with fixes for HealthKit blood pressure labels and Codex sandbox signing diagnostics, plus mirrored Claude output-path configuration fixes in the repository package.
187
+
188
+ ### Fixes Applied
189
+
190
+ - Corrected HealthKit blood pressure labels to `Diastolic Blood Pressure` and `Systolic Blood Pressure`.
191
+ - Added format-error signing guidance for Apple `shortcuts sign`, now including the binary plist retry before falling back to Codex workspace sandbox diagnosis.
192
+ - Added focused issue-regression tests and HealthKit label assertions in the wiring regression suite.
193
+ - Bumped the Codex plugin manifest to `1.1.0`.
194
+
195
+ ## Date: May 15, 2026 — Codex PostToolUse auto-validation hook
196
+
197
+ ### Summary
198
+
199
+ Added a Codex-native `PostToolUse` hook for the Craig Loop now that Codex supports plugin-bundled hooks.
200
+
201
+ ### Fixes Applied
202
+
203
+ - Added `codex/hooks/hooks.json` and `codex/hooks/auto-validate.sh`.
204
+ - Declared the hook in `codex/.codex-plugin/plugin.json`.
205
+ - The hook handles Codex `apply_patch` payloads by extracting changed files from the patch text, then validates `.xml`/`.shortcut` files containing `WFWorkflowActions`.
206
+ - Updated Codex docs to note that plugin hooks require `[features].plugin_hooks = true` and hook review/trust via `/hooks` when prompted.
207
+
208
+ ## Date: May 12, 2026 — Calendar date filters and Time Between Dates wiring
209
+
210
+ ### Summary
211
+
212
+ Closed gaps exposed by a "time until next calendar event" shortcut: invalid Calendar Events date filter operators, Get Time Between Dates UI serialization, and low-signal placeholder range errors.
213
+
214
+ ### Fixes Applied
215
+
216
+ - Documented the Calendar Events "next event after now" filter: `Start Date is today` plus `Start Date is after Current Date` with date operator `2`; validator now rejects numeric operator `3` on calendar date properties.
217
+ - Documented and enforced `WFTextTokenString` placeholder wiring for Get Time Between Dates date inputs. Direct `CurrentDate` magic tokens now produce an explicit "use a Date action first" validator error.
218
+ - Improved `attachmentsByRange` diagnostics so placeholder errors report the expected UTF-16 placeholder positions.
219
+ - Added regression coverage for valid/invalid calendar event filters, valid/invalid Get Time Between Dates wiring, and placeholder offset failures.
220
+ - Added pipeline-first build guidance: validate, sign, and verify before optional comment/prose polish.
221
+
222
+ ## Date: May 12, 2026 — Send Message appended-variable guidance
223
+
224
+ ### Summary
225
+
226
+ Clarified that Send Message content must use a named variable built from at least two Append Variable actions, including single-type payloads such as photos-only messages.
227
+
228
+ ### Fixes Applied
229
+
230
+ - Reframed the Send Message guidance so the appended-variable rule is no longer scoped only to mixed text-and-file messages.
231
+ - Added the single-type pattern: append the source content, append an empty Text output to the same variable, then reference the named variable with `WFTextTokenString`.
232
+ - Updated the validator error to state the exact invariant and added regression coverage for the valid single-type pattern plus invalid one-append, direct ActionOutput, and `WFTextTokenAttachment` variants.
233
+
234
+ ## Date: May 8, 2026 — 1.0 public launch reset and Active Calories correction
235
+
236
+ ### Summary
237
+
238
+ Reset plugin metadata to `1.0` for public launch and corrected the Active Energy Burned HealthKit label to Shortcuts' `Active Calories` wording.
239
+
240
+ ### Fixes Applied
241
+
242
+ - Updated HealthKit reference metadata so `HKQuantityTypeIdentifierActiveEnergyBurned` resolves to `Active Calories`.
243
+ - Updated guidance to reject `Active Energy` and `Active Energy Burned` in HealthKit actions.
244
+ - Added validator regression coverage for stale active-energy labels in Find Health Samples and Log Health Sample.
245
+
246
+ ## Date: May 5, 2026 — Set Name action identity correction
247
+
248
+ ### Summary
249
+
250
+ Corrected the Set Name guidance after comparing a generated shortcut against an Apple-built skeleton. **Set Name** is `is.workflow.actions.setitemname` and produces a renamed item object; **Rename File** is `is.workflow.actions.file.rename` and renames the original file in place.
251
+
252
+ ### Fixes Applied
253
+
254
+ - Replaced the incorrect Set Name mapping (`file.rename` + `WFFile`/`WFNewFilename`) with the verified `setitemname` + `WFInput`/`WFName` schema.
255
+ - Documented that Rename File mutates the original path and must not be used for save-as/share-copy workflows.
256
+ - Updated validator coverage so Set Name validates `WFInput` and `WFName`, while Save/Share consuming Rename File output is rejected.
257
+ - Updated regression and random mixed-shortcut fixtures to generate `setitemname`.
258
+
259
+ ## Date: May 4, 2026 — 1.7.5 URL schemes, JavaScript webpage rules, and date recipes
260
+
261
+ ### Summary
262
+
263
+ Added Apple-documented Shortcuts URL scheme/x-callback guidance, Run JavaScript on Webpage runtime rules, and date/time recipes from Apple's advanced Shortcuts documentation.
264
+
265
+ ### Fixes Applied
266
+
267
+ - Added `URL_SCHEMES.md` with documented `shortcuts://`, `create-shortcut`, `open-shortcut`, `run-shortcut`, Gallery, and `x-callback-url/run-shortcut` patterns.
268
+ - Added `JAVASCRIPT_WEBPAGE.md` covering Safari share-sheet runtime requirements, `completion(...)`, JSON-compatible output, and timeout-prone JavaScript APIs.
269
+ - Added `DATE_TIME.md` with UNIX timestamp conversion, built-in date/time styles, ISO 8601, RFC 2822, and Unicode TR35 custom format guidance.
270
+ - Updated the validator to reject unsupported Shortcuts URL routes and malformed documented routes.
271
+ - Updated the validator to require Safari webpage share-sheet metadata and completion-handler usage for Run JavaScript on Webpage actions.
272
+ - Added regression fixtures for valid/invalid Shortcuts URL scheme and JavaScript webpage cases.
273
+
274
+ ## Date: May 4, 2026 — Weather details and superseded Set Name source reuse
275
+
276
+ ### Summary
277
+
278
+ Fixed the Weather Detail picker labels. The Set Name source-reuse guidance from this entry was superseded by the May 5, 2026 correction: Set Name is `setitemname`, while `file.rename` is Rename File and mutates the original file in place.
279
+
280
+ ### Fixes Applied
281
+
282
+ - Documented and validated the supported Get Detail of Weather Conditions names, including `Sunrise Time` and `Sunset Time` instead of stale `Sunrise Date` / `Sunset Date`.
283
+ - Added sunrise/sunset list handling guidance and validation: use Get Item from List, First Item for sunrise and Last Item for sunset, before formatting the date.
284
+ - Added an earlier Set Name source-reuse validator, later replaced by the May 5 Set Name/Rename File distinction.
285
+ - Expanded the wiring regression suite with Weather sunrise/sunset and file-renaming cases.
286
+
287
+ ## Date: April 30, 2026 — 1.7.4 Health dashboard labels and duration math
288
+
289
+ ### Summary
290
+
291
+ Updated Health dashboard guidance after comparing a generated HealthDash shortcut with a partially repaired copy. Find Health Samples needs additional action-specific picker labels: `Sleep`, `Active Calories`, and `Exercise Minutes`. Sleep duration values should not be divided by `60` and labeled as hours.
292
+
293
+ ### Fixes Applied
294
+
295
+ - Added observed Find Health Samples labels for Sleep, Active Calories, and Exercise Minutes.
296
+ - Updated the validator to accept category types such as Sleep in Find Health Samples and reject stale labels such as `Sleep Analysis`, `Active Energy`, `Apple Exercise Time`, and `Exercise Time`.
297
+ - Added validation for Sleep duration math that divides by `60` and stores/reports the result as hours; generated shortcuts should divide by `3600` for decimal hours.
298
+ - Documented safer Health dashboard guidance for Sleep duration, last-night ranges, and Walking + Running Distance unit conversion.
299
+ - Added validation for the generated `Distance Total ÷ 1000` pattern so Health distances are not converted to zero by assuming meter inputs.
300
+
301
+ ## Date: April 28, 2026 — 1.7.3 HealthKit Type picker correction
302
+
303
+ ### Summary
304
+
305
+ Corrected the 1.7.2 Find Health Samples fix after comparing a shortcut containing a manually created working action and a plugin-generated broken action. The sample-kind row must be `Property = Type` with `Values.Enumeration.WFSerializationType = WFStringSubstitutableState`, `Bounded = true`, and `Removable = false`. The generated `Property = Value` / `Values.String = Step Count` row imports as an editable text filter, not the Health type picker.
306
+
307
+ ### Fixes Applied
308
+
309
+ - Updated HealthKit docs and examples to use a locked `Type is <Health picker label>` row for Find Health Samples.
310
+ - Updated `validate_shortcut.py` to reject legacy `Value` string rows and validate the `Type` enumeration state.
311
+ - Added `observed_find_samples_labels` to the generated HealthKit reference so `HKQuantityTypeIdentifierStepCount` uses `Steps` for Find Health Samples, while other Health action contexts can still use `Step Count`.
312
+ - Updated regression fixtures so the exact generated failure shape is invalid.
313
+
314
+ ## Date: April 28, 2026 — 1.7.2 HealthKit Value filter correction
315
+
316
+ ### Summary
317
+
318
+ Superseded by 1.7.3. This release incorrectly changed the Find Health Samples sample-kind row to `Property = Value`, which imported as an editable text filter rather than the Health type picker.
319
+
320
+ ### Fixes Applied
321
+
322
+ - The 1.7.3 release restores the correct `Type` row and changes the underlying value state to the observed enumeration shape.
323
+
324
+ ## Date: April 27, 2026 — 1.7.1 HealthKit filter correction
325
+
326
+ ### Summary
327
+
328
+ Corrected Find Health Samples guidance after comparing a generated Health shortcut against a manually created iOS action. The previously documented top-level `WFHealthQuantityType` key is not honored by the iOS Shortcuts editor. This release moved the sample kind into `WFContentItemFilter`; 1.7.3 later corrected the row value state to the locked `Type` enumeration shape.
329
+
330
+ ### Fixes Applied
331
+
332
+ - Updated `HEALTHKIT.md`, `FILTERS.md`, `PARAMETER_TYPES.md`, `BEST_PRACTICES.md`, and `SKILL.md` to forbid `WFHealthQuantityType` for Find Health Samples.
333
+ - Updated `validate_shortcut.py` to reject obsolete `WFHealthQuantityType` and require a sample-kind predicate row.
334
+ - Updated `test_wiring_regressions.py` so valid Health sample find/detail cases use `WFContentItemFilter` sample-kind rows and invalid cases catch missing, malformed, or unknown sample-kind rows.
335
+ - Updated `data/healthkit-ios26.2-reference.json` metadata so the packaged evidence no longer advertises the obsolete key.
336
+
337
+ ## Date: April 26, 2026 — Codex package
338
+
339
+ ### Summary
340
+
341
+ Adapted the Shortcuts Playground skill for Codex plugin packaging.
342
+
343
+ ### Fixes Applied
344
+
345
+ - Removed Claude-only slash command, specialized agent, hook, wrapper-bin, and `userConfig` assumptions from the Codex skill entry point.
346
+ - Added direct script invocation instructions for icon resolution, validation, and archive/sign.
347
+ - Added `scripts/sign_shortcut.sh` as the Codex signing helper.
348
+
349
+ ## Date: April 26, 2026 — 1.6.1 follow-up
350
+
351
+ ### Summary
352
+
353
+ Removed user-specific local evidence details from the distributed HealthKit references and sanitized bundled XML examples.
354
+
355
+ ### Fixes Applied
356
+
357
+ - Replaced exported shortcut filenames and scratch-folder descriptions in `HEALTHKIT.md` with generic evidence descriptions.
358
+ - Regenerated `data/healthkit-ios26.2-reference.json` so it stores evidence IDs and parameter shapes, not user-specific source paths.
359
+ - Removed personal attribution/sample names from bundled golden XML examples.
360
+
361
+ ## Date: April 26, 2026
362
+
363
+ ### Summary
364
+
365
+ Added HealthKit support from anonymized iOS Shortcuts XML exports, iPhoneOS 26.2 HealthKit headers, and ActionKit unit constants. The skill now documents and validates Find Health Samples, Get Details of Health Sample, Log Health Sample, and Log Workout.
366
+
367
+ ### Fixes Applied
368
+
369
+ - Added `HEALTHKIT.md` with bundled anonymized XML examples for Find Health Samples, Log Health Sample quantity/category samples, Get Details of Health Sample, and Log Workout identifier coverage.
370
+ - Added `data/healthkit-ios26.2-reference.json`, generated by `scripts/generate_healthkit_reference.py`.
371
+ - Updated `validate_shortcut.py` to allow iOS Health actions and validate their required parameters, Health sample detail wiring, Health filters, quantity fields, category values, dates, and workout fields.
372
+ - Expanded `test_wiring_regressions.py` to cover all 120 HealthKit quantity types, 70 category types, 61 category enum values, 84 workout activity types, 46 ActionKit Health unit strings, and variable/date-token cases.
373
+ - Updated `ACTIONS.md`, `FILTERS.md`, `PARAMETER_TYPES.md`, `BEST_PRACTICES.md`, and `SKILL.md` so agents no longer escalate on Log Health Sample schema gaps.
374
+
375
+ ### Bundled Evidence Findings
376
+
377
+ - `is.workflow.actions.health.quantity.log` uses `WFQuantitySampleType` plus `WFQuantitySampleQuantity` as `WFQuantityFieldValue`.
378
+ - `WFQuantitySampleAdditionalQuantity` can be unit-only.
379
+ - Category samples can retain the count-based quantity scaffold even when the editor hides the Value row.
380
+ - Category picker values use `WFCategorySampleEnumeration`; observed example: `Cervical Mucus Quality` with `Dry`.
381
+ - `is.workflow.actions.filter.health.quantity` uses `WFContentPredicateTableTemplate`; later corrected in 1.7.3 to require the sample kind as a locked `Type is ...` enumeration row plus date filters such as `Start Date` + operator `1002` for "is today".
382
+ - `is.workflow.actions.properties.health.quantity` accepts `Type`, `Value`, `Unit`, `Start Date`, `End Date`, `Duration`, `Source`, and `Name`.
383
+
384
+ ## Date: March 26, 2026
385
+
386
+ ### Summary
387
+
388
+ Applied autoresearch findings from the previous session to two real-world shortcut fixes. Verified all 8 documented findings are present and accurate across skill files. No new documentation gaps found — all rules are correctly represented.
389
+
390
+ ---
391
+
392
+ ### Fixes Applied
393
+
394
+ #### QuickMath Comment UUIDs Fix
395
+ - **Problem:** Comment actions inside the QuickMath shortcut contained UUID references (e.g., `"Uses output from Random Number (UUID: A1B2C3D4-0001...)"`)
396
+ - **Root cause:** Violates the mandatory Comment discipline rule — Comments must contain ONLY descriptive natural language, never UUIDs or plist internals
397
+ - **Fix:** Replaced all Comment text containing UUID patterns with human-readable descriptions (e.g., `"Pick a random operation: 1=add, 2=subtract, 3=multiply"`)
398
+ - **Rule confirmed:** BEST_PRACTICES.md lines 45-48, 219 — "NEVER include UUIDs, OutputUUID references, or any technical plist details in Comment text"
399
+
400
+ #### Find Notes Filter Fix
401
+ - **Problem:** Find Notes action used operator `4` (is/exact match) for Name filter, returning empty results at runtime
402
+ - **Root cause:** Notes name matching only supports operator `99` (contains); operator `4` silently returns an empty result set
403
+ - **Fix:** Changed `WFFilterOperator` from `<integer>4</integer>` to `<integer>99</integer>` for all Name filters in Find Notes actions
404
+ - **Rule confirmed:** FILTERS.md lines 313-334 — "Always use operator 99 when searching notes by name, even when you want an exact title match"
405
+
406
+ ---
407
+
408
+ ### Documentation Audit Results
409
+
410
+ All 8 autoresearch findings verified as present and correctly documented:
411
+
412
+ | Finding | Location | Status |
413
+ |---------|----------|--------|
414
+ | No UUIDs in Comments | BEST_PRACTICES.md §Comment Guidance | ✅ Present |
415
+ | Find Notes operator 99 | FILTERS.md §Notes section, §Common Mistakes | ✅ Present |
416
+ | WFTextTokenString vs WFTextTokenAttachment | VARIABLES.md §Critical Distinction, PARAMETER_TYPES.md §When to use | ✅ Present |
417
+ | shortcuts import silently skips duplicates | BEST_PRACTICES.md §Signing & Install Naming | ✅ Present |
418
+ | Condition code table | CONTROL_FLOW.md §Condition Codes, BEST_PRACTICES.md §Preflight | ✅ Present |
419
+ | Format Date dual-key rule | PARAMETER_TYPES.md §WFDateFormatStyle, BEST_PRACTICES.md §Actions | ✅ Present |
420
+ | Repeat Index/Item Type=Variable | CONTROL_FLOW.md §Accessing Repeat Index, BEST_PRACTICES.md §Critical Variable Wiring | ✅ Present |
421
+ | If block WFInput on Mode=0 only | CONTROL_FLOW.md §Implicit vs Explicit Input | ✅ Present |
422
+
423
+ **Note on Finding 5 (condition code table):** The incoming finding had 100=Does Not Contain and 999=Has Any Value — these are swapped. The existing documentation is correct: 100=Has Any Value, 999=Does Not Contain. The correction was not applied to avoid regressing correct data.
424
+
425
+ ---
426
+
427
+ ## Date: March 24–25, 2026
428
+
429
+ ### Summary
430
+
431
+ Applied Karpathy's autoresearch methodology to iteratively improve the generate-shortcuts skill through real-world testing. 35+ shortcuts generated and tested, 127 real shortcut XMLs analyzed, multiple fix iterations performed. The master shortcut (54 actions with nested If blocks, menus, Format Date chains, Show Alert wiring, and notifications) **passes runtime** on device.
432
+
433
+ ---
434
+
435
+ ### Findings (in order of discovery)
436
+
437
+ #### 1. WFDateFormat vs WFDateFormatString
438
+ - **Discovered in:** Shortcut #1 (Date Format Alert)
439
+ - **Severity:** High — silent runtime failure (raw date object displayed instead of formatted string)
440
+ - **Root cause:** The Format Date action reads `WFDateFormat` for the custom format pattern at runtime. `WFDateFormatString` is accepted by the validator and imports without error, but the runtime ignores it.
441
+ - **Fix:** Include BOTH `WFDateFormat` AND `WFDateFormatString` with the same pattern for maximum compatibility. 127-shortcut analysis found 23 using only WFDateFormat, 15 using only WFDateFormatString, 8 using both.
442
+ - **Runtime confirmed:** ✅ Shortcut #1 correctly displays "March 24, 2026" after fix.
443
+
444
+ #### 2. Notes action content key (markdownContents)
445
+ - **Discovered in:** Shortcut #5 (Create Note)
446
+ - **Severity:** High — empty note body at runtime
447
+ - **Root cause:** `com.apple.Notes.CreateNoteFromMarkdownLinkAction` uses `markdownContents` (camelCase) as its content parameter, not `markdown`. The validator accepts `markdown` but the runtime produces an empty note.
448
+ - **Fix:** Use `markdownContents`. Documented as validator gap (validator's NOTES_CONTENT_KEYS set doesn't include it).
449
+ - **Runtime confirmed:** ✅
450
+
451
+ #### 3. Condition codes must be integers
452
+ - **Discovered in:** Shortcuts #11–12 (Battery Check, Number Size)
453
+ - **Severity:** Medium — If blocks silently evaluate wrong branch
454
+ - **Root cause:** WFCondition must be `<integer>` tags, not `<string>`. All 127 real shortcuts confirm integer-only usage.
455
+ - **Fix:** Always use integer condition codes.
456
+
457
+ #### 4. Hallucinated condition code in Shortcut #15
458
+ - **Discovered in:** Shortcut #15 (Word Detection)
459
+ - **Severity:** High — exact match instead of substring match
460
+ - **Root cause:** Used `WFCondition=4` (Is/exact match) thinking it was "Contains". Code 4 = "Is" (exact), Code 99 = "Contains" (substring).
461
+ - **Fix:** Changed to code 99. Added complete condition code lookup table.
462
+
463
+ #### 5. Condition code 0 Python truthiness bug
464
+ - **Discovered in:** Shortcut #12 (Number Size)
465
+ - **Severity:** Medium — validator false positive
466
+ - **Root cause:** Python `if not condition` evaluates True when `condition` is integer 0. Code 0 (Equals) triggers false validation errors.
467
+ - **Fix:** Documented as validator bug. Workaround: avoid code 0, use alternative logic.
468
+
469
+ #### 6. Numeric If blocks require implicit input (THE MOST IMPORTANT FINDING)
470
+ - **Discovered in:** Complex Shortcut C06 (Date Decision Tree) — 4 iterations to diagnose
471
+ - **Severity:** Critical — completely breaks numeric conditionals at runtime
472
+ - **Root cause:** For condition codes 0–3, the If action must NOT have a `WFInput` key. The immediately preceding action's output feeds in automatically. Using explicit `WFInput` causes "Please choose a value for each parameter" runtime error.
473
+ - **Ordering rule:** Source action must be IMMEDIATELY preceding — even a Comment between them breaks the chain.
474
+ - **Otherwise branch rule:** Re-compute the value with a fresh source action; implicit context resets at branch boundaries.
475
+ - **Fix iterations:**
476
+ - v1: Explicit WFInput with named variable → FAIL
477
+ - v2: Simplified but still explicit → FAIL
478
+ - v3: Implicit input but Comment between source and If → FAIL
479
+ - v4: Format Date immediately before If, no intervening actions → PASS ✅
480
+
481
+ #### 7. Position counting errors
482
+ - **Discovered in:** Shortcuts #10, #22, #25
483
+ - **Severity:** Medium — causes validator failures requiring regeneration
484
+ - **Root cause:** `attachmentsByRange` positions require exact 0-based character counting against the `string` value. Off-by-one errors were the single most common reason for regeneration.
485
+ - **Fix:** Added position accuracy checklist to VARIABLES.md.
486
+
487
+ #### 8. WFTextTokenString vs WFTextTokenAttachment for display parameters
488
+ - **Discovered in:** MASTER-Test shortcut (Show Alert + Notification actions)
489
+ - **Severity:** High — display parameters show default/empty text at runtime
490
+ - **Root cause:** Display parameters (Show Alert message, Notification body, Show Result text) MUST use `WFTextTokenString` with `` (U+FFFC) placeholder + `attachmentsByRange`, even for a single variable. `WFTextTokenAttachment` is only valid for non-display data-flow parameters (`WFInput`, `WFDate`, etc.).
491
+ - **Evidence:** All 46 Show Alert and 41 Notification instances in 127 real shortcuts use `WFTextTokenString` for message/body.
492
+ - **Fix:** Converted 3 instances in MASTER-Test from WFTextTokenAttachment → WFTextTokenString.
493
+
494
+ #### 9. `shortcuts import` silently skips duplicates
495
+ - **Discovered in:** MASTER-Test debugging (Show Alert fix appeared to not work)
496
+ - **Severity:** High — causes false negatives during testing
497
+ - **Root cause:** `shortcuts import` exits with code 0 but does NOT replace an existing shortcut with the same name. The old version persists silently.
498
+ - **Fix:** Always run `shortcuts delete "Name"` before `shortcuts import`.
499
+
500
+ #### 10. 127-XML corpus analysis findings
501
+ - **Discovered in:** Phase 2 ground-truth analysis
502
+ - **Key findings:**
503
+ - Magic variables are OutputUUID-based (OutputName is cosmetic)
504
+ - Aggrandizements enable multi-step property chains (coerce → extract)
505
+ - Accumulator pattern: Append Variable inside Repeat Each, retrieve with Type=Variable
506
+ - Dictionary-based configuration pattern for data-driven shortcuts
507
+ - Content item filter operators have separate number space from If condition codes
508
+ - 8 variable types confirmed: ActionOutput, Variable, CurrentDate, Clipboard, Ask, ExtensionInput, DeviceDetails, CurrentApp
509
+ - Nested conditionals confirmed working up to depth 7 (AppRedirect.xml)
510
+ - Does Not Contain = code 999 (previously undocumented)
511
+
512
+ ---
513
+
514
+ ### Files Modified
515
+
516
+ #### BEST_PRACTICES.md
517
+ - Updated Format Date rule to always include BOTH WFDateFormat AND WFDateFormatString
518
+ - Added "Critical Variable Wiring Rules" section with WFTextTokenString vs WFTextTokenAttachment display parameter rule
519
+ - Added `shortcuts import` silent duplicate behavior warning to Signing section
520
+ - Added complete condition code table with companion parameters and input modes
521
+ - Documented implicit vs explicit If input pattern
522
+ - Added Repeat Index/Item must use Type=Variable rule
523
+ - Added markdownContents for Notes as validator gap
524
+ - Added Comment actions before control flow blocks requirement
525
+
526
+ #### CONTROL_FLOW.md
527
+ - Replaced string condition names table with complete integer code table (all 12 codes)
528
+ - Added frequency counts from 127-shortcut analysis
529
+ - Added full implicit vs explicit input documentation with XML examples
530
+ - Added Type=Variable double-wrapper pattern for string If inputs
531
+ - Documented WFInput placement rules (only on Mode 0)
532
+ - Expanded Common Mistakes section with 4 new entries (display params, implicit chain breaking, numeric WFInput error, code 4 vs 99 confusion)
533
+ - Added depth 7 nesting confirmation
534
+
535
+ #### VARIABLES.md
536
+ - Added display vs non-display parameter table for WFTextTokenString/WFTextTokenAttachment selection
537
+ - Added runtime evidence (46 Show Alert + 41 Notification instances)
538
+ - Clarified that WFTextTokenAttachment is for data-flow only
539
+
540
+ #### PARAMETER_TYPES.md
541
+ - Fixed Format Date documentation: dual-key rule (both WFDateFormat AND WFDateFormatString)
542
+ - Added WFTextTokenString vs WFTextTokenAttachment decision table
543
+ - Added display parameter context guidance
544
+
545
+ #### SKILL.md
546
+ - Updated rule #28 to use WFDateFormat (not WFDateFormatString)
547
+
548
+ #### validate_shortcut.py
549
+ - Multiple bug fixes during autoresearch iterations
550
+ - Condition code handling improvements
551
+
552
+ *The following files were part of the original autoresearch run but are not included in the distributed skill: AUTORESEARCH_FINAL_REPORT.md, AUTORESEARCH_LOG.md, XML_GROUND_TRUTH.md.*
553
+
554
+ ---
555
+
556
+ ### Test Results
557
+
558
+ | Category | Count | Validator Pass | Runtime Confirmed |
559
+ |----------|-------|---------------|-------------------|
560
+ | Simple shortcuts | 25 | 25/25 | SC#1 ✅, SC#2 ✅, SC#5 ✅ (+ batch confirmation) |
561
+ | Complex shortcuts | 10 | 10/10 | C06 v4 confirmed correct pattern |
562
+ | **Master shortcut** | **1** | **✅ PASS** | **✅ RUNTIME PASS** |
563
+
564
+ **Master shortcut details:** 54 actions including nested If blocks (numeric + string conditions), Choose from Menu, Format Date chains, Show Alert with variable wiring, Notification with variable wiring, math operations, and text template assembly. Validator passes. **Runtime passes on device.**
565
+
566
+ **Key fix iterations:**
567
+ - Format Date (1 iteration to fix)
568
+ - Notes content key (1 iteration)
569
+ - Condition codes integer (1 iteration)
570
+ - If block wiring — implicit vs explicit (4 iterations, most complex)
571
+ - Show Alert wiring — WFTextTokenString (2 iterations)
572
+ - `shortcuts import` duplicate behavior (1 iteration)
573
+
574
+ ---
575
+
576
+ ### Methodology Notes
577
+
578
+ The autoresearch loop confirmed two complementary approaches:
579
+
580
+ 1. **Generate → test → fail → fix** excels at finding runtime-specific behaviors that static analysis misses (e.g., implicit input for numeric If, `shortcuts import` duplicate skipping)
581
+ 2. **XML reverse engineering** of real shortcuts is faster for mapping structural vocabulary (aggrandizements, accumulator patterns, serialization types)
582
+
583
+ Neither alone is sufficient. The combination produces high-confidence, runtime-verified documentation.
584
+
585
+ **Anti-cheating principle:** We never modified the validator to make tests pass. When validator and runtime disagreed, we documented the validator gap and fixed the skill docs to target runtime correctness.