-
Notifications
You must be signed in to change notification settings - Fork 129
Description
Summary
The skill validator (Validate-SkillStructure.ps1) does not recognize Python skill conventions. It treats Python package directories as unrecognized subdirectories (triggering warnings) and flags .py files in scripts/ without companion .ps1 or .sh files as errors. These are structural blockers that must be resolved before a Python skill can pass validation.
Context
Validate-SkillStructure.ps1 (500+ lines) enforces a recognized directory list:
$RecognizedSubdirectories = @('scripts', 'references', 'assets', 'examples', 'tests')Python skills add directories not on this list (e.g., powerpoint_skill/ as a Python package directory). The validator also expects script files to include at least one .ps1 or .sh file, which conflicts with pure-Python skills that only have .py files in scripts/.
This is a structural blocker for the Python build system series. Without these changes, the skill validator fails on any Python-containing skill, breaking npm run validate:skills and CI validation.
Changes Required
| File | Change |
|---|---|
scripts/collections/Validate-SkillStructure.ps1 |
Detect pyproject.toml and switch to language-aware validation mode |
scripts/collections/Validate-SkillStructure.ps1 |
Accept Python package directories when a pyproject.toml is present |
scripts/collections/Validate-SkillStructure.ps1 |
Accept .py-only scripts/ directories for Python skills |
The validator should detect the presence of pyproject.toml in a skill root directory and apply Python-aware rules:
- Python package directories (containing
__init__.py) are valid subdirectories .pyfiles inscripts/do not require companion.ps1/.shfiles- Standard Python project files (
pyproject.toml,uv.lock,.python-version) are recognized - Existing validation for non-Python skills remains unchanged
Acceptance Criteria
- Skills with
pyproject.tomlpass validation without false warnings about unrecognized directories - Python package directories (with
__init__.py) are accepted as valid subdirectories -
.pyfiles inscripts/are valid without requiring.ps1/.shcompanion files for Python skills -
pyproject.toml,uv.lock, and.python-versionare recognized as valid skill root files - Non-Python skills continue to be validated with existing rules (no regressions)
-
npm run validate:skillspasses with the PowerPoint skill from PR feat(skills): add PowerPoint automation skill with YAML-driven deck generation #868
Dependencies
- This is a structural blocker: should be implemented before or alongside the first Python skill merge (PR feat(skills): add PowerPoint automation skill with YAML-driven deck generation #868)
Related
- PR feat(skills): add PowerPoint automation skill with YAML-driven deck generation #868 — PowerPoint automation skill (first Python skill, blocked by this issue)
- feat(ci): Add Python file extensions to copyright/SPDX header validation #883 — Copyright/SPDX header validation for Python
- feat(scripts): Add npm run scripts for Python linting and testing #886 — npm scripts for Python
- feat(ci): Add Python linting CI workflow with ruff #889 — Python linting CI workflow
- feat(workflows): Add Python testing CI workflow with pytest and Codecov integration #890 — Python testing CI workflow