corrections
CI / CI configuration security checks (push) Successful in 6s
CI / Python tests and compilation (push) Failing after 12s
CI / QMD unit tests (push) Skipped
CI / Capabilities and shell quality (push) Successful in 1m50s
CI / Build and inspect generated packages (push) Skipped
CI / Bash integration and installation guards (push) Skipped
CI / Installed client configuration smoke tests (push) Skipped
CI / PowerShell tests on Ubuntu (push) Failing after 7m24s

This commit is contained in:
Julian Lechner committed 2026-11-19 10:30:43 +01:00
1 parent b35e2254b3
commit c3e22eb902
39 files changed
+246 -151

No files matched your search

+12 -1
View File
@@ -51,9 +51,12 @@ foreach ($pluginEntry in $pluginEntries) {
if (-not (Test-Path -LiteralPath $capabilityManifest)) { throw "Missing capability manifest: $capabilityManifest" }
$agentTools = @{}
$agentSkills = @{}
foreach ($entry in @(Import-Csv -LiteralPath $capabilityManifest -Delimiter ([char]9))) {
if ([string]::IsNullOrWhiteSpace($entry.role) -or [string]::IsNullOrWhiteSpace($entry.tools)) { throw 'Invalid capability manifest row.' }
$agentTools[$entry.role] = $entry.tools
# Optional: skills whose full content Claude preloads into the subagent at startup.
$agentSkills[$entry.role] = @(([string]$entry.skills).Split(',') | ForEach-Object { $_.Trim() } | Where-Object { $_ })
}
# Build into a private sibling directory and swap it into place only after validation, so a failed
@@ -171,7 +174,14 @@ foreach ($shell in @('powershell','bash')) {
$ruleContent = Get-Content $ruleSkill.Body -Raw
$ruleTitle = (Get-Content $ruleSkill.Body | Where-Object { $_ -match '^#+\s+' } | Select-Object -First 1) -replace '^#+\s+', ''
if ([string]::IsNullOrWhiteSpace($ruleTitle)) { throw "Missing rule title in $($ruleSkill.Body)" }
$ruleDescription = "Use when the task concerns $ruleTitle."
# The rule's opening "Apply ..."/"For ..." sentence states when it applies; it is a better trigger than the title.
$ruleLead = Get-Content $ruleSkill.Body | Where-Object { $_.Trim() -and $_ -notmatch '^#' } | Select-Object -First 1
if ($ruleLead -match '^(Apply|For)\s') {
$sentenceEnd = $ruleLead.IndexOf('. ')
$ruleDescription = if ($sentenceEnd -ge 0) { $ruleLead.Substring(0, $sentenceEnd + 1) } else { $ruleLead.TrimEnd() }
} else {
$ruleDescription = "Use when the task concerns $ruleTitle."
}
$skillBody = "---`r`nname: $($ruleSkill.Name)`r`ndescription: $(Quote-Toml $ruleDescription)`r`n---`r`n`r`n$ruleContent"
Set-Content (Join-Path $skillDir 'SKILL.md') $skillBody -Encoding UTF8
if ($ruleSkill.References -and (Test-Path -LiteralPath $ruleSkill.References)) {
@@ -206,6 +216,7 @@ foreach ($shell in @('powershell','bash')) {
if ($tools) { $tools = Expand-ShellPlaceholders $tools $shell }
$frontmatter = "---`r`nname: $name`r`ndescription: $description`r`n"
if ($tools) { $frontmatter += "tools: $tools`r`n" }
if ($agentSkills[$name]) { $frontmatter += "skills:`r`n" + (($agentSkills[$name] | ForEach-Object { " - $_`r`n" }) -join '') }
Set-Content (Join-Path $agentsOutput "$name.md") ($frontmatter + "---`r`n`r`n$instructions") -Encoding UTF8
}
}