TASK-450587736: Scaffold alissa-python-sdk namespace-anchor package with tool extras - #1
Merged
Merged
Conversation
Stand up the `alissa` distribution as the single package that anchors the `alissa` import namespace and curates optional tool extras, using alissa-github-review-daemon as the structural reference. - Aggregator model: ship only the owned leaf `alissa.sdk`; keep every namespace level PEP 420 so tool distributions merge in via extras (e.g. `pip install 'alissa[tools.github.reviewloop]'`). - Extras and runtime discovery share one source of truth (_tools.py:: CURATED_TOOLS), read by both setup.py and installed_tools(). - installed_tools() probes via importlib find_spec so it is correct for both editable and wheel installs. - Console script `alissa-sdk` (not `alissa`, to avoid shadowing the Alissa by Fahera CLI). - Reference conventions: src/main + src/test, plain-text version file, dev scripts, and CI (style/tests/types/wheel/publish) matrixed over the distribution directory. TASK-450587736 Co-Authored-By: alissa-app <support@alissa.app> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A literal `alissa.py` command cannot work: the generated console-script file `bin/alissa.py` is a valid target for `import alissa` and shadows the installed `alissa` package, so `alissa.sdk` fails to import. Use `alissa-py` — same explicit "Python SDK" signal, no import collision. TASK-450587736 Co-Authored-By: alissa-app <support@alissa.app> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Factor the version-file loader into alissa.utils.version.Version so every alissa.* distribution reuses one implementation instead of re-implementing it. Adds `load()` (warn + fall back) alongside `from_path()` (strict), re-exported from `alissa.utils`. Dogfood it: alissa.sdk.version now loads the distribution's version through the shared utility — the canonical example downstream tools follow. The SDK distribution now owns two leaves (alissa.sdk, alissa.utils); both namespace levels stay PEP 420 so tools still merge in. Downstream tools should declare install_requires=["alissa"] and load their version via alissa.utils.version — no dependency cycle (base alissa requires nothing; the alissa[tools.*] extras are a separate opt-in edge) and no circular import (the SDK core never imports tool code). TASK-450587736 Co-Authored-By: alissa-app <support@alissa.app> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
RHDZMOTA
marked this pull request as ready for review
July 22, 2026 07:47
The public extra becomes `alissa[tools.github.revloop]`, ahead of renaming the source package to `revloop` (to pair with a planned `devloop`). Only the extra moves. The distribution and module stay `alissa-tools-github-reviewloop` / `alissa.tools.github.reviewloop` because that is what is published on PyPI — `alissa-tools-github-revloop` does not exist, so renaming them now would resolve to a missing distribution. The curated registry already decouples the extra name from both, so this is a one-line change there; when the source package is renamed, the other two values move with it. Verified: metadata records `Provides-Extra: tools-github-revloop` requiring alissa-tools-github-reviewloop, and discovery still resolves the module. TASK-450587736 Co-Authored-By: alissa-app <support@alissa.app> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Scaffolds the
alissa-python-sdkrepository for TASK-450587736, usingalissa-github-review-daemonas the structural reference.What this is
The
alissadistribution: the single package that anchors thealissaimport namespace and curates optional tool extras.Design decisions
alissa.sdkandalissa.utils; every namespace level (alissa,alissa.tools, ...) stays PEP 420 (no__init__.py) so separately-published tool distributions merge theiralissa.tools.*subtrees into the namespace.alissa/src/main/alissa/sdk/_tools.py::CURATED_TOOLSis read by bothsetup.py(extras_require) and the runtimeinstalled_tools(), so they cannot drift. It also decouples the public extra name from the distribution name.installed_tools()probes curated tools withimportlib.util.find_spec(correct for both editable and wheel installs) rather thanpkgutil.walk_packages, which silently misses editable installs whose__path__entries are synthetic finder hooks.alissa-py. Notalissa(the Alissa by Fahera CLI), and not a literalalissa.py-- abin/alissa.pyscript file would shadow the importablealissapackage and break its own import.alissa.utils.version. The version-file loader is factored out so everyalissa.*distribution reuses one implementation.alissa.sdk.versiondogfoods it. Downstream tools shouldinstall_requires=["alissa"]; there is no dependency cycle (basealissarequires nothing; thealissa[tools.*]extras are a separate opt-in edge) and no circular import (the SDK core never imports tool code).Naming note
The extra is
tools.github.revloop, but the distribution and module remainalissa-tools-github-reviewloop/alissa.tools.github.reviewloop-- that is what is published on PyPI (alissa-tools-github-revloopis a 404). The source package will be renamed torevlooplater, to pair with a planneddevloop; only the registry entry changes then.Layout / conventions (mirrors the reference repo)
alissa/).src/main+src/test, plain-textversionfile,MANIFEST.in.check-style.sh,check-types.sh,tests-unit.sh,tests-coverage.sh.Verification (local, all green)
tests-unit.sh alissatests-coverage.sh alissacheck-style.sh alissa(pycodestyle)check-types.sh alissa(mypy)python -m build+twine checkBehavioural checks:
pip install -e ./alissa->import alissa.sdkexposes__version__matching theversionfile;alissa-py --version->alissa 0.1.0.installed_tools()->['alissa.tools.github.reviewloop']with the tool installed (editable),[]in a clean env.Provides-Extra: tools-github-revlooprequiringalissa-tools-github-reviewloop.alissa/sdk/*+alissa/utils/*with noalissa/__init__.py(PEP 420 intact).Generated with Claude Code