diff --git a/.claude/skills/cf-edit/scripts/cf-edit.ps1 b/.claude/skills/cf-edit/scripts/cf-edit.ps1 index d6a187649..60ddc4b02 100644 --- a/.claude/skills/cf-edit/scripts/cf-edit.ps1 +++ b/.claude/skills/cf-edit/scripts/cf-edit.ps1 @@ -23,8 +23,9 @@ function ConvertFrom-JsonInput([string]$text, [string]$source, [string]$expected } catch { $what = if ($expected) { "$source expects $expected" } else { "Invalid JSON in $source" } $got = ($text -replace '\s+', ' ').Trim() - if ($got.Length -gt 60) { $got = $got.Substring(0, 60) + '...' } - [Console]::Error.WriteLine("[ERROR] ${what}, got: ${got} ($($_.Exception.Message))") + $label = 'got' + if ($got.Length -gt 60) { $label = 'got (first 60 chars, whitespace collapsed)'; $got = $got.Substring(0, 60) } + [Console]::Error.WriteLine("[ERROR] ${what}, ${label}: ${got} ($($_.Exception.Message))") exit 1 } Write-Output -NoEnumerate $parsed diff --git a/.claude/skills/cf-edit/scripts/cf-edit.py b/.claude/skills/cf-edit/scripts/cf-edit.py index 68a5954f8..def75d863 100644 --- a/.claude/skills/cf-edit/scripts/cf-edit.py +++ b/.claude/skills/cf-edit/scripts/cf-edit.py @@ -31,9 +31,11 @@ def parse_json_input(text, source, expected=None): except ValueError as exc: what = "%s expects %s" % (source, expected) if expected else "Invalid JSON in %s" % source got = " ".join(str(text).split()) + label = "got" if len(got) > 60: - got = got[:60] + "..." - print("[ERROR] %s, got: %s (%s)" % (what, got, exc), file=_psys.stderr) + label = "got (first 60 chars, whitespace collapsed)" + got = got[:60] + print("[ERROR] %s, %s: %s (%s)" % (what, label, got, exc), file=_psys.stderr) _psys.exit(1) diff --git a/.claude/skills/form-compile/scripts/form-compile.ps1 b/.claude/skills/form-compile/scripts/form-compile.ps1 index 7c170ee91..1c30ddceb 100644 --- a/.claude/skills/form-compile/scripts/form-compile.ps1 +++ b/.claude/skills/form-compile/scripts/form-compile.ps1 @@ -27,8 +27,9 @@ function ConvertFrom-JsonInput([string]$text, [string]$source, [string]$expected } catch { $what = if ($expected) { "$source expects $expected" } else { "Invalid JSON in $source" } $got = ($text -replace '\s+', ' ').Trim() - if ($got.Length -gt 60) { $got = $got.Substring(0, 60) + '...' } - [Console]::Error.WriteLine("[ERROR] ${what}, got: ${got} ($($_.Exception.Message))") + $label = 'got' + if ($got.Length -gt 60) { $label = 'got (first 60 chars, whitespace collapsed)'; $got = $got.Substring(0, 60) } + [Console]::Error.WriteLine("[ERROR] ${what}, ${label}: ${got} ($($_.Exception.Message))") exit 1 } Write-Output -NoEnumerate $parsed diff --git a/.claude/skills/form-compile/scripts/form-compile.py b/.claude/skills/form-compile/scripts/form-compile.py index 96b091053..6361e1c64 100644 --- a/.claude/skills/form-compile/scripts/form-compile.py +++ b/.claude/skills/form-compile/scripts/form-compile.py @@ -32,9 +32,11 @@ def parse_json_input(text, source, expected=None): except ValueError as exc: what = "%s expects %s" % (source, expected) if expected else "Invalid JSON in %s" % source got = " ".join(str(text).split()) + label = "got" if len(got) > 60: - got = got[:60] + "..." - print("[ERROR] %s, got: %s (%s)" % (what, got, exc), file=_psys.stderr) + label = "got (first 60 chars, whitespace collapsed)" + got = got[:60] + print("[ERROR] %s, %s: %s (%s)" % (what, label, got, exc), file=_psys.stderr) _psys.exit(1) diff --git a/.claude/skills/form-edit/scripts/form-edit.ps1 b/.claude/skills/form-edit/scripts/form-edit.ps1 index 91d22d1b8..702ebfb66 100644 --- a/.claude/skills/form-edit/scripts/form-edit.ps1 +++ b/.claude/skills/form-edit/scripts/form-edit.ps1 @@ -23,8 +23,9 @@ function ConvertFrom-JsonInput([string]$text, [string]$source, [string]$expected } catch { $what = if ($expected) { "$source expects $expected" } else { "Invalid JSON in $source" } $got = ($text -replace '\s+', ' ').Trim() - if ($got.Length -gt 60) { $got = $got.Substring(0, 60) + '...' } - [Console]::Error.WriteLine("[ERROR] ${what}, got: ${got} ($($_.Exception.Message))") + $label = 'got' + if ($got.Length -gt 60) { $label = 'got (first 60 chars, whitespace collapsed)'; $got = $got.Substring(0, 60) } + [Console]::Error.WriteLine("[ERROR] ${what}, ${label}: ${got} ($($_.Exception.Message))") exit 1 } Write-Output -NoEnumerate $parsed diff --git a/.claude/skills/form-edit/scripts/form-edit.py b/.claude/skills/form-edit/scripts/form-edit.py index 53e2aa81c..f697e9c2b 100644 --- a/.claude/skills/form-edit/scripts/form-edit.py +++ b/.claude/skills/form-edit/scripts/form-edit.py @@ -30,9 +30,11 @@ def parse_json_input(text, source, expected=None): except ValueError as exc: what = "%s expects %s" % (source, expected) if expected else "Invalid JSON in %s" % source got = " ".join(str(text).split()) + label = "got" if len(got) > 60: - got = got[:60] + "..." - print("[ERROR] %s, got: %s (%s)" % (what, got, exc), file=_psys.stderr) + label = "got (first 60 chars, whitespace collapsed)" + got = got[:60] + print("[ERROR] %s, %s: %s (%s)" % (what, label, got, exc), file=_psys.stderr) _psys.exit(1) diff --git a/.claude/skills/interface-edit/scripts/interface-edit.ps1 b/.claude/skills/interface-edit/scripts/interface-edit.ps1 index 2d5e82c95..77c4b8227 100644 --- a/.claude/skills/interface-edit/scripts/interface-edit.ps1 +++ b/.claude/skills/interface-edit/scripts/interface-edit.ps1 @@ -29,8 +29,9 @@ function ConvertFrom-JsonInput([string]$text, [string]$source, [string]$expected } catch { $what = if ($expected) { "$source expects $expected" } else { "Invalid JSON in $source" } $got = ($text -replace '\s+', ' ').Trim() - if ($got.Length -gt 60) { $got = $got.Substring(0, 60) + '...' } - [Console]::Error.WriteLine("[ERROR] ${what}, got: ${got} ($($_.Exception.Message))") + $label = 'got' + if ($got.Length -gt 60) { $label = 'got (first 60 chars, whitespace collapsed)'; $got = $got.Substring(0, 60) } + [Console]::Error.WriteLine("[ERROR] ${what}, ${label}: ${got} ($($_.Exception.Message))") exit 1 } Write-Output -NoEnumerate $parsed diff --git a/.claude/skills/interface-edit/scripts/interface-edit.py b/.claude/skills/interface-edit/scripts/interface-edit.py index 11fe90a01..dadbdaebe 100644 --- a/.claude/skills/interface-edit/scripts/interface-edit.py +++ b/.claude/skills/interface-edit/scripts/interface-edit.py @@ -364,9 +364,11 @@ def parse_json_input(text, source, expected=None): except ValueError as exc: what = "%s expects %s" % (source, expected) if expected else "Invalid JSON in %s" % source got = " ".join(str(text).split()) + label = "got" if len(got) > 60: - got = got[:60] + "..." - print("[ERROR] %s, got: %s (%s)" % (what, got, exc), file=_psys.stderr) + label = "got (first 60 chars, whitespace collapsed)" + got = got[:60] + print("[ERROR] %s, %s: %s (%s)" % (what, label, got, exc), file=_psys.stderr) _psys.exit(1) diff --git a/.claude/skills/meta-compile/scripts/meta-compile.ps1 b/.claude/skills/meta-compile/scripts/meta-compile.ps1 index b304352ad..10b3fe7a9 100644 --- a/.claude/skills/meta-compile/scripts/meta-compile.ps1 +++ b/.claude/skills/meta-compile/scripts/meta-compile.ps1 @@ -22,8 +22,9 @@ function ConvertFrom-JsonInput([string]$text, [string]$source, [string]$expected } catch { $what = if ($expected) { "$source expects $expected" } else { "Invalid JSON in $source" } $got = ($text -replace '\s+', ' ').Trim() - if ($got.Length -gt 60) { $got = $got.Substring(0, 60) + '...' } - [Console]::Error.WriteLine("[ERROR] ${what}, got: ${got} ($($_.Exception.Message))") + $label = 'got' + if ($got.Length -gt 60) { $label = 'got (first 60 chars, whitespace collapsed)'; $got = $got.Substring(0, 60) } + [Console]::Error.WriteLine("[ERROR] ${what}, ${label}: ${got} ($($_.Exception.Message))") exit 1 } Write-Output -NoEnumerate $parsed diff --git a/.claude/skills/meta-compile/scripts/meta-compile.py b/.claude/skills/meta-compile/scripts/meta-compile.py index 4fca1b998..f452df6b9 100644 --- a/.claude/skills/meta-compile/scripts/meta-compile.py +++ b/.claude/skills/meta-compile/scripts/meta-compile.py @@ -40,9 +40,11 @@ def parse_json_input(text, source, expected=None): except ValueError as exc: what = "%s expects %s" % (source, expected) if expected else "Invalid JSON in %s" % source got = " ".join(str(text).split()) + label = "got" if len(got) > 60: - got = got[:60] + "..." - print("[ERROR] %s, got: %s (%s)" % (what, got, exc), file=_psys.stderr) + label = "got (first 60 chars, whitespace collapsed)" + got = got[:60] + print("[ERROR] %s, %s: %s (%s)" % (what, label, got, exc), file=_psys.stderr) _psys.exit(1) diff --git a/.claude/skills/meta-edit/scripts/meta-edit.ps1 b/.claude/skills/meta-edit/scripts/meta-edit.ps1 index ff3755da3..46feb7b0d 100644 --- a/.claude/skills/meta-edit/scripts/meta-edit.ps1 +++ b/.claude/skills/meta-edit/scripts/meta-edit.ps1 @@ -44,8 +44,9 @@ function ConvertFrom-JsonInput([string]$text, [string]$source, [string]$expected } catch { $what = if ($expected) { "$source expects $expected" } else { "Invalid JSON in $source" } $got = ($text -replace '\s+', ' ').Trim() - if ($got.Length -gt 60) { $got = $got.Substring(0, 60) + '...' } - [Console]::Error.WriteLine("[ERROR] ${what}, got: ${got} ($($_.Exception.Message))") + $label = 'got' + if ($got.Length -gt 60) { $label = 'got (first 60 chars, whitespace collapsed)'; $got = $got.Substring(0, 60) } + [Console]::Error.WriteLine("[ERROR] ${what}, ${label}: ${got} ($($_.Exception.Message))") exit 1 } Write-Output -NoEnumerate $parsed diff --git a/.claude/skills/meta-edit/scripts/meta-edit.py b/.claude/skills/meta-edit/scripts/meta-edit.py index 8141e0367..af0855fb3 100644 --- a/.claude/skills/meta-edit/scripts/meta-edit.py +++ b/.claude/skills/meta-edit/scripts/meta-edit.py @@ -30,9 +30,11 @@ def parse_json_input(text, source, expected=None): except ValueError as exc: what = "%s expects %s" % (source, expected) if expected else "Invalid JSON in %s" % source got = " ".join(str(text).split()) + label = "got" if len(got) > 60: - got = got[:60] + "..." - print("[ERROR] %s, got: %s (%s)" % (what, got, exc), file=_psys.stderr) + label = "got (first 60 chars, whitespace collapsed)" + got = got[:60] + print("[ERROR] %s, %s: %s (%s)" % (what, label, got, exc), file=_psys.stderr) _psys.exit(1) diff --git a/.claude/skills/mxl-compile/scripts/mxl-compile.ps1 b/.claude/skills/mxl-compile/scripts/mxl-compile.ps1 index 663477631..3c6f0846c 100644 --- a/.claude/skills/mxl-compile/scripts/mxl-compile.ps1 +++ b/.claude/skills/mxl-compile/scripts/mxl-compile.ps1 @@ -22,8 +22,9 @@ function ConvertFrom-JsonInput([string]$text, [string]$source, [string]$expected } catch { $what = if ($expected) { "$source expects $expected" } else { "Invalid JSON in $source" } $got = ($text -replace '\s+', ' ').Trim() - if ($got.Length -gt 60) { $got = $got.Substring(0, 60) + '...' } - [Console]::Error.WriteLine("[ERROR] ${what}, got: ${got} ($($_.Exception.Message))") + $label = 'got' + if ($got.Length -gt 60) { $label = 'got (first 60 chars, whitespace collapsed)'; $got = $got.Substring(0, 60) } + [Console]::Error.WriteLine("[ERROR] ${what}, ${label}: ${got} ($($_.Exception.Message))") exit 1 } Write-Output -NoEnumerate $parsed diff --git a/.claude/skills/mxl-compile/scripts/mxl-compile.py b/.claude/skills/mxl-compile/scripts/mxl-compile.py index ddf7d4fd7..83d91f16d 100644 --- a/.claude/skills/mxl-compile/scripts/mxl-compile.py +++ b/.claude/skills/mxl-compile/scripts/mxl-compile.py @@ -30,9 +30,11 @@ def parse_json_input(text, source, expected=None): except ValueError as exc: what = "%s expects %s" % (source, expected) if expected else "Invalid JSON in %s" % source got = " ".join(str(text).split()) + label = "got" if len(got) > 60: - got = got[:60] + "..." - print("[ERROR] %s, got: %s (%s)" % (what, got, exc), file=_psys.stderr) + label = "got (first 60 chars, whitespace collapsed)" + got = got[:60] + print("[ERROR] %s, %s: %s (%s)" % (what, label, got, exc), file=_psys.stderr) _psys.exit(1) diff --git a/.claude/skills/role-compile/scripts/role-compile.ps1 b/.claude/skills/role-compile/scripts/role-compile.ps1 index 78a3c76a0..9d3895176 100644 --- a/.claude/skills/role-compile/scripts/role-compile.ps1 +++ b/.claude/skills/role-compile/scripts/role-compile.ps1 @@ -22,8 +22,9 @@ function ConvertFrom-JsonInput([string]$text, [string]$source, [string]$expected } catch { $what = if ($expected) { "$source expects $expected" } else { "Invalid JSON in $source" } $got = ($text -replace '\s+', ' ').Trim() - if ($got.Length -gt 60) { $got = $got.Substring(0, 60) + '...' } - [Console]::Error.WriteLine("[ERROR] ${what}, got: ${got} ($($_.Exception.Message))") + $label = 'got' + if ($got.Length -gt 60) { $label = 'got (first 60 chars, whitespace collapsed)'; $got = $got.Substring(0, 60) } + [Console]::Error.WriteLine("[ERROR] ${what}, ${label}: ${got} ($($_.Exception.Message))") exit 1 } Write-Output -NoEnumerate $parsed diff --git a/.claude/skills/role-compile/scripts/role-compile.py b/.claude/skills/role-compile/scripts/role-compile.py index e965ce1be..fcf1cc0b3 100644 --- a/.claude/skills/role-compile/scripts/role-compile.py +++ b/.claude/skills/role-compile/scripts/role-compile.py @@ -30,9 +30,11 @@ def parse_json_input(text, source, expected=None): except ValueError as exc: what = "%s expects %s" % (source, expected) if expected else "Invalid JSON in %s" % source got = " ".join(str(text).split()) + label = "got" if len(got) > 60: - got = got[:60] + "..." - print("[ERROR] %s, got: %s (%s)" % (what, got, exc), file=_psys.stderr) + label = "got (first 60 chars, whitespace collapsed)" + got = got[:60] + print("[ERROR] %s, %s: %s (%s)" % (what, label, got, exc), file=_psys.stderr) _psys.exit(1) diff --git a/.claude/skills/skd-compile/scripts/skd-compile.ps1 b/.claude/skills/skd-compile/scripts/skd-compile.ps1 index aad8e741c..903b57623 100644 --- a/.claude/skills/skd-compile/scripts/skd-compile.ps1 +++ b/.claude/skills/skd-compile/scripts/skd-compile.ps1 @@ -21,8 +21,9 @@ function ConvertFrom-JsonInput([string]$text, [string]$source, [string]$expected } catch { $what = if ($expected) { "$source expects $expected" } else { "Invalid JSON in $source" } $got = ($text -replace '\s+', ' ').Trim() - if ($got.Length -gt 60) { $got = $got.Substring(0, 60) + '...' } - [Console]::Error.WriteLine("[ERROR] ${what}, got: ${got} ($($_.Exception.Message))") + $label = 'got' + if ($got.Length -gt 60) { $label = 'got (first 60 chars, whitespace collapsed)'; $got = $got.Substring(0, 60) } + [Console]::Error.WriteLine("[ERROR] ${what}, ${label}: ${got} ($($_.Exception.Message))") exit 1 } Write-Output -NoEnumerate $parsed diff --git a/.claude/skills/skd-compile/scripts/skd-compile.py b/.claude/skills/skd-compile/scripts/skd-compile.py index 2bd1dda43..321fd187b 100644 --- a/.claude/skills/skd-compile/scripts/skd-compile.py +++ b/.claude/skills/skd-compile/scripts/skd-compile.py @@ -29,9 +29,11 @@ def parse_json_input(text, source, expected=None): except ValueError as exc: what = "%s expects %s" % (source, expected) if expected else "Invalid JSON in %s" % source got = " ".join(str(text).split()) + label = "got" if len(got) > 60: - got = got[:60] + "..." - print("[ERROR] %s, got: %s (%s)" % (what, got, exc), file=_psys.stderr) + label = "got (first 60 chars, whitespace collapsed)" + got = got[:60] + print("[ERROR] %s, %s: %s (%s)" % (what, label, got, exc), file=_psys.stderr) _psys.exit(1) diff --git a/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 b/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 index 9a8f4a097..0eaa19418 100644 --- a/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 +++ b/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 @@ -22,8 +22,9 @@ function ConvertFrom-JsonInput([string]$text, [string]$source, [string]$expected } catch { $what = if ($expected) { "$source expects $expected" } else { "Invalid JSON in $source" } $got = ($text -replace '\s+', ' ').Trim() - if ($got.Length -gt 60) { $got = $got.Substring(0, 60) + '...' } - [Console]::Error.WriteLine("[ERROR] ${what}, got: ${got} ($($_.Exception.Message))") + $label = 'got' + if ($got.Length -gt 60) { $label = 'got (first 60 chars, whitespace collapsed)'; $got = $got.Substring(0, 60) } + [Console]::Error.WriteLine("[ERROR] ${what}, ${label}: ${got} ($($_.Exception.Message))") exit 1 } Write-Output -NoEnumerate $parsed diff --git a/.claude/skills/skd-decompile/scripts/skd-decompile.py b/.claude/skills/skd-decompile/scripts/skd-decompile.py index e8b78b8e2..d3a64ef7a 100644 --- a/.claude/skills/skd-decompile/scripts/skd-decompile.py +++ b/.claude/skills/skd-decompile/scripts/skd-decompile.py @@ -26,9 +26,11 @@ def parse_json_input(text, source, expected=None): except ValueError as exc: what = "%s expects %s" % (source, expected) if expected else "Invalid JSON in %s" % source got = " ".join(str(text).split()) + label = "got" if len(got) > 60: - got = got[:60] + "..." - print("[ERROR] %s, got: %s (%s)" % (what, got, exc), file=_psys.stderr) + label = "got (first 60 chars, whitespace collapsed)" + got = got[:60] + print("[ERROR] %s, %s: %s (%s)" % (what, label, got, exc), file=_psys.stderr) _psys.exit(1) diff --git a/.claude/skills/subsystem-compile/scripts/subsystem-compile.ps1 b/.claude/skills/subsystem-compile/scripts/subsystem-compile.ps1 index b21e59deb..86ac4cb91 100644 --- a/.claude/skills/subsystem-compile/scripts/subsystem-compile.ps1 +++ b/.claude/skills/subsystem-compile/scripts/subsystem-compile.ps1 @@ -22,8 +22,9 @@ function ConvertFrom-JsonInput([string]$text, [string]$source, [string]$expected } catch { $what = if ($expected) { "$source expects $expected" } else { "Invalid JSON in $source" } $got = ($text -replace '\s+', ' ').Trim() - if ($got.Length -gt 60) { $got = $got.Substring(0, 60) + '...' } - [Console]::Error.WriteLine("[ERROR] ${what}, got: ${got} ($($_.Exception.Message))") + $label = 'got' + if ($got.Length -gt 60) { $label = 'got (first 60 chars, whitespace collapsed)'; $got = $got.Substring(0, 60) } + [Console]::Error.WriteLine("[ERROR] ${what}, ${label}: ${got} ($($_.Exception.Message))") exit 1 } Write-Output -NoEnumerate $parsed diff --git a/.claude/skills/subsystem-compile/scripts/subsystem-compile.py b/.claude/skills/subsystem-compile/scripts/subsystem-compile.py index 5ed621ea2..b09a6e610 100644 --- a/.claude/skills/subsystem-compile/scripts/subsystem-compile.py +++ b/.claude/skills/subsystem-compile/scripts/subsystem-compile.py @@ -30,9 +30,11 @@ def parse_json_input(text, source, expected=None): except ValueError as exc: what = "%s expects %s" % (source, expected) if expected else "Invalid JSON in %s" % source got = " ".join(str(text).split()) + label = "got" if len(got) > 60: - got = got[:60] + "..." - print("[ERROR] %s, got: %s (%s)" % (what, got, exc), file=_psys.stderr) + label = "got (first 60 chars, whitespace collapsed)" + got = got[:60] + print("[ERROR] %s, %s: %s (%s)" % (what, label, got, exc), file=_psys.stderr) _psys.exit(1) diff --git a/.claude/skills/subsystem-edit/scripts/subsystem-edit.ps1 b/.claude/skills/subsystem-edit/scripts/subsystem-edit.ps1 index 476ac16c6..f10e3c816 100644 --- a/.claude/skills/subsystem-edit/scripts/subsystem-edit.ps1 +++ b/.claude/skills/subsystem-edit/scripts/subsystem-edit.ps1 @@ -23,8 +23,9 @@ function ConvertFrom-JsonInput([string]$text, [string]$source, [string]$expected } catch { $what = if ($expected) { "$source expects $expected" } else { "Invalid JSON in $source" } $got = ($text -replace '\s+', ' ').Trim() - if ($got.Length -gt 60) { $got = $got.Substring(0, 60) + '...' } - [Console]::Error.WriteLine("[ERROR] ${what}, got: ${got} ($($_.Exception.Message))") + $label = 'got' + if ($got.Length -gt 60) { $label = 'got (first 60 chars, whitespace collapsed)'; $got = $got.Substring(0, 60) } + [Console]::Error.WriteLine("[ERROR] ${what}, ${label}: ${got} ($($_.Exception.Message))") exit 1 } Write-Output -NoEnumerate $parsed diff --git a/.claude/skills/subsystem-edit/scripts/subsystem-edit.py b/.claude/skills/subsystem-edit/scripts/subsystem-edit.py index 88cc352cb..6d7e1df69 100644 --- a/.claude/skills/subsystem-edit/scripts/subsystem-edit.py +++ b/.claude/skills/subsystem-edit/scripts/subsystem-edit.py @@ -30,9 +30,11 @@ def parse_json_input(text, source, expected=None): except ValueError as exc: what = "%s expects %s" % (source, expected) if expected else "Invalid JSON in %s" % source got = " ".join(str(text).split()) + label = "got" if len(got) > 60: - got = got[:60] + "..." - print("[ERROR] %s, got: %s (%s)" % (what, got, exc), file=_psys.stderr) + label = "got (first 60 chars, whitespace collapsed)" + got = got[:60] + print("[ERROR] %s, %s: %s (%s)" % (what, label, got, exc), file=_psys.stderr) _psys.exit(1)