fix(ci): explicit setuptools packages + SPDX license#1
Merged
Conversation
CI failed across all 4 matrix legs (ubuntu/windows × py3.11/3.12) at the `pip install -e .[dev]` step. Root cause: setuptools flat-layout auto-discovery saw lib/, hooks/, agents/, skills/, scaffold/, commands/ as top-level packages and refused to build with 'Multiple top-level packages discovered'. Fix: - Restrict packages to lib* via [tool.setuptools.packages.find] - hooks/agents/skills/scaffold/commands are plugin data, not Python packages - Switch license from deprecated TOML table to SPDX string + license-files - Pin setuptools>=77.0.0 for SPDX support Verified locally: 'pip install -e .[dev]' succeeds, 92 tests pass, ruff clean.
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.
Summary
Every CI run since v0.1.0 has been red on
pip install -e ".[dev]". Root cause: setuptools flat-layout auto-discovery seeslib/,hooks/,agents/,skills/,scaffold/,commands/at the repo root and refuses to build withMultiple top-level packages discovered in a flat-layout. Also a deprecation warning aboutproject.licenseas a TOML table.Fix
pyproject.toml:[tool.setuptools.packages.find]withinclude = ["lib*"]— onlylibis real Python code. Other top-level dirs are Claude Code plugin data (hooks.json, skill markdown, agent markdown, scaffold templates) read directly from disk by the plugin loader.license = "Apache-2.0"SPDX string +license-files = ["LICENSE"](PEP 639) — replaces the deprecated TOML-table form.setuptools>=77.0.0for PEP 639 support.Local verification
pip install -e ".[dev]"succeeds on this branch.ruff check .clean.Code review
Independent review (feature-dev:code-reviewer subagent) approved: subpackage discovery is complete (
lib,lib.compliance_templates,lib.drift_scoring), SPDX license-files change is safe at the pinned setuptools version, no silent breakage paths in the current feature set. Forward-looking note: if non-Python assets are added underlib/later (yaml templates, etc.), they'll need a[tool.setuptools.package-data]stanza to ship in wheels.Test plan
pip install -e ".[dev]"succeedspytest -q— 92/92 passingruff check .clean🤖 Generated with Claude Code