-
Notifications
You must be signed in to change notification settings - Fork 125
Description
Summary
Skills today have zero CI test coverage. Contributing guidelines define structural requirements (SKILL.md, dual-platform scripts) but impose no unit testing mandate. CI pipelines are structurally blind to .github/skills/ — Pester coverage paths exclude it, PSScriptAnalyzer targets only scripts/**/*.ps1, and no Python validation pipeline exists. Contributors also have no documented process for requesting build system support when a skill requires a language not yet in CI.
This issue tracks five related gaps identified during a deep review of contributing docs, CI pipelines, and open PRs. PR #625 (in-flight) adds structural validation for skills but does not address runtime testing of skill scripts.
Gaps Addressed
Gap 1 — skills.md has no unit test requirement (High)
docs/contributing/skills.md defines skill directory structure, frontmatter, and SKILL.md sections but:
- No unit test requirement appears anywhere in the acceptance criteria.
- Rejection criteria (lines 50–56) list single-platform, duplicate functionality, and undocumented — missing tests is not a rejection criterion.
- Validation commands reference
lint:frontmatter,lint:ps,lint:md— notest:psortest:skills.
CONTRIBUTING.md lines 161–186 state "New functionality MUST include tests" and require *.Tests.ps1 for PowerShell scripts, but has no skills-specific callout linking that mandate to the skills contributing workflow.
Changes required:
- Add a "Unit Tests" section to
docs/contributing/skills.mddefining co-located test directory structure, naming convention (*.Tests.ps1), and minimum coverage expectations. - Add "Missing unit tests for executable scripts" to the rejection criteria list.
- Add a skills-specific callout in
CONTRIBUTING.mdtesting section linking todocs/contributing/skills.md. - Define the expected skill directory structure with tests:
.github/skills/<skill-name>/
├── SKILL.md
├── scripts/
│ ├── convert.ps1
│ └── convert.sh
├── tests/ ← NEW: required
│ └── convert.Tests.ps1
└── examples/
└── README.md
Gap 2 — Pester config excludes .github/skills/ from coverage (High)
scripts/tests/pester.config.ps1 lists coverage directories: linting/, security/, dev-tools/, lib/, extension/, plugins/. The .github/skills/ path is absent, meaning skill PowerShell scripts never appear in Pester code coverage reports or Codecov uploads.
Additionally, .github/workflows/pester-tests.yml discovers tests only under scripts/tests/ — skill tests co-located at .github/skills/<name>/tests/ would not be found by the current pipeline.
Changes required:
- Add
.github/skills/(or appropriate relative path) to theCodeCoverage.Patharray inpester.config.ps1. - Extend test discovery in
pester-tests.ymlto also search.github/skills/*/tests/*.Tests.ps1, or add a dedicated skill test job to the PR validation pipeline. - Consider whether a
test:skillsnpm script should be added topackage.jsonfor local developer use.
Gap 3 — PSScriptAnalyzer excludes skill scripts (High)
.github/workflows/ps-script-analyzer.yml and the linting scripts target scripts/**/*.ps1. PowerShell scripts at .github/skills/<name>/scripts/*.ps1 are outside that glob and never undergo static analysis.
Changes required:
- Expand the PSScriptAnalyzer target path to include
.github/skills/**/*.ps1. - Verify the existing
PSScriptAnalyzer.psd1ruleset applies without modification to skill scripts (it should — the rules are language-level, not path-dependent). - Update
npm run lint:psif the underlying script uses hardcoded paths rather than the workflow glob.
Gap 4 — No Python CI pipeline (Medium)
Python standards are documented extensively in AI instruction templates (uv-projects.instructions.md, python-script.instructions.md, docs/contributing/instructions.md lines 440–493) but zero implementation exists:
- No
pyproject.tomlanywhere in the repository. - No
ruff.tomlor.python-versionfile. - No CI workflow runs
ruff check,ruff format --check, orpytest. - No
uv.lockfile. - Python 3.11 is pre-installed in both devcontainer and Copilot agent environments.
The immediate risk is that a Python skill PR could merge with no automated quality gates. Issue #320 (add second skill) and the roadmap both anticipate Python-based skills.
Changes required:
- Document the skill-level
pyproject.tomltemplate indocs/contributing/skills.mdcovering ruff config (line-length=88,target-version="py311",select=["E","F","I","N","W","UP"]), pytest config, and project metadata. - Defer creating the actual CI workflow and root
pyproject.tomluntil the first Python skill PR, but ensure the contributing docs clearly describe what will be required. - Add Python to the "Supported Languages" table (see Gap 7) with status "Documented — CI pending first skill PR."
Gap 7 — No documented process for new language requests (Medium)
Contributors have no way to know which languages the build system supports, which are rejected, or how to propose adding support for a new one. The skill request issue template has no field for specifying programming language or testing requirements.
Changes required:
- Add a "Supported Languages and Tooling" table to
docs/contributing/skills.md:
| Language | Testing | Linting | Config | CI Status |
|---|---|---|---|---|
| PowerShell | Pester 5.x | PSScriptAnalyzer | PSScriptAnalyzer.psd1 (repo root) |
Active |
| Bash | Pester (wrapper) or BATS | ShellCheck | .shellcheckrc (skill-level) |
Active |
| Python | pytest | ruff | pyproject.toml (skill-level) |
Documented — CI pending |
- Add a "Requesting New Language Support" section describing the process: open a "Build System Change Request" issue → maintainer review → CI implementation before skill PRs using that language are accepted.
- Create a
.github/ISSUE_TEMPLATE/build-system-request.ymlissue template for build system change requests (language, tooling, CI integration, testing framework). - Update
.github/ISSUE_TEMPLATE/skill-request.ymlto add a "Programming Language" dropdown field. - Expand rejection criteria: "Skills using languages not listed in the supported languages table" and "Skills requiring CI tools not in the build system (must file a build system support issue first)."
Acceptance Criteria
-
docs/contributing/skills.mdincludes a unit test requirement section with directory structure, naming convention, and rejection criterion for missing tests. -
scripts/tests/pester.config.ps1CodeCoverage.Patharray includes.github/skills/(or equivalent). - PSScriptAnalyzer CI job targets
.github/skills/**/*.ps1in addition toscripts/**/*.ps1. -
docs/contributing/skills.mdincludes a supported languages table and apyproject.tomltemplate for Python skills. -
docs/contributing/skills.mdincludes a "Requesting New Language Support" section with clear process steps. -
.github/ISSUE_TEMPLATE/build-system-request.ymlexists with appropriate fields. -
.github/ISSUE_TEMPLATE/skill-request.ymlincludes a programming language dropdown. -
CONTRIBUTING.mdtesting section includes a skills-specific callout with link todocs/contributing/skills.md. - Existing
video-to-gifskill has at least one*.Tests.ps1file demonstrating the required pattern (or a follow-up issue is filed).
Related
- PR feat(skills): edit SKILL frontmatter schema, add CI validation, and documentation #625 — Skill frontmatter schema validation and CI structural checks (in-flight, does not cover runtime testing)
- PR feat(agents): add Security Champion agent with SDL and OWASP guidance #408 — Security Champion skill (no test files)
- Issue feat(skills): Update skill frontmatter schema, prompt-builder guidance, CI validation, and documentation #623 — Skill frontmatter schema update tracking issue
- Issue feat: add second skill package to expand skills library #320 — Add second skill package
- Issue feat(extension): Update extension packaging to distribute skills #251 — Extension packaging for skills distribution (v2.7.0)
Files to Modify
| File | Change |
|---|---|
docs/contributing/skills.md |
Add unit test section, supported languages table, language request process, expanded rejection criteria, Python pyproject.toml template |
CONTRIBUTING.md |
Add skills-specific testing callout |
scripts/tests/pester.config.ps1 |
Add .github/skills/ to coverage paths |
.github/workflows/ps-script-analyzer.yml |
Expand glob to include .github/skills/**/*.ps1 |
.github/workflows/pester-tests.yml |
Extend test discovery or add skill test job |
package.json |
Consider adding test:skills npm script |
.github/ISSUE_TEMPLATE/skill-request.yml |
Add programming language dropdown |
.github/ISSUE_TEMPLATE/build-system-request.yml |
New file — build system change request template |
RPI Starter Prompts
Research Phase
Research the CI coverage gap for skills in hve-core. Map how
pester.config.ps1coverage paths,pester-tests.ymltest discovery, andps-script-analyzer.ymlglobs exclude.github/skills/. Document the exact config lines that need updating. Review PR #625'sValidate-SkillStructure.ps1to understand what structural validation already covers and where runtime test validation should be added. Identify existing test patterns inscripts/tests/that should serve as the model for skill tests.
Plan Phase
Plan the changes to mandate unit testing for skills and extend CI coverage to
.github/skills/. The plan should cover: (1)docs/contributing/skills.mdupdates with unit test section, supported languages table, and language request process, (2)pester.config.ps1andpester-tests.ymlchanges for coverage and discovery, (3) PSScriptAnalyzer path expansion, (4) new issue template for build system requests, (5) skill request template language field addition, (6)CONTRIBUTING.mdskills callout. Include file paths, line numbers, and the proposed content for each change.
Implement Phase
Implement the skills unit testing mandate and CI coverage changes. Update
docs/contributing/skills.mdwith unit test requirements (co-locatedtests/directory,*.Tests.ps1naming, rejection criterion), supported languages table, Pythonpyproject.tomltemplate, and "Requesting New Language Support" section. Extendpester.config.ps1coverage paths to include.github/skills/. Expand PSScriptAnalyzer glob inps-script-analyzer.yml. Create.github/ISSUE_TEMPLATE/build-system-request.yml. Add programming language dropdown toskill-request.yml. Add skills testing callout toCONTRIBUTING.md. Runnpm run lint:mdandnpm run lint:allto validate.
Review Phase
Review the skills unit testing mandate implementation. Verify: (1)
docs/contributing/skills.mdhas a complete unit test section with directory structure, naming convention, and explicit rejection criterion, (2) the supported languages table covers PowerShell, Bash, and Python with accurate CI status, (3)pester.config.ps1includes.github/skills/in coverage paths, (4) PSScriptAnalyzer glob covers.github/skills/**/*.ps1, (5)build-system-request.ymltemplate has appropriate fields for language, tooling, CI integration, and testing framework, (6)skill-request.ymlhas a programming language dropdown, (7)CONTRIBUTING.mdlinks to skills testing docs, (8)npm run lint:mdpasses, (9) changes are consistent with PR #625's structural validation approach.