feat(validate): auto-resolve directory paths, fix SKILL.md placeholders

Scripts now accept directory paths (e.g. Forms/ИмяФормы) and auto-resolve
to the target XML file. Silent fallbacks handle missing Ext/ level and
descriptor-to-file resolution. SKILL.md: concrete placeholders, unified
quotes, auto-resolve notes, role-validate MaxErrors in params.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-03-09 18:41:38 +03:00
parent 422e397381
commit b2a2534b5a
19 changed files with 191 additions and 18 deletions
@@ -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
@@ -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)