Skip to content

TASK-450587736: Scaffold alissa-python-sdk namespace-anchor package with tool extras - #1

Merged
RHDZMOTA merged 4 commits into
mainfrom
TASK-450587736-SCAFFOLD-SDK
Jul 22, 2026
Merged

TASK-450587736: Scaffold alissa-python-sdk namespace-anchor package with tool extras#1
RHDZMOTA merged 4 commits into
mainfrom
TASK-450587736-SCAFFOLD-SDK

Conversation

@RHDZMOTA

@RHDZMOTA RHDZMOTA commented Jul 21, 2026

Copy link
Copy Markdown
Member

Scaffolds the alissa-python-sdk repository for TASK-450587736, using alissa-github-review-daemon as the structural reference.

What this is

The alissa distribution: the single package that anchors the alissa import namespace and curates optional tool extras.

pip install alissa                          # SDK core, zero third-party deps
pip install 'alissa[tools.github.revloop]'  # + a tool, merged into alissa.tools.*
pip install 'alissa[all]'                   # + every curated tool

Design decisions

  • Aggregator / meta-package, not a monolith. Ships only the owned leaves alissa.sdk and alissa.utils; every namespace level (alissa, alissa.tools, ...) stays PEP 420 (no __init__.py) so separately-published tool distributions merge their alissa.tools.* subtrees into the namespace.
  • Single source of truth for extras. alissa/src/main/alissa/sdk/_tools.py::CURATED_TOOLS is read by both setup.py (extras_require) and the runtime installed_tools(), so they cannot drift. It also decouples the public extra name from the distribution name.
  • Discovery via the import machinery. installed_tools() probes curated tools with importlib.util.find_spec (correct for both editable and wheel installs) rather than pkgutil.walk_packages, which silently misses editable installs whose __path__ entries are synthetic finder hooks.
  • Console script alissa-py. Not alissa (the Alissa by Fahera CLI), and not a literal alissa.py -- a bin/alissa.py script file would shadow the importable alissa package and break its own import.
  • Shared alissa.utils.version. The version-file loader is factored out so every alissa.* distribution reuses one implementation. alissa.sdk.version dogfoods it. Downstream tools should install_requires=["alissa"]; there is 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).

Naming note

The extra is tools.github.revloop, but the distribution and module remain alissa-tools-github-reviewloop / alissa.tools.github.reviewloop -- that is what is published on PyPI (alissa-tools-github-revloop is a 404). The source package will be renamed to revloop later, to pair with a planned devloop; only the registry entry changes then.

Layout / conventions (mirrors the reference repo)

  • Monorepo-of-distributions; one distribution today (alissa/).
  • src/main + src/test, plain-text version file, MANIFEST.in.
  • Dev scripts: check-style.sh, check-types.sh, tests-unit.sh, tests-coverage.sh.
  • CI matrixed over the distribution dir: style, tests, types, wheel, publish.

Verification (local, all green)

Check Result
tests-unit.sh alissa 11 passed
tests-coverage.sh alissa 100% (60 statements)
check-style.sh alissa (pycodestyle) clean
check-types.sh alissa (mypy) no issues, 9 source files
python -m build + twine check wheel + sdist PASSED

Behavioural checks:

  • pip install -e ./alissa -> import alissa.sdk exposes __version__ matching the version file; alissa-py --version -> alissa 0.1.0.
  • installed_tools() -> ['alissa.tools.github.reviewloop'] with the tool installed (editable), [] in a clean env.
  • Package metadata: Provides-Extra: tools-github-revloop requiring alissa-tools-github-reviewloop.
  • Wheel ships alissa/sdk/* + alissa/utils/* with no alissa/__init__.py (PEP 420 intact).

Generated with Claude Code

RHDZMOTA and others added 3 commits July 20, 2026 18:27
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
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>
@RHDZMOTA
RHDZMOTA requested a review from alissa-app July 22, 2026 07:54
@RHDZMOTA
RHDZMOTA merged commit abadcb4 into main Jul 22, 2026
4 checks passed
@RHDZMOTA
RHDZMOTA deployed to PYPI Package Publishing July 22, 2026 14:16 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant