feat(cli): modules from any git repo — smpy add / smpy update - #266
Merged
Conversation
Approved brainstorm outcome: smpy add/update over [tool.uv.sources], multi-module repo scan, lockstep v* tag convention, wizard integration. Claude-Session: https://claude.ai/code/session_01HMniW4BEhpumUTFnWZVKVc
3 tasks
antosubash
marked this pull request as ready for review
August 20, 2026 09:51
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
Makes any git repo (and local path) a first-class module source alongside PyPI, per the approved design in
docs/superpowers/specs/2026-08-19-git-module-sources-design.md(implementation plan:docs/superpowers/plans/2026-08-19-git-module-sources.md).smpy add <spec>— accepts a PyPI requirement,git+URL[@tag|branch|sha][#subdirectory=dir], or a local path. Writes a normal named dependency plus a[tool.uv.sources]redirect (tomlkit, format-preserving; nothing written until git resolution succeeds), then runsuv sync→smpy host gen-pages→smpy host sync-js-deps→ entry-point verification. Prints a one-line security notice on the first git source and a migration reminder for modules shipping models.#subdirectoryis scanned for packages declaring[project.entry-points.simple_module]; several matches go through an interactive picker or--module a,b/--all.smpy update [name]— moves git-sourced modules to the newestv*semver tag satisfying the host's declared range, group-wise per repo (one repo, one ref). Branch pins re-lock to the newest SHA and are labeled dev-mode; PyPI-sourced names delegate touv lock --upgrade-package.smpy newwizard gains an 'Add modules from a git URL?' step;smpy newandsmpy create-hostgain a repeatable--git-moduleflag.vX.Y.Ztag convention, multi-module layout, private-repo auth); host README template and framework-conventions updated.No loader or frontend changes needed: entry-point discovery and the npm-alias pipeline were already source-agnostic.
Test plan
make test(1945 py + 48 js) andmake lint(ruff format/check, ty, Biome, tsc, 300-line cap).smpy add git+file://…against a two-module repo wrote both sources sharing one tag;smpy update --dry-runpicked up the next tag for the whole group.https://claude.ai/code/session_01HMniW4BEhpumUTFnWZVKVc