From 96712e1cdf3299b92a844f8d2a11757cd1bd1b7e Mon Sep 17 00:00:00 2001 From: Matt Van Horn Date: Wed, 18 Mar 2026 06:00:16 -0700 Subject: [PATCH] fix(scripts): add explicit positional binding to PowerShell create-new-feature params (#1885) The $Number (Int32) parameter was implicitly receiving positional arguments intended for $FeatureDescription, causing a ParameterBindingArgumentTransformationException when AI agents called the script with positional strings. Add [Parameter(Position = 0)] to $FeatureDescription so it binds first, and mark $Number with [Parameter()] (no Position) so it only binds by name (-Number N). Fixes #1879 Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 --- scripts/powershell/create-new-feature.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/powershell/create-new-feature.ps1 b/scripts/powershell/create-new-feature.ps1 index 31acbe29..17e61bb8 100644 --- a/scripts/powershell/create-new-feature.ps1 +++ b/scripts/powershell/create-new-feature.ps1 @@ -4,9 +4,10 @@ param( [switch]$Json, [string]$ShortName, + [Parameter()] [int]$Number = 0, [switch]$Help, - [Parameter(ValueFromRemainingArguments = $true)] + [Parameter(Position = 0, ValueFromRemainingArguments = $true)] [string[]]$FeatureDescription ) $ErrorActionPreference = 'Stop'