RFC: split LoopX distributions inside the monorepo (loopx-core / loopx-workspace / capability packages) and pin top-level module growth
Problem
The loopx wheel is one distribution that installs the kernel, the CLI, 33 built-in capabilities, the chat/workspace server, and the Python side of the TS effect runtime. On main@3e443ad7c:
loopx/top level: 143 flat*.pyfiles / ~78.8k lines, including 37chat_*.pymodules and 9*_goal_mode/host packages next to the kernel.loopx/control_plane≈131k lines,loopx/capabilities≈115k lines,loopx/extensions≈44k lines in one package.pyproject.tomldeclaresdependencies = []and describes "a lightweight ... control plane", but the effect runtime requires Node.js ≥ 22.22.3 for every install, including CLI-only or kernel-only use.- Coupling is bidirectional: 52 kernel/CLI/top-level modules import
loopx.capabilities; 74 capability modules importloopx.control_plane. packages/already hosts 9 independently packaged extensions (loopx-finance-*,loopx-jev,loopx-obelisk,loopx-repo-health, ...), so the repository has two packaging conventions at once.
Effects: first-use installs pull everything; contributors cannot find module boundaries from the tree; the import-boundary tests protect control_plane inward edges but nothing stops the top level from growing.
Proposal (monorepo stays; distributions split)
Do not split the repository. Keep one repo and one PR/CI flow, especially while the TypeScript control-plane migration is in its transaction-cutover phase. Instead:
- Top-level regrouping first (pure moves + compat re-exports):
loopx/chat_*.py→loopx/chat/;loopx/*_goal_mode/→loopx/hosts/; keep import paths working through re-export shims for at least one minor release. - Architecture test "top-level file count does not grow": alongside
tests/architecture/test_control_plane_import_boundaries.py, pin the current count ofloopx/*.pyand only allow it to decrease. - Distributions:
loopx-core(kernel + CLI + minimal host adapters; Node runtime declared as an optional extra or bundled),loopx-workspace(chat server,apps/presentation, desktop), and per-capability packages migrated intopackages/behind the existingCapabilityRegistryprovider boundary. - Package graduation to separate repos is explicitly out of scope until the kernel migration is complete and a package has its own maintainers.
Acceptance sketch
pip install loopx-coreon a clean machine without Node succeeds andloopx --help/ read-only status work; effect-runtime commands report a typednode_unavailablediagnostic instead of failing at import time.loopx/*.pycount is pinned and decreasing; the architecture test fails on any new top-level module.- Existing
import loopx.chat_serverstyle imports keep working for one minor release with a deprecation note. - Capability packages moved to
packages/install/uninstall independently and off-state preserves core behavior (same rule as existing extensions).
RFC PR: https://github.com/loopx-project/loopx/pull/5073
Picking up M0 of docs/architecture/rfcs/monorepo-distribution-split-v0.md (the budget fixture plus the guard test, per Section 5 and the Section 9 row "Top-level module count never grows"): PR #5191.
Two facts measured at the current base that the RFC's own re-measurement note asks for:
ls loopx/*.py | wc -lis 147 on9eaacfbf2, not the 148 in the Section 5 example, so #5191 pins 147 — pinning 148 would admit one more top-level module on arrival.- The surface is still moving: 66 distinct top-level modules were added in the 45 days before that base, 6 of them in the last 7 days.
M1/M2 (the chat_* and *_goal_mode regroupings) are untouched here; each of them now has a number it must lower in the same PR. D1-D4 and M3+ stay with you.
Delivery checkpoint for this RFC task: M0 is shipped in #5191 on current main (ce3862e33). The top-level module-count gate should not be proposed again.
Keep this issue as the single distribution-split RFC task in the RFC map. M1/M2 moves must coordinate with active Chat/session and native-authority work; preserve the real compatibility window and do not move ownership merely to reduce a count. M3+ packaging/publication and D1–D4 retain their explicit decisions. Neither the RFC nor this checkpoint authorizes a new distribution release.