Files
troupe-standup/wizard-work/spark/verify_skills3.py
T

42 lines
1.4 KiB
Python

#!/usr/bin/env python3
import json
from pathlib import Path
# Read the inventory
inv_path = Path('/root/.hermes/wizard-outputs/spark/skills_inventory.json')
data = json.loads(inv_path.read_text())
skills = data.get('skills', [])
print(f"Total skills in inventory: {len(skills)}")
# Count actual SKILL.md files
skill_md_files = list(Path('/root/.hermes/profiles/spark/skills').rglob('SKILL.md'))
print(f"Actual SKILL.md files found: {len(skill_md_files)}")
# Get the names from the inventory
inventoried_names = set(s.get('name') for s in skills)
# Get the actual skill directories (parent of SKILL.md)
actual_names = set()
for f in skill_md_files:
# The skill name is the parent directory of the SKILL.md file
skill_name = f.parent.name
actual_names.add(skill_name)
print(f"Actual skill directories with SKILL.md: {len(actual_names)}")
# Compare
missing_from_actual = inventoried_names - actual_names
extra_in_actual = actual_names - inventoried_names
print(f"\nSkills in inventory but not in actual: {len(missing_from_actual)}")
if missing_from_actual:
print(" ", sorted(missing_from_actual)[:10])
print(f"Skills in actual but not in inventory: {len(extra_in_actual)}")
if extra_in_actual:
print(" ", sorted(extra_in_actual)[:10])
# All skills have has_skill_md: true in inventory?
all_have_skill_md = all(s.get('has_skill_md') == True for s in skills)
print(f"\nAll skills in inventory have has_skill_md=true: {all_have_skill_md}")