diff --git a/.claude/skills/cfe-validate/SKILL.md b/.claude/skills/cfe-validate/SKILL.md index 4bb2856b..96a5d9ff 100644 --- a/.claude/skills/cfe-validate/SKILL.md +++ b/.claude/skills/cfe-validate/SKILL.md @@ -33,7 +33,7 @@ allowed-tools: ## Команда ```powershell -powershell.exe -NoProfile -File .claude/skills/cfe-validate/scripts/cfe-validate.ps1 -ExtensionPath src +powershell.exe -NoProfile -File .claude/skills/cfe-validate/scripts/cfe-validate.ps1 -ExtensionPath "<путь>" ``` ## Проверки (9 шагов) diff --git a/.claude/skills/epf-validate/SKILL.md b/.claude/skills/epf-validate/SKILL.md index 116e15d8..fa8439ff 100644 --- a/.claude/skills/epf-validate/SKILL.md +++ b/.claude/skills/epf-validate/SKILL.md @@ -33,7 +33,7 @@ allowed-tools: ## Команда ```powershell -powershell.exe -NoProfile -File .claude/skills/epf-validate/scripts/epf-validate.ps1 -ObjectPath "<путь>" +powershell.exe -NoProfile -File .claude/skills/epf-validate/scripts/epf-validate.ps1 -ObjectPath "<путь_к_обработке>" ``` ## Проверки diff --git a/.claude/skills/form-validate/SKILL.md b/.claude/skills/form-validate/SKILL.md index 9a07c493..304f23b6 100644 --- a/.claude/skills/form-validate/SKILL.md +++ b/.claude/skills/form-validate/SKILL.md @@ -30,9 +30,11 @@ allowed-tools: ## Команда ```powershell -powershell.exe -NoProfile -File .claude/skills/form-validate/scripts/form-validate.ps1 -FormPath "<путь>" +powershell.exe -NoProfile -File .claude/skills/form-validate/scripts/form-validate.ps1 -FormPath "<.../Forms/ИмяФормы>" ``` +Можно указать директорию формы — скрипт найдёт Ext/Form.xml автоматически. + ## Проверки | # | Проверка | Серьёзность | diff --git a/.claude/skills/form-validate/scripts/form-validate.ps1 b/.claude/skills/form-validate/scripts/form-validate.ps1 index 900ee59a..6f572b98 100644 --- a/.claude/skills/form-validate/scripts/form-validate.ps1 +++ b/.claude/skills/form-validate/scripts/form-validate.ps1 @@ -12,6 +12,27 @@ param( $ErrorActionPreference = "Stop" [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 +# --- Resolve path --- +# A: Directory → Ext/Form.xml +if (Test-Path $FormPath -PathType Container) { + $FormPath = Join-Path (Join-Path $FormPath "Ext") "Form.xml" +} +# B1: Missing Ext/ (e.g. Forms/Форма/Form.xml → Forms/Форма/Ext/Form.xml) +if (-not (Test-Path $FormPath)) { + $fn = [System.IO.Path]::GetFileName($FormPath) + if ($fn -eq "Form.xml") { + $c = Join-Path (Join-Path (Split-Path $FormPath) "Ext") $fn + if (Test-Path $c) { $FormPath = $c } + } +} +# B2: Descriptor (Forms/Форма.xml → Forms/Форма/Ext/Form.xml) +if (-not (Test-Path $FormPath) -and $FormPath.EndsWith(".xml")) { + $stem = [System.IO.Path]::GetFileNameWithoutExtension($FormPath) + $dir = Split-Path $FormPath + $c = Join-Path (Join-Path (Join-Path $dir $stem) "Ext") "Form.xml" + if (Test-Path $c) { $FormPath = $c } +} + # --- Load XML --- if (-not (Test-Path $FormPath)) { diff --git a/.claude/skills/form-validate/scripts/form-validate.py b/.claude/skills/form-validate/scripts/form-validate.py index 13042016..ff44ed1e 100644 --- a/.claude/skills/form-validate/scripts/form-validate.py +++ b/.claude/skills/form-validate/scripts/form-validate.py @@ -31,6 +31,27 @@ def main(): detailed = args.Detailed max_errors = args.MaxErrors + if not os.path.isabs(form_path): + form_path = os.path.join(os.getcwd(), form_path) + + # A: Directory → Ext/Form.xml + if os.path.isdir(form_path): + form_path = os.path.join(form_path, 'Ext', 'Form.xml') + # B1: Missing Ext/ (e.g. Forms/Форма/Form.xml → Forms/Форма/Ext/Form.xml) + if not os.path.exists(form_path): + fn = os.path.basename(form_path) + if fn == 'Form.xml': + c = os.path.join(os.path.dirname(form_path), 'Ext', fn) + if os.path.exists(c): + form_path = c + # B2: Descriptor (Forms/Форма.xml → Forms/Форма/Ext/Form.xml) + if not os.path.exists(form_path) and form_path.endswith('.xml'): + stem = os.path.splitext(os.path.basename(form_path))[0] + parent = os.path.dirname(form_path) + c = os.path.join(parent, stem, 'Ext', 'Form.xml') + if os.path.exists(c): + form_path = c + if not os.path.isfile(form_path): print(f"File not found: {form_path}", file=sys.stderr) sys.exit(1) diff --git a/.claude/skills/interface-validate/SKILL.md b/.claude/skills/interface-validate/SKILL.md index ae0eeb3e..91f645d7 100644 --- a/.claude/skills/interface-validate/SKILL.md +++ b/.claude/skills/interface-validate/SKILL.md @@ -31,9 +31,11 @@ allowed-tools: ## Команда ```powershell -powershell.exe -NoProfile -File '.claude/skills/interface-validate/scripts/interface-validate.ps1' -CIPath '' +powershell.exe -NoProfile -File ".claude/skills/interface-validate/scripts/interface-validate.ps1" -CIPath "" ``` +Можно указать директорию подсистемы — скрипт найдёт Ext/CommandInterface.xml автоматически. + ## Проверки (13) | # | Проверка | Серьёзность | diff --git a/.claude/skills/interface-validate/scripts/interface-validate.ps1 b/.claude/skills/interface-validate/scripts/interface-validate.ps1 index f153cfa9..0bd5191a 100644 --- a/.claude/skills/interface-validate/scripts/interface-validate.ps1 +++ b/.claude/skills/interface-validate/scripts/interface-validate.ps1 @@ -14,6 +14,18 @@ $ErrorActionPreference = "Stop" if (-not [System.IO.Path]::IsPathRooted($CIPath)) { $CIPath = Join-Path (Get-Location).Path $CIPath } +# A: Directory → Ext/CommandInterface.xml +if (Test-Path $CIPath -PathType Container) { + $CIPath = Join-Path (Join-Path $CIPath "Ext") "CommandInterface.xml" +} +# B1: Missing Ext/ (e.g. Subsystems/X/CommandInterface.xml → Subsystems/X/Ext/CommandInterface.xml) +if (-not (Test-Path $CIPath)) { + $fn = [System.IO.Path]::GetFileName($CIPath) + if ($fn -eq "CommandInterface.xml") { + $c = Join-Path (Join-Path (Split-Path $CIPath) "Ext") $fn + if (Test-Path $c) { $CIPath = $c } + } +} if (-not (Test-Path $CIPath)) { Write-Host "[ERROR] File not found: $CIPath" exit 1 diff --git a/.claude/skills/interface-validate/scripts/interface-validate.py b/.claude/skills/interface-validate/scripts/interface-validate.py index ee81894d..4eeb181b 100644 --- a/.claude/skills/interface-validate/scripts/interface-validate.py +++ b/.claude/skills/interface-validate/scripts/interface-validate.py @@ -94,6 +94,17 @@ def main(): if not os.path.isabs(ci_path): ci_path = os.path.join(os.getcwd(), ci_path) + # A: Directory → Ext/CommandInterface.xml + if os.path.isdir(ci_path): + ci_path = os.path.join(ci_path, 'Ext', 'CommandInterface.xml') + # B1: Missing Ext/ + if not os.path.exists(ci_path): + fn = os.path.basename(ci_path) + if fn == 'CommandInterface.xml': + c = os.path.join(os.path.dirname(ci_path), 'Ext', fn) + if os.path.exists(c): + ci_path = c + if not os.path.exists(ci_path): print(f'[ERROR] File not found: {ci_path}') sys.exit(1) diff --git a/.claude/skills/meta-validate/SKILL.md b/.claude/skills/meta-validate/SKILL.md index 627ab1e3..abcd59d5 100644 --- a/.claude/skills/meta-validate/SKILL.md +++ b/.claude/skills/meta-validate/SKILL.md @@ -33,7 +33,7 @@ allowed-tools: ## Команда ```powershell -powershell.exe -NoProfile -File .claude/skills/meta-validate/scripts/meta-validate.ps1 -ObjectPath "<путь>" +powershell.exe -NoProfile -File .claude/skills/meta-validate/scripts/meta-validate.ps1 -ObjectPath "" ``` ## Поддерживаемые типы (23) diff --git a/.claude/skills/mxl-validate/SKILL.md b/.claude/skills/mxl-validate/SKILL.md index e3b6a639..5c2e19f9 100644 --- a/.claude/skills/mxl-validate/SKILL.md +++ b/.claude/skills/mxl-validate/SKILL.md @@ -35,9 +35,11 @@ allowed-tools: ## Команда ```powershell -powershell.exe -NoProfile -File .claude/skills/mxl-validate/scripts/mxl-validate.ps1 -TemplatePath "<путь>" +powershell.exe -NoProfile -File .claude/skills/mxl-validate/scripts/mxl-validate.ps1 -TemplatePath "<.../Templates/ИмяМакета>" ``` +Можно указать директорию макета — скрипт найдёт Ext/Template.xml автоматически. + ## Проверки | # | Проверка | Серьёзность | diff --git a/.claude/skills/mxl-validate/scripts/mxl-validate.ps1 b/.claude/skills/mxl-validate/scripts/mxl-validate.ps1 index ba35f8fb..0657100e 100644 --- a/.claude/skills/mxl-validate/scripts/mxl-validate.ps1 +++ b/.claude/skills/mxl-validate/scripts/mxl-validate.ps1 @@ -22,6 +22,26 @@ if (-not $TemplatePath) { $TemplatePath = Join-Path (Join-Path (Join-Path (Join-Path (Join-Path $SrcDir $ProcessorName) "Templates") $TemplateName) "Ext") "Template.xml" } +# A: Directory → Ext/Template.xml +if (Test-Path $TemplatePath -PathType Container) { + $TemplatePath = Join-Path (Join-Path $TemplatePath "Ext") "Template.xml" +} +# B1: Missing Ext/ (e.g. Templates/Макет/Template.xml → Templates/Макет/Ext/Template.xml) +if (-not (Test-Path $TemplatePath)) { + $fn = [System.IO.Path]::GetFileName($TemplatePath) + if ($fn -eq "Template.xml") { + $c = Join-Path (Join-Path (Split-Path $TemplatePath) "Ext") $fn + if (Test-Path $c) { $TemplatePath = $c } + } +} +# B2: Descriptor (Templates/Макет.xml → Templates/Макет/Ext/Template.xml) +if (-not (Test-Path $TemplatePath) -and $TemplatePath.EndsWith(".xml")) { + $stem = [System.IO.Path]::GetFileNameWithoutExtension($TemplatePath) + $dir = Split-Path $TemplatePath + $c = Join-Path (Join-Path (Join-Path $dir $stem) "Ext") "Template.xml" + if (Test-Path $c) { $TemplatePath = $c } +} + if (-not (Test-Path $TemplatePath)) { Write-Error "File not found: $TemplatePath" exit 1 diff --git a/.claude/skills/mxl-validate/scripts/mxl-validate.py b/.claude/skills/mxl-validate/scripts/mxl-validate.py index 3cecfbbc..fcbef905 100644 --- a/.claude/skills/mxl-validate/scripts/mxl-validate.py +++ b/.claude/skills/mxl-validate/scripts/mxl-validate.py @@ -81,6 +81,24 @@ def main(): if not os.path.isabs(template_path): template_path = os.path.join(os.getcwd(), template_path) + # A: Directory → Ext/Template.xml + if os.path.isdir(template_path): + template_path = os.path.join(template_path, 'Ext', 'Template.xml') + # B1: Missing Ext/ (e.g. Templates/Макет/Template.xml → Templates/Макет/Ext/Template.xml) + if not os.path.exists(template_path): + fn = os.path.basename(template_path) + if fn == 'Template.xml': + c = os.path.join(os.path.dirname(template_path), 'Ext', fn) + if os.path.exists(c): + template_path = c + # B2: Descriptor (Templates/Макет.xml → Templates/Макет/Ext/Template.xml) + if not os.path.exists(template_path) and template_path.endswith('.xml'): + stem = os.path.splitext(os.path.basename(template_path))[0] + parent = os.path.dirname(template_path) + c = os.path.join(parent, stem, 'Ext', 'Template.xml') + if os.path.exists(c): + template_path = c + if not os.path.exists(template_path): print(f'File not found: {template_path}', file=sys.stderr) sys.exit(1) diff --git a/.claude/skills/role-validate/SKILL.md b/.claude/skills/role-validate/SKILL.md index 9f604df6..f0bd611d 100644 --- a/.claude/skills/role-validate/SKILL.md +++ b/.claude/skills/role-validate/SKILL.md @@ -1,7 +1,7 @@ --- name: role-validate description: Валидация роли 1С. Используй после создания или модификации роли для проверки корректности -argument-hint: [-Detailed] [-MetadataPath ] +argument-hint: [-Detailed] [-MaxErrors 30] [-MetadataPath ] allowed-tools: - Bash - Read @@ -25,6 +25,7 @@ allowed-tools: | RightsPath | да | — | Путь к `Rights.xml` роли | | MetadataPath | нет | — | Путь к метаданным роли (`Roles/ИмяРоли.xml`) | | Detailed | нет | — | Показывать [OK] для каждой проверки | +| MaxErrors | нет | 30 | Макс. ошибок до остановки (по умолчанию 30) | | OutFile | нет | — | Записать результат в файл (UTF-8 BOM) | **Важно:** Для кириллических путей используй `-OutFile` и читай результат через Read tool. @@ -32,9 +33,11 @@ allowed-tools: ## Команда ```powershell -powershell.exe -NoProfile -File .claude/skills/role-validate/scripts/role-validate.ps1 -RightsPath [-MetadataPath ] +powershell.exe -NoProfile -File .claude/skills/role-validate/scripts/role-validate.ps1 -RightsPath "" [-MetadataPath ""] ``` +Можно указать директорию роли — скрипт найдёт Ext/Rights.xml автоматически. + ## Проверки | # | Проверка | Серьёзность | diff --git a/.claude/skills/role-validate/scripts/role-validate.ps1 b/.claude/skills/role-validate/scripts/role-validate.ps1 index f3ba2cdd..ac26567e 100644 --- a/.claude/skills/role-validate/scripts/role-validate.ps1 +++ b/.claude/skills/role-validate/scripts/role-validate.ps1 @@ -189,6 +189,23 @@ function Find-Similar { return $result } +# --- Resolve path --- +if (-not [System.IO.Path]::IsPathRooted($RightsPath)) { + $RightsPath = Join-Path (Get-Location).Path $RightsPath +} +# A: Directory → Ext/Rights.xml +if (Test-Path $RightsPath -PathType Container) { + $RightsPath = Join-Path (Join-Path $RightsPath "Ext") "Rights.xml" +} +# B1: Missing Ext/ (e.g. Roles/МояРоль/Rights.xml → Roles/МояРоль/Ext/Rights.xml) +if (-not (Test-Path $RightsPath)) { + $fn = [System.IO.Path]::GetFileName($RightsPath) + if ($fn -eq "Rights.xml") { + $c = Join-Path (Join-Path (Split-Path $RightsPath) "Ext") $fn + if (Test-Path $c) { $RightsPath = $c } + } +} + # --- 3. Validate Rights.xml --- if (-not (Test-Path $RightsPath)) { diff --git a/.claude/skills/role-validate/scripts/role-validate.py b/.claude/skills/role-validate/scripts/role-validate.py index 688b1652..54c9a587 100644 --- a/.claude/skills/role-validate/scripts/role-validate.py +++ b/.claude/skills/role-validate/scripts/role-validate.py @@ -193,6 +193,17 @@ def main(): if not os.path.isabs(rights_path): rights_path = os.path.join(os.getcwd(), rights_path) + # A: Directory → Ext/Rights.xml + if os.path.isdir(rights_path): + rights_path = os.path.join(rights_path, 'Ext', 'Rights.xml') + # B1: Missing Ext/ + if not os.path.exists(rights_path): + fn = os.path.basename(rights_path) + if fn == 'Rights.xml': + c = os.path.join(os.path.dirname(rights_path), 'Ext', fn) + if os.path.exists(c): + rights_path = c + # --- Output helpers --- lines = [] errors = 0 diff --git a/.claude/skills/skd-validate/SKILL.md b/.claude/skills/skd-validate/SKILL.md index 6be77895..14ee3d4b 100644 --- a/.claude/skills/skd-validate/SKILL.md +++ b/.claude/skills/skd-validate/SKILL.md @@ -33,9 +33,11 @@ allowed-tools: ## Команда ```powershell -powershell.exe -NoProfile -File .claude/skills/skd-validate/scripts/skd-validate.ps1 -TemplatePath "<путь>" +powershell.exe -NoProfile -File .claude/skills/skd-validate/scripts/skd-validate.ps1 -TemplatePath "<.../Templates/ИмяМакета>" ``` +Можно указать директорию макета — скрипт найдёт Ext/Template.xml автоматически. + ## Проверки (~30) | Группа | Что проверяется | diff --git a/.claude/skills/skd-validate/scripts/skd-validate.ps1 b/.claude/skills/skd-validate/scripts/skd-validate.ps1 index 7a91890f..99e4bfa2 100644 --- a/.claude/skills/skd-validate/scripts/skd-validate.ps1 +++ b/.claude/skills/skd-validate/scripts/skd-validate.ps1 @@ -16,12 +16,28 @@ $ErrorActionPreference = "Stop" # --- Resolve path --- -if (-not $TemplatePath.EndsWith(".xml")) { - $candidate = Join-Path (Join-Path $TemplatePath "Ext") "Template.xml" - if (Test-Path $candidate) { - $TemplatePath = $candidate +if (-not [System.IO.Path]::IsPathRooted($TemplatePath)) { + $TemplatePath = Join-Path (Get-Location).Path $TemplatePath +} +# A: Directory → Ext/Template.xml +if (Test-Path $TemplatePath -PathType Container) { + $TemplatePath = Join-Path (Join-Path $TemplatePath "Ext") "Template.xml" +} +# B1: Missing Ext/ (e.g. Templates/СКД/Template.xml → Templates/СКД/Ext/Template.xml) +if (-not (Test-Path $TemplatePath)) { + $fn = [System.IO.Path]::GetFileName($TemplatePath) + if ($fn -eq "Template.xml") { + $c = Join-Path (Join-Path (Split-Path $TemplatePath) "Ext") $fn + if (Test-Path $c) { $TemplatePath = $c } } } +# B2: Descriptor (Templates/СКД.xml → Templates/СКД/Ext/Template.xml) +if (-not (Test-Path $TemplatePath) -and $TemplatePath.EndsWith(".xml")) { + $stem = [System.IO.Path]::GetFileNameWithoutExtension($TemplatePath) + $dir = Split-Path $TemplatePath + $c = Join-Path (Join-Path (Join-Path $dir $stem) "Ext") "Template.xml" + if (Test-Path $c) { $TemplatePath = $c } +} if (-not (Test-Path $TemplatePath)) { Write-Error "File not found: $TemplatePath" diff --git a/.claude/skills/skd-validate/scripts/skd-validate.py b/.claude/skills/skd-validate/scripts/skd-validate.py index 3b76d3f3..8c7b38d4 100644 --- a/.claude/skills/skd-validate/scripts/skd-validate.py +++ b/.claude/skills/skd-validate/scripts/skd-validate.py @@ -25,10 +25,23 @@ out_file = args.OutFile # ── resolve path ───────────────────────────────────────────── -if not template_path.endswith(".xml"): - candidate = os.path.join(template_path, "Ext", "Template.xml") - if os.path.exists(candidate): - template_path = candidate +# A: Directory → Ext/Template.xml +if os.path.isdir(template_path): + template_path = os.path.join(template_path, 'Ext', 'Template.xml') +# B1: Missing Ext/ (e.g. Templates/СКД/Template.xml → Templates/СКД/Ext/Template.xml) +if not os.path.exists(template_path): + fn = os.path.basename(template_path) + if fn == 'Template.xml': + c = os.path.join(os.path.dirname(template_path), 'Ext', fn) + if os.path.exists(c): + template_path = c +# B2: Descriptor (.xml → dir/Ext/Template.xml) +if not os.path.exists(template_path) and template_path.endswith('.xml'): + stem = os.path.splitext(os.path.basename(template_path))[0] + parent = os.path.dirname(template_path) + c = os.path.join(parent, stem, 'Ext', 'Template.xml') + if os.path.exists(c): + template_path = c if not os.path.exists(template_path): print(f"File not found: {template_path}", file=sys.stderr) diff --git a/.claude/skills/subsystem-validate/SKILL.md b/.claude/skills/subsystem-validate/SKILL.md index 75673663..9d4314ca 100644 --- a/.claude/skills/subsystem-validate/SKILL.md +++ b/.claude/skills/subsystem-validate/SKILL.md @@ -31,9 +31,11 @@ allowed-tools: ## Команда ```powershell -powershell.exe -NoProfile -File '.claude/skills/subsystem-validate/scripts/subsystem-validate.ps1' -SubsystemPath '<путь>' +powershell.exe -NoProfile -File ".claude/skills/subsystem-validate/scripts/subsystem-validate.ps1" -SubsystemPath "" ``` +Можно указать директорию подсистемы — скрипт найдёт XML-файл автоматически. + ## Проверки (13) | # | Проверка | Серьёзность |