Fix skill path resolution and PyPI skill packaging.#79
Merged
rosspeili merged 1 commit intoMay 18, 2026
Conversation
Resolve registry skill IDs from SKILLWARE_SKILL_PATH, project skills/ directories, then bundled site-packages skills. Ship full skill bundles in wheels via MANIFEST.in and package-data. Add loader and packaging tests, contributor docs, and __init__.py layout for the skills package. Fixes ARPAHLS#13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #13:
SkillLoader.load_skill("category/name")failed afterpip installbecause relative paths were resolved only next to the installed package (site-packages/skills/), not the user’s project. PyPI wheels also shipped mostly.pyfiles, so bundled skills loaded with empty manifests.What changed
Core (
skillware/core/loader.py)_resolve_skill_path()with explicit search order:skill.pySKILLWARE_SKILL_PATH(multiple roots,os.pathsep-separated)skills/under the current working directory, walking up to 6 parent dirssite-packages/skills/(same layout as the repo registry)FileNotFoundErrorlisting paths tried when nothing matches.Packaging (
pyproject.toml,MANIFEST.in,skills/**/__init__.py)include-package-data = true,MANIFEST.in(graft skills), andskills = ["**/*"]so wheels includemanifest.yaml,instructions.md,card.json, and data files—no per-skillpyproject.tomlentries when adding skills.__init__.pyon category packages andoffice/pdf_form_fillerso setuptools includes the full skill tree.Tests
skills/,SKILLWARE_SKILL_PATH, env-over-cwd precedence, registry manifest non-empty, wheel contains skill YAML.test_registry_skills_have_packaging_init_filesenforces__init__.pyfor new registry skills.Docs & contributor guidance
docs/usage/README.md— “Finding skills on disk”docs/introduction.md,docs/skills/README.md, path fixes in skill catalog pagesCONTRIBUTING.md,templates/python_skill/README.md— packaging checklist (__init__.py, no pyproject edits per skill)README.md— pointer to path search order.gitignore—.ruff_cache/Why
pip install -e .skills/)skills/still found firstpip installin another appsite-packages/skills/; incomplete bundles./skills/, env var, then bundled; full manifests in wheelCI was unaffected in practice because it runs
pytestfrom a full checkout; this aligns PyPI behavior with clone behavior.How to verify
Type of Change
loader.py, etc.)Checklist (all PRs)
python -m flake8 .andpytest tests/locally (or the subset relevant to this change).New or updated skill
Skipped — no new registry skills; only empty
__init__.pyfiles for packaging layout.Constitution & Safety
No skill logic or constitutions changed. Loader behavior is path resolution only; execution semantics unchanged.
Related Issues
Fixes #13