Python Package Ownership
July 30, 2026 ยท View on GitHub
Base keeps Python code in focused packages under cli/python/ and shared
runtime helpers under lib/python/. The reusable base_cli framework is
maintained in the standalone base-cli repository; Base owns only its provider
selection and command integration. Package boundaries should follow product
responsibility, not file size.
Current Boundaries
| Package | Primary responsibility | Notes |
|---|---|---|
base_setup | Setup reconciliation, manifest parsing, project diagnostics, project routing, and compatibility facades for older imports. | Keep setup/check/doctor behavior here. Do not add adapter-specific schema generation here when a focused package can own it. |
base_devcontainer | Dev Containers export from Base manifests. | Owns generated devcontainer.json shape, unsupported/ambiguous field reporting, guarded writes, and text/JSON export rendering through base_devcontainer.export. |
base_devenv | Nix/devenv compatibility reporting from Base manifests. | Owns supported/unsupported/lossy/project-owned classification, summary counts, and text/JSON report rendering through base_devenv.report. |
Extraction Rules
- Preserve public
basectlcommand behavior while moving implementation ownership. - Keep compatibility facades in
base_setupwhen existing internal callers may still import historical module names. - Keep shared manifest models and loaders in
base_setupuntil there is a broader manifest package boundary. - Add structure tests when a package becomes the primary owner for a surface.