test(skills): verify reduced catalog handling
This commit is contained in:
1 parent
05663197f7
commit
f7eec43122
4 files changed
+16
No files matched your search
@@ -80,6 +80,14 @@ class SelectionTests(unittest.TestCase):
|
||||
self.assertTrue(state['statusline'])
|
||||
self.assertIn('semantic_retrieval\ttrue', self.run_state('read', '--format', 'tsv').stdout)
|
||||
|
||||
def test_legacy_skill_profile_is_ignored(self):
|
||||
self.save()
|
||||
state = json.loads(self.run_state('read').stdout)
|
||||
state['skill_profile'] = 'core'
|
||||
self.path.write_text(json.dumps(state))
|
||||
self.assertNotIn('skill_profile', json.loads(self.run_state('read').stdout))
|
||||
self.assertNotIn('skill_profile', self.run_state('read', '--format', 'tsv').stdout)
|
||||
|
||||
def test_invalid_write_preserves_last_selection(self):
|
||||
self.save('--selected', 'Superpowers')
|
||||
original = self.path.read_bytes()
|
||||
|
||||
@@ -48,6 +48,7 @@ foreach ($shell in @('powershell','bash')) {
|
||||
if ($client -eq 'claude' -and (Get-Content (Join-Path $package 'agents/reviewer.md') -Raw) -notmatch "(?m)^tools: Read,Grep,Glob,$expectedReviewerShellTool\r?`$") { throw "Reviewer capability profile is missing in $package" }
|
||||
$expectedSkillCount = if ($client -eq 'claude') { $sourceSkillCount + $ruleSkillCount } else { $sourceSkillCount }
|
||||
if (@(Get-ChildItem "$package/skills" -Filter SKILL.md -Recurse).Count -ne $expectedSkillCount) { throw "Missing skills in $package" }
|
||||
if (-not (Test-Path "$package/skills/debugging/SKILL.md") -or -not (Test-Path "$package/skills/copywriting/SKILL.md") -or -not (Test-Path "$package/skills/marketing-psychology/SKILL.md") -or -not (Test-Path "$package/skills/image/SKILL.md") -or (Test-Path "$package/skills/marketing-plan/SKILL.md") -or (Test-Path "$package/skills/social/SKILL.md")) { throw "Incorrect skill catalog in $package" }
|
||||
$expected = if ($shell -eq 'powershell') { '__POWERSHELL_COMMAND__ .*flashbang.ps1' } else { 'bash .*flashbang.sh' }
|
||||
if ($content -notmatch $expected -or $content -match '__HOOK_|__POWERSHELL_HOOK_') { throw "Incorrect shell command in $package" }
|
||||
if ($shell -eq 'powershell' -and $content -match 'WindowStyle\s+Hidden') { throw "PowerShell hook hides the terminal in $package" }
|
||||
|
||||
@@ -55,6 +55,12 @@ for shell in powershell bash; do
|
||||
expected_skill_count=$source_skill_count
|
||||
[ "$client" != claude ] || expected_skill_count=$((source_skill_count + rule_skill_count))
|
||||
test "$(find "$package/skills" -name SKILL.md | wc -l)" -eq "$expected_skill_count"
|
||||
test -f "$package/skills/debugging/SKILL.md"
|
||||
test -f "$package/skills/copywriting/SKILL.md"
|
||||
test -f "$package/skills/marketing-psychology/SKILL.md"
|
||||
test -f "$package/skills/image/SKILL.md"
|
||||
test ! -e "$package/skills/marketing-plan/SKILL.md"
|
||||
test ! -e "$package/skills/social/SKILL.md"
|
||||
if [ "$shell" = powershell ]; then
|
||||
grep -q '__POWERSHELL_COMMAND__ .*flashbang.ps1' "$package/$file"
|
||||
! grep -Eq 'WindowStyle[[:space:]]+Hidden' "$package/$file"
|
||||
|
||||
Reference in new issue
Block a user