Summary
The repository uses npm run scripts as the canonical interface for all validation commands (lint:md, lint:ps, test:ps, etc.). Python has no equivalent entries, meaning developers and CI workflows have no standardized way to run Python linting or testing. Adding lint:py, lint:py:fix, and test:py scripts creates developer-facing commands that mirror the existing patterns.
Context
The codebase convention documented in copilot-instructions.md states that all scripts used by the codebase have an npm run script for ease of use. The Coding Agent environment section lists specific npm run commands that agents should use for validation. Without Python entries, neither human developers nor AI agents have discoverable commands for Python quality gates.
These scripts should invoke ruff for linting and pytest for testing via uv run to ensure the correct virtual environment is used. The lint:all composite script should also be updated to include lint:py.
Architecture: Multi-Skill Discovery
Each Python skill maintains its own pyproject.toml. Rather than hardcoding paths, npm scripts should use find-based discovery to automatically locate and iterate over all Python skill directories. This scales to N skills without per-skill configuration changes.
Changes Required
| File |
Change |
package.json |
Add lint:py script using find-based discovery |
package.json |
Add lint:py:fix script using find-based discovery |
package.json |
Add test:py script using find-based discovery |
package.json |
Update lint:all to include lint:py in the chain |
Example entries using dynamic discovery:
{
"lint:py": "find .github/skills -name pyproject.toml -execdir uv run ruff check . ';'",
"lint:py:fix": "find .github/skills -name pyproject.toml -execdir uv run ruff format . ';'",
"test:py": "find .github/skills -name pyproject.toml -execdir uv run pytest ';'"
}
The find -execdir pattern runs each command in the directory containing the pyproject.toml, ensuring uv resolves the correct virtual environment per skill. Adding a new Python skill with a pyproject.toml causes it to be discovered by all scripts automatically.
Acceptance Criteria
Dependencies
Related
Summary
The repository uses
npm runscripts as the canonical interface for all validation commands (lint:md,lint:ps,test:ps, etc.). Python has no equivalent entries, meaning developers and CI workflows have no standardized way to run Python linting or testing. Addinglint:py,lint:py:fix, andtest:pyscripts creates developer-facing commands that mirror the existing patterns.Context
The codebase convention documented in
copilot-instructions.mdstates that all scripts used by the codebase have annpm runscript for ease of use. The Coding Agent environment section lists specificnpm runcommands that agents should use for validation. Without Python entries, neither human developers nor AI agents have discoverable commands for Python quality gates.These scripts should invoke
rufffor linting andpytestfor testing viauv runto ensure the correct virtual environment is used. Thelint:allcomposite script should also be updated to includelint:py.Architecture: Multi-Skill Discovery
Each Python skill maintains its own
pyproject.toml. Rather than hardcoding paths, npm scripts should usefind-based discovery to automatically locate and iterate over all Python skill directories. This scales to N skills without per-skill configuration changes.Changes Required
package.jsonlint:pyscript usingfind-based discoverypackage.jsonlint:py:fixscript usingfind-based discoverypackage.jsontest:pyscript usingfind-based discoverypackage.jsonlint:allto includelint:pyin the chainExample entries using dynamic discovery:
{ "lint:py": "find .github/skills -name pyproject.toml -execdir uv run ruff check . ';'", "lint:py:fix": "find .github/skills -name pyproject.toml -execdir uv run ruff format . ';'", "test:py": "find .github/skills -name pyproject.toml -execdir uv run pytest ';'" }The
find -execdirpattern runs each command in the directory containing thepyproject.toml, ensuring uv resolves the correct virtual environment per skill. Adding a new Python skill with apyproject.tomlcauses it to be discovered by all scripts automatically.Acceptance Criteria
npm run lint:pyexecutes ruff check against Python files in all skill directoriesnpm run lint:py:fixapplies auto-fixable ruff corrections across all skill directoriesnpm run test:pyexecutes pytest against Python test files in all skill directoriesnpm run lint:allincludeslint:pyin its execution chainpyproject.tomlis automatically discovered without script changesDependencies
uvto be available in the execution environment (addressed by feat(devcontainer): Add Python development extensions and uv package manager #887 for devcontainer, feat(ci): Add uv and Python package sync to copilot-setup-steps #888 for Copilot Agent)pyproject.tomlmust exist for commands to have targets (PR feat(skills): add PowerPoint automation skill with YAML-driven deck generation #868)Related