feat(skills): reworked skills and rules
CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 14s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 14s
CI / PowerShell tests on Ubuntu (push) Successful in 1m4s
CI / Installed client configuration smoke tests (push) Successful in 33s
CI / Bash integration and installation guards (push) Successful in 1m1s
CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 14s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 14s
CI / PowerShell tests on Ubuntu (push) Successful in 1m4s
CI / Installed client configuration smoke tests (push) Successful in 33s
CI / Bash integration and installation guards (push) Successful in 1m1s
This commit is contained in:
1 parent
29632ff0ce
commit
f5d8f6f11b
124 files changed
+1250
-8138
No files matched your search
@@ -115,6 +115,20 @@ class SearchReminderTests(unittest.TestCase):
|
||||
self.assertIn('additionalContext', self.search(session='s2', tool='Bash', command='rg Tile'))
|
||||
self.assertNotIn('s1', ' '.join(p.name for p in (self.home / '.my-ai-configuration/state/search-reminder').iterdir()))
|
||||
|
||||
def test_reminds_again_after_repeated_searches_without_qmd(self):
|
||||
self.assertIn('additionalContext', self.search())
|
||||
outputs = [self.search(tool='Grep') for _ in range(10)]
|
||||
self.assertEqual([''] * (10 - 1), outputs[:-1])
|
||||
self.assertIn('additionalContext', outputs[-1])
|
||||
|
||||
def test_qmd_use_resets_the_repeat_counter(self):
|
||||
self.assertIn('additionalContext', self.search())
|
||||
for _ in range(10 - 1):
|
||||
self.search(tool='Grep')
|
||||
query = 'node "$HOME/.my-ai-configuration/qmd/qmd-search.mjs" --query "Where are tests?" --top-k 5'
|
||||
self.assertEqual(self.search(tool='Bash', command=query), '')
|
||||
self.assertEqual(self.search(tool='Grep'), '')
|
||||
|
||||
def test_detects_shell_searches(self):
|
||||
searches = ('rg Tile', 'git grep -n x', 'find . -name "*.csproj"', 'grep -r xunit src',
|
||||
'Get-ChildItem -Recurse -Filter *.csproj', 'Get-Content a.cs | Select-String Test', 'cd src && fd test')
|
||||
|
||||
@@ -55,7 +55,9 @@ foreach ($shell in @('powershell','bash')) {
|
||||
if (@(Get-ChildItem "$package/skills" -Filter SKILL.md -Recurse).Count -ne $expectedSkillCount) { throw "Missing skills in $package" }
|
||||
$securityReview = if ($client -eq 'claude') { 'skills/security-review/SKILL.md' } else { 'skills/reviews/security-review/SKILL.md' }
|
||||
if ($client -eq 'claude' -and @(Get-ChildItem "$package/skills" -Filter SKILL.md -Recurse | Where-Object { $_.Directory.Parent.FullName -ne (Resolve-Path "$package/skills").Path }).Count) { throw "Nested Claude skills in $package" }
|
||||
if ((Test-Path "$package/skills/debugging/SKILL.md") -or -not (Test-Path "$package/$securityReview") -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" }
|
||||
if ((Test-Path "$package/skills/debugging/SKILL.md") -or -not (Test-Path "$package/$securityReview") -or (Test-Path "$package/skills/copywriting/SKILL.md") -or (Test-Path "$package/skills/cro/SKILL.md") -or -not (Test-Path "$package/skills/media/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" }
|
||||
$diagnostics = if ($client -eq 'claude') { 'skills' } else { 'skills/diagnostics' }
|
||||
foreach ($skill in @('incident-investigation','performance-measure')) { if (-not (Test-Path "$package/$diagnostics/$skill/SKILL.md")) { throw "Missing $skill 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" }
|
||||
|
||||
@@ -68,9 +68,13 @@ for shell in powershell bash; do
|
||||
else
|
||||
test -f "$package/skills/reviews/security-review/SKILL.md"
|
||||
fi
|
||||
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/copywriting/SKILL.md"
|
||||
test ! -e "$package/skills/cro/SKILL.md"
|
||||
test -f "$package/skills/media/SKILL.md"
|
||||
diagnostics="$package/skills/diagnostics"
|
||||
[ "$client" != claude ] || diagnostics="$package/skills"
|
||||
test -f "$diagnostics/incident-investigation/SKILL.md"
|
||||
test -f "$diagnostics/performance-measure/SKILL.md"
|
||||
test ! -e "$package/skills/marketing-plan/SKILL.md"
|
||||
test ! -e "$package/skills/social/SKILL.md"
|
||||
if [ "$shell" = powershell ]; then
|
||||
|
||||
Reference in new issue
Block a user